/* The quote page (/quote/): file, options, live price, delivery; and, at the end, the order-success page (/order/success/), which loads this file too. Loaded after site.css. Everything here is layout and presentation:
   quote-ui.js and uploader-cf.js find their elements by id and name, which are untouched. No external resource references in this file (docs/DESIGN.md).
   Sections: 1 frame and progress · 2 dropzone · 3 states under the drop · 4 instrument panel · 5 option form · 6 price panel · 7 delivery · 8 responsive */

/* ============ 1. Frame and progress ============ */
.wrap.quote { max-width: calc(1160px + 2 * var(--gutter)); }
.q-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--space-4) var(--space-6); margin-bottom: var(--space-4); }
.q-top h1 { margin: 0; }
.q-top .eyebrow { margin-bottom: var(--space-3); }
.quote .live-page { margin: 0 0 var(--space-5); }

/* Three-step progress. Pure CSS: it reads which of #result, #options and #delivery are showing, so no script drives it. */
.qp { display: flex; align-items: center; margin: 0 0 6px; padding: 0; list-style: none; }
.qp li { display: flex; align-items: center; gap: 10px; font: 500 var(--fs-mono-s)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); transition: color var(--dur-2); }
.qp li + li::before { content: ""; flex: none; width: clamp(16px, 4vw, 44px); height: 1px; margin: 0 12px 0 4px; background: var(--line-strong); transition: background-color var(--dur-2); }
.qp b {
  display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 8px; font: 500 .75rem/1 var(--font-mono); letter-spacing: 0;
  color: var(--text-2); background: var(--surface); border: 1px solid var(--line-strong); transition: background-color var(--dur-2), border-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2);
}
/* current */
.quote .qp li:nth-child(1), .quote:has(#options:not([hidden])) .qp li:nth-child(2), .quote:has(#delivery:not([hidden])) .qp li:nth-child(3) { color: var(--text); }
.quote .qp li:nth-child(1) b, .quote:has(#options:not([hidden])) .qp li:nth-child(2) b, .quote:has(#delivery:not([hidden])) .qp li:nth-child(3) b {
  color: var(--on-signal); font-weight: 600; background: linear-gradient(180deg, var(--signal-hi), var(--signal)); border-color: rgba(255, 160, 110, .55); box-shadow: 0 0 16px -2px var(--glow);
}
.quote:has(#options:not([hidden])) .qp li:nth-child(2)::before, .quote:has(#delivery:not([hidden])) .qp li:nth-child(3)::before { background: var(--signal); }
/* done: a tick replaces the number */
.quote:has(#options:not([hidden])) .qp li:nth-child(1), .quote:has(#delivery:not([hidden])) .qp li:nth-child(2) { color: var(--text-2); }
.quote:has(#options:not([hidden])) .qp li:nth-child(1) b, .quote:has(#delivery:not([hidden])) .qp li:nth-child(2) b {
  font-size: 0; color: var(--good); background: rgba(52, 211, 153, .1); border-color: rgba(52, 211, 153, .4); box-shadow: none;
}
.quote:has(#options:not([hidden])) .qp li:nth-child(1) b::after, .quote:has(#delivery:not([hidden])) .qp li:nth-child(2) b::after { content: "\2713"; font-size: .75rem; font-weight: 700; }

/* ============ 2. Dropzone ============ */
.quote .drop {
  margin-top: 0; gap: 8px; min-height: clamp(280px, 36vw, 340px); align-content: center; padding: clamp(40px, 7vw, 80px) var(--space-5); overflow: hidden;
  border: 1px solid transparent; border-radius: var(--r-lg);
  background: radial-gradient(60% 90% at 50% 0%, rgba(255, 107, 26, .1), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .04), rgba(255, 255, 255, .012));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.quote .drop:hover { border-color: transparent; background-color: rgba(255, 107, 26, .03); }
.quote .drop.over, .quote .drop:focus-visible { border-color: transparent; border-style: solid; background-color: rgba(255, 107, 26, .06); }
.quote .drop:focus-visible { box-shadow: 0 0 0 3px rgba(255, 107, 26, .35), 0 20px 60px -20px var(--glow); }
.quote .drop p:first-of-type { font-size: clamp(1.125rem, 1rem + .6vw, 1.375rem); font-weight: 500; letter-spacing: -.015em; }
.quote .drop strong { font-weight: 500; }
.quote .drop .helper { max-width: 56ch; }
.quote .drop > :not(.drop-frame):not(.drop-scan) { position: relative; z-index: 1; }

/* The icon: a quiet breathing glow, a lift on hover */
.quote .drop::before {
  width: 64px; height: 64px; margin-bottom: 14px; border-radius: 18px; font-size: 1.75rem; position: relative; z-index: 1;
  animation: q-breathe 4.5s ease-in-out infinite; transition: transform var(--dur-2) var(--ease), border-color var(--dur-2);
}
.quote .drop:hover::before, .quote .drop:focus-visible::before, .quote .drop.over::before { transform: translateY(-4px); border-color: rgba(255, 138, 71, .6); animation: none; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 0 34px -4px var(--glow); }
@keyframes q-breathe { 50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 36px -2px var(--glow); } }

/* The dashed frame is an inline SVG so it follows the rounded corners; the dashes march on hover, focus and drag */
.drop-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.drop-frame rect {
  fill: none; stroke: rgba(255, 255, 255, .22); stroke-width: 1.5; stroke-dasharray: 7 7; x: .75px; y: .75px; width: calc(100% - 1.5px); height: calc(100% - 1.5px); rx: 21.25px;
  transition: stroke var(--dur-2), stroke-width var(--dur-2);
}
.quote .drop:hover .drop-frame rect, .quote .drop:focus-visible .drop-frame rect { stroke: rgba(255, 138, 71, .85); animation: q-march 1.1s linear infinite; }
.quote .drop.over .drop-frame rect { stroke: var(--signal); stroke-width: 2; animation: q-march .45s linear infinite; }
@keyframes q-march { to { stroke-dashoffset: -14; } }

/* The scan: a soft beam sweeps the box while it is live */
.drop-scan {
  position: absolute; left: 0; right: 0; top: -150px; height: 150px; pointer-events: none; opacity: 0; transition: opacity var(--dur-2);
  background: linear-gradient(180deg, transparent, rgba(255, 107, 26, .08) 55%, rgba(255, 138, 71, .3) 96%);
  border-bottom: 1px solid rgba(255, 170, 120, .75); box-shadow: 0 6px 22px rgba(255, 107, 26, .45);
}
.quote .drop:hover .drop-scan, .quote .drop:focus-visible .drop-scan, .quote .drop.over .drop-scan { opacity: 1; animation: q-scan 2.8s linear infinite; }
.quote .drop.over .drop-scan { animation-duration: 1.4s; }
@keyframes q-scan { from { top: -150px; } to { top: 100%; } }

/* Crop marks close in on the corners when the box is live */
.quote .drop::after {
  content: ""; position: absolute; inset: 16px; pointer-events: none; opacity: .35; --c: rgba(255, 138, 71, .9); --l: 14px; background-repeat: no-repeat;
  background-image: linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c));
  background-size: var(--l) 1px, 1px var(--l), var(--l) 1px, 1px var(--l), var(--l) 1px, 1px var(--l), var(--l) 1px, 1px var(--l);
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
  transition: inset var(--dur-3) var(--ease), opacity var(--dur-2);
}
.quote .drop:hover::after, .quote .drop:focus-visible::after, .quote .drop.over::after { inset: 10px; opacity: 1; }

/* Once a file is chosen the box shrinks to a one-line bar: still there to replace the file */
.quote:has(#result:not([hidden])) .drop { min-height: 0; margin-top: var(--space-5); padding: 14px 18px; grid-auto-flow: column; justify-content: start; align-content: center; justify-items: start; gap: 6px 16px; text-align: left; }
.quote:has(#result:not([hidden])) .drop::before { width: 40px; height: 40px; margin: 0; border-radius: 12px; font-size: 1.125rem; animation: none; }
.quote:has(#result:not([hidden])) .drop .helper { display: none; }
.quote:has(#result:not([hidden])) .drop p:first-of-type { font-size: 1rem; }
.quote:has(#result:not([hidden])) .drop::after { display: none; }
.quote:has(#result:not([hidden])) .drop-scan { display: none; }
.quote:has(#result:not([hidden])) .drop-frame rect { rx: 15.25px; }
.quote:has(#error:not([hidden])) .drop-frame rect { stroke: rgba(248, 113, 113, .6); }
.quote:has(#error:not([hidden])) .drop::after { --c: rgba(248, 113, 113, .85); }

/* ============ 3. States under the drop: error, analysing, what we take ============ */
.quote p#error { margin: var(--space-3) 0 0; padding: 12px 16px; font-size: .9375rem; }
.quote p.q-analysing {
  display: flex; align-items: center; gap: 12px; margin: var(--space-4) 0 0; padding: 12px 16px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: rgba(10, 16, 28, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
  font: 500 .875rem/1.45 var(--font-mono); letter-spacing: .005em; color: var(--text-2);
}
.q-analysing::before { content: ""; flex: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .15); border-top-color: var(--signal); animation: spin .7s linear infinite; }
.quote .q-specs { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: var(--space-4) 0 0; }
.q-specs .readout { grid-template-columns: 1fr; padding: 16px 20px; }
.q-specs dd { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px; font-size: 1.375rem; }
.q-specs dd.q-spec-list { font-size: 1.0625rem; letter-spacing: -.02em; line-height: 1.5; }
.quote:has(#result:not([hidden])) .q-specs { display: none; }

/* ============ 4. The instrument panel: preview and readouts ============ */
.q-result {
  margin-top: var(--space-4); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .015)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 24px 48px -32px rgba(0, 0, 0, .8);
}
.q-result-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: 12px 20px; border-bottom: 1px solid var(--line); font: 500 var(--fs-mono-s)/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); }
.q-result-head > span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.q-result-head > span:first-child::before { content: ""; width: 6px; height: 6px; background: var(--signal); box-shadow: 0 0 10px var(--glow); }
.q-hint { display: none; letter-spacing: .02em; text-transform: none; }
.q-result:has(#preview canvas) .q-hint { display: inline; }
.q-result-body { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.q-viewer { position: relative; min-height: 380px; border-right: 1px solid var(--line); }
.q-viewer:not(:has(canvas)) { min-height: 150px; }
.q-viewer .preview { position: absolute; inset: 0; height: auto; margin: 0; border: 0; border-radius: 0; }
.q-viewer .preview > p.q-nopreview { display: grid; place-items: center; height: 100%; margin: 0; padding: var(--space-5); text-align: center; font-size: .9375rem; }
/* Viewfinder marks over the model (pointer-events off so the model still orbits) */
.q-viewer::after {
  content: ""; position: absolute; inset: 14px; pointer-events: none; --c: rgba(125, 211, 252, .55); --l: 14px; background-repeat: no-repeat;
  background-image: linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)),
    linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c)), linear-gradient(var(--c), var(--c));
  background-size: var(--l) 1px, 1px var(--l), var(--l) 1px, 1px var(--l), var(--l) 1px, 1px var(--l), var(--l) 1px, 1px var(--l);
  background-position: left top, left top, right top, right top, left bottom, left bottom, right bottom, right bottom;
}
/* Upload progress: a hairline along the foot of the viewer */
.q-viewer .bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 3px; margin: 0; border-radius: 0; }
.q-readout { display: flex; flex-direction: column; gap: var(--space-4); padding: 20px; min-width: 0; }
.q-readout .summary { display: flex; align-items: flex-start; gap: 10px; margin: 0; font: 500 .9375rem/1.5 var(--font-body); letter-spacing: 0; color: var(--text); }
.q-readout .summary::before { content: "i"; flex: none; display: grid; place-items: center; width: 20px; height: 20px; margin-top: 1px; border-radius: 50%; font: 700 .75rem/1 var(--font-mono); color: var(--bg); background: var(--ice); }
.q-readout:has(#fx-weight:not(:empty)) .summary::before { content: "\2713"; background: var(--good); }
.q-readout .helper { margin: 0; }
.q-facts { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 1fr; flex: 1; margin: 0; }
.q-facts .readout { grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 14px 18px; }
.q-facts dd { text-align: right; font-size: clamp(1.25rem, 1.1rem + .5vw, 1.5rem); white-space: nowrap; }
.q-facts dd small { margin-left: 6px; }
.q-facts .readout.signal dd { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.q-facts .readout:has(dd > span:empty) { display: none; }
.q-readout:has(#fx-weight:empty) .q-facts { display: none; }
/* No preview (a file we quote by hand): the readout column has only a sentence */
.q-viewer:not(:has(canvas)) + .q-readout { justify-content: center; }

/* While the figures are being worked out the readout column shows a quiet placeholder; if the file fails after the preview is up, the column folds away */
.quote:has(#analysing:not([hidden])) .q-readout:has(#summary[hidden])::before {
  content: ""; display: block; flex: 1; min-height: 240px; border-radius: var(--r); border: 1px solid var(--line);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .07), transparent) -100% 0 / 60% 100% no-repeat, repeating-linear-gradient(180deg, rgba(255, 255, 255, .02) 0 59px, var(--line) 59px 60px);
  animation: q-shimmer 1.6s linear infinite;
}
@keyframes q-shimmer { to { background-position: 220% 0, 0 0; } }
.quote:not(:has(#analysing:not([hidden]))) .q-result-body:has(#summary[hidden]) { grid-template-columns: minmax(0, 1fr); }
.quote:not(:has(#analysing:not([hidden]))) .q-result-body:has(#summary[hidden]) .q-readout { display: none; }
.quote:not(:has(#analysing:not([hidden]))) .q-result-body:has(#summary[hidden]) .q-viewer { border-right: 0; }

/* ============ 5. The option form: two columns, price panel sticky ============ */
.q-form { grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); column-gap: var(--space-6); row-gap: var(--space-4); align-items: start; margin-top: var(--space-6); }
.q-form > * { grid-column: 1; min-width: 0; }
.q-form > .q-side { grid-column: 2; grid-row: 1 / span 5; position: sticky; top: calc(var(--hdr-h) + 16px); align-self: start; }
.q-group legend { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.q-group legend::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--signal); box-shadow: 0 0 10px var(--glow); }
.q-group .helper.link { margin: var(--space-1) 0 0; justify-self: start; }

/* Option cards: radio, text, and for turnaround a trailing figure */
.q-form .opt { align-items: center; gap: 14px; padding: 15px 18px; border-radius: 12px; }
.q-form .opt input { margin-top: 0; }
.q-form .opt > span:first-of-type { flex: 1; min-width: 0; font-size: .9375rem; }
.q-form .opt b { font-size: 1rem; }
.q-form .opt:has(input:checked) b { color: #fff; }
.q-form .opt-delta, .q-form .opt-end { flex: none; margin-left: auto; }
.q-form .opt-delta { padding: 5px 9px; border-radius: 7px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); font: 500 .8125rem/1 var(--font-mono); }
.q-form .opt-end { font: 600 1rem/1 var(--font-mono); color: var(--text); }
/* The script writes the dispatch date, or the reason a turnaround is closed, into the <em>. Closed cards stay readable: only the name and the control dim. */
.q-form .opt em { margin-top: 6px; font: 500 .8125rem/1.4 var(--font-mono); letter-spacing: 0; color: var(--ice); }
.q-form .opt.off, .q-form .opt:has(input:disabled) { opacity: 1; background: rgba(5, 8, 15, .2); }
.q-form .opt.off > input, .q-form .opt:has(input:disabled) > input, .q-form .opt.off b, .q-form .opt.off .opt-delta { opacity: .5; }
.q-form .opt.off > span:first-of-type { color: var(--text-3); }
.q-form .opt.off em { color: var(--wait); }

/* Material: three spec cards across when there is room */
@media (min-width: 1100px) {
  .q-mat { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .q-mat > legend, .q-mat > a { grid-column: 1 / -1; }
  .q-mat .opt { flex-direction: column; align-items: flex-start; gap: 0; min-height: 150px; padding: 18px 16px 16px; }
  .q-mat .opt > input { position: absolute; top: 16px; right: 16px; }
  .q-mat .opt > span:first-of-type { font-size: .875rem; line-height: 1.5; }
  .q-mat .opt b { display: block; margin: 0 0 10px; font: 600 1.5rem/1 var(--font-mono); letter-spacing: -.03em; }
}

/* Quantity and notes */
.q-details { grid-template-columns: 200px minmax(0, 1fr); column-gap: var(--space-5); align-items: start; }
.q-details > legend { grid-column: 1 / -1; }
.q-details .field { max-width: none; margin: 0; }
.q-qty .helper { margin: var(--space-2) 0 0; }
.q-details textarea { min-height: 112px; }

/* ============ 6. The price panel ============ */
.q-side { display: grid; gap: var(--space-3); }
.q-side .panel { padding: 0 var(--space-5) var(--space-5); }
.q-side .panel-head { margin: 0 calc(-1 * var(--space-5)) var(--space-5); }
.q-side .panel-head span:first-child { display: inline-flex; align-items: center; gap: 10px; }
.q-side .panel-head span:first-child::before { content: ""; width: 6px; height: 6px; background: var(--signal); box-shadow: 0 0 10px var(--glow); }
.q-side .notice, .q-side .offer-hint { margin-bottom: var(--space-3); font-size: .875rem; }
.q-side .total { flex-direction: column; align-items: flex-start; gap: 8px; margin: 0 0 var(--space-3); }
.q-side #totlabel { font: 500 var(--fs-mono-s)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.q-side .total > span:last-child { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 14px; max-width: 100%; }
.q-side .total #total { font-size: clamp(2.5rem, 2rem + 1.6vw, 3.375rem); line-height: 1; letter-spacing: -.045em; color: #fff; text-shadow: 0 0 32px var(--glow); font-weight: 600; }
.q-side .total #was { margin: 0; font: 400 1.0625rem/1 var(--font-mono); color: var(--text-3); text-decoration: line-through; text-decoration-color: rgba(248, 113, 113, .85); }
/* The dispatch promise sits directly under the total */
.q-side #promise { display: inline-flex; align-items: center; gap: 10px; margin: 0; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255, 107, 26, .3); background: rgba(255, 107, 26, .07); font: 500 .8125rem/1.3 var(--font-mono); letter-spacing: 0; color: var(--text); }
.q-side #promise::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 10px var(--signal); }
.q-side #promise:empty { display: none; }
.q-side #lines { margin-top: var(--space-4); border-top: 1px solid var(--line); font-size: .9375rem; }
.q-side #lines td { padding: 10px 0; }
.q-side #lines td:first-child { padding-right: var(--space-3); }
.q-side #lines tr:last-child td { border-bottom: 0; padding-bottom: 0; }
.q-side #lines td:last-child { white-space: nowrap; }
.q-side #lines td.helper { width: 10em; font-size: .8125rem; line-height: 1.4; white-space: normal; }
.q-side .q-saved { margin: var(--space-4) 0 0; padding-top: var(--space-3); border-top: 1px solid var(--line); }
/* Sign up or in for the launch offer and saved designs (quote-signup.js): a glass panel under the price, the email or code beside its button */
.q-side .q-signup { display: grid; gap: var(--space-3); padding: var(--space-5); }   /* full padding: unlike the price panel it has no .panel-head */
.q-signup h2 { margin: 0; font-size: 1rem; line-height: 1.4; letter-spacing: -.01em; color: var(--text); }
.q-su-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-2); }
.q-su-row .field { flex: 1 1 180px; max-width: none; margin: 0; }
.q-su-code { display: grid; gap: var(--space-2); justify-items: start; }
.q-su-code .helper { margin: 0; }
.q-signup #sucode { letter-spacing: .3em; }
.q-signup > .helper, .q-signup p.error { margin: 0; }
/* With the sign-up form open the column is taller than a screen, so it scrolls with the page rather than sticking */
.q-form > .q-side:has(#signup:not([hidden])) { position: static; }
.q-side p.error { margin: 0; }
.q-side .btn { --b-h: 56px; }
.q-side .q-assure { margin: 0; text-align: center; }

/* ============ 7. Delivery step and terms ============ */
.q-form .q-delivery {
  display: grid; gap: var(--space-4); padding: var(--space-5); border-radius: var(--r); border: 1px solid rgba(255, 107, 26, .3);
  background: radial-gradient(90% 60% at 0% 0%, rgba(255, 107, 26, .07), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .045), rgba(255, 255, 255, .02));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
#delivery.q-delivery > h2 { margin: 0; font-size: 1.375rem; letter-spacing: -.02em; }
.q-delivery > p.helper { margin: 0; }
.q-delivery #services, .q-form #services { padding: 0; border: 0; background: none; box-shadow: none; gap: var(--space-2); }
.q-delivery .field { max-width: 240px; margin: 0; }
.q-delivery .field input { text-transform: uppercase; }
.q-delivery .terms { margin: 0; padding: 14px 16px 14px 46px; border-radius: 10px; border: 1px solid var(--line); background: rgba(5, 8, 15, .35); transition: border-color var(--dur-1), background-color var(--dur-2); }
.q-delivery .terms > input { left: 16px; top: 15px; }
.q-delivery .terms:has(input:checked) { border-color: rgba(52, 211, 153, .45); background: rgba(52, 211, 153, .06); color: var(--text); }
.q-delivery .terms:has(input:focus-visible) { outline: 2px solid var(--signal); outline-offset: 2px; }
.q-delivery #pay { margin-top: var(--space-1); }

/* ============ 8. Responsive ============ */
@media (max-width: 980px) {
  .q-form { grid-template-columns: minmax(0, 1fr); }
  .q-form > .q-side { grid-column: 1; grid-row: auto; position: static; }
  .q-result-body { grid-template-columns: minmax(0, 1fr); }
  .q-viewer { min-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); }
  .q-viewer:not(:has(canvas)) { min-height: 120px; }
}
@media (max-height: 700px) { .q-form > .q-side { position: static; } }
@media (max-width: 640px) {
  .qp li { gap: 8px; font-size: .6875rem; letter-spacing: .08em; }
  .qp li + li::before { margin: 0 8px 0 0; width: 14px; }
  .quote .drop { min-height: 260px; }
  .quote .q-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .q-specs .readout:first-child { grid-column: 1 / -1; }
  .q-details { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-4); }
  .q-form .opt { padding: 13px 14px; gap: 12px; }
  .q-form .q-delivery { padding: var(--space-4); }
  .q-result-head { padding: 12px 16px; }
  .q-hint { display: none !important; }
  .q-readout { padding: 16px; }
  .q-viewer { min-height: 280px; }
}
@media (prefers-reduced-motion: reduce) {
  .drop-scan { display: none; }
  .quote .drop::before { animation: none; }
  .quote .drop:hover .drop-frame rect, .quote .drop:focus-visible .drop-frame rect, .quote .drop.over .drop-frame rect { animation: none; }
}

/* ============ 9. The order-success page (/order/success/) ============ */
.wrap.ok { max-width: calc(760px + 2 * var(--gutter)); padding-top: clamp(32px, 7vw, 88px); }
.ok-card { display: grid; justify-items: center; text-align: center; padding: clamp(28px, 6vw, 56px) clamp(20px, 5vw, 56px); overflow: hidden; }
.ok-card::before { content: ""; position: absolute; left: 50%; top: -1px; width: min(420px, 70%); height: 1px; transform: translateX(-50%); background: linear-gradient(90deg, transparent, var(--signal), transparent); }
.ok-card > * { margin-top: 0; }
.ok-card h1 { margin: 0 0 var(--space-3); font-size: clamp(1.875rem, 1.4rem + 2.4vw, 3rem); max-width: 20ch; }
.ok-card .strap { margin: 0 auto var(--space-5); max-width: 52ch; color: var(--text-2); }

/* The mark: while the order is being looked up an orange arc turns (for about thirty seconds, the length of the script's wait). When the script reveals #btns
   the ring turns green and the tick draws itself. All CSS: it reads the same hidden attribute the script flips. */
.ok-mark { position: relative; width: 88px; height: 88px; margin: 0 auto var(--space-5); }
.ok-ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 107, 26, .3); background: rgba(255, 107, 26, .04); }
.ok-ring::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--signal); filter: drop-shadow(0 0 6px var(--glow)); animation: ok-wait 31s linear both; }
.ok-tick { position: absolute; left: 50%; top: 50%; width: 38px; height: 20px; margin: -17px 0 0 -19px; transform: rotate(-45deg); opacity: 0; }
.ok-tick::before, .ok-tick::after { content: ""; position: absolute; left: 0; border-radius: 3px; background: var(--good); box-shadow: 0 0 14px rgba(52, 211, 153, .7); }
.ok-tick::before { top: 0; width: 5px; height: 0; }
.ok-tick::after { bottom: 0; height: 5px; width: 0; }
.ok:has(#btns:not([hidden])) .ok-ring { border-color: var(--good); background: rgba(52, 211, 153, .08); box-shadow: 0 0 48px -6px rgba(52, 211, 153, .55), inset 0 0 24px rgba(52, 211, 153, .1); animation: ok-pop .55s var(--ease) both; }
.ok:has(#btns:not([hidden])) .ok-ring::before { inset: 0; border: 2px solid var(--good); filter: none; animation: ok-burst 1.1s .1s ease-out both; }
.ok:has(#btns:not([hidden])) .ok-tick { opacity: 1; }
.ok:has(#btns:not([hidden])) .ok-tick::before { animation: ok-short .22s .3s var(--ease) both; }
.ok:has(#btns:not([hidden])) .ok-tick::after { animation: ok-long .34s .5s var(--ease) both; }
@keyframes ok-wait { 0% { transform: rotate(0); opacity: 1; } 96% { transform: rotate(10080deg); opacity: 1; } 100% { transform: rotate(10080deg); opacity: 0; } }
@keyframes ok-pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ok-burst { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(1.7); opacity: 0; } }
@keyframes ok-short { from { height: 0; } to { height: 100%; } }
@keyframes ok-long { from { width: 0; } to { width: 100%; } }

/* The order number, once there is one */
.ok-order { display: none; gap: 8px; margin: 0 0 var(--space-6); padding: 14px 28px 16px; border-radius: var(--r); border: 1px solid rgba(255, 107, 26, .3); background: radial-gradient(120% 140% at 50% 0%, rgba(255, 107, 26, .14), transparent 70%), rgba(10, 16, 28, .6); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }
.ok:has(#btns:not([hidden])) .ok-order { display: grid; }
.ok-order .k { font: 500 var(--fs-mono-s)/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); }
.ok-order .v { font: 600 clamp(2rem, 1.6rem + 2vw, 2.75rem)/1 var(--font-mono); letter-spacing: -.04em; color: #fff; text-shadow: 0 0 32px var(--glow); }

/* What happens next: the tracking page's timeline, for the kind of order that was placed */
.ok-next { display: none; width: 100%; max-width: 440px; margin: 0 0 var(--space-6); text-align: left; padding-top: var(--space-5); border-top: 1px solid var(--line); }
.ok-next .label { margin: 0 0 var(--space-4); }
.ok-next .tsteps { margin: 0; }
.ok:has(#btns:not([hidden])):not(:has(#msg[data-kind="sample_pack"])) .ok-next[data-for="print"], .ok:has(#btns:not([hidden])):has(#msg[data-kind="sample_pack"]) .ok-next[data-for="sample_pack"] { display: block; }
.ok-card .btns { justify-content: center; margin: 0; }
@media (prefers-reduced-motion: reduce) {
  .ok-ring::before { animation: none; border-top-color: transparent; }
  .ok:has(#btns:not([hidden])) .ok-ring::before { display: none; }
}
