/* controls.css — The job form: select, chips, segmented control, cards, custom printer.
   Cascade position 12 of 18. Order is load-bearing and is asserted by
   verify-fixtures.mjs; index.html links these explicitly (never @import) because Caddy's
   try_files turns a missing file into a 200 text/html SPA shell.
   Owner after Step 1: section (g).

   Section (g) restyle, 2026-09-06. Items 74, 98, 99, 100, 101, 102, 104, 105, 106, 107,
   149 (styling half), 150. Three rules govern every block below and each is a measured
   number, not a preference (REFERENCE-STUDY §18):

     - Hover changes FILL and BORDER COLOUR and nothing else. No transform, no shadow
       growth, no border-WIDTH change — a width change reflows and item 100 is a reflow bug.
     - Every transition here is 120ms (--sn-dur-fast) with one easing. Nothing exceeds 200ms.
     - Elevation is one property. Every box below carries a real 1px `border` and NO
       `box-shadow` spread ring; the shipped file expressed the same hairline as
       `box-shadow: inset 0 0 0 1px`, which meant a selected state had to grow the ring to
       1.5px and therefore repainted a different box model on selection.

   `opacity` is never used to express a disabled state (DESIGN-SPEC §9). The shipped chip
   was `opacity: .4` on --sn-ink over --sn-surface-2, which composites to 3.6:1; it is now
   --sn-ink-mute on --sn-surface-1, which is 5.71:1. */

/* ══ Select — DESIGN-SPEC §4.9, item 102 ══════════════════════════════════════════════
   All four selects shipped `cursor: default` (the "nothing here" cursor) with no :hover
   rule anywhere in the sheet, on four of the eight decisions the product asks for.
   `color-scheme: dark` in tokens.css is what makes the NATIVE popup list dark (item 145);
   nothing here can reach inside it. */
select {
  width: 100%; height: 36px;
  padding: 0 var(--sn-space-6) 0 var(--sn-space-3);
  border: 1px solid var(--sn-line); border-radius: var(--sn-radius-sm);
  background-color: var(--sn-surface-2); color: var(--sn-ink);
  font: inherit; font-size: var(--sn-text-sm);
  appearance: none; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--sn-ink-mute) 50%), linear-gradient(135deg, var(--sn-ink-mute) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out);
}
select:hover:not(:disabled) {
  border-color: var(--sn-line-strong); background-color: var(--sn-surface-2-alt);
}
select:disabled {
  color: var(--sn-ink-mute); background-color: var(--sn-surface-1);
  border-color: var(--sn-line); cursor: not-allowed;
}
select[aria-invalid="true"] { border-color: var(--sn-bad); }

/* ══ Custom printer — items 104, 105, 106, 107, 149, 150 ══════════════════════════════
   Plan row 41. Text inputs borrow the select's box so the form does not become a second
   visual language inside the same panel. */
/* UI Quiet: the two disclosures live inside <dialog>s now ("Add my own printer /
   filament" opens the dialog; js/choice-steps.js keeps the <details> open while it shows),
   so their own summary line would only repeat the dialog's title. It stays in the DOM:
   js/controls.js still returns focus to it by id. */
#customPrinter > summary, #customMaterial > summary { display: none; }

/* item 105: the one fact that decides whether this feature is any use to you was 53
   words of 12px --dim (3.99:1) sitting AFTER all ten fields. It is now the first line
   inside the disclosure, at --sn-ink, and the long version moved to `.cp-tech` below. */
.cp-lede {
  margin: 0 0 var(--sn-space-3);
  font-size: var(--sn-text-sm); line-height: var(--sn-lh-sm); color: var(--sn-ink);
}

/* item 106: the three "limits" fields arrive pre-filled with guesses, so they read as
   answered. A fieldset says out loud that they are optional and already safe. */
.cp-fieldset { margin: 0 0 var(--sn-space-2); padding: 0; border: 0; min-inline-size: 0; }
.cp-legend {
  display: flex; align-items: center; gap: var(--sn-space-1);
  padding: 0 0 var(--sn-space-1);
  font-size: var(--sn-text-xs); font-weight: 600; color: var(--sn-ink-dim);
}

.cp-grid { display: grid; gap: var(--sn-space-2); margin-bottom: var(--sn-space-2); }
.cp-grid--2 { grid-template-columns: 1fr 1fr; }
.cp-grid--3 { grid-template-columns: 1fr 1fr 1fr; }
.cp-grid label {
  display: grid; gap: var(--sn-space-1); min-width: 0;
  font-size: var(--sn-text-xs); color: var(--sn-ink-dim);
}
/* The label text lifted into a row so item 106's `.info` can sit beside it rather than
   becoming a third grid row of its own. Section (i) owns what `.info` looks like and
   how it opens; this rule only places it. */
.cp-labelrow { display: flex; align-items: center; gap: var(--sn-space-1); min-width: 0; }
.cp-grid input, .cp-grid select {
  width: 100%; height: 40px; padding: 0 var(--sn-space-3);
  border: 1px solid var(--sn-line); border-radius: var(--sn-radius-sm);
  background: var(--sn-surface-2); color: var(--sn-ink);
  font: inherit; font-size: var(--sn-text-sm);
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out);
}
.cp-grid input:hover:not(:disabled), .cp-grid select:hover:not(:disabled) { border-color: var(--sn-line-strong); }
.cp-grid input::placeholder { color: var(--sn-ink-placeholder); }
/* `:user-invalid` only matches AFTER the user has interacted. The earlier
   `:invalid:not(:placeholder-shown)` was always true for a number input with no
   placeholder, so an untouched form showed three red boxes. `[aria-invalid="true"]` is
   what item 104's own client validation sets, and the two must look identical. */
.cp-grid input:user-invalid,
.cp-grid input[aria-invalid="true"] {
  border-color: var(--sn-bad); background: var(--sn-bad-tint);
}
.cp-grid input[aria-invalid="true"]:focus-visible { outline-color: var(--sn-bad); }
/* item 104: the message belongs under the field it is about, not 371px below at the
   bottom of the form. `:empty` so an un-flagged field reserves nothing. */
.field__err {
  font-size: var(--sn-text-2xs); line-height: var(--sn-lh-2xs); color: var(--sn-bad);
}
.field__err:empty { display: none; }

/* item 104: the server-level slot moves ABOVE the button that triggers it. */
#cpErr {
  margin: 0 0 var(--sn-space-2);
  font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-bad);
}
#cpErr:empty { display: none; }
/* item 107: `#cpSave` measured 110.6 x 35.1 hard against the left edge of a 424px form
   with 313px of empty row beside it, while every other primary in the rail is full
   bleed. It now wears the shared `.btn.btn--primary`, so this file declares nothing
   about its size at all. The close affordance is item 107's second half: the only way
   out of the disclosure was the <summary> 340px above where the form ends. */
.cp-close { width: 100%; margin-top: var(--sn-space-2); }

/* item 105, second half: the 31-word middle sentence is still true and still worth
   reading — it is simply not the first thing a customer needs. */
.cp-tech > summary {
  cursor: pointer; padding: var(--sn-space-1) 0;
  font-size: var(--sn-text-xs); color: var(--sn-ink-mute);
}
.cp-tech > summary:hover { color: var(--sn-ink-dim); }
.cp-tech p { margin: 0; font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-ink-mute); }

/* item 149: the per-printer Remove button fell back to the UA default — 62.9 x 23.5,
   rgb(239,239,239) fill, 2.23:1 label, a light-grey pill on a black card that deleted a
   saved machine on one click with no confirmation. It is now the shared `.btn`, and the
   min-width holds the row still when the label swaps to the confirm step. */
.cp-row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sn-space-3);
  padding: var(--sn-space-2) 0;
  font-size: var(--sn-text-xs); color: var(--sn-ink-dim);
}
.cp-row span { min-width: 0; }
#cmList .cp-row { justify-content: flex-start; }
#cmList .cp-row span { margin-right: auto; }
#cmCancel { margin-top: var(--sn-space-2); }
/* 132px, MEASURED: "Remove" is 124.00 and "Confirm remove" is 129.88 at --sn-text-sm/600,
   so 124 still let the row shift 5.88px when the label swapped. At 132 both states are
   132.00 and the reflow is 0 (REFERENCE-STUDY §18: nothing reflows on a state change). */
.custom-printer-remove { min-width: 132px; }
.custom-printer-remove[data-confirm="true"] {
  border-color: var(--sn-bad-edge); background: var(--sn-bad-tint); color: var(--sn-bad-ink);
}
.custom-printer-remove[data-confirm="true"]:hover:not(:disabled) {
  border-color: var(--sn-bad); background: var(--sn-bad-tint);
}
#cpList .note { margin-top: var(--sn-space-3); }

/* ══ Printer type — two equal pills, not tall cards ═══════════════════════════════════ */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sn-space-2); }
.type-card {
  display: grid; gap: 1px; justify-items: start; align-content: center; text-align: left;
  min-height: 44px; padding: var(--sn-space-2) var(--sn-space-3);
  border: 1px solid var(--sn-line); border-radius: var(--sn-radius-sm); cursor: pointer;
  background: var(--sn-surface-2); color: var(--sn-ink); font: inherit;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out),
              color var(--sn-dur-fast) var(--sn-ease-out);
}
.type-card:hover:not(:disabled):not([aria-pressed="true"]) {
  border-color: var(--sn-line-strong); background: var(--sn-surface-2-alt);
}
.type-card[aria-pressed="true"] {
  background: var(--sn-accent-tint); border-color: var(--sn-accent);
}
.type-card:disabled {
  background: var(--sn-surface-1); border-color: var(--sn-line);
  color: var(--sn-ink-mute); cursor: not-allowed;
}
.type-card__title { font-size: var(--sn-text-xs); font-weight: 600; }
.type-card__sub { font-size: var(--sn-text-2xs); color: var(--sn-ink-mute); }
.type-card:disabled .type-card__sub { color: var(--sn-ink-mute); }

/* ══ Print profile cards — items 100, 101 ═════════════════════════════════════════════
   MEASURED before: the selected card was 110.1px tall with its three bullets shown and
   the other two were 49.5px with `display: none`, so the ONLY content that distinguishes
   the three profiles was visible for exactly one of them at a time, comparing meant
   changing the job, and selecting moved the cards below by 60.6px — out from under the
   pointer that was about to click them.

   All three bullet lists are now always visible and NOTHING about the box model changes
   on selection: same padding, same 1px border width, same rows. Only two colours move. */
.profile-list { display: grid; gap: var(--sn-space-2); }
.profile-card {
  display: grid; grid-template-columns: 28px 1fr;
  gap: var(--sn-space-2) var(--sn-space-3); align-items: start;
  text-align: left; padding: var(--sn-space-3);
  border: 1px solid var(--sn-line); border-radius: var(--sn-radius-md); cursor: pointer;
  background: var(--sn-surface-2); color: var(--sn-ink); font: inherit;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out);
}
.profile-card:hover:not([aria-pressed="true"]) {
  border-color: var(--sn-line-strong); background: var(--sn-surface-2-alt);
}
.profile-card[aria-pressed="true"] {
  background: var(--sn-accent-tint); border-color: var(--sn-accent);
}
.profile-card__icon {
  width: 28px; height: 28px; border-radius: var(--sn-radius-sm);
  display: grid; place-items: center;
  background: var(--sn-surface-1); border: 1px solid var(--sn-line); color: var(--sn-ink-dim);
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out),
              color var(--sn-dur-fast) var(--sn-ease-out);
}
.profile-card[aria-pressed="true"] .profile-card__icon {
  background: var(--sn-accent-tint-hi); border-color: var(--sn-accent-edge); color: var(--sn-accent);
}
.profile-card__icon svg { width: 14px; height: 14px; }
.profile-card__body { min-width: 0; }
.profile-card__title {
  display: block; font-size: var(--sn-text-sm); font-weight: 700;
  letter-spacing: -.01em; line-height: 1.2;
}
.profile-card__sub {
  display: block; margin-top: 1px;
  font-size: var(--sn-text-2xs); color: var(--sn-ink-mute); line-height: 1.3;
}
/* Column 2 so the bullets align under the title rather than under the icon. */
.profile-card__points {
  grid-column: 2 / -1; margin: 0; padding: 0; list-style: none;
  display: grid; gap: var(--sn-space-1);
}
.profile-card__points li {
  position: relative; padding-left: 11px;
  font-size: var(--sn-text-2xs); color: var(--sn-ink-dim); line-height: 1.35;
}
.profile-card__points li::before {
  content: ''; position: absolute; left: 0; top: .55em; width: 4px; height: 4px;
  border-radius: 50%; background: var(--sn-ink-mute);
}
.profile-card[aria-pressed="true"] .profile-card__points li::before { background: var(--sn-accent); }
/* item 101: real numbers under the card title, ONLY when the backend published them.
   `[data-profile-meta]` measured `.innerText === ""` on all three cards and
   `[data-profile-flag]` was `hidden` on all three, so the markup reserved space for
   content that never arrives. Both now render nothing at all when they are empty. */
.profile-card__meta {
  grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: var(--sn-space-1);
}
.profile-card__meta:empty { display: none; }
.profile-card__meta b {
  font-size: var(--sn-text-2xs); font-weight: 600; letter-spacing: .01em;
  padding: 2px 6px; border-radius: calc(var(--sn-radius-sm) - 3px);
  background: var(--sn-surface-1); border: 1px solid var(--sn-line); color: var(--sn-ink-dim);
}
.profile-card__impact {
  flex: 0 0 100%; margin-top: var(--sn-space-1);
  font-size: var(--sn-text-2xs); line-height: var(--sn-lh-2xs); color: var(--sn-ink-dim);
}
.profile-card__flag {
  margin-left: var(--sn-space-1); font-size: var(--sn-text-2xs); font-weight: 700;
  letter-spacing: .04em; text-transform: uppercase; color: var(--sn-accent); vertical-align: 1px;
}
.profile-card__flag:empty { display: none; }

/* ══ Choice chips — items 98, 99 ══════════════════════════════════════════════════════
   A chip row rather than a <select> because the whole point of item 1 is that the SET is
   the information — a customer should see that their Ender-3 V3 offers exactly one
   diameter without opening a menu.

   MEASURED before: widths 65.7 / 89.0 / 65.6 / 65.8. The 23px bulge was the 10px
   `<small>ships with this</small>` rendered on the stock chip alone, so the row's rhythm
   depended on which chip happened to be stock. The row is now ONE grid row of equal 1fr
   tracks: every chip is the same width and, because a grid row stretches, the same
   height, whichever one carries the sub-label and whatever the viewport.

   DELIBERATE DEVIATION from REFERENCE-STUDY §7's 28px chip, recorded in COMPONENT-PLAN
   §2(g): our chips keep DESIGN-SPEC §4.11's 40px floor because item 99 requires a
   reserved sub-label line and §9 sets a 32px accessibility floor — a 28px chip cannot
   hold two lines. We take §7's grammar (no wrap, colour-only 120ms transition, one row),
   not its height. Second deviation: the selected chip is --sn-accent-tint with an accent
   border, not §7's inverted light-on-dark fill, because DESIGN-SPEC §2.4 reserves the
   accent as the only colour an ACTION may wear and a light chip would out-shout the
   Prepare button beneath it. */
.chip-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr);
  gap: var(--sn-space-2);
}
/* A printer that takes one diameter should not get one 424px-wide chip. */
.chip-row[data-count="1"] { grid-auto-columns: minmax(0, 160px); justify-content: start; }
.chip {
  display: grid; align-content: center; justify-items: center; gap: var(--sn-space-1);
  min-height: 40px; padding: var(--sn-space-2) var(--sn-space-2);
  border: 1px solid var(--sn-line); border-radius: var(--sn-radius-sm); cursor: pointer;
  background: var(--sn-surface-2); color: var(--sn-ink); font: inherit;
  font-size: var(--sn-text-sm); font-weight: 600; line-height: 1.2; text-align: center;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out),
              color var(--sn-dur-fast) var(--sn-ease-out);
}
.chip:hover:not(:disabled):not([aria-pressed="true"]) {
  border-color: var(--sn-line-strong); background: var(--sn-surface-2-alt);
}
.chip[aria-pressed="true"] {
  background: var(--sn-accent-tint); border-color: var(--sn-accent); color: var(--sn-ink);
}
/* 5.71:1. The shipped `opacity: .4` composited to 3.6:1 on 12.5px text. */
.chip:disabled {
  background: var(--sn-surface-1); border-color: var(--sn-line);
  color: var(--sn-ink-mute); cursor: not-allowed;
}
/* The reserved sub-label line (item 99). Present on EVERY chip, empty on most. */
.chip small {
  display: block; min-height: 1.2em;
  font-size: var(--sn-text-2xs); font-weight: 500; line-height: 1.2;
  color: var(--sn-ink-mute);
}
.chip[aria-pressed="true"] small { color: var(--sn-ok-soft); }
.chip:disabled small { color: var(--sn-ink-mute); }

/* A fact the page is telling you, not a control. Used for the material window, the layer
   height the nozzle implies, the support angle reference, and — item 98 — the reason a
   nozzle diameter is unavailable, which used to be a native `title=` on a `disabled`
   button: invisible to touch, unreachable by keyboard, and a second tooltip mechanism
   12px away from five `.info` buttons that use a different one. */
.note {
  margin: var(--sn-space-2) 0 0;
  font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-ink-mute);
}
.note b { color: var(--sn-ink-dim); font-weight: 600; }
.note.is-warn { color: var(--sn-warn); }
.note:empty { display: none; }
.spec-strip { display: flex; flex-wrap: wrap; gap: var(--sn-space-1); margin-top: var(--sn-space-2); }
.spec-strip:empty { display: none; }
.spec-strip span {
  font-size: var(--sn-text-2xs); padding: 3px 7px;
  border-radius: calc(var(--sn-radius-sm) - 3px); line-height: 1.3;
  background: var(--sn-surface-1); border: 1px solid var(--sn-line); color: var(--sn-ink-dim);
}
.spec-strip span b { color: var(--sn-ink); font-weight: 600; }
.spec-strip span.is-warn {
  flex-basis: 100%; border-color: var(--sn-warn-edge); background: var(--sn-warn-tint); color: var(--sn-warn-ink);
}
.spec-strip span.is-warn b { color: var(--sn-warn); }

.slicer-matrix { margin-top: var(--sn-space-2); }
.slicer-matrix > summary {
  cursor: pointer; font-size: var(--sn-text-xs); font-weight: 600; color: var(--sn-ink-dim);
}
.slicer-matrix__rows {
  display: grid; gap: 1px; margin-top: var(--sn-space-2); overflow: hidden;
  border-radius: var(--sn-radius-sm); background: var(--sn-line);
}
.slicer-matrix__rows p {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: var(--sn-space-2);
  margin: 0; padding: var(--sn-space-2); background: var(--sn-surface-2);
}
.slicer-matrix__rows b { font-size: var(--sn-text-2xs); color: var(--sn-ink-dim); }
.slicer-matrix__rows span { font-size: var(--sn-text-2xs); color: var(--sn-ink-mute); }
.slicer-matrix__rows [data-status="available"] span { color: var(--sn-ok); }
.slicer-matrix__rows [data-status="nozzle-unavailable"] span { color: var(--sn-warn); }
.slicer-matrix__policy {
  margin: var(--sn-space-2) 0 0; font-size: var(--sn-text-2xs); line-height: var(--sn-lh-2xs); color: var(--sn-ink-mute);
}

/* Exact spool selection extends the existing form language: labels above the same
   36px controls, compact hierarchy, and unavailable identities left readable. */
.product-picker { display: grid; gap: var(--sn-space-2); }
.product-picker[hidden] { display: none; }
.product-picker > label,
.product-picker .field > label {
  font-size: var(--sn-text-xs); font-weight: 600; color: var(--sn-ink-dim);
}
.product-picker input[type="search"] {
  width: 100%; height: 36px; padding: 0 var(--sn-space-3);
  border: 1px solid var(--sn-line); border-radius: var(--sn-radius-sm);
  background: var(--sn-surface-2); color: var(--sn-ink);
  font: inherit; font-size: var(--sn-text-sm);
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out);
}
.product-picker input[type="search"]:hover { border-color: var(--sn-line-strong); }
.product-picker input[type="search"]::placeholder { color: var(--sn-ink-placeholder); }
.product-picker .field-row { margin: 0; }
.product-picker__unavailable {
  display: grid; gap: var(--sn-space-1); margin: 0; padding: 0; list-style: none;
}
.product-picker__unavailable:empty { display: none; }
.product-picker__unavailable li {
  padding: var(--sn-space-2); border: 1px solid var(--sn-line);
  border-radius: var(--sn-radius-sm); background: var(--sn-surface-1);
  font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-ink-mute);
}
.product-picker__unavailable b { color: var(--sn-ink-dim); }

/* ══ Segmented track — DESIGN-SPEC §4.11 ══════════════════════════════════════════════
   "Let us decide / on / off". The first option is the default and it sends NOTHING —
   geometry's own SupportRequest calls that "no opinion", and a producer that has not been
   taught this control must not read silence as off.

   `calc(var(--sn-radius-sm) - 3px)` is the one permitted fourth radius: it is the track's
   own radius minus the track's 3px inset, so it is derived rather than new. */
/* UI Quiet (DESIGN §5.2 `.seg`): a surface-1 track, no edge, and the chosen segment is
   one surface step up in full ink — principle 4 keeps the green for the primary action. */
.seg {
  display: flex; gap: var(--sn-space-1); padding: 3px;
  border: 0; border-radius: var(--sn-radius-sm);
  background: var(--sn-surface-1);
}
.seg button {
  flex: 1 1 0; min-width: 0; min-height: 32px; padding: 0 var(--sn-space-1);
  border: 0; border-radius: calc(var(--sn-radius-sm) - 3px); cursor: pointer;
  background: none; color: var(--sn-ink-dim); font: inherit;
  font-size: var(--sn-text-xs); font-weight: 600;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              color var(--sn-dur-fast) var(--sn-ease-out);
}
.seg button:hover:not([aria-pressed="true"]):not(:disabled) {
  background: rgb(var(--sn-white-rgb) / .047058823529411764); color: var(--sn-ink);
}
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--sn-surface-3); color: var(--sn-ink); }
.seg button:disabled { color: var(--sn-ink-mute); cursor: not-allowed; }

/* ══ Proceed-anyway — item 74 ═════════════════════════════════════════════════════════
   Amber, never green, and never pre-ticked. The checkbox was the browser default: a
   white square measured 13 x 15 px on a black card, under every target minimum, and
   `accent-color` only ever colours the CHECKED state. It is now a 20 x 20 control in the
   app's own language inside a <label> whose whole card is the hit area (DESIGN-SPEC
   §4.20 + mocks/NOTES.md A4: the 32px target is met by the label, not by the input).

   MEASURED COLLISION, and it is why the selector below is `.adv__grp > .danger` rather
   than `.danger`: `css/slider.css` (section h, cascade position 13, i.e. AFTER this file)
   declares `.adv__grp > label, .adv__lbl { display: flex; gap: 6px; align-items: baseline }`
   for the slider value labels. `.danger` IS a `<label>` and IS a direct child of
   `.adv__grp`, so that rule turned this card into a FLEX row — at equal specificity and a
   later cascade position it won — and the checkbox became a flex item that shrank from
   its declared 20px to 15px (offsetWidth 15, first "track" 15px, gap 6px, all measured in
   the running page). That is also why the audit found a 13 x 15 UA box here rather than
   the 16px the shipped `.danger` asked for. `.adv__grp > .danger` is (0,2,0) against that
   rule's (0,1,1) and wins on specificity alone, in either cascade order. A contract line
   asks section (h) to narrow its selector; this rule is correct whether or not it does. */
.adv__grp > .danger,
.danger {
  display: grid; grid-template-columns: 20px 1fr; gap: var(--sn-space-3); align-items: start;
  padding: var(--sn-space-3); border-radius: var(--sn-radius-sm);
  background: var(--sn-warn-tint); border: 1px solid var(--sn-warn-edge);
  font-size: var(--sn-text-xs); cursor: pointer;
}
.danger input {
  appearance: none; width: 20px; height: 20px; margin: 0;
  display: grid; place-items: center;
  border: 1.5px solid var(--sn-line-strong); border-radius: calc(var(--sn-radius-sm) - 3px);
  background: var(--sn-surface-2); cursor: pointer;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out),
              border-color var(--sn-dur-fast) var(--sn-ease-out);
}
.danger:hover input:not(:checked) { border-color: var(--sn-line-raised); }
.danger input::after {
  content: ''; width: 12px; height: 12px; opacity: 0;
  background: var(--sn-warn-ink-on-fill);
  clip-path: polygon(14% 44%, 0 60%, 40% 100%, 100% 18%, 84% 0, 39% 66%);
  transition: opacity var(--sn-dur-fast) var(--sn-ease-out);
}
.danger input:checked { background: var(--sn-warn); border-color: var(--sn-warn); }
.danger input:checked::after { opacity: 1; }
.danger__t { font-size: var(--sn-text-xs); font-weight: 600; color: var(--sn-warn); display: block; }
.danger__d {
  font-size: var(--sn-text-xs); color: var(--sn-warn-ink); line-height: var(--sn-lh-xs);
  display: block; margin-top: 3px;
}
.danger__d b { color: var(--sn-warn); font-weight: 700; }

/* ══ UI Quiet — the four steps (choice-steps lane, 23 Sep) ═══════════════════════════════
   DESIGN.md §4.1, §4.2, §5.1 (step row), §5.2 (option row). controls.css loads AFTER
   rail.css, and every rule that re-seats a `.step` box names #step1 / #step2 by id, so it
   wins on specificity as well as order. Tokens only.

   Structure (index.html): #step1 is the Model step, driven by js/steps.js as before.
   #step2 is the setup group the rest of the app flips idle / live / inert / collapsed; its
   own head is drawn only once it collapses on a result (the "your choices" fold). Inside
   its body, .qs-step × 3 are Printer, Material and What matters most, opened one at a time
   by js/choice-steps.js. */

#step2.step { border-top: 0; margin-top: var(--sn-space-1); }
#step1, .qs-step {
  border-radius: var(--sn-radius-md);
  transition: background-color var(--sn-dur-slow) var(--sn-ease-out);
}
.qs-step + .qs-step { margin-top: var(--sn-space-1); }
#step1.is-live, #step1.is-done:not(.is-collapsed), .qs-step.is-open { background: var(--sn-surface-2); }

/* ── the row: node · eyebrow + summary · chevron (§5.1) ─────────────────────────────── */
button.qs-row {
  display: flex; align-items: center; gap: var(--sn-space-3);
  width: 100%; height: auto; min-height: 48px;
  padding: var(--sn-space-2) var(--sn-space-3) var(--sn-space-2) var(--sn-space-2);
  border: 0; border-radius: var(--sn-radius-md);
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out);
}
button.qs-row:hover:not(:disabled) { background: var(--sn-surface-2); }
#step1.is-done:not(.is-collapsed) > .qs-row:hover, .qs-step.is-open > .qs-row:hover { background: none; }
button.qs-row:disabled { cursor: default; }
button.qs-row:focus-visible { outline: 2px solid var(--sn-focus); outline-offset: -2px; border-radius: var(--sn-radius-md); }

.qs-node, #step1 .step__n.qs-node, #step2 .step__n.qs-node {
  position: static; width: 24px; height: 24px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--sn-radius-pill); box-shadow: none;
  background: var(--sn-surface-2); color: var(--sn-ink-mute);
  font-family: var(--sn-font-display); font-weight: 700; font-size: var(--sn-text-2xs);
  transition: background-color var(--sn-dur-base) var(--sn-ease-out), color var(--sn-dur-base) var(--sn-ease-out);
}
#step1 .qs-node::after, #step2 .qs-node::after { content: none; }
#step1.is-live .qs-node, #step1.is-done:not(.is-collapsed) .qs-node, .qs-step.is-open .qs-node {
  background: var(--sn-ink); color: var(--sn-surface-0);
}
.qs-step.is-locked .qs-node { opacity: .5; }

.qs-lab { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.qs-eyebrow { font-size: var(--sn-text-2xs); line-height: var(--sn-lh-2xs); color: var(--sn-ink-mute); }
/* Summaries wrap; they never ellipsise (§4.2). */
.qs-title, #step1 h3.qs-title, #step2 h3.qs-title {
  font-family: var(--sn-font); font-size: var(--sn-text-sm); font-weight: 500;
  line-height: var(--sn-lh-sm); letter-spacing: 0; color: var(--sn-ink);
  overflow-wrap: anywhere; text-wrap: pretty;
}
#step1.is-live .qs-title, #step1.is-done:not(.is-collapsed) .qs-title, .qs-step.is-open .qs-title {
  font-size: var(--sn-text-md); font-weight: 600;
}
.qs-step.is-locked .qs-title { color: var(--sn-ink-mute); }

.qs-chev, #step1 .step__chev, #step2 .step__chev {
  display: grid; flex: none; color: var(--sn-ink-mute);
  transition: transform var(--sn-dur-base) var(--sn-ease-out);
}
#step1.is-live .step__chev, #step1.is-done:not(.is-collapsed) .step__chev,
#step2.is-done:not(.is-collapsed) .step__chev, .qs-step.is-open .qs-chev { transform: rotate(90deg); }
#step1.is-collapsed .step__chev, #step2.is-collapsed .step__chev { transform: none; }
.qs-step.is-locked .qs-chev { opacity: .5; }

/* ── bodies ─────────────────────────────────────────────────────────────────────────── */
#step1 > .step__body { padding: 0 var(--sn-space-3) var(--sn-space-4) 44px; }
/* The three Quiet steps expand with grid-template-rows 0fr -> 1fr (§2 Motion) and are
   `inert` while closed (js/choice-steps.js), so a closed body is out of the tab order. */
.qs-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows var(--sn-dur-slow) var(--sn-ease-out);
}
.qs-step.is-open > .qs-body { grid-template-rows: 1fr; }
.qs-clip { min-height: 0; overflow: hidden; }
.qs-in {
  padding: var(--sn-space-1) var(--sn-space-3) var(--sn-space-4) 44px;
  opacity: 0; transition: opacity var(--sn-dur-base) var(--sn-ease-out) 60ms;
}
.qs-step.is-open .qs-in { opacity: 1; }
.qs-in > .field:last-child, .qs-in .field--last { margin-bottom: 0; }

/* #step2 is a container now: no padding of its own, never faded as a whole (locked steps
   say so on their own rows, §5.1), and its head only exists as the result's fold. */
#step2 > .step__body { padding: 0; }
#step2.is-idle > .step__body { opacity: 1; }
#step2:is(.is-idle, .is-live) > #step2Toggle { display: none; }
/* e2e audit N2: #step2 is only a container. Its old "2 · Your choices · How you want it"
   head and one-line summary are never drawn — the result has its own fold row ("benchy.stl
   · your choices" + Change) and the three Quiet rows are the steps — so a collapsed #step2
   (a finished result, a refused file) still shows the Printer / Material / What matters
   most rows, never a second row numbered 2. */
#step2 > #step2Toggle, #step2 > #step2Summary { display: none; }
#step2.is-collapsed > .step__body { display: block; }
#step1 > #step1Summary, #step2 > #step2Summary {
  padding: 0 var(--sn-space-3) var(--sn-space-3) 44px;
  white-space: normal; overflow-wrap: anywhere;
}

/* ── step 1 details ─────────────────────────────────────────────────────────────────── */
/* DESIGN §4.1: one line, two underlined words, nothing that looks like a drop box. */
.qs-add { margin: 0; color: var(--sn-ink-dim); line-height: 1.6; }
body:not(.is-empty) #step1Add { display: none; }
.qs-link {
  display: inline; padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 500; color: var(--sn-ink);
  text-decoration: underline; text-decoration-color: var(--sn-line-strong); text-underline-offset: 3px;
  border-radius: var(--sn-radius-sm);
  transition: text-decoration-color var(--sn-dur-fast) var(--sn-ease-out), color var(--sn-dur-fast) var(--sn-ease-out);
}
.qs-link:hover { text-decoration-color: var(--sn-ink); }
.qs-more { margin: var(--sn-space-2) 0 var(--sn-space-3); font-size: var(--sn-text-xs); }
.qs-end { display: flex; justify-content: flex-end; margin-top: var(--sn-space-3); }

/* The row's own line carries the Quiet summary; today's one-liner is tester detail.
   (An id rule: rail.css's `.step.is-collapsed .step__summary` is (0,3,0) and would beat
   the shell's (0,2,1) data-detail-only rule.) */
html:not([data-detail="full"]) #step1Summary { display: none; }
/* Reassuring findings are notes (full view); a finding that needs fixing is never hidden. */
html:not([data-detail="full"]) #findings .finding--ok { display: none; }
#step1.is-collapsed #step1Body:has(.finding--fix) { display: block; }
#step1.is-collapsed #step1Body:has(.finding--fix) > #findings:not(#modelFileList):not(#fileAggregate) { display: grid; }
html:not([data-detail="full"]) #step1.is-collapsed #step1Body:has(.finding--fix) > #findings .finding--ok { display: none; }
/* One model: the collapsed row already names it, so the one-row list folds away in the
   simple view. Several models: step 1 stays a compact file list (placement decision). */
html:not([data-detail="full"]) #step1.is-collapsed #step1Body:not(:has(.file-row + .file-row)):not(:has(.finding--fix)) { display: none; }
html:not([data-detail="full"]) #step1.is-collapsed #step1Body:not(:has(.file-row + .file-row)) > :is(#modelFileList, #fileAggregate) { display: none; }
html[data-detail="full"] .file-row__size-simple { display: none; }
/* STAGE-AUDIT S7: once the job has refused the repair (the consent box is shown for a
   repair refusal and nothing else), "we seal these" is no longer true. The counts stay;
   the promise and the simple view's "we will fix" line go. */
body:has(#dockConsent:not([hidden])) #findings :is(.finding--note, .finding__promise) { display: none; }
html:not([data-detail="full"]) body:has(#dockConsent:not([hidden])) #step1.is-collapsed #step1Body:not(:has(.file-row + .file-row)) { display: none; }

/* ── declutter (24 Sep): the choose screen's tester-only lines ───────────────────────
   Each of these is kept in the tester view, never deleted. */
/* "0.2 mm isn't available for the Bambu Lab A1 — we don't have a checked OrcaSlicer
   preset for it." is engine language; the simple view says it in one line. */
html:not([data-detail="full"]) #nozzleReasonNote { display: none; }
#nozzleReasonNote[hidden] + #nozzleReasonShort { display: none; }
/* The slicer select already lists the slicers this setup supports. */
html:not([data-detail="full"]) #slicerMatrix { display: none; }
/* "Generic · Exact spool" with Exact spool disabled is a dead control plus an apology on
   every visit; it appears in the simple view only once the catalogue is live. */
html:not([data-detail="full"]) #filamentChoiceField:has([data-filament-mode="product"]:disabled) { display: none; }
/* Support style, angle and density are expert controls: the simple view shows them only
   once Supports is switched On. */
html:not([data-detail="full"]) #adv:not(:has(#supEnabled [data-v="on"][aria-pressed="true"])) :is(#supTypeGrp, #supAngleGrp, #supDensityGrp) { display: none; }
/* "Continue despite unrepairable model defects" duplicates the consent box that appears
   exactly when a repair is refused. Hidden in the simple view only while it is OFF, so a
   switch a tester turned on is never active and out of sight. */
html:not([data-detail="full"]) #adv .adv__grp:has(> .danger #allowUnprintable:not(:checked)) { display: none; }

/* ── option rows (§5.2): materials, and the profile cards drawn as rows ──────────────── */
.qs-opts { display: flex; flex-direction: column; gap: var(--sn-space-1); margin-left: calc(var(--sn-space-3) * -1); }
.qs-opts:empty { display: none; }
.qs-opt {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; align-items: center;
  column-gap: var(--sn-space-3); width: 100%; padding: var(--sn-space-3);
  border: 0; border-radius: var(--sn-radius-sm); background: none;
  color: var(--sn-ink); font: inherit; text-align: left; cursor: pointer;
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out);
}
.qs-opt:hover:not([aria-disabled="true"]), .qs-opt[aria-checked="true"] { background: var(--sn-surface-3); }
.qs-opt[aria-disabled="true"] { cursor: not-allowed; }
.qs-dot {
  width: 16px; height: 16px; flex: none; border-radius: var(--sn-radius-pill);
  box-shadow: inset 0 0 0 1.5px var(--sn-line-strong);
  transition: box-shadow var(--sn-dur-fast) var(--sn-ease-out);
}
.qs-opt[aria-checked="true"] .qs-dot, #mode .profile-card[aria-pressed="true"] .qs-dot { box-shadow: inset 0 0 0 5px var(--sn-ink); }
.qs-opt__t { min-width: 0; }
.qs-opt__t b { display: block; font-weight: 600; }
.qs-opt__t small { display: block; font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-ink-dim); }
/* Disabled: the name and the dot dim, the reason stays at full --sn-warn (§2 contrast). */
.qs-opt[aria-disabled="true"] .qs-opt__t b, .qs-opt[aria-disabled="true"] .qs-dot { opacity: .45; }
.qs-opt__t .qs-opt__why { color: var(--sn-warn); }
.qs-opt__dl { grid-column: 2 / -1; margin-top: var(--sn-space-1); font-size: var(--sn-text-xs); color: var(--sn-ink-soft); }
.qs-opt__dl.is-current { color: var(--sn-ink-dim); }

#mode.qs-opts { display: flex; }
#mode .profile-card {
  grid-template-columns: 16px minmax(0, 1fr); column-gap: var(--sn-space-3); row-gap: var(--sn-space-1);
  align-items: center; padding: var(--sn-space-3);
  border: 0; border-radius: var(--sn-radius-sm); background: none;
}
#mode .profile-card:hover:not([aria-pressed="true"]), #mode .profile-card[aria-pressed="true"] { background: var(--sn-surface-3); }
#mode .profile-card__icon { display: none; }
#mode .profile-card__title { font-size: var(--sn-text-sm); font-weight: 600; letter-spacing: 0; }
#mode .profile-card__sub { font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-ink-dim); }
#mode .profile-card__flag { color: var(--sn-ink-dim); font-weight: 600; }
#mode .profile-card__points li::before, #mode .profile-card[aria-pressed="true"] .profile-card__points li::before { background: var(--sn-ink-mute); }
.qs-proof, .qs-delta { display: block; font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); }
.qs-proof { color: var(--sn-ink-dim); }
.qs-delta { margin-top: var(--sn-space-1); color: var(--sn-ink-soft); }
.qs-delta.is-current { color: var(--sn-ink-dim); }
.qs-proof:empty, .qs-delta:empty { display: none; }

/* ── the nozzle as a segmented control (§4.2) ───────────────────────────────────────── */
#nozzleChoices.qs-seg {
  display: flex; gap: var(--sn-space-1); padding: 3px;
  border-radius: var(--sn-radius-sm); background: var(--sn-surface-1);
}
#nozzleChoices .chip {
  flex: 1 1 0; min-width: 0; min-height: 32px; padding: 0 var(--sn-space-1);
  border: 0; border-radius: calc(var(--sn-radius-sm) - 3px);
  background: none; color: var(--sn-ink-dim);
  font-size: var(--sn-text-xs); font-weight: 600;
}
#nozzleChoices .chip:hover:not(:disabled):not([aria-pressed="true"]) { background: none; color: var(--sn-ink); }
#nozzleChoices .chip[aria-pressed="true"] { background: var(--sn-surface-3); color: var(--sn-ink); }
#nozzleChoices .chip:disabled { background: none; color: var(--sn-ink-mute); }
html:not([data-detail="full"]) #nozzleChoices .chip small { display: none; }
.qs-nozzle-tag { margin-left: auto; }

/* ── the pane foot: What happens next / More control (§3, §4.1, §4.2) ─────────────────── */
html:not([data-route="empty"]) #nextSteps { display: none; }
/* More control belongs to the setup: shown on prepare, and on the result only while the
   customer has re-opened the "your choices" fold to change something (the foot itself is
   css/shell.css's to show on that route). */
html:not([data-route="prepare"]):not([data-route="result"]) #adv { display: none; }
html[data-route="result"]:not(:has(#step2.is-done:not(.is-collapsed))) #adv { display: none; }
.qs-next__title { margin: 0; padding: 0 var(--sn-space-3) 0 var(--sn-space-2); font-size: var(--sn-text-xs); font-weight: 600; color: var(--sn-ink-soft); }
.qs-next__title::before { content: ''; display: inline-block; width: 36px; }
.qs-next__list {
  margin: 0; padding: var(--sn-space-3) var(--sn-space-3) var(--sn-space-4) var(--sn-space-2);
  list-style: none; display: flex; flex-direction: column; gap: var(--sn-space-3); counter-reset: qs-next;
}
.qs-next__list li { display: flex; gap: var(--sn-space-3); font-size: var(--sn-text-xs); line-height: var(--sn-lh-xs); color: var(--sn-ink-dim); }
.qs-next__list li::before {
  counter-increment: qs-next; content: counter(qs-next); flex: none; width: 24px; text-align: center;
  font-family: var(--sn-font-display); font-weight: 700; font-size: var(--sn-text-2xs); color: var(--sn-ink-mute);
}

#paneFoot #adv { background: none; box-shadow: none; border-radius: var(--sn-radius-sm); }
#paneFoot #adv > summary {
  display: flex; align-items: center; gap: var(--sn-space-2); min-height: 36px;
  padding: 0 var(--sn-space-2); border-radius: var(--sn-radius-sm);
  font-size: var(--sn-text-sm); font-weight: 500; color: var(--sn-ink-dim);
  transition: background-color var(--sn-dur-fast) var(--sn-ease-out), color var(--sn-dur-fast) var(--sn-ease-out);
}
#paneFoot #adv > summary:hover { background: var(--sn-surface-2); color: var(--sn-ink); }
.adv__sum { font-size: var(--sn-text-xs); font-weight: 400; color: var(--sn-ink-mute); }
#paneFoot #advCount { background: var(--sn-surface-2); color: var(--sn-ink-dim); }
#paneFoot .adv__body {
  max-height: min(48vh, 440px); overflow-y: auto; overscroll-behavior: contain;
  padding: var(--sn-space-2) var(--sn-space-2) var(--sn-space-1);
  scrollbar-width: thin; scrollbar-color: var(--sn-line) transparent;
}
