/* SliceFleet for WooCommerce - front end widget styles.
 *
 * The quote experience follows an established dialog layout and
 * visual language - navy header, part cards, colour popover,
 * tier cards, gold pill buttons and progress strip. Class names
 * keep the sfw- prefix so the plugin can run alongside other
 * tools on the same page without colliding with their rules.
 *
 * Since v2.3.0 the experience renders inline on the page: the
 * panel (the dialog DOM, still carrying the sfw-popup* classes)
 * sits in the page flow under the entry, in the admin-chosen
 * presentation - "designed" (branded drop zone), "simple" (one
 * upload button) or "custom" (no plugin trigger; the shop's own
 * element opens the picker). The .sfw-panel rules below take
 * away the fixed overlay, the viewport sizing and the internal
 * scroll region; everything inside the panel is the dialog's
 * styling unchanged.
 *
 * v2.4.0: the panel carries no window chrome (the header is just
 * the model name) and the ready view is zoned - at split widths
 * the viewer with the quoted results under it forms the left
 * column and all settings sit in the right rail; below the split
 * the zones stack viewer, settings, results.
 *
 * v2.6.0: the results leave the left column - at split widths
 * they span the full panel width as a band below BOTH columns
 * (viewer and settings keep their two columns above it), and
 * the quote details inside the band render as a compact grid
 * of label/value cells by default, with a shop setting
 * (details layout) to switch them back to the stacked list.
 *
 * v2.5.2: ultrawide is designed, not accidental - the mount has
 * no width ceiling, and a dedicated tier at 1900px of container
 * width widens the rail and groups its controls into sub-columns
 * so a 2560px embed gets the same organized layout, wider.
 */

/* --- shortcode mount and notices ---
   Carried over so the mount never shows an unstyled flash before
   the widget boots. */

.sfw-quote {
	/* Fallback layer for the tenant appearance colours. The
	   widget sets these two custom properties inline on this
	   element from the shop's settings on construction; the
	   literals here are the default theme's colours (Generic,
	   #1F2937 / #D97706), so an un-configured or pre-JS render
	   already matches. Every
	   brand-colour rule below reads the variables (derived
	   shades and tints via color-mix); text navies, greys,
	   error reds and success greens stay literal - they are
	   neutrals and states, not brand colours. */
	--sfw-primary: #1F2937;
	--sfw-accent: #D97706;
	/* No width ceiling (v2.5.2, replacing the v2.4.0 1560px
	   cap): the panel fills whatever width the embedder gives
	   it, so on an ultrawide embed both layout columns stretch
	   to fill the space instead of stopping at a cap with dead
	   room at the sides. A store's content column is the normal
	   limit; only a full-bleed embed on a very wide monitor
	   reaches the ultrawide tiers below. */
	max-width: none;
	margin: 0 auto;
	/* The mount is the responsive container: the dialog layout
	   adapts to the width the embedder gives the widget (see
	   the @container blocks at the end of this file), not to
	   the viewport. Embedders can widen the mount (the demo
	   does) to reach the wide layout. */
	container-type: inline-size;
}

.sfw-notice {
	border: 1px solid #dcdcde;
	background: #f6f7f7;
	padding: 12px 16px;
	border-radius: 4px;
}

/* --- page entry (drop a file, open the dialog) --- */

.sfw-entry {
	border: 2px solid #d5dce8;
	border-radius: 12px;
	background: #f4f6fa;
	padding: 22px 18px;
	text-align: center;
	color: #16294d;
}

/* Hide-upload-trigger (v2.7.0): the entry renders nothing of
   its own in this mode (just the file input), so its box goes
   entirely - the empty quote panel below is the whole surface. */
.sfw-widget.sfw-hide-trigger .sfw-entry {
	display: none;
}

/* Self-contained presentations (v2.13.0 redesign): Designed
   and Simple render no external upload box at all - the
   preview's empty state is the upload surface - so the entry
   element (which now holds only the file input) goes entirely.
   Only the Custom presentation's fallback button, when it has
   to render, brings the entry back. */
.sfw-widget.sfw-self-contained .sfw-entry {
	display: none;
}

.sfw-entry.sfw-dragging {
	border-color: var(--sfw-accent);
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
}

.sfw-entry-title {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 700;
	color: #16294d;
}

.sfw-entry-note {
	margin: 0 0 14px;
	font-size: 14px;
	color: #5a6a86;
}

.sfw-entry-btn {
	display: inline-block;
	padding: 12px 24px;
	background: var(--sfw-accent);
	color: var(--sfw-primary);
	border: 1px solid var(--sfw-accent);
	border-radius: 999px;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	min-height: 48px;
	cursor: pointer;
}

.sfw-entry-btn:hover {
	filter: brightness(1.07);
}

/* The sample file button (v2.5.0): an outline sibling of the
   entry's solid button - same pill, NO background colour in any
   state, primary border and text, so it reads quieter than the
   solid Choose a file button beside it. It sits beside the main
   button in the entry (a small gap; the designed entry centres
   the pair, the simple entry left-aligns it). The compound
   selector and the explicit state rules pin the transparent
   fill even where a host stylesheet (or the base class) would
   otherwise fill it (v2.5.1). */
.sfw-entry-btn.sfw-entry-btn-outline {
	background: transparent;
	color: var(--sfw-primary);
	border: 1.5px solid var(--sfw-primary);
	margin-left: 10px;
}

.sfw-entry-btn.sfw-entry-btn-outline:hover,
.sfw-entry-btn.sfw-entry-btn-outline:focus,
.sfw-entry-btn.sfw-entry-btn-outline:active {
	background: transparent;
}

.sfw-entry-btn.sfw-entry-btn-outline:disabled {
	opacity: 0.6;
	cursor: wait;
	transform: none;
	box-shadow: none;
}

.sfw-sample-note {
	margin: 10px 0 0;
	font-size: 13.5px;
	color: #9c2b2e;
}

/* --- pre-upload empty state (v2.5.0) ---
   Shown only before the first model, in the upfront master
   behaviour: the viewer box carries a centred placeholder line,
   and the results area shows a dashed empty-state box where the
   quote will land. The settings between them are live controls,
   not placeholders. */

.sfw-viewer-empty {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	text-align: center;
	padding: 24px 20px;
	color: #8494ab;
}

/* The empty state's furniture (v2.13.0 redesign): the upload
   prompt and its two actions, composed inside the preview.
   The whole empty viewer stays a click and drop target (the
   viewer opens the picker on click); the buttons are real
   buttons inside it, so keyboard and touch users get proper
   targets. */
.sfw-viewer-empty-icon {
	display: inline-flex;
	color: #8494ab;
}

.sfw-viewer-empty-icon svg {
	width: 40px;
	height: 40px;
	display: block;
}

.sfw-viewer-empty-title {
	margin: 2px 0 0;
	font-size: 17px;
	font-weight: 800;
	color: #16294d;
}

.sfw-viewer-empty-note {
	margin: 0;
	font-size: 13.5px;
	font-weight: 600;
	color: #8494ab;
}

.sfw-viewer-empty-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 10px;
	margin-top: 10px;
}

.sfw-viewer-upload-btn {
	background: var(--sfw-accent);
	color: var(--sfw-primary);
	border: 1px solid var(--sfw-accent);
	border-radius: 999px;
	padding: 12px 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 800;
	cursor: pointer;
	min-height: 48px;
}

.sfw-viewer-upload-btn:hover {
	filter: brightness(1.07);
}

.sfw-viewer-sample-btn {
	background: transparent;
	color: var(--sfw-primary);
	border: 1.5px solid var(--sfw-primary);
	border-radius: 999px;
	padding: 12px 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	min-height: 48px;
}

.sfw-viewer-sample-btn:hover {
	background: color-mix(in srgb, var(--sfw-primary) 7%, transparent);
}

.sfw-viewer-sample-btn:disabled {
	opacity: 0.55;
	cursor: default;
}

.sfw-viewer-empty .sfw-sample-note {
	margin: 6px 0 0;
}

/* A file dragged over the viewer lights it as the target. */
.sfw-viewer.sfw-dragging {
	outline: 2px dashed var(--sfw-accent);
	outline-offset: -10px;
	background: color-mix(in srgb, var(--sfw-accent) 9%, #f2f4f8);
}

/* The empty viewer is a click target (v2.7.0): a click
   anywhere on it opens the file picker. */
.sfw-quote .sfw-viewer.is-clickable {
	cursor: pointer;
}

/* Pre-upload placeholder for the results area (v2.7.7): a
   skeleton of the totals footer. It mirrors .sfw-popup-footer
   rule for rule - same strip, padding, border and gap. Since
   v2.8.1 the button piece is the footer's own element in a
   waiting state rather than a grey bar: a greyed-out Add to
   Cart button with its label showing. Since v2.8.2 the total
   spot carries a short generic status line ("Waiting for
   your model") in the slicing status lines' font treatment
   instead of a dashed fake of the price sentence; its line
   box still reserves the price line's height (see the strut
   below), so when the real footer replaces the skeleton
   nothing else on the page has to move. */
.sfw-results-skeleton {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border-top: 1px solid #e3e8f0;
	background: #f8fafc;
}

.sfw-skeleton-line {
	/* A short generic status line in the slicing status
	   lines' register (.sfw-progress-text: 14px, 700), in
	   the skeleton's muted colour - no fake price sentence,
	   no background. Flex mirrors .sfw-popup-price. The
	   line's own glyphs are smaller than the price's, so a
	   zero-width strut at the price's font size (the
	   ::before below) reserves the price line's box height:
	   the strut shares the price's font-size and inherited
	   line height, so its line box IS the price line's
	   height in whatever font the page runs - including the
	   wrapped small-width layout, where the line is a row
	   of its own and its height is what the strip is
	   measured by. */
	font-size: 14px;
	font-weight: 700;
	color: #8494ab;
	flex: 1 1 auto;
	user-select: none;
}

.sfw-skeleton-line::before {
	content: '';
	font-size: 18px;
}

.sfw-skeleton-btn {
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 800;
	border: none;
	border-radius: 999px;
	min-height: 48px;
	white-space: nowrap;
	font-family: inherit;
	/* The Add to Cart button's own box (same padding, font
	   and min-height as .sfw-popup-btn) greyed out: a muted
	   fill, and its label in muted text instead of
	   transparent, so it visibly reads as the real button
	   waiting for a quote. */
	background: #e3e8f0;
	color: #8494ab;
	user-select: none;
}

/* Simple presentation: the entry is one button and nothing
   else - no panel chrome around it, left-aligned in the page
   flow. Custom presentation: the entry is normally invisible
   (the host element is the trigger); it only paints when the
   fallback button renders, and then it looks like Simple. */
.sfw-mode-simple .sfw-entry,
.sfw-mode-custom .sfw-entry {
	border: none;
	background: transparent;
	padding: 0;
	text-align: left;
}

.sfw-mode-simple .sfw-entry.sfw-dragging,
.sfw-mode-custom .sfw-entry.sfw-dragging {
	background: transparent;
}

/* The real file input stays in the entry panel - the gold button
   clicks it, the entry's click handler clicks it, drag-and-drop
   and file selection read from it - but it is never painted: the
   panel shows only the wizard presentation (title, note, gold
   pill). Visually hidden (the sr-only pattern) rather than the
   hidden attribute or display:none: a theme rule on input
   elements overrode [hidden] in production and the native
   "Choose Files" control rendered under the gold button, and
   display:none is avoided so programmatic click + change keep
   working the same in every browser. The 1px clipped box cannot
   be resurrected by a theme display rule. */
.sfw-file-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* --- panel shell (inline since v2.3.0) --- */

.sfw-panel-wrap {
	margin-top: 14px;
	font-family: inherit;
}

.sfw-popup {
	background: #fff;
	width: 880px;
	max-width: 100%;
	max-height: calc(100vh - 32px);
	max-height: calc(100svh - 32px);
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

/* The inline panel: fills the width its embed gives it and
   grows with its content (the page scrolls, so nothing is
   hidden inside a fixed-height box). Since v2.13.0 it wears
   no frame of its own - no border, no shadow, no rounding,
   no background: the widget ships its inner elements only
   and the host site's wrapper styles the outside. */
.sfw-quote .sfw-panel {
	width: 100%;
	max-height: none;
	border: 0;
	box-shadow: none;
	border-radius: 0;
	background: transparent;
}

/* Inside the panel the body is plain page flow: no internal
   scroll region, no height cap. It stays the positioning
   context for the colour popover. */
.sfw-quote .sfw-panel .sfw-popup-body {
	overflow: visible;
	flex: none;
	min-height: 0;
}

.sfw-popup-body {
	padding: 18px;
	overflow-y: auto;
	flex: 1 1 auto;
	min-height: 0;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	/* Positioning context for the per-part colour popover, which
	   is anchored to a card's colour dot in body content space. */
	position: relative;
}

.sfw-popup-spinner {
	width: 44px;
	height: 44px;
	margin: 26px auto 14px;
	border-radius: 50%;
	border: 5px solid #dbe4f2;
	border-top-color: var(--sfw-accent);
	animation: sfw-spin 0.9s linear infinite;
}

@keyframes sfw-spin {
	to { transform: rotate(360deg); }}

.sfw-popup-status {
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	color: #16294d;
	margin: 0 0 6px;
}

.sfw-popup-substatus {
	text-align: center;
	font-size: 14px;
	color: #5a6a86;
	margin: 0 0 22px;
}

/* --- viewer --- */

.sfw-viewer-wrap {
	margin-bottom: 14px;
	position: relative;
}

.sfw-viewer {
	position: relative;
	width: 100%;
	height: 380px;
	border-radius: 12px;
	overflow: hidden;
	background: #f2f4f8;
}

/* The canvas fills its slide in layout terms. The renderer sizes
   only the drawing buffer (container size x pixel ratio); without
   a CSS size the element lays out at buffer size - on a hi-dpi
   phone, twice the viewer - and the centred render lands outside
   the visible corner (v2.8.0). */
.sfw-viewer canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* One slide per part; only the selected part's slide shows. */
.sfw-viewer-slide {
	position: absolute;
	inset: 0;
}

.sfw-viewer-loading {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #5a6a86;
	font-size: 14px;
	font-weight: 600;
}

.sfw-viewer-loading p {
	margin: 0;
}

.sfw-viewer-spinner {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	border: 4px solid #dbe4f2;
	border-top-color: var(--sfw-accent);
	animation: sfw-spin 0.9s linear infinite;
}

.sfw-viewer-note {
	font-size: 13.5px;
	color: #5a6a86;
	margin: 8px 0 0;
}

/* Preview colour badge: a small clickable colour circle in the
   top corner of the 3D preview showing the selected part's
   colour. Plain parts show their colour; painted parts show
   their spools as a conic gradient. */
.sfw-preview-badge {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 6;
	width: 56px;
	height: 56px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
}

.sfw-preview-badge .sfw-preview-badge-dot {
	position: relative;
	overflow: hidden;
	display: block;
	width: 52px;
	height: 52px;
	margin: 2px;
	border: 2px solid #ffffff;
	border-radius: 50%;
	box-shadow: 0 1px 5px rgba(15, 23, 42, 0.35);
	box-sizing: border-box;
}

.sfw-preview-badge:hover .sfw-preview-badge-dot {
	box-shadow: 0 2px 9px rgba(15, 23, 42, 0.5);
}

.sfw-preview-badge-caret {
	position: absolute;
	right: 3px;
	bottom: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #ffffff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.sfw-preview-badge-caret svg {
	width: 11px;
	height: 7px;
	display: block;
}

/* Quote details trigger + panel (v2.7.0, Popover details
   layout): the trigger mirrors the colour badge - the same
   56px round footprint in the opposite, top-left corner: a
   white circle holding an info icon in the theme primary.
   The panel anchors to the same corner, is capped to the
   viewer so it never spills outside it, and fades in and
   out; while it is open the trigger is faded away
   (is-faded), and clicking the renderer brings it back. */
.sfw-quote .sfw-details-btn {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 6;
	width: 56px;
	height: 56px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.25s ease;
}

.sfw-quote .sfw-details-btn.is-faded {
	opacity: 0;
	pointer-events: none;
}

.sfw-quote .sfw-details-btn-circle {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	background: #ffffff;
	box-shadow: 0 1px 5px rgba(15, 23, 42, 0.35);
	box-sizing: border-box;
	color: var(--sfw-primary);
	display: flex;
	align-items: center;
	justify-content: center;
}

.sfw-quote .sfw-details-btn-circle svg {
	width: 26px;
	height: 26px;
	display: block;
}

.sfw-quote .sfw-details-pop {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 7;
	box-sizing: border-box;
	width: 330px;
	max-width: calc(100% - 24px);
	max-height: calc(100% - 24px);
	overflow-y: auto;
	background: #ffffff;
	border: 1px solid #d5dce8;
	border-radius: 12px;
	box-shadow: 0 18px 48px rgba(15, 27, 45, 0.28);
	padding: 14px 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sfw-quote .sfw-details-pop.is-open {
	opacity: 1;
	visibility: visible;
}

.sfw-quote .sfw-details-pop-title {
	font-size: 14px;
	font-weight: 700;
	color: #16294d;
	margin-bottom: 8px;
}

/* --- part cards --- */

.sfw-part-rows {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(158px, 188px));
	gap: 8px;
	margin-bottom: 6px;
}

.sfw-part-row {
	display: flex;
	flex-direction: column;
	gap: 5px;
	padding: 9px 10px;
	border: 2px solid #d5dce8;
	border-radius: 12px;
	background: #f4f6fa;
	color: #16294d;
	cursor: pointer;
	min-width: 0;
}

.sfw-part-row.is-selected {
	border-color: var(--sfw-accent);
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
}

.sfw-part-row:focus-visible {
	outline: 2px solid var(--sfw-primary);
	outline-offset: 2px;
}

.sfw-part-card-top {
	display: flex;
	align-items: center;
	gap: 7px;
	min-width: 0;
}

.sfw-part-card-bottom {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	min-width: 0;
	margin-top: auto;
}

.sfw-part-row-name {
	font-size: 13.5px;
	font-weight: 800;
	white-space: nowrap;
}

.sfw-part-row-file {
	display: block;
	font-size: 13.5px;
	color: #5a6a86;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sfw-part-row-state {
	font-size: 13.5px;
	font-weight: 700;
	color: #8a94a6;
	white-space: nowrap;
}

.sfw-part-tag {
	margin-left: auto;
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #7a5b00;
	background: color-mix(in srgb, var(--sfw-accent) 16%, transparent);
	border-radius: 999px;
	padding: 2px 8px;
	white-space: nowrap;
}

.sfw-part-tag.is-incart {
	color: #14703c;
	background: rgba(31, 157, 85, 0.14);
}

.sfw-part-row-price {
	font-size: 14px;
	font-weight: 800;
	color: var(--sfw-primary);
	white-space: nowrap;
}

.sfw-part-row-price.is-pending {
	font-size: 13.5px;
	font-weight: 600;
	color: #8a94a6;
}

/* Per-part quantity stepper (v2.9.0): round outline buttons in
   the primary colour, matching the widget's outline language,
   sitting at the card bottom row's right edge ahead of the tag. */
.sfw-qty {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	margin-left: auto;
}

.sfw-qty-btn {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1.5px solid var(--sfw-primary);
	border-radius: 50%;
	background: transparent;
	color: var(--sfw-primary);
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.sfw-qty-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.sfw-qty-value {
	min-width: 20px;
	text-align: center;
	font-size: 13.5px;
	font-weight: 800;
	color: var(--sfw-primary);
}

.sfw-qty ~ .sfw-part-tag {
	margin-left: 0;
}

.sfw-part-remove {
	width: 28px;
	height: 28px;
	flex: 0 0 auto;
	margin-left: auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: none;
	border-radius: 50%;
	background: rgba(179, 38, 30, 0.08);
	color: #b3261e;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

.sfw-part-remove:hover {
	background: rgba(179, 38, 30, 0.18);
}

.sfw-part-remove:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.sfw-part-row.is-removed,
.sfw-part-row.is-error {
	background: #fbfcfd;
	border-color: #e3e8f0;
	cursor: default;
}

.sfw-part-row.is-removed .sfw-part-row-name,
.sfw-part-row.is-removed .sfw-part-row-file,
.sfw-part-row.is-error .sfw-part-row-name,
.sfw-part-row.is-error .sfw-part-row-file {
	color: #8a94a6;
}

.sfw-part-row.is-error .sfw-part-row-state {
	color: #b3261e;
	white-space: normal;
}

.sfw-part-undo {
	flex: 0 0 auto;
	margin-left: auto;
	border: 1.5px solid var(--sfw-primary);
	background: transparent;
	color: var(--sfw-primary);
	font-size: 13px;
	font-weight: 800;
	border-radius: 999px;
	padding: 4px 12px;
	min-height: 28px;
	cursor: pointer;
}

.sfw-chip-dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	border: none;
	flex: 0 0 auto;
}

.sfw-chip-dot-multi {
	background: conic-gradient(#d8262c, #f2c200, #1f9d4d, #2057c9, #d8262c);
}

/* On colourable cards the dot is a button: it opens the per-part
   colour popover. */
button.sfw-chip-dot-btn {
	width: 34px;
	height: 34px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: pointer;
	background: none;
}

.sfw-chip-dot-btn:hover {
	box-shadow: 0 0 0 2px var(--sfw-accent);
}

.sfw-chip-dot-btn:focus-visible {
	outline: 2px solid var(--sfw-primary);
	outline-offset: 2px;
}

.sfw-chip-dot-inner {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	flex: 0 0 auto;
	position: relative;
	overflow: hidden;
}

/* The add-part tile (v2.7.0): the last cell of the part-card
   grid - a dashed-outline button the size of a part card that
   opens the file picker for another part. It replaces the
   "+ Add another file" ghost-pill button that sat under the
   grid until v2.6.x. */
.sfw-quote .sfw-part-add-tile {
	border: 2px dashed #b9c4d6;
	border-radius: 12px;
	background: #fbfcfe;
	color: var(--sfw-primary);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 4px;
	padding: 12px;
	min-width: 0;
	cursor: pointer;
	font: inherit;
	text-align: center;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.sfw-quote .sfw-part-add-tile:hover {
	border-color: var(--sfw-primary);
	background: #f0f7fc;
}

.sfw-quote .sfw-part-add-plus {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
}

.sfw-quote .sfw-part-add-text {
	font-size: 13.5px;
	font-weight: 700;
}

/* --- colour section --- */

.sfw-field-label {
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #16294d;
	margin: 14px 0 8px;
}

.sfw-swatch {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	padding: 0;
}

.sfw-swatch.is-selected {
	box-shadow: 0 0 0 3px var(--sfw-accent);
}

.sfw-painted-note,
.sfw-multi-note {
	font-size: 13.5px;
	color: #5a6a86;
	margin: 8px 0 0;
}

.sfw-retry {
	margin-left: 8px;
	border: 1.5px solid var(--sfw-primary);
	background: transparent;
	color: var(--sfw-primary);
	font-size: 13px;
	font-weight: 800;
	border-radius: 999px;
	padding: 3px 12px;
	min-height: 28px;
	cursor: pointer;
	vertical-align: baseline;
}

/* Per-part colour popover: a small palette card anchored to a
   part card's colour dot, in the popup body's content space. */
.sfw-colour-popover {
	display: none;
	position: absolute;
	z-index: 30;
	width: 216px;
	background: #fff;
	border: 1px solid #d5dce8;
	border-radius: 12px;
	box-shadow: 0 18px 48px rgba(15, 27, 45, 0.28);
	padding: 10px 12px;
	flex-wrap: wrap;
	gap: 9px;
}

.sfw-colour-popover.is-open {
	display: flex;
}

.sfw-colour-popover-title {
	flex: 1 1 100%;
	font-size: 13.5px;
	font-weight: 800;
	color: #16294d;
}

.sfw-colour-popover .sfw-swatch {
	width: 30px;
	height: 30px;
	position: relative;
	overflow: hidden;
}

.sfw-pop-reset {
	flex: 1 1 100%;
	border: 1.5px solid var(--sfw-primary);
	background: transparent;
	color: var(--sfw-primary);
	font-size: 13px;
	font-weight: 800;
	border-radius: 999px;
	padding: 4px 12px;
	min-height: 28px;
	cursor: pointer;
}

/* Filament finishes: silk shine and sparkle flecks (his swatch
   finishes, keyed by colour name in the widget). */
.sfw-swatch.is-silk, .sfw-chip-dot-inner.is-silk, .sfw-slot-dot.is-silk, .sfw-preview-badge-dot.is-silk { position: relative; }
.sfw-swatch.is-silk::after, .sfw-chip-dot-inner.is-silk::after, .sfw-slot-dot.is-silk::after, .sfw-preview-badge-dot.is-silk::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(135deg, rgba(255, 255, 255, .6) 0%, rgba(255, 255, 255, .1) 42%, rgba(255, 255, 255, 0) 60%, rgba(0, 0, 0, .14) 100%); pointer-events: none; }
.sfw-swatch.is-sparkly, .sfw-chip-dot-inner.is-sparkly, .sfw-slot-dot.is-sparkly, .sfw-preview-badge-dot.is-sparkly { position: relative; }
.sfw-swatch.is-sparkly::after, .sfw-chip-dot-inner.is-sparkly::after, .sfw-slot-dot.is-sparkly::after, .sfw-preview-badge-dot.is-sparkly::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(150deg, rgba(255, 255, 255, .32) 0%, rgba(255, 255, 255, 0) 38%), repeating-linear-gradient(45deg, rgba(255, 255, 255, .13) 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, rgba(190, 220, 255, .11) 0 1px, transparent 1px 6px); pointer-events: none; }

/* --- filament slot pills (painted parts) --- */

.sfw-slot-menu {
	margin: 0 0 10px;
}

.sfw-slot-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sfw-slot-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px 3px 4px;
	border: 1.5px solid #d5dce8;
	border-radius: 999px;
	background: #ffffff;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 700;
	color: #16294d;
	/* A pill is one unit: its dot and label never split across
	   lines (no widowing inside the settings rail). */
	white-space: nowrap;
}

.sfw-slot-dot {
	flex: none;
	cursor: pointer;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	position: relative;
	overflow: hidden;
}

.sfw-slot-pill.is-pending {
	border-color: var(--sfw-accent);
	box-shadow: 0 0 0 1px var(--sfw-accent);
}

.sfw-slot-pill:disabled {
	opacity: 0.55;
	cursor: default;
}

.sfw-slot-menu-note {
	font-size: 13px;
	color: #7a4d00;
	margin: 4px 0 0;
}

/* --- plastic / printer tier cards --- */

.sfw-tiers {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 10px;
}

.sfw-tiers-2 {
	grid-template-columns: repeat(2, 1fr);
}

.sfw-tier {
	text-align: left;
	border: 2px solid #d5dce8;
	background: #f4f6fa;
	border-radius: 12px;
	padding: 12px 13px;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-height: 44px;
	font-family: inherit;
}

.sfw-tier.is-selected {
	border-color: var(--sfw-accent);
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
}

.sfw-tier.is-disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.sfw-tier-name {
	font-size: 15px;
	font-weight: 800;
	color: #16294d;
}

.sfw-tier-desc {
	font-size: 13.5px;
	color: #5a6a86;
	line-height: 1.35;
}

/* --- print settings pill rows ---
   Each group is a compact label column beside an even pill
   grid (v2.5.3): the title sits inline with its selections
   instead of taking a full-width line of its own, and the
   pills divide the remaining group width equally. The column
   count per layout tier divides the option count (6 layer
   heights, 8 infill values), so a group never ends with a
   lone pill on the last row. */

.sfw-setting-row {
	display: grid;
	grid-template-columns: 110px minmax(0, 1fr);
	column-gap: 10px;
	align-items: start;
	margin-bottom: 10px;
}

.sfw-setting-label {
	font-size: 12.5px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #5a6a86;
	/* Ride the first pill row: the label text aligns with the
	   pills beside it instead of centring over the whole
	   group height. */
	padding-top: 6px;
}

.sfw-setting-pills {
	display: grid;
	gap: 6px;
}

.sfw-setting-row-layer .sfw-setting-pills {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sfw-setting-row-infill .sfw-setting-pills {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* The extended on/off rows (v2.9.0) divide their two pills. */
.sfw-setting-row-supports .sfw-setting-pills,
.sfw-setting-row-brim .sfw-setting-pills,
.sfw-setting-row-ironing .sfw-setting-pills {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sfw-setting-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	padding: 3px 10px;
	border: 1.5px solid #d5dce8;
	border-radius: 999px;
	background: #ffffff;
	cursor: pointer;
	font-size: 13.5px;
	font-weight: 700;
	color: #16294d;
	min-height: 28px;
	/* One unit: a value like "0.08 mm" never wraps mid-pill when
	   the row wraps in a narrow rail. */
	white-space: nowrap;
}

.sfw-setting-pill.is-selected {
	border-color: var(--sfw-accent);
	box-shadow: 0 0 0 1px var(--sfw-accent);
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
}

/* --- quote details (labelled price rows) --- */

.sfw-details {
	border-top: 1px solid #e3e8f0;
	margin-top: 14px;
	/* The band's footer (the across-parts total and Add to
	   Cart) follows the details directly, so the block carries
	   the same 8px below itself that the grid keeps between
	   its own rows - without it the last row sat flush against
	   the footer (v2.7.3). The popover layout resets this to
	   0: its panel carries the spacing. */
	margin-bottom: 8px;
	padding-top: 4px;
}

.sfw-detail-row {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 5px 0;
	border-bottom: 1px solid #eef1f6;
	font-size: 14px;
}

.sfw-detail-row:last-child {
	border-bottom: none;
}

.sfw-detail-label {
	color: #5a6a86;
	flex: 1 1 auto;
}

.sfw-detail-value {
	font-weight: 700;
	color: #16294d;
	white-space: nowrap;
}

/* The part's Price row (is-total in the markup) carries no
   styling of its own since v2.7.0: in every layout it is an
   ordinary row or cell like the rest, told apart only by its
   place - last. It used to render bolder, and to span the
   details grid as a full-width band. */

/* Quote details, grid layout (v2.6.0): the default. The same
   rows render as compact label/value cells - the label small
   above its value - in a grid whose column count steps down
   with the panel width (see the container blocks below), and
   values wrap inside their cell, so a long dimensions string
   wraps instead of truncating. The part's Price is simply the
   last cell, like every other stat (v2.7.0 - it spanned the
   grid as a full-width band until then). The Stack layout
   needs no rules of its own: it is the base list above. */
.sfw-details.sfw-details-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	padding-top: 12px;
}

.sfw-details-grid .sfw-detail-row {
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	padding: 8px 10px;
	border: 1px solid #eef1f6;
	border-radius: 8px;
	background: #fbfcfe;
}

.sfw-details-grid .sfw-detail-label {
	flex: none;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.sfw-details-grid .sfw-detail-value {
	white-space: normal;
	overflow-wrap: break-word;
	font-size: 15px;
}

/* Quote details, popover layout (v2.7.0): the same rows in a
   compact two-column grid of label/value cells at popover
   width, inside the .sfw-details-pop panel over the preview.
   No top rule or top margin - the panel carries the chrome -
   and the cells mirror the band grid's treatment at a
   slightly smaller value size. The column count stays two
   here whatever the panel-width steps do to the band grid. */
.sfw-details.sfw-details-popover {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
	border-top: none;
	margin-top: 0;
	margin-bottom: 0;
	padding-top: 0;
}

.sfw-details-popover .sfw-detail-row {
	flex-direction: column;
	align-items: stretch;
	gap: 2px;
	padding: 7px 9px;
	border: 1px solid #eef1f6;
	border-radius: 8px;
	background: #fbfcfe;
}

.sfw-details-popover .sfw-detail-label {
	flex: none;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.sfw-details-popover .sfw-detail-value {
	white-space: normal;
	overflow-wrap: break-word;
	font-size: 14px;
}

/* Details grid column steps live in the layout system at the
   end of this file (v2.13.0 redesign): the count follows
   where the results zone sits - band, rail, drawer or panel -
   not the panel width alone. */

/* --- notes, errors, footer --- */

.sfw-quote-note {
	font-size: 13.5px;
	color: #8a6d00;
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
	border-radius: 8px;
	padding: 9px 12px;
	margin: 14px 0 0;
}

.sfw-quote-note a {
	color: var(--sfw-primary);
	font-weight: 700;
}

.sfw-popup-error-msg,
.sfw-popup-added-msg {
	font-size: 16px;
	font-weight: 600;
	color: #16294d;
	margin: 6px 0 10px;
}

.sfw-popup-added-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 12px;
}

.sfw-popup-footer {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 14px 18px;
	border-top: 1px solid #e3e8f0;
	background: #f8fafc;
}

.sfw-popup-price {
	font-size: 18px;
	font-weight: 800;
	color: #16294d;
	flex: 1 1 auto;
}

.sfw-popup-add-error {
	font-size: 13.5px;
	color: #b3261e;
	flex: 1 1 auto;
}

.sfw-popup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	font-size: 15px;
	font-weight: 800;
	border-radius: 999px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	min-height: 48px;
	white-space: nowrap;
	font-family: inherit;
}

.sfw-popup-btn-gold {
	background: var(--sfw-accent);
	color: var(--sfw-primary);
	border: 1px solid var(--sfw-accent);
}

.sfw-popup-btn-gold:hover {
	filter: brightness(1.07);
}

.sfw-popup-btn-gold:disabled {
	opacity: 0.55;
	cursor: wait;
}

.sfw-popup-btn-ghost {
	background: transparent;
	border: 1.5px solid var(--sfw-primary);
	color: var(--sfw-primary);
}

.sfw-popup-btn-ghost:hover {
	background: color-mix(in srgb, var(--sfw-primary) 7%, transparent);
}

/* --- progress strip --- */

.sfw-progress-strip {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 9px 18px;
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
	border-top: 1px solid #eadfae;
	overflow: hidden;
	max-height: 60px;
	transition: max-height 0.35s ease, opacity 0.35s ease, padding 0.35s ease;
}

.sfw-progress-strip.is-on { display: flex; }

/* Direction v4: the strip lives inside the viewer in every
   layout, floating over the canvas's bottom edge, so its
   show and hide never move anything around it - the
   widget's outer height is identical with the strip on or
   off. In Studio it floats clear of the bottom pill. */
.sfw-quote .sfw-viewer .sfw-progress-strip {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 28;
	margin: 0;
	border: 1px solid #eadfae;
	border-radius: 12px;
	box-shadow: 0 10px 26px rgba(9, 16, 34, 0.14);
}

.sfw-quote.sfw-layout-studio .sfw-viewer .sfw-progress-strip {
	bottom: 76px;
}

.sfw-progress-strip.is-collapsed {
	max-height: 0;
	opacity: 0;
	padding-top: 0;
	padding-bottom: 0;
}

.sfw-progress-spinner {
	flex: 0 0 auto;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 3px solid #dbe4f2;
	border-top-color: var(--sfw-accent);
	animation: sfw-spin 0.8s linear infinite;
}

.sfw-progress-check {
	flex: 0 0 auto;
	color: #a8860a;
	font-size: 15px;
	font-weight: 900;
	line-height: 1;
}

.sfw-progress-text {
	font-size: 14px;
	font-weight: 700;
	color: #33393f;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sfw-progress-bar {
	flex: 1 1 auto;
	min-width: 36px;
	height: 5px;
	border-radius: 3px;
	background: #e9e2c4;
	overflow: hidden;
}

.sfw-progress-bar-fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--sfw-accent);
	border-radius: 3px;
	transition: width 0.45s ease;
}

.sfw-part-row-spinner {
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-right: 6px;
	vertical-align: -1px;
	border-radius: 50%;
	border: 2px solid #dbe4f2;
	border-top-color: var(--sfw-accent);
	animation: sfw-spin 0.8s linear infinite;
}

/* --- layout system (v2.13.0 redesign) ---
   One widget, five themes, three width buckets. The mount
   (.sfw-quote) is the container, so every rule below keys off
   the width the embedder gives the widget, never the
   viewport: desktop >= 1024px of widget width, tablet
   640-1023px, mobile under 640px. A theme is an arrangement
   of five zones - viewer, parts, settings, results, summary -
   and the grid follows the controls actually on screen (the
   root's data-density, set from the rendered control groups),
   so a hand-tuned toggle set still composes: hidden controls
   leave no gaps behind.

   Base (every width) is the single column: zones stack in
   DOM reading order - viewer, parts, settings, results,
   summary - which is the tablet and mobile shape; the
   container blocks then give the settings zone its two-column
   group grid on tablet, the rails and inspectors on desktop,
   and the compact touch sizing on mobile. Studio and Guided
   carry their own arrangement at every width. */

/* --- zones and control groups --- */

.sfw-quote .sfw-layout {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sfw-quote .sfw-zone {
	min-width: 0;
}

.sfw-quote .sfw-zone-settings {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.sfw-quote .sfw-control-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
}

/* Inside a group the label sits directly on its control: the
   group's gap does the spacing the label's old margins did. */
.sfw-quote .sfw-control-group .sfw-field-label {
	margin: 0;
}

.sfw-quote .sfw-control-group .sfw-slot-menu {
	margin: 0;
}

/* Material cards flow as many across as fit their zone,
   so the same group reads well in a rail, a half-width
   tablet cell and a full-width phone stack. Printer cards
   stay two across: four printers divide 2/2 everywhere and
   never strand an orphan. */
.sfw-quote .sfw-zone-settings .sfw-tiers {
	grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.sfw-quote .sfw-zone-settings .sfw-tiers-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Setting pill groups: three layer heights and four infill
   values across - the counts that divide 6 and 8 evenly at
   every zone width this system produces. */
.sfw-quote .sfw-setting-row-layer .sfw-setting-pills {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sfw-quote .sfw-setting-row-infill .sfw-setting-pills {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* The summary zone's total is the strongest figure in the
   widget; the footer's own price carries it. */
/* The total carries one kit size everywhere (.sfw-popup-price,
   18px) - no larger summary-zone or smaller Studio-bar variant
   (UX coherence pass, 2026-11-14). */

/* Long colour lists stay inside their card: the painted slot
   pills wrap, and the colour popover scrolls instead of
   growing over the preview. */
.sfw-quote .sfw-slot-pills {
	flex-wrap: wrap;
}

.sfw-quote .sfw-colour-popover {
	max-height: min(320px, 60vh);
	overflow-y: auto;
}

/* --- Studio chrome (every width) ---
   The bar and its buttons exist in every theme's DOM and
   only ever show under the Studio layout class. */

.sfw-studio-bar {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	z-index: 30;
	display: none;
	align-items: center;
	gap: 12px;
	padding: 8px 8px 8px 14px;
	background: rgba(255, 255, 255, 0.94);
	border: 1px solid #d5dce8;
	border-radius: 99px;
	box-shadow: 0 10px 30px rgba(9, 16, 34, 0.22);
}

.sfw-quote.sfw-layout-studio .sfw-studio-bar {
	display: flex;
}

.sfw-studio-btns {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	/* A slight visible gap between the pill's price and
	   its right-hand buttons (direction v4). */
	margin-left: 10px;
}

.sfw-studio-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 38px;
	padding: 0 13px;
	border-radius: 999px;
	border: 1px solid #d5dce8;
	background: #fff;
	color: var(--sfw-primary);
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
}

.sfw-studio-btn svg {
	width: 18px;
	height: 18px;
	display: block;
	flex: none;
}

.sfw-studio-btn:hover {
	border-color: var(--sfw-accent);
}

.sfw-studio-btn.is-active {
	background: var(--sfw-primary);
	border-color: var(--sfw-primary);
	color: #fff;
}

/* The Parts edge button: top-left of the viewer. */
.sfw-studio-parts-btn {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 30;
	display: none;
	background: rgba(255, 255, 255, 0.94);
	box-shadow: 0 8px 24px rgba(9, 16, 34, 0.2);
}

.sfw-quote.sfw-layout-studio .sfw-studio-parts-btn {
	display: inline-flex;
}

/* The finished-parts badge on the Parts button (direction
   v4): the count of parts that have finished slicing. */
.sfw-studio-parts-badge {
	position: absolute;
	top: -7px;
	right: -7px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	border-radius: 999px;
	background: var(--sfw-accent);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 20px;
	text-align: center;
	box-shadow: 0 4px 10px rgba(9, 16, 34, 0.25);
}

/* The quote "i" button (direction v4): one icon button
   where the metric chips used to live - the viewer's top
   area, beside the Parts button - opening the quote panel
   the retired Quote button opened. */
.sfw-studio-info-btn {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 30;
	display: none;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	padding: 0;
	border-radius: 999px;
	border: 1px solid #d5dce8;
	background: rgba(255, 255, 255, 0.94);
	color: var(--sfw-primary);
	box-shadow: 0 8px 24px rgba(9, 16, 34, 0.2);
	cursor: pointer;
}

.sfw-quote.sfw-layout-studio .sfw-studio-info-btn {
	display: inline-flex;
}

.sfw-studio-info-btn svg {
	width: 20px;
	height: 20px;
	display: block;
}

.sfw-studio-info-btn:hover {
	border-color: var(--sfw-accent);
}

.sfw-studio-info-btn.is-active {
	background: var(--sfw-primary);
	border-color: var(--sfw-primary);
	color: #fff;
}

/* --- Studio arrangement ---
   Direction v4: the stage is a row. The viewer fills the
   middle; the parts list and the slice options are real
   space-taking panels that slide in on the viewer's left
   and right at the slicer's height, compressing the canvas
   - they are in flow, never floating. The results zone
   stays a sheet over the stage (it is what the "i" button
   opens), and the summary rides inside the bar (the widget
   moves the footer there). */

.sfw-quote.sfw-layout-studio .sfw-layout {
	display: flex;
	flex-direction: row;
	align-items: stretch;
	position: relative;
}

.sfw-quote.sfw-layout-studio .sfw-zone-viewer {
	position: relative;
	flex: 1 1 auto;
	min-width: 0;
	order: 2;
}

.sfw-quote.sfw-layout-studio .sfw-viewer {
	height: 480px;
}

.sfw-quote.sfw-layout-studio .sfw-zone-summary {
	display: none;
}

/* The footer inside the bar: no band chrome of its own.
   It stretches across the pill so the price reads at the
   pill's left and the button cluster closes it at the
   right; the price is all the pill shows (direction v4). */
.sfw-quote .sfw-studio-bar .sfw-popup-footer {
	flex: 1 1 auto;
	border: 0;
	background: transparent;
	padding: 0;
	gap: 10px;
}

.sfw-quote .sfw-studio-bar .sfw-popup-price {
	flex: 0 0 auto;
}

/* The bar's Add to Cart carries the kit button box unchanged
   (UX coherence pass): no slimmer one-off padding in Studio. */

/* The parts panel: a stacked list sliding in on the
   viewer's left, in flow, at the slicer's height. Shut, it
   takes no space at all. */
.sfw-quote.sfw-layout-studio .sfw-zone-parts {
	order: 1;
	flex: 0 0 0;
	width: 0;
	min-width: 0;
	/* Size containment: the panel's size comes from its
	   flex basis and the row's stretch, never from its
	   content - shut, its wrapped content would otherwise
	   stretch the whole row past the slicer's height. */
	contain: size;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateX(-14px);
	padding: 0;
	background: #fff;
	border: 0 solid #d5dce8;
	border-radius: 12px;
	transition: flex-basis 0.35s ease, width 0.35s ease,
		opacity 0.3s ease, transform 0.35s ease,
		visibility 0.35s;
}

.sfw-quote.sfw-layout-studio .sfw-zone-parts .sfw-part-rows {
	margin: 0;
	grid-template-columns: 1fr;
}

.sfw-quote.sfw-layout-studio.sfw-studio-open-parts .sfw-zone-parts {
	flex-basis: 300px;
	width: 300px;
	overflow-y: auto;
	opacity: 1;
	visibility: visible;
	transform: none;
	padding: 8px;
	border-width: 1px;
	margin-right: 12px;
}

/* The options panel: the mirror image on the viewer's
   right, sliding in and scrolling internally. */
.sfw-quote.sfw-layout-studio .sfw-zone-settings {
	order: 3;
	flex: 0 0 0;
	width: 0;
	min-width: 0;
	/* Size containment, same as the parts panel: content
	   never sizes the row. */
	contain: size;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateX(14px);
	padding: 0;
	background: #fff;
	border: 0 solid #d5dce8;
	border-radius: 12px;
	transition: flex-basis 0.35s ease, width 0.35s ease,
		opacity 0.3s ease, transform 0.35s ease,
		visibility 0.35s;
}

.sfw-quote.sfw-layout-studio.sfw-studio-open-options .sfw-zone-settings {
	flex-basis: 320px;
	width: 320px;
	overflow-y: auto;
	opacity: 1;
	visibility: visible;
	transform: none;
	padding: 16px;
	border-width: 1px;
	margin-left: 12px;
}

/* The results zone is a CENTRED POPOVER inside the
   slicer space (v4.1): 80% of the slicer's width, dark and
   slightly transparent so the model shows through, white
   text. It rides in the viewer itself, so its centring is
   the canvas's own. Click-away and its X button close it. */
.sfw-quote.sfw-layout-studio .sfw-zone-results {
	position: absolute;
	left: 50%;
	top: 50%;
	right: auto;
	bottom: auto;
	transform: translate(-50%, -50%);
	width: 80%;
	z-index: 33;
	max-height: 82%;
	overflow-y: auto;
	padding: 16px;
	background: rgba(13, 18, 28, 0.92);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: 12px;
	box-shadow: 0 18px 50px rgba(9, 16, 34, 0.28);
	visibility: hidden;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, visibility 0.18s;
}

/* White-on-dark readings inside the Studio popover. */
.sfw-quote.sfw-layout-studio .sfw-zone-results .sfw-field-label,
.sfw-quote.sfw-layout-studio .sfw-zone-results .sfw-detail-value {
	color: #fff;
}

.sfw-quote.sfw-layout-studio .sfw-zone-results .sfw-detail-label {
	color: rgba(255, 255, 255, 0.72);
}

.sfw-quote.sfw-layout-studio .sfw-zone-results .sfw-detail-row {
	background: rgba(255, 255, 255, 0.06);
	border-color: rgba(255, 255, 255, 0.14);
}

.sfw-quote.sfw-layout-studio .sfw-zone-results .sfw-quote-note {
	color: rgba(255, 255, 255, 0.88);
}

/* The popover's own close button: only Studio shows it. */
.sfw-studio-quote-close {
	display: none;
}

.sfw-quote.sfw-layout-studio .sfw-studio-quote-close {
	display: flex;
	align-items: center;
	justify-content: center;
	position: absolute;
	top: 8px;
	right: 8px;
	width: 32px;
	height: 32px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	font-size: 19px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
}

.sfw-quote.sfw-layout-studio .sfw-studio-quote-close:hover {
	background: rgba(255, 255, 255, 0.24);
}

.sfw-quote.sfw-layout-studio.sfw-studio-open-quote .sfw-zone-results {
	visibility: visible;
	opacity: 1;
	pointer-events: auto;
}

/* --- Guided chrome (every width) ---
   The stepper, the step-1 explanation panel and the Back /
   Next bar. Which zones show is the widget's step state
   (renderGuideChrome); these rules are the look. */

.sfw-guide-bar {
	display: none;
	gap: 4px;
}

.sfw-quote.sfw-layout-guided .sfw-guide-bar {
	display: flex;
}

.sfw-guide-step {
	flex: 1 1 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 9px 10px;
	border: 1px solid #d5dce8;
	border-radius: 99px;
	background: #f4f6fa;
	color: #5a6a86;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	min-width: 0;
	min-height: 44px;
}

.sfw-guide-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #dbe4f2;
	color: #16294d;
	font-size: 13px;
	font-weight: 800;
	flex: 0 0 auto;
}

.sfw-guide-step.is-current {
	border-color: var(--sfw-primary);
	color: #16294d;
	background: #fff;
}

.sfw-guide-step.is-current .sfw-guide-step-num {
	background: var(--sfw-primary);
	color: #fff;
}

.sfw-guide-step.is-done {
	color: #16294d;
}

.sfw-guide-step.is-done .sfw-guide-step-num {
	background: var(--sfw-accent);
	color: #fff;
}

.sfw-guide-step:disabled {
	opacity: 0.45;
	cursor: default;
}

/* Step 1's panel: explanation only. The upload lives in the
   preview's empty state, like every other theme. */
.sfw-guide-upload {
	border: 1px solid #e3e8f0;
	border-radius: 12px;
	background: #f8fafc;
	padding: 16px 18px;
}

.sfw-guide-upload-title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 800;
	color: #16294d;
}

.sfw-guide-upload-note {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: #5a6a86;
}

.sfw-guide-nav {
	display: none;
	align-items: center;
	gap: 12px;
}

.sfw-quote.sfw-layout-guided .sfw-guide-nav {
	display: flex;
}

.sfw-guide-hint {
	flex: 1 1 auto;
	text-align: center;
	font-size: 13.5px;
	color: #5a6a86;
}

.sfw-guide-btn {
	border-radius: 999px;
	padding: 12px 24px;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	min-height: 48px;
}

.sfw-guide-back {
	background: transparent;
	border: 1.5px solid var(--sfw-primary);
	color: var(--sfw-primary);
}

.sfw-guide-back:hover {
	background: color-mix(in srgb, var(--sfw-primary) 7%, transparent);
}

.sfw-guide-next {
	background: var(--sfw-accent);
	border: 1px solid var(--sfw-accent);
	color: var(--sfw-primary);
	font-weight: 800;
	margin-left: auto;
}

.sfw-guide-next:hover {
	filter: brightness(1.07);
}

.sfw-guide-btn:disabled {
	opacity: 0.45;
	cursor: default;
}

.sfw-guide-back:disabled {
	visibility: hidden;
}

/* --- sub-desktop summary (tablet and mobile) ---
   The summary rides at the widget's bottom while the shopper
   scrolls a stacked layout: it is in flow (its space is
   always reserved, so it never covers content at rest) and
   sticky, so the total and Add to Cart stay reachable. In
   Guided the step navigation is the sticky bar instead. */
@container (max-width: 1023.98px) {
	.sfw-quote .sfw-zone-summary {
		position: sticky;
		bottom: 0;
		z-index: 24;
	}

	.sfw-quote .sfw-zone-summary .sfw-popup-footer {
		box-shadow: 0 -10px 28px rgba(9, 16, 34, 0.12);
	}

	.sfw-quote.sfw-layout-guided .sfw-zone-summary {
		position: static;
	}

	.sfw-quote.sfw-layout-guided .sfw-guide-nav {
		position: sticky;
		bottom: 0;
		z-index: 25;
		padding: 10px 2px;
		background: #fff;
		border-top: 1px solid #e3e8f0;
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-summary {
		position: static;
	}}

/* --- tablet (widget 640-1023px) ---
   Viewer first at a stable height, the parts strip under it,
   the control groups in a two-column grid (colours span the
   full width - they are the primary control and the painted
   slot list needs the room), then the results and the sticky
   summary. Studio keeps its stage, its drawers capped at
   about 85% of the widget. */
@container (min-width: 640px) and (max-width: 1023.98px) {
	.sfw-quote .sfw-viewer {
		height: clamp(320px, 54cqw, 440px);
	}

	.sfw-quote .sfw-zone-settings {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px 18px;
		align-items: start;
	}

	.sfw-quote .sfw-group-colour {
		grid-column: 1 / -1;
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-settings {
		display: flex;
	}

	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: clamp(360px, 58cqw, 480px);
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-settings {
		width: min(400px, 85%);
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-parts {
		width: min(330px, 85%);
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-results {
		max-height: 85%;
	}

	.sfw-quote .sfw-details.sfw-details-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}}

/* --- desktop (widget 1024px and up) ---
   Rails and inspectors beside the viewer. The areas are the
   same five zones in every theme; the template is what
   changes. */
@container (min-width: 1024px) {
	.sfw-quote .sfw-zone-viewer { grid-area: viewer; }
	.sfw-quote .sfw-zone-parts { grid-area: parts; }
	.sfw-quote .sfw-zone-settings { grid-area: settings; }
	.sfw-quote .sfw-zone-results { grid-area: results; }
	.sfw-quote .sfw-zone-summary { grid-area: summary; }
	.sfw-quote .sfw-guide-bar { grid-area: steps; }
	.sfw-quote .sfw-guide-nav { grid-area: nav; }
	.sfw-quote.sfw-layout-guided .sfw-guide-upload { grid-area: settings; }

	/* The details grid runs four across where the results
	   zone is a full-width band; in a rail, a drawer or the
	   Guided panel it stays two across, and in Studio's
	   wide bottom sheet three. */
	.sfw-quote .sfw-details.sfw-details-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.sfw-quote.sfw-layout-express .sfw-details.sfw-details-grid,
	.sfw-quote.sfw-layout-standard .sfw-details.sfw-details-grid,
	.sfw-quote.sfw-layout-guided .sfw-details.sfw-details-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sfw-quote.sfw-layout-studio .sfw-details.sfw-details-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	/* Express: the viewer takes almost everything; a narrow
	   rail holds the colours, the compact details and the
	   summary pinned to the rail's foot. */
	.sfw-quote.sfw-layout-express .sfw-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 324px;
		grid-template-areas:
			"viewer settings"
			"viewer results"
			"parts summary";
		gap: 18px 20px;
		align-items: start;
	}

	.sfw-quote.sfw-layout-express[data-density="full"] .sfw-layout {
		grid-template-columns: minmax(0, 1fr) 356px;
	}

	.sfw-quote.sfw-layout-express .sfw-viewer {
		height: 520px;
	}

	.sfw-quote.sfw-layout-express .sfw-zone-summary {
		align-self: end;
		position: sticky;
		bottom: 12px;
	}

	/* Standard: viewer and parts on the left; material,
	   colours, quote details and the sticky summary stacked
	   in a 384px rail on the right. The rail follows the
	   control density when a shop hand-tunes the toggles. */
	.sfw-quote.sfw-layout-standard .sfw-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 384px;
		grid-template-areas:
			"viewer settings"
			"parts settings"
			"parts results"
			"parts summary";
		gap: 18px 20px;
		align-items: start;
	}

	.sfw-quote.sfw-layout-standard[data-density="minimal"] .sfw-layout {
		grid-template-columns: minmax(0, 1fr) 336px;
	}

	.sfw-quote.sfw-layout-standard[data-density="full"] .sfw-layout {
		grid-template-columns: minmax(0, 1fr) 408px;
	}

	.sfw-quote.sfw-layout-standard .sfw-viewer {
		height: 500px;
	}

	.sfw-quote.sfw-layout-standard .sfw-zone-summary {
		align-self: end;
		position: sticky;
		bottom: 12px;
	}

	/* Guided: a vertical step rail, the persistent viewer,
	   and the step panel - the settings zone, the results or
	   the step-1 explanation, whichever the step shows; the
	   navigation closes the row. */
	.sfw-quote.sfw-layout-guided .sfw-layout {
		display: grid;
		grid-template-columns: 208px minmax(0, 1fr) 356px;
		grid-template-areas:
			"steps viewer settings"
			"steps viewer results"
			"steps parts summary"
			"steps nav nav";
		gap: 18px 20px;
		align-items: start;
	}

	.sfw-quote.sfw-layout-guided .sfw-guide-bar {
		flex-direction: column;
		align-items: stretch;
		gap: 6px;
	}

	.sfw-quote.sfw-layout-guided .sfw-guide-step {
		justify-content: flex-start;
	}

	.sfw-quote.sfw-layout-guided .sfw-viewer {
		height: 460px;
	}

	.sfw-quote.sfw-layout-guided .sfw-guide-nav {
		align-self: center;
	}

	/* Studio: the stage grows; the drawers keep their caps. */
	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: 600px;
	}}

/* --- ultrawide (widget 1500px and up) ---
   The viewer and the stage keep growing; the rails widen a
   step and stop, so no control row stretches into sparseness. */
@container (min-width: 1500px) {
	.sfw-quote.sfw-layout-express .sfw-layout {
		grid-template-columns: minmax(0, 1fr) 344px;
	}

	.sfw-quote.sfw-layout-express .sfw-viewer {
		height: 620px;
	}

	.sfw-quote.sfw-layout-standard .sfw-layout {
		grid-template-columns: minmax(0, 1fr) 420px;
	}

	.sfw-quote.sfw-layout-standard .sfw-viewer {
		height: 600px;
	}

	.sfw-quote.sfw-layout-guided .sfw-layout {
		grid-template-columns: 224px minmax(0, 1fr) 392px;
	}

	.sfw-quote.sfw-layout-guided .sfw-viewer {
		height: 560px;
	}

	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: 700px;
	}

	.sfw-quote .sfw-part-rows {
		grid-template-columns: repeat(auto-fill, minmax(180px, 224px));
	}}

/* --- mobile (widget under 640px) ---
   One column, the viewer first at a compact but usable
   height, full-width part cards, stacked control groups and
   thumb-sized targets throughout. The summary (or, in
   Guided, the step navigation) sticks to the widget's foot
   per the sub-desktop block above. */
@container (max-width: 639.98px) {
	.sfw-quote .sfw-popup-body {
		padding: 12px;
	}

	.sfw-quote .sfw-viewer {
		height: 350px;
	}

	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: 380px;
	}

	.sfw-quote .sfw-part-rows {
		grid-template-columns: 1fr;
	}

	/* Tier cards hold two across; the " in stock" suffix
	   sheds so name + colour count fit the narrower cards. */
	.sfw-quote .sfw-tier-stock {
		display: none;
	}

	.sfw-quote .sfw-colour-popover {
		max-width: calc(100% - 16px);
	}

	/* Touch targets: nothing a thumb needs is under 44px. */
	.sfw-quote .sfw-qty-btn {
		width: 40px;
		height: 40px;
		font-size: 17px;
	}

	.sfw-quote .sfw-qty-value {
		min-width: 24px;
		text-align: center;
		font-size: 15px;
	}

	.sfw-quote .sfw-setting-pill {
		min-height: 44px;
		padding-top: 10px;
		padding-bottom: 10px;
	}

	.sfw-quote .sfw-studio-btn {
		height: 44px;
		padding: 0 15px;
	}

	.sfw-guide-step {
		padding: 8px 6px;
		font-size: 13px;
		gap: 5px;
	}

	/* Studio's drawers become full-width sheets. */
	.sfw-quote.sfw-layout-studio .sfw-zone-settings {
		width: calc(100% - 16px);
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-parts {
		width: calc(100% - 16px);
		max-height: 85%;
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-results {
		max-height: 85%;
	}

	.sfw-quote .sfw-studio-bar {
		left: 6px;
		right: 6px;
		bottom: 6px;
		border-radius: 20px;
		flex-wrap: wrap;
		row-gap: 6px;
	}

	.sfw-viewer-empty {
		padding: 16px 12px;
	}

	.sfw-viewer-empty-title {
		font-size: 16px;
	}}

/* ============================================================
   BESPOKE LAYOUTS v3 (2026-11-14) - supersedes the layout
   system above for the five layout themes.

   Bailey rejected two passes that were one skeleton with
   sections toggled: each layout below is its own composition
   with its own structure, surface treatment and collapse
   strategy, and each takes only the space its content needs.
   The zones are moved into layout-owned shells by the widget
   (arrangeLayoutDom): Express merges them into a purchase
   dock, Standard splits a stage column from an option panel,
   Guided flows them through a step stage, and Studio frames
   them around one full-bleed canvas. (Direction v4 retired
   the Workshop layout; four layouts remain.)

   The companion rule lives in the widget: a section, zone or
   group with no real content is display:none (never a
   reserved shell), and there is no standing Colour section -
   colour controls render only while a part has actual
   choices. Breakpoints are container queries on the widget
   width, and each layout picks its own thresholds.
   ============================================================ */

/* --- shared v3 hygiene --- */

.sfw-quote .sfw-viewer-wrap {
	margin-bottom: 0;
}

.sfw-quote .sfw-part-rows {
	margin-bottom: 0;
}

.sfw-quote .sfw-popup-body {
	padding: 14px;
}

/* Layout shells: inert and hidden until their layout owns
   the zones. */
.sfw-express-dock,
.sfw-express-row,
.sfw-standard-row,
.sfw-standard-main,
.sfw-standard-panel,
.sfw-guided-main {
	display: none;
}

.sfw-quote.sfw-layout-express .sfw-express-dock {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* Express (v4.1): viewer + dock form the row; the footer
   band (results + summary) runs full width beneath it. */
.sfw-quote.sfw-layout-express .sfw-express-row {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sfw-quote.sfw-layout-standard .sfw-standard-row {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.sfw-quote.sfw-layout-standard .sfw-standard-main {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

.sfw-quote.sfw-layout-standard .sfw-standard-panel {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.sfw-quote.sfw-layout-guided .sfw-guided-main {
	display: flex;
	flex-direction: column;
	gap: 14px;
	min-width: 0;
}

/* Layout-native tab strip (Standard's panel tabs). */
.sfw-standard-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sfw-panel-tab {
	border: 1.5px solid #d5dce8;
	background: #fff;
	color: #40506b;
	border-radius: 999px;
	padding: 7px 14px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	cursor: pointer;
	min-height: 36px;
}

.sfw-panel-tab.is-active {
	background: var(--sfw-primary);
	border-color: var(--sfw-primary);
	color: #fff;
}

/* Direct colour choices (plain parts): swatch pills with
   names, rendered only while a real choice exists. */
.sfw-colour-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sfw-colour-choice {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 13px 6px 7px;
	border: 1.5px solid #d5dce8;
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	color: #16294d;
	min-height: 40px;
}

.sfw-colour-choice.is-selected {
	border-color: var(--sfw-accent);
	box-shadow: 0 0 0 1px var(--sfw-accent);
	background: color-mix(in srgb, var(--sfw-accent) 16%, #ffffff);
}

.sfw-colour-choice-dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	flex: none;
	position: relative;
	overflow: hidden;
	box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
}

/* ============================================================
   EXPRESS - a compact checkout dock. The viewer and the dock
   are one merged surface; the dock is only ever as tall as
   the choices, quantity, total and CTA inside it. Quote
   detail is one expandable line, never a standing band.
   ============================================================ */

.sfw-quote.sfw-layout-express .sfw-layout {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.sfw-quote.sfw-layout-express .sfw-express-dock {
	background: #fff;
	border: 1px solid #e3e8f0;
	border-top: none;
	border-radius: 0 0 12px 12px;
	/* Visible, not hidden: the More options popover must be
	   able to spill over the zones below it. Zone backgrounds
	   are transparent, so nothing needs clipping. */
	overflow: visible;
	transition: flex-basis 0.35s ease, width 0.35s ease,
		max-height 0.35s ease, opacity 0.3s ease,
		transform 0.35s ease, visibility 0.35s;
}

/* Direction v4: before a part is sliced the dock renders
   nothing at all - no elements, no reserved whitespace; the
   viewer stands alone at full width. When the first part
   settles, the dock slides in and the viewer gives way. */
.sfw-quote.sfw-layout-express.sfw-express-dock-off .sfw-express-dock {
	flex-basis: 0;
	width: 0;
	max-height: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	border: none;
	overflow: hidden;
}

.sfw-quote.sfw-layout-express.sfw-express-dock-off .sfw-viewer {
	border-radius: 12px;
}

.sfw-quote.sfw-layout-express .sfw-viewer {
	border-radius: 12px 12px 0 0;
	height: 380px;
}

.sfw-quote.sfw-layout-express .sfw-express-dock .sfw-zone {
	padding: 12px 14px;
}

.sfw-quote.sfw-layout-express .sfw-express-dock .sfw-zone + .sfw-zone {
	border-top: 1px solid #edf1f6;
}

.sfw-quote.sfw-layout-express .sfw-express-dock .sfw-zone-summary {
	padding: 0;
}

/* One part per row in the dock: identity, price and the
   quantity stepper read as the dock's line items. */
.sfw-quote.sfw-layout-express .sfw-part-rows {
	grid-template-columns: 1fr;
	gap: 6px;
}

/* The quote detail stays shut until its line is tapped. */
.sfw-quote.sfw-layout-express .sfw-zone-results {
	display: none;
}

.sfw-quote.sfw-layout-express.sfw-express-details-open .sfw-zone-results {
	display: block;
}

/* Direction v4: inside the dock, the summary line and Add
   to Cart are each full width, stacked. */
.sfw-quote.sfw-layout-express .sfw-popup-footer {
	flex-direction: column;
	align-items: stretch;
	gap: 10px;
}

.sfw-quote.sfw-layout-express .sfw-popup-price {
	text-align: left;
}

/* Direction v4.1: the stat boxes FLEX-WRAP naturally -
   one row when the band is wide enough, wrapping onto new
   lines as it narrows. (v4 forced a single row; Bailey
   reversed that.) */
.sfw-quote.sfw-layout-express .sfw-details.sfw-details-grid {
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	grid-auto-flow: row;
}

.sfw-express-details-toggle {
	display: block;
	width: 100%;
	text-align: left;
	background: none;
	border: none;
	border-top: 1px solid #edf1f6;
	padding: 11px 14px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--sfw-primary);
	cursor: pointer;
	min-height: 44px;
}

/* More options: the dock's extra settings live in one
   popover, never a panel. It is visibility-toggled (not
   display) so its groups keep their layout while shut. */
.sfw-quote.sfw-layout-express .sfw-zone-settings {
	position: relative;
}

.sfw-express-more {
	display: block;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid #d5dce8;
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
	font-size: 13.5px;
	font-weight: 700;
	color: var(--sfw-primary);
	cursor: pointer;
	min-height: 42px;
}

.sfw-express-popover {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 6px);
	z-index: 45;
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: #fff;
	border: 1px solid #d5dce8;
	border-radius: 12px;
	box-shadow: 0 18px 48px rgba(15, 27, 45, 0.28);
	padding: 14px;
	visibility: hidden;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.sfw-express-popover.is-open {
	visibility: visible;
	opacity: 1;
	transform: none;
}

@container (min-width: 900px) {
	/* Desktop dock: attached to the viewer's right edge.
	   The row is top-aligned, never stretched - the dock is
	   exactly as tall as its contents, so no blank band can
	   open up inside it above the summary. (v4.1: the row is
	   the express-row shell; the layout itself stays a
	   column so the footer band stacks beneath it.) */
	.sfw-quote.sfw-layout-express .sfw-express-row {
		flex-direction: row;
		align-items: flex-start;
	}

	.sfw-quote.sfw-layout-express .sfw-zone-viewer {
		flex: 1 1 auto;
		min-width: 0;
	}

	.sfw-quote.sfw-layout-express .sfw-viewer {
		border-radius: 12px 0 0 12px;
		height: 440px;
	}

	.sfw-quote.sfw-layout-express .sfw-express-dock {
		flex: 0 0 332px;
		width: 332px;
		max-height: none;
		border: 1px solid #e3e8f0;
		border-left: none;
		border-radius: 0 12px 12px 0;
	}

	/* Dock off at desktop width: no width at all, slid out
	   to the right; the viewer rounds out on every side. */
	.sfw-quote.sfw-layout-express.sfw-express-dock-off .sfw-express-dock {
		flex-basis: 0;
		width: 0;
		transform: translateX(24px);
	}

	.sfw-quote.sfw-layout-express.sfw-express-dock-off .sfw-viewer {
		border-radius: 12px;
	}}

@container (max-width: 639.98px) {
	.sfw-quote.sfw-layout-express .sfw-viewer {
		height: 320px;
	}

	/* The dock's summary sticks to the widget foot. */
	.sfw-quote.sfw-layout-express .sfw-express-dock {
		overflow: visible;
	}}

/* ============================================================
   STANDARD - a balanced configurator (direction v4). Stage
   column (viewer, parts) on the left and the settings panel
   on the right inside one row; the quote details and the
   summary run FULL WIDTH under the row. All settings show
   before and after slicing. The shop's Scrollable settings
   area toggle picks the panel's height behaviour: on, the
   settings scroll internally at the slicer column's height;
   off, they take their natural height - and either way the
   two columns are the same height, the viewer flexing to
   absorb the difference.
   ============================================================ */

.sfw-quote.sfw-layout-standard .sfw-layout {
	display: flex;
	flex-direction: column;
	/* The prod96 grid block's align-items: start must not leak
	   in: the bands (results, summary) and the row are full
	   width by direction v4. */
	align-items: stretch;
	gap: 16px;
}

.sfw-quote.sfw-layout-standard .sfw-standard-panel {
	background: #fff;
	border: 1px solid #e3e8f0;
	border-radius: 12px;
}

/* The summary is a full-width band under the row (direction
   v4) - the prod96 block's align-self: end + sticky belonged
   to the rail composition and would shrink-wrap the band to
   its content at the right edge. Scoped to the side-by-side
   widths: the stacked-width sticky bar further down the file
   is a different, older behaviour and stays. */
@container (min-width: 1024px) {
	.sfw-quote.sfw-layout-standard .sfw-zone-summary {
		align-self: stretch;
		position: static;
	}
}

.sfw-quote.sfw-layout-standard .sfw-standard-panel .sfw-zone-settings {
	padding: 16px 16px 6px;
}

.sfw-quote.sfw-layout-standard .sfw-standard-main .sfw-part-rows {
	grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}

.sfw-quote.sfw-layout-standard .sfw-standard-tabs {
	margin-bottom: 12px;
}

@container (min-width: 1024px) {
	/* The row stretches: both columns end at the same
	   height, whichever of them is taller. */
	.sfw-quote.sfw-layout-standard .sfw-standard-row {
		flex-direction: row;
		align-items: stretch;
		gap: 20px;
	}

	.sfw-quote.sfw-layout-standard .sfw-standard-main {
		flex: 1 1 auto;
		min-width: 0;
	}

	.sfw-quote.sfw-layout-standard .sfw-standard-panel {
		flex: 0 0 380px;
		width: 380px;
		position: relative;
	}

	.sfw-quote.sfw-layout-standard[data-density="full"] .sfw-standard-panel {
		flex-basis: 408px;
		width: 408px;
	}

	.sfw-quote.sfw-layout-standard[data-density="minimal"] .sfw-standard-panel {
		flex-basis: 336px;
		width: 336px;
	}

	/* The viewer flexes inside the stage column: when the
	   settings run taller, the canvas - not the column -
	   absorbs the difference. */
	.sfw-quote.sfw-layout-standard .sfw-standard-main .sfw-zone-viewer {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
		min-height: 0;
	}

	.sfw-quote.sfw-layout-standard .sfw-viewer-wrap {
		flex: 1 1 auto;
		display: flex;
		flex-direction: column;
	}

	.sfw-quote.sfw-layout-standard .sfw-viewer {
		flex: 1 1 auto;
		height: auto;
		min-height: 480px;
	}

	/* Scrollable settings area ON (the default): the
	   settings fill the panel the row gives them and
	   scroll inside it, so the panel's height is the
	   slicer column's height exactly. The zone is taken
	   out of flow so its full content can never stretch
	   the row past the stage column. */
	.sfw-quote.sfw-layout-standard.sfw-standard-scroll .sfw-standard-panel .sfw-zone-settings {
		position: absolute;
		inset: 0;
		overflow-y: auto;
	}}

@container (min-width: 1500px) {
	.sfw-quote.sfw-layout-standard .sfw-viewer {
		min-height: 580px;
	}}

@container (min-width: 640px) and (max-width: 719.98px) {
	/* Just above phone widths the panel is still too narrow
	   for a mosaic: its groups stack in one column. */
	.sfw-quote.sfw-layout-standard .sfw-zone-settings {
		display: flex;
	}}

@container (min-width: 720px) and (max-width: 1023.98px) {
	/* Tablet: the panel's groups form a two-column mosaic. */
	.sfw-quote.sfw-layout-standard .sfw-zone-settings {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px 18px;
		align-items: start;
	}

	.sfw-quote.sfw-layout-standard .sfw-group-colour {
		grid-column: 1 / -1;
	}}

/* ============================================================
   GUIDED - a checkout-style wizard (direction v4). A slim
   progress header with each step centered over its segment;
   the stage changes shape per step: a full-size upload
   stage, then a persistent preview beside ALL the decision
   groups stacked (no tabs) in a column that scrolls at the
   slicer's height, then a review with the slicer at 2/3
   and the parts at 1/3, details and summary full width.
   ============================================================ */

.sfw-quote.sfw-layout-guided .sfw-layout {
	display: flex;
	flex-direction: column;
	gap: 14px;
	/* The prod96 grid rule's align-items:start leaks into
	   this flex column and shrink-wraps the stage to its
	   content (zero width) - the stage must stretch. */
	align-items: stretch;
}

/* The progress header is a horizontal slim bar in v3; the
   prod96 desktop rule stacked it into a vertical rail. */
.sfw-quote.sfw-layout-guided .sfw-guide-bar {
	flex-direction: row;
	align-items: center;
}

/* Progress as a segmented underline header, not pills. */
.sfw-quote.sfw-layout-guided .sfw-guide-step {
	border: none;
	border-bottom: 2.5px solid #e3e8f0;
	border-radius: 0;
	background: transparent;
	padding: 8px 6px;
}

.sfw-quote.sfw-layout-guided .sfw-guide-step.is-current {
	border-bottom-color: var(--sfw-accent);
	background: transparent;
	color: #16294d;
}

/* Direction v4: each step's number and label are CENTERED
   over their segment, at every width. */
.sfw-quote.sfw-layout-guided .sfw-guide-step {
	justify-content: center;
	text-align: center;
}

/* An empty hint leaves no gap in the nav bar. */
.sfw-quote.sfw-layout-guided .sfw-guide-hint:empty {
	display: none;
}

/* Direction v4: step 1's Next button is CENTERED - the
   Back button leaves the row entirely on step 1 (it has
   nowhere to go), and the hint takes its own line above. */
.sfw-quote.sfw-layout-guided.sfw-guide-at-1 .sfw-guide-nav {
	flex-wrap: wrap;
	justify-content: center;
}

.sfw-quote.sfw-layout-guided.sfw-guide-at-1 .sfw-guide-back {
	display: none;
}

.sfw-quote.sfw-layout-guided.sfw-guide-at-1 .sfw-guide-hint {
	order: -1;
	flex: 1 1 100%;
}

.sfw-quote.sfw-layout-guided.sfw-guide-at-1 .sfw-guide-next {
	margin-left: 0;
}

.sfw-quote.sfw-layout-guided.sfw-guide-at-1 .sfw-viewer {
	height: 520px;
}

.sfw-quote.sfw-layout-guided.sfw-guide-at-2 .sfw-viewer {
	height: 340px;
}

.sfw-quote.sfw-layout-guided.sfw-guide-at-3 .sfw-viewer {
	height: 300px;
}

@container (min-width: 900px) {
	/* Step 2 (direction v4): preview on the left, ALL the
	   decision groups stacked on the right - no tabs. The
	   options column scrolls internally at the slicer's
	   height (its rule lives in the 640px block below).
	   Step 3: the slicer takes 2/3 of the space and the
	   parts list the remaining 1/3 on the right; the quote
	   details and the summary run full width under both. */
	.sfw-quote.sfw-layout-guided.sfw-guide-at-2 .sfw-guided-main {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
		grid-template-areas:
			"viewer settings"
			"parts settings";
		gap: 16px 20px;
		align-items: start;
	}

	.sfw-quote.sfw-layout-guided.sfw-guide-at-3 .sfw-guided-main {
		display: grid;
		grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
		grid-template-areas:
			"viewer parts"
			"results results"
			"summary summary";
		gap: 14px 20px;
		align-items: start;
	}

	.sfw-quote.sfw-layout-guided .sfw-zone-viewer { grid-area: viewer; }
	.sfw-quote.sfw-layout-guided .sfw-zone-parts { grid-area: parts; }
	.sfw-quote.sfw-layout-guided .sfw-zone-settings { grid-area: settings; }
	.sfw-quote.sfw-layout-guided .sfw-zone-results { grid-area: results; }
	.sfw-quote.sfw-layout-guided .sfw-zone-summary { grid-area: summary; }}

@container (min-width: 640px) {
	/* Step 2's options side scrolls internally in a
	   container whose height matches the slicer height
	   (the step-2 viewer is 340px at these widths). */
	.sfw-quote.sfw-layout-guided.sfw-guide-at-2 .sfw-zone-settings {
		height: 340px;
		overflow-y: auto;
	}}

@container (max-width: 639.98px) {
	/* App-like step screens: the preview shrinks as the
	   flow advances so the footprint stays small. */
	.sfw-quote.sfw-layout-guided.sfw-guide-at-1 .sfw-viewer {
		height: 380px;
	}

	.sfw-quote.sfw-layout-guided.sfw-guide-at-2 .sfw-viewer {
		height: 230px;
	}

	.sfw-quote.sfw-layout-guided.sfw-guide-at-3 .sfw-viewer {
		height: 190px;
	}

	/* Step 2 on mobile (direction v4): no inner scroll -
	   the options side takes its full height and the page
	   scrolls. Steps stack vertically. */
	.sfw-quote.sfw-layout-guided.sfw-guide-at-2 .sfw-zone-settings {
		height: auto;
		overflow: visible;
	}}

/* ============================================================
   STUDIO - an immersive analysis canvas (direction v4).
   Full-bleed stage; the parts and options panels take real
   space beside the canvas (left and right); the quote
   panel stays a sheet over it, opened by the "i" button
   where the metric chips used to live (Studio has no chips
   now); a floating pill dock carries the price only, with
   Add to Cart in its button cluster.
   ============================================================ */

.sfw-studio-hud {
	position: absolute;
	top: 12px;
	left: 64px;
	right: 76px;
	z-index: 31;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	pointer-events: none;
}

.sfw-hud-chip {
	background: rgba(13, 18, 28, 0.72);
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.3);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* The dock: a floating pill centred on the stage's foot. */
.sfw-quote.sfw-layout-studio .sfw-studio-bar {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
	width: max-content;
	max-width: calc(100% - 20px);
	bottom: 12px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

/* The quote popover's geometry lives with its base rule
   above (v4.1: centred in the slicer space at 80% width);
   the v4 bottom-sheet positioning is gone. */

@container (min-width: 1024px) {
	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: 620px;
	}}

@container (min-width: 640px) and (max-width: 1023.98px) {
	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: 480px;
	}}

/* Studio's stacked widths (v4.1): the breakpoint covers
   640 itself, so the 640 preview takes the phone stacking,
   not the 50/50 tablet arrangement. */
@container (max-width: 640px) {
	.sfw-quote.sfw-layout-studio .sfw-viewer {
		height: 400px;
	}

	/* The metric chips stay pinned in the viewer's top band
	   at phone widths too (bespoke v3 fix): the row keeps the
	   colour badge's 12px top inset and 72px side insets (the
	   corner buttons end at 68px), and the chips shrink a step
	   so the row holds one line instead of wrapping down the
	   canvas. Measured on the reference Benchy: the three
	   chips need 195px at this size, the row gets 218px.
	   (The first draft of this rule was written for Studio -
	   drop below the badge row - but sat here unscoped and
	   dragged the row 64px down the viewer in EVERY layout
	   at this width.) */
	.sfw-studio-hud {
		top: 12px;
		left: 72px;
		right: 72px;
		gap: 4px;
	}

	.sfw-hud-chip {
		padding: 3px 6px;
		font-size: 10.5px;
	}

	/* Direction v4 on mobile: the panels render BELOW the
	   slicer at full height - no inner scrolling, the page
	   scrolls. The quote sheet still floats above the pill. */
	.sfw-quote.sfw-layout-studio .sfw-layout {
		flex-direction: column;
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-viewer {
		order: 1;
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-parts {
		order: 2;
		width: auto;
		flex: 0 0 auto;
		/* Below the slicer the panel's height IS its
		   content height - the row layout's size
		   containment comes off. */
		contain: none;
		max-height: 0;
		transform: translateY(-8px);
		transition: max-height 0.35s ease, opacity 0.3s ease,
			transform 0.35s ease, visibility 0.35s;
	}

	.sfw-quote.sfw-layout-studio .sfw-zone-settings {
		order: 3;
		width: auto;
		flex: 0 0 auto;
		contain: none;
		max-height: 0;
		transform: translateY(-8px);
		transition: max-height 0.35s ease, opacity 0.3s ease,
			transform 0.35s ease, visibility 0.35s;
	}

	.sfw-quote.sfw-layout-studio.sfw-studio-open-parts .sfw-zone-parts {
		width: auto;
		flex-basis: auto;
		max-height: 1600px;
		overflow: visible;
		margin: 12px 0 0;
		transform: none;
	}

	.sfw-quote.sfw-layout-studio.sfw-studio-open-options .sfw-zone-settings {
		width: auto;
		flex-basis: auto;
		max-height: 1600px;
		overflow: visible;
		margin: 12px 0 0;
		transform: none;
	}

	/* The quote popover stays centred in the slicer space
	   on the stacked widths too (v4.1): 80% of the slicer,
	   never a bottom sheet. */
	.sfw-quote.sfw-layout-studio .sfw-zone-results {
		left: 50%;
		top: 50%;
		right: auto;
		bottom: auto;
		width: 80%;
		max-height: 82%;
	}

	.sfw-quote.sfw-layout-studio .sfw-studio-bar {
		border-radius: 20px;
		flex-wrap: wrap;
		justify-content: center;
		row-gap: 6px;
	}}

/* ============================================================
   UX COHERENCE PASS (2026-11-14) - one component kit across
   the four layouts. The value unifications live with their
   components above (primary/secondary buttons, choice pills,
   cards, panels, popovers, the total); this block carries
   the shared interaction states, the disclosure affordance,
   and the placement fixes that key off several components
   at once. Layouts differ in arrangement and density only -
   never in how a component looks or behaves.
   ============================================================ */

/* One focus ring for every interactive component. */
.sfw-quote .sfw-entry-btn:focus-visible,
.sfw-quote .sfw-viewer-upload-btn:focus-visible,
.sfw-quote .sfw-viewer-sample-btn:focus-visible,
.sfw-quote .sfw-popup-btn:focus-visible,
.sfw-quote .sfw-guide-btn:focus-visible,
.sfw-quote .sfw-guide-step:focus-visible,
.sfw-quote .sfw-panel-tab:focus-visible,
.sfw-quote .sfw-tier:focus-visible,
.sfw-quote .sfw-setting-pill:focus-visible,
.sfw-quote .sfw-colour-choice:focus-visible,
.sfw-quote .sfw-slot-pill:focus-visible,
.sfw-quote .sfw-studio-btn:focus-visible,
.sfw-quote .sfw-studio-info-btn:focus-visible,
.sfw-quote .sfw-express-more:focus-visible,
.sfw-quote .sfw-express-details-toggle:focus-visible,
.sfw-quote .sfw-part-add-tile:focus-visible,
.sfw-quote .sfw-qty-btn:focus-visible {
	outline: 2px solid var(--sfw-primary);
	outline-offset: 2px;
}

/* One hover cue for the choice controls: the border warms
   to the primary colour. A selected control keeps its
   accent treatment. */
.sfw-quote .sfw-panel-tab:hover:not(.is-active),
.sfw-quote .sfw-tier:hover:not(.is-selected),
.sfw-quote .sfw-setting-pill:hover:not(.is-selected),
.sfw-quote .sfw-colour-choice:hover:not(.is-selected),
.sfw-quote .sfw-slot-pill:hover:not(.is-pending):not(:disabled) {
	border-color: var(--sfw-primary);
}

/* Disclosures carry a chevron that turns when they open:
   Express's More options button and its Quote details row
   read as expandable at a glance. */
.sfw-express-more,
.sfw-express-details-toggle {
	position: relative;
	padding-right: 36px;
}

.sfw-express-more::after,
.sfw-express-details-toggle::after {
	content: '';
	position: absolute;
	right: 13px;
	top: 50%;
	width: 10px;
	height: 6px;
	transform: translateY(-50%);
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2316294d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
	transition: transform 0.15s ease;
}

.sfw-express-more[aria-expanded="true"]::after,
.sfw-quote.sfw-express-details-open .sfw-express-details-toggle::after {
	transform: translateY(-50%) rotate(180deg);
}

@container (max-width: 639.98px) {
	/* Standard on a phone: the part rows run two-across
	   (card + add tile side by side, the arrangement that
	   already reads well at full width) instead of stacking
	   full-width, and the option panel sheds its dead space
	   (tighter padding and group gaps). Nothing is hidden -
	   the same content takes materially less vertical room.
	   The quote details grid stays two-up: that is its
	   settled phone design (values wrap inside their cells). */
	.sfw-quote.sfw-layout-standard .sfw-part-rows {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sfw-quote.sfw-layout-standard .sfw-layout {
		gap: 12px;
	}

	.sfw-quote.sfw-layout-standard .sfw-standard-panel .sfw-zone-settings {
		padding: 12px 12px 4px;
		gap: 10px;
	}

	/* Studio's wrapped phone dock is taller; the progress
	   strip floats clear above it. */
	.sfw-quote.sfw-layout-studio .sfw-viewer .sfw-progress-strip {
		bottom: 156px;
	}}
/* ============================================================
   DIRECTION V4.1 (2026-11-14 feedback round)
   ============================================================ */

/* --- T1: Studio's settings panel - group titles sit ABOVE
   their options and the options span the panel's full
   width (the shared kit's side-by-side label column stands
   down in this panel only). */
.sfw-quote.sfw-layout-studio .sfw-zone-settings .sfw-setting-row {
	grid-template-columns: minmax(0, 1fr);
	row-gap: 6px;
}

.sfw-quote.sfw-layout-studio .sfw-zone-settings .sfw-setting-label {
	padding-top: 0;
}

/* --- G2: Guided's quote details - width-driven rows: one
   row on ultrawide, four per row on desktop, flexing down
   below that (the base grid's two). */
@container (min-width: 1024px) {
	.sfw-quote.sfw-layout-guided .sfw-details.sfw-details-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@container (min-width: 1600px) {
	.sfw-quote.sfw-layout-guided .sfw-details.sfw-details-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: minmax(0, 1fr);
	}
}

/* --- Guided step spec (Bailey, 2026-11-15): step 1 is
   the drop box alone. The v4.1 G1 prep rules that gave
   step 1 step 2's arrangement are removed with the prep
   state itself; step 1 keeps its v4 full-size viewer. */

/* --- G3: Guided's Add to Cart rides the step footer
   beside Back, in the kit's primary styling. */
.sfw-quote.sfw-layout-guided .sfw-guide-nav .sfw-popup-add {
	margin-left: 10px;
	flex: none;
}

/* --- S3: at the 640 width Standard's settings area is a
   flex ROW of narrow group boxes (the 640-719.98 band
   above); in that band the groups stack full width instead
   and the material cards span the FULL row, colour choices
   the full width too. Below 640 the settled phone design
   (cards sharing a row) is untouched. */
@container (min-width: 640px) and (max-width: 719.98px) {
	.sfw-quote.sfw-layout-standard .sfw-zone-settings {
		flex-direction: column;
		align-items: stretch;
	}

	.sfw-quote.sfw-layout-standard .sfw-tiers {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfw-quote.sfw-layout-standard .sfw-colour-choices {
		width: 100%;
	}
}

/* --- G5 / T6: at 640 and below, Guided's materials span
   the full row and Studio's stacked materials span the
   full panel width - the same full-row rule in the flows
   that stack there. Studio's settings zone is a flex
   column with align-items: start (its desktop panel
   shrink-wraps groups to their widest row); in the
   stacked arrangement the groups must stretch instead,
   or the tiers grid never sees the panel's width. */
@container (max-width: 640px) {
	.sfw-quote.sfw-layout-studio .sfw-zone-settings {
		align-items: stretch;
	}

	/* Guided at 640 (G5): the generic narrow-box band
	   (640-1023.98) puts the settings zone's groups two
	   across; at 640 exactly, Guided's groups stack full
	   width instead, like Standard's band above. */
	.sfw-quote.sfw-layout-guided .sfw-zone-settings {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfw-quote.sfw-layout-guided .sfw-tiers,
	.sfw-quote.sfw-layout-studio .sfw-zone-settings .sfw-tiers {
		grid-template-columns: minmax(0, 1fr);
	}

	.sfw-quote.sfw-layout-guided .sfw-colour-choices,
	.sfw-quote.sfw-layout-studio .sfw-colour-choices {
		width: 100%;
	}
}

/* --- E1: the Express footer band is a layout-level band:
   the legacy rail rule (sticky, shrink-wrapped to the
   right edge) stands down, and the layout stretches its
   children - the legacy align-items:start leak would
   otherwise shrink-wrap the row shell to its contents. */
.sfw-quote.sfw-layout-express .sfw-layout {
	align-items: stretch;
}

.sfw-quote.sfw-layout-express .sfw-zone-summary {
	align-self: stretch;
	position: static;
}

/* --- T3: a stale Studio quote reads stale - the total
   dims while changes are queued; the button swap to
   Re-slice is the primary signal. */
.sfw-quote .sfw-popup-footer.sfw-quote-stale .sfw-popup-price {
	opacity: 0.55;
}

/* --- A1: entrances. Bands and Guided steps appear with a
   short fade-rise instead of an instant display flip; the
   Express dock and Studio panels keep their transitions,
   which now actually run (the DOM no longer churns under
   them - see arrangeLayoutDom). */
@keyframes sfwBandIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.sfw-quote .sfw-band-in,
.sfw-quote .sfw-step-in {
	animation: sfwBandIn 0.32s ease;
}

.sfw-quote.sfw-layout-express.sfw-express-details-open .sfw-zone-results {
	animation: sfwBandIn 0.3s ease;
}

/* ============================================================
   STUDIO PILL (Bailey, 2026-11-15): the bottom pill stays
   hidden until a model has been successfully sliced, fades
   in when it lands, centres its buttons while it carries
   no price, and leaves the viewer's bottom edge to the
   progress strip while a slice is in flight.
   ============================================================ */

/* The pill fades in and out on the JS-driven pill-off
   class; visibility rides along so a hidden pill takes no
   clicks and leaves the canvas fully clear. */
.sfw-quote.sfw-layout-studio .sfw-studio-bar {
	transition: opacity 0.3s ease, visibility 0.3s;
}

.sfw-quote.sfw-layout-studio.sfw-studio-pill-off .sfw-studio-bar {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

/* While the pill is off (a slice in flight), the progress
   strip sits right at the bottom of the slicer area
   instead of floating clear of the pill; it glides
   between the two spots on its own bottom transition. */
.sfw-quote.sfw-layout-studio .sfw-viewer .sfw-progress-strip {
	transition: max-height 0.35s ease, opacity 0.35s ease,
		padding 0.35s ease, bottom 0.3s ease;
}

.sfw-quote.sfw-layout-studio.sfw-studio-pill-off .sfw-viewer .sfw-progress-strip {
	bottom: 10px;
}

/* No price yet: the price space collapses out of the pill
   entirely - no width, no gaps - and the CTA buttons sit
   centred in what remains. Once the price lands, the
   space opens on the left (price plus its gap) and the
   buttons shift to the right as before. */
.sfw-quote.sfw-layout-studio.sfw-studio-noprice .sfw-studio-bar {
	gap: 0;
	/* The bar's wider left padding is the price's
	   breathing room; with no price it would leave the
	   centred buttons 3px off centre. */
	padding-left: 8px;
}

.sfw-quote.sfw-layout-studio.sfw-studio-noprice .sfw-studio-bar .sfw-popup-footer {
	flex: 0 0 0;
	width: 0;
	opacity: 0;
	overflow: hidden;
}

.sfw-quote.sfw-layout-studio.sfw-studio-noprice .sfw-studio-btns {
	margin-left: 0;
}

/* Ultrawide: the Options panel takes 2/5 of the widget
   width instead of the fixed 320px. The Parts panel
   keeps its 300px at every width. */
@container (min-width: 1600px) {
	.sfw-quote.sfw-layout-studio.sfw-studio-open-options .sfw-zone-settings {
		flex-basis: 40%;
		width: 40%;
	}
}

/* ============================================================
   REDUCED MOTION (direction v4) - the widget's show/hide
   moves are animated (the Express dock slides in, Studio's
   panels slide, drawers and popovers fade/slide, the
   progress strip slides), and every transition stands down
   when the user prefers reduced motion.
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
	.sfw-quote *,
	.sfw-quote *::before,
	.sfw-quote *::after {
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
	}
}
