/* web/trial/trial.css: the trial face's one stylesheet (ADR-081; HST-F1, HST-F2; path E's builder, cw2-143).
   The studio's three critic-cleared sheets, each byte for byte and in its cascade order, between the markers below:
     1. assets/trial.css  md5 b30b3bef879395e5a952ebd496a3d876  the shared tokens and components (D-01 to D-24)
     2. ds-1/ds1.css      md5 4c05bab588461287f3475a3a5abaf111  "What you can try" (the F1 view)
     3. ds-2/ds2.css      md5 3f8dcd09a74b89f5ab151fadc6807729  sign-in, the code step and the start page (the F2 views)
     4. ds-3/ds3.css      md5 c07731a0ad6106cc18a08caab758c608  the four working faces (the F3 views; HST-F3, cw2-154)
     5. ds-3/ds3-drawing.css md5 bff09104d5787a8e393b51616336d06e  the drawing face (D-6; path E's face builder, cw2-180)
   A design change is re-copied from the studio, never edited here. */

/* ==== part 1: assets/trial.css, byte for byte ==== */
/* trial.css: the trial face's shared tokens and components
   Project: design-studio/projects/thexrayproject/l2q-trial/v1 (DS-1, DS-2, DS-3 share this sheet).
   Writer: cw2-019, the studio lead. Every rule traces to a D-## in ../SHARED-BRIEF.md section 1.
   Changed 2026-10-19 by cw2-039 (the lead's hand for the critic's blocking fixes, CRITIC-DS-1-3 section 6): B-2 adds
   one rule after section 2's focus ring (a heading given tabindex="-1" shows no ring, D-19.2 as amended); B-1 adds one
   line to section 17 (reduced motion removes the busy bar, D-18). Nothing else changed.
   No font file, no import, no external origin, no image or font reference. Relative paths only. A surface adds its own
   sheet with selectors prefixed by its name (ds2-, ds3-) and never redeclares a class named here. */

/* ---------- 1. Tokens ---------- */
:root {
  /* D-03 / SHARED-BRIEF section 5: six literals, no seventh */
  --ink: #141414;
  --paper: #FFFFFF;
  --sheet: #F4F4F4;
  --muted: #4A4A4A;
  --rule: #D8D8D8;    /* decorative hairline only, never text, never the only separator */
  --accent: #8A5A16;  /* D-04: the total of a quotation that stands; paper ground; DS-3 only */

  /* D-02 two stacks */
  --sans: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  /* D-05 fixed scale, ratio 1.200 off 1rem */
  --step--1: 0.833rem;
  --step-0: 1rem;
  --step-1: 1.2rem;
  --step-2: 1.44rem;
  --step-3: 1.728rem;
  --step-4: 2.074rem;
  --step-5: 2.488rem;

  /* D-07 space, 8 px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* D-07 layout */
  --gutter: 1rem;
  --page-max: 75rem;
  --rail: 14rem;
  --measure: 66ch;
  --tap: 44px;

  /* D-18 motion */
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-state: 140ms;
}

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.5;
  font-kerning: normal;
}
h1, h2, h3 { margin: 0; font-weight: 500; line-height: 1.1; text-wrap: balance; }
p, ul, ol, dl, dd, figure { margin: 0; }
p, li, dd { text-wrap: pretty; }
strong { font-weight: 700; }
svg { display: block; }
a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }   /* D-19.2 */
h1[tabindex="-1"]:focus { outline: none; }   /* D-19.2 as amended; B-2, cw2-039, 2026-10-19 */
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* D-02: the exact voice, inline. kbd = she types it; samp = the tool says it. */
kbd, samp {
  font-family: var(--mono);
  font-size: 0.9375em;   /* optical: the monospace sets larger than the sans at one size */
  font-style: normal;
  font-weight: 400;
}

/* ---------- 3. Skip link (D-19.3) ---------- */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -6rem;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  background: var(--paper);
  border: 1px solid var(--ink);
}
.skip:focus { top: var(--space-2); }

/* ---------- 4. Banner (D-08) ---------- */
.banner { background: var(--ink); color: var(--paper); }
.banner__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-3) var(--gutter);
}
.banner__text {
  max-width: 92ch;
  font-size: var(--step--1);
  line-height: 1.45;
  letter-spacing: 0.005em;
}

/* ---------- 5. Masthead (D-06) ---------- */
.masthead { border-bottom: 1px solid var(--rule); }
.masthead__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-2) var(--gutter) var(--space-3);
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "home . nav"
    "name name name";
  align-items: center;
  column-gap: var(--space-4);
}
.masthead__home {
  grid-area: home;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  color: var(--ink);
  text-decoration: none;
}
.lockup { width: 170px; height: auto; color: var(--ink); }   /* the floor; never smaller */
.masthead__name {
  grid-area: name;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.01em;
}
.masthead__nav { grid-area: nav; display: flex; gap: var(--space-4); }
.masthead__nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--step--1);
  font-weight: 500;
}
@media (min-width: 64rem) {
  .masthead__inner {
    grid-template-columns: auto auto 1fr auto;
    grid-template-areas: "home name . nav";
    padding-block: var(--space-3);
  }
  .masthead__name {
    padding-left: var(--space-4);
    border-left: 1px solid var(--rule);
    line-height: 1.2;
  }
}

/* ---------- 6. Page and the record grid (D-07) ---------- */
.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--gutter) var(--space-9);
}
.page-head { padding: var(--space-7) 0 var(--space-6); }
.page-head h1 { font-size: var(--step-3); letter-spacing: -0.012em; }
.lede {
  margin-top: var(--space-4);
  max-width: var(--measure);
  font-size: var(--step-1);
  line-height: 1.45;
}
.toc { margin-top: var(--space-5); }
.toc__who {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.toc ul { list-style: none; padding: 0; margin-top: var(--space-1); display: flex; flex-wrap: wrap; column-gap: var(--space-5); }
.toc a { display: inline-flex; align-items: center; min-height: var(--tap); }

.section { padding-top: var(--space-7); }
.section > h2 {
  font-size: var(--step-2);
  letter-spacing: -0.01em;
  padding-top: var(--space-5);
  border-top: 1px solid var(--ink);
}
.section__body { margin-top: var(--space-4); max-width: var(--measure); }
.section__body > * + * { margin-top: var(--space-4); }
.section__intro { color: var(--ink); }

@media (min-width: 64rem) {
  .page-head {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, var(--measure));
    column-gap: var(--space-7);
    align-items: start;
    padding: var(--space-8) 0 var(--space-7);
  }
  .page-head h1 { font-size: var(--step-4); }
  .page-head .lede { margin-top: 0; }
  .page-head .toc { grid-column: 2; }
  .section {
    display: grid;
    grid-template-columns: var(--rail) minmax(0, var(--measure));
    column-gap: var(--space-7);
    align-items: start;
    padding-top: var(--space-8);
  }
  .section > h2 { grid-column: 1; }
  .section__body { grid-column: 2; margin-top: 0; padding-top: var(--space-5); border-top: 1px solid var(--rule); }
}

/* ---------- 7. The exact form (D-09) ---------- */
.exact { background: var(--sheet); padding: var(--space-3) var(--space-4) var(--space-4); }
.exact__who {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--tap);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.exact__text {
  display: block;
  margin-top: var(--space-1);
  font-family: var(--mono);
  font-size: 0.9375rem;   /* the same optical correction as inline kbd and samp */
  line-height: 1.55;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.exact__text .ln { display: block; padding-left: 2ch; text-indent: -2ch; }
.exact + .exact { margin-top: var(--space-2); }

.copy {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  min-width: 5.5rem;
  justify-content: center;
  padding: 0 var(--space-4);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color var(--dur-state) var(--ease-out-quart), color var(--dur-state) var(--ease-out-quart);
}
.copy:hover { border-width: 2px; padding: 0 calc(var(--space-4) - 1px); }
.copy[data-state="copied"] { background: var(--ink); color: var(--paper); }

/* ---------- 8. Our note, ledger lists (D-21, D-07) ---------- */
.note { font-size: var(--step--1); line-height: 1.5; color: var(--muted); max-width: var(--measure); }
.note strong { color: var(--ink); font-weight: 500; }

.ledger { list-style: none; padding: 0; }
.ledger > li, .ledger > div { padding: var(--space-3) 0; border-top: 1px solid var(--rule); }
.ledger > li:first-child, .ledger > div:first-child { border-top: 0; padding-top: 0; }
.ledger dt { font-weight: 500; }
.ledger dd { margin-top: var(--space-1); color: var(--muted); }

/* ---------- 9. Field (D-10) ---------- */
.field { display: grid; gap: var(--space-2); max-width: var(--measure); }
.field__label { font-weight: 500; }
.field__hint { font-size: var(--step--1); color: var(--muted); }
.field__control {
  appearance: none;
  width: 100%;
  min-height: var(--tap);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);   /* what she types is the exact voice */
  font-size: 0.9375rem;
  line-height: 1.55;
}
textarea.field__control { min-height: 8.5rem; resize: vertical; }
.field__control[aria-invalid="true"] { border-width: 2px; padding: calc(var(--space-2) - 1px) calc(var(--space-3) - 1px); }

/* ---------- 10. Actions (D-11) and waiting (D-13) ---------- */
.act, .act-quiet {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0 var(--space-5);
  border: 1px solid var(--ink);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.act { background: var(--ink); color: var(--paper); }
.act:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.act:active { transform: translateY(1px); }
.act:disabled, .act[aria-disabled="true"] {
  background: var(--paper);
  color: var(--muted);
  border-style: dashed;
  cursor: not-allowed;
}
.act-quiet { background: var(--paper); color: var(--ink); }
.act-quiet:hover { border-width: 2px; padding: 0 calc(var(--space-5) - 1px); }
.act[aria-busy="true"] { cursor: progress; }
.act[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 30%;
  height: 2px;
  background: var(--ink);
  animation: trial-wait 1.2s var(--ease-in-out) infinite alternate;
}
@keyframes trial-wait { from { transform: translateX(0); } to { transform: translateX(233%); } }

/* ---------- 11. Status word (D-12) ---------- */
.status {
  display: inline-block;
  padding: 0 var(--space-2);
  border: 1px solid var(--ink);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1.6;
}
.status[data-status="draft"] { border-style: dashed; }

/* ---------- 12. Empty state (D-14) ---------- */
.empty { max-width: var(--measure); color: var(--ink); padding: var(--space-5) 0; border-top: 1px solid var(--rule); }

/* ---------- 13. Plain-document frame (D-15) ---------- */
.doc-frame { max-width: 52rem; }
.doc-frame__who {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.doc-frame__sheet { display: block; width: 100%; margin-top: var(--space-3); border: 1px solid var(--ink); background: var(--paper); }

/* ---------- 14. The total (D-16, D-04) ---------- */
.total__who {
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.total__figure {
  margin-top: var(--space-1);
  font-size: var(--step-4);
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.total:is([data-status="issued"], [data-status="sent"], [data-status="won"]) .total__figure { color: var(--accent); }
@media (min-width: 64rem) { .total__figure { font-size: var(--step-5); } }

/* ---------- 15. Record table (D-17) ---------- */
table.record { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.record caption { text-align: left; font-weight: 500; padding-bottom: var(--space-2); }
table.record th {
  text-align: left;
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: var(--space-2) var(--space-3) var(--space-2) 0;
  border-bottom: 1px solid var(--ink);
}
table.record td { padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.record .num { text-align: right; }
@media (max-width: 63.99rem) {
  table.record thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table.record tr { display: block; padding: var(--space-3) 0; border-bottom: 1px solid var(--rule); }
  table.record td { display: grid; grid-template-columns: 9rem 1fr; gap: var(--space-3); padding: var(--space-1) 0; border: 0; }
  table.record td::before { content: attr(data-label); color: var(--muted); font-size: var(--step--1); }
  table.record .num { text-align: left; }
}

/* ---------- 16. Slot and foot ---------- */
.slot { font-family: var(--sans); color: var(--muted); }
.foot { border-top: 1px solid var(--rule); }
.foot__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--space-5) var(--gutter) var(--space-8);
  font-size: var(--step--1);
  color: var(--muted);
}
.foot__inner p + p { margin-top: var(--space-2); }

/* ---------- 17. Reduced motion (D-18) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .act[aria-busy="true"]::after { content: none; }   /* D-18: the bar removed, not only stopped; B-1, cw2-039, 2026-10-19 */
}
/* ==== end of part 1 ==== */

/* ==== part 2: ds-1/ds1.css, byte for byte ==== */
/* ds1.css: DS-1 "What you can try" only. Every selector is prefixed ds1- (SHARED-BRIEF section 0).
   Loads after ../assets/trial.css and redeclares nothing that sheet names. Writer: cw2-019. */

/* The enquiries to paste: input above, the tool's answer below (D-09) */
.ds1-example + .ds1-example { margin-top: var(--space-7); }
.ds1-example h3 { font-size: var(--step-1); }
.ds1-example .exact { margin-top: var(--space-3); }
.ds1-example__does { margin-top: var(--space-3); }
.ds1-example__does + .exact { margin-top: var(--space-2); }

/* The walk: a real sequence, so the numbers earn their place (D-07) */
.ds1-walk { list-style: none; padding: 0; }
.ds1-step {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  column-gap: var(--space-4);
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule);
}
.ds1-step:first-child { border-top: 0; padding-top: var(--space-2); }
.ds1-step__n {
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ds1-step__body > * + * { margin-top: var(--space-3); }
.ds1-step__who { font-weight: 500; }
.ds1-step__list { padding-left: 1.25rem; list-style-type: "\2013  "; }
.ds1-step__list li + li { margin-top: var(--space-1); }

/* The walk's in-sentence links (E-1, E-4, Tell us): a 48 px tall hit area that leaves the line box
   unchanged, so the 44 px phone floor holds without breaking the sentence (D-19.4). */
.ds1-step__body a {
  display: inline-block;
  padding: 0.75rem 0.375rem;
  margin: -0.75rem -0.375rem;
}

/* The drawings to send (cw2-126, 2026-10-20): as the enquiries, each with its download link, which the build places. */
.ds1-drawing > * + * { margin-top: var(--space-3); }
.ds1-drawing .ds1-drawing__file { min-height: var(--tap); display: flex; align-items: center; }
/* ==== end of part 2 ==== */

/* ==== part 3: ds-2/ds2.css, byte for byte ==== */
/* ds2.css: DS-2 sign-in (two steps) and the start page only. Every selector is prefixed ds2-
   (SHARED-BRIEF section 0). Loads after ../assets/trial.css and redeclares nothing that sheet names.
   Writers: cw2-029 (attempt 1), cw2-029-a2 (attempt 2). No colour literal: only the shared tokens. */

/* The view's panel: on the desktop it takes the record grid's text column beside the h1 (D-07).
   A grid with a gap, not sibling margins: a hidden part (an arrival, an answer) takes no space, so the
   first part shown always starts level with the h1 on the desktop and one step under it on the phone. */
.ds2-panel,
.ds2-step { display: grid; gap: var(--space-5); align-content: start; }
.ds2-panel > *,
.ds2-step > * { margin-top: 0; }
@media (max-width: 63.99rem) {
  .ds2-panel { margin-top: var(--space-5); }
}
@media (min-width: 64rem) {
  .ds2-panel { grid-column: 2; }
}

/* Why she is on the sign-in view again (signed out, or signed out by the tool): our words first */
.ds2-arrival > * + * { margin-top: var(--space-3); }

/* Our own sentence where it is the main message (no sentence of the tool's came): ink, body size (D-24) */
.ds2-plain { max-width: var(--measure); font-weight: 500; }

/* The sign-in forms: narrower than the text column, fields stacked (D-10) */
.ds2-form { max-width: 26rem; }
.ds2-form > * + * { margin-top: var(--space-5); }
.ds2-who { color: var(--muted); }
.ds2-who kbd { color: var(--ink); }
.ds2-code { max-width: 11rem; }
/* The authenticator entry's name, as her app shows it: kept on one line, since she looks for it by name */
.ds2-entry { white-space: nowrap; }

/* The act row: at most one primary, a secondary beside it (D-11) */
.ds2-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }

/* The tool's answer to the act, under the act (D-10: field null) */
.ds2-form > .ds2-answer { margin-top: var(--space-3); }
.ds2-answer > * + * { margin-top: var(--space-2); }
.ds2-answer > .note, .ds2-answer > .ds2-plain { margin-top: var(--space-3); }

/* Sign out in the masthead: an act, set like the masthead's links (the same form as DS-3's ds3-signout) */
.ds2-signout {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.ds2-signout:hover { text-decoration-thickness: 2px; }
.ds2-signout[aria-busy="true"] { cursor: progress; text-decoration-line: none; }

/* The start page: where to start, as a link that reads as a link, at heading size (D-11), its note
   directly under it. A grid, not a paragraph, so no text strut adds space under the 44 px link. */
.ds2-begin { display: grid; justify-items: start; gap: var(--space-2); }
.ds2-begin__link {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.2;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
}
.ds2-begin__link:hover { text-decoration-thickness: 3px; }

/* A link inside a note: a 48 px tall hit area that leaves the line box unchanged (D-19.4; the same
   device as DS-1's in-sentence links) */
.ds2-begin .note a {
  display: inline-block;
  padding: 0.875rem 0.375rem;
  margin: -0.875rem -0.375rem;
}

/* The rest of the tool: each place a link on its own line, then one line on what is there */
.ds2-places a { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 500; }
.ds2-places p { color: var(--muted); }
/* ==== end of part 3 ==== */

/* ==== part 4: ds-3/ds3.css, byte for byte ==== */
/* ds3.css: DS-3, the trial face's working pages (the enquiry box, the quotation view, the register,
   the rate card's versions). Every selector is prefixed ds3- (SHARED-BRIEF section 0). Loads after
   ../assets/trial.css and redeclares nothing that sheet names. Writer: cw2-027; revised by cw2-027-a2. Colours only through
   the six tokens; no font file, no image or font reference, no blend, no shade, no rounding. */

/* ---------- Masthead: sign out is an act, set as the masthead's one link-weight control (D-06, D-11) ---------- */
.ds3-signout {
  appearance: none;
  display: inline-flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.ds3-signout:hover { text-decoration-thickness: 2px; }

/* ---------- Page head: the lede and the tool's three working pages (D-07) ---------- */
.ds3-head > * + * { margin-top: var(--space-4); }
.ds3-pages ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: var(--space-5);
}
.ds3-pages a { display: inline-flex; align-items: center; min-height: var(--tap); }
.ds3-pages a[aria-current="page"] { text-decoration: none; font-weight: 500; }
.ds3-asof { font-size: var(--step--1); color: var(--muted); }

/* ---------- Acts and the words that answer them (D-10, D-11, D-13) ---------- */
.ds3-acts { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.ds3-acts + .exact, .ds3-acts + .ds3-ours { margin-top: var(--space-3); }
.ds3-ours { max-width: var(--measure); }
.ds3-ours strong { font-weight: 500; }
.field__said { margin-top: var(--space-1); }

/* An in-sentence link keeps its line box and gets a 48 px tall hit area (D-19.4; as ds1's walk links). */
.ds3-tap {
  display: inline-block;
  padding: 0.75rem 0.375rem;
  margin: -0.75rem -0.375rem;
}
.ds3-next a { display: inline-flex; align-items: center; min-height: var(--tap); }

/* ---------- Facts: the tool's figures under our labels (D-02: figures in the sans) ---------- */
.ds3-facts { display: grid; gap: 0; }
.ds3-facts > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  column-gap: var(--space-4);
  padding: var(--space-2) 0;
  border-top: 1px solid var(--rule);
}
.ds3-facts > div:first-child { border-top: 0; padding-top: 0; }
.ds3-acts + .ds3-facts { margin-top: var(--space-5); }
.ds3-facts dt { color: var(--muted); font-size: var(--step--1); padding-top: 0.15rem; }
.ds3-facts dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (min-width: 64rem) { .ds3-facts > div { grid-template-columns: 11rem minmax(0, 1fr); } }

/* ---------- The finish: the card's own lists, every choice shown (lead's escalation 2) ---------- */
.ds3-set { margin-inline: 0; margin-bottom: 0; padding: 0; border: 0; min-width: 0; }
.ds3-set > legend { padding: 0; font-weight: 500; }
.ds3-set + .ds3-set { margin-top: var(--space-6); }
.ds3-matrix { display: grid; gap: var(--space-3); margin-top: var(--space-2); }
.ds3-pick { margin: 0; padding: var(--space-2) 0 0; border: 0; border-top: 1px solid var(--rule); min-width: 0; }
.ds3-pick > legend { float: left; width: 100%; padding: 0; font-size: var(--step--1); color: var(--muted); }
.ds3-pick > legend + * { clear: left; }
.ds3-choices { display: flex; flex-wrap: wrap; column-gap: var(--space-5); }
.ds3-choice {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: var(--tap);
  cursor: pointer;
}
.ds3-choice input {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--ink);
  cursor: pointer;
}
.ds3-choices--stack { flex-direction: column; }
@media (min-width: 64rem) {
  .ds3-matrix { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-6); }
}

/* ---------- The file chooser: the native input kept, visually hidden; its label is the control ---------- */
.ds3-file__choose { justify-self: start; }
.ds3-file__name { font-size: var(--step--1); color: var(--muted); }
.ds3-file__name kbd { color: var(--ink); }
.ds3-file__input:focus-visible + .ds3-file__choose { outline: 2px solid var(--ink); outline-offset: 3px; }

/* ---------- Waiting on a page's first answer (D-13, D-18): the words, and one ink bar without reduced motion ---------- */
.ds3-wait {
  position: relative;
  display: inline-block;
  padding-bottom: var(--space-2);
  font-weight: 500;
}
.ds3-wait::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 30%;
  height: 2px;
  background: var(--ink);
  animation: trial-wait 1.2s var(--ease-in-out) infinite alternate;
}

/* A quiet act that is waiting or has nothing to act on (D-11's disabled form, D-13's bar), for DS-3's quiet acts */
.ds3-acts .act-quiet:disabled, .ds3-row-acts .act-quiet:disabled {
  border-style: dashed;
  color: var(--muted);
  cursor: not-allowed;
}
.ds3-row-acts .act-quiet[aria-busy="true"] { cursor: progress; }
.ds3-row-acts .act-quiet[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 30%;
  height: 2px;
  background: var(--ink);
  animation: trial-wait 1.2s var(--ease-in-out) infinite alternate;
}
/* D-18: reduced motion removes the waiting bar and keeps the words. trial.css section 17 stops the animation of the
   shared .act bar but leaves it standing still; inside DS-3's own act rows it is removed here too (cw2-027-a2;
   reported to the lead for trial.css). */
@media (prefers-reduced-motion: reduce) {
  .ds3-wait::after, .ds3-row-acts .act-quiet[aria-busy="true"]::after, .ds3-acts > .act[aria-busy="true"]::after { content: none; }
}

/* ---------- The quotation's summary: a stated sub-total is a figure, not the total (D-16 gap; see NOTES-ds-3) ---------- */
.ds3-summary > * + * { margin-top: var(--space-5); }
.ds3-subtotal__figure {
  margin-top: var(--space-1);
  font-size: var(--step-2);
  font-weight: 400;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

/* ---------- The document frame's two notes sit under its caption (D-15, D-22) ---------- */
.ds3-doc > .note { margin-top: var(--space-2); }
.ds3-doc > .doc-frame__sheet { margin-top: var(--space-4); }

/* ---------- Wide working content: the register and the document take the rail and the text column, never the void (D-07) ---------- */
@media (min-width: 64rem) {
  .ds3-wide { display: block; }
  .ds3-wide > h2 { max-width: var(--rail); }
  .ds3-wide > .ds3-wide__body { margin-top: var(--space-5); max-width: calc(var(--rail) + var(--space-7) + var(--measure)); }
  .ds3-wide > .ds3-wide__body > * + * { margin-top: var(--space-4); }
}
@media (max-width: 63.99rem) {
  .ds3-wide__body { margin-top: var(--space-4); }
  .ds3-wide__body > * + * { margin-top: var(--space-4); }
}

/* ---------- The register's rows: the acts, and a refusal set on its own line under its row (D-10, D-17) ---------- */
.ds3-row-acts { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); }
.ds3-row-acts .act-quiet { padding: 0 var(--space-4); white-space: nowrap; }
.ds3-row-acts .act-quiet:hover { padding: 0 calc(var(--space-4) - 1px); }
.ds3-none { color: var(--muted); }
@media (min-width: 64rem) { .ds3-nowrap { white-space: nowrap; } }
.ds3-reg td > .status { justify-self: start; }
table.record tr.ds3-has-said td { border-bottom: 0; }
table.record tr.ds3-said-row .note { margin-top: var(--space-2); }
table.record tr.ds3-said-row td { padding-top: 0; }
table.record tr.ds3-said-row td::before { content: none; }
@media (max-width: 63.99rem) {
  table.record tr.ds3-said-row { padding-top: 0; }
  table.record tr.ds3-said-row td { display: block; }
  table.record tr.ds3-has-said { border-bottom: 0; }
}
table.record th.num { text-align: right; }
@media (max-width: 63.99rem) { table.record td.ds3-acts-cell { align-items: start; } }
/* ==== end of part 4 ==== */

/* ==== part 5: ds-3/ds3-drawing.css, byte for byte ==== */
/* ds3-drawing.css: DS-3's drawing pages (upload a drawing, what the tool read, the area table, the drawing file).
   Writer: cw2-084, the studio's D-6 design, 2026-10-20. Loads after ../assets/trial.css and ds3.css on the
   drawing-*.html pages only; every selector is prefixed ds3- and none is a class either sheet already names.
   Colours only through the six tokens; no font file, no image or font reference, no blend, no shade, no rounding. */

/* ---------- The upload: four required fields under one legend, the numbers in short controls (D-10) ---------- */
.ds3-four > legend + .field__hint { margin-top: var(--space-1); }
.ds3-fields { margin-top: var(--space-4); }
.ds3-fields > * + * { margin-top: var(--space-5); }
.ds3-num { max-width: 12rem; }
.ds3-when { max-width: 18rem; }

/* ---------- A quiet act that is waiting (D-13), as the register's row acts: the words, and the bar without reduced motion ---------- */
.ds3-acts .act-quiet[aria-busy="true"] { cursor: progress; }
.ds3-acts .act-quiet[aria-busy="true"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 30%;
  height: 2px;
  background: var(--ink);
  animation: trial-wait 1.2s var(--ease-in-out) infinite alternate;
}
@media (prefers-reduced-motion: reduce) {
  .ds3-acts .act-quiet[aria-busy="true"]::after { content: none; }   /* D-18: removed, not only stopped */
}

/* ---------- The area table: three record tables in one wide body (D-07, D-17) ---------- */
.ds3-wide__body > table.ds3-area { margin-top: var(--space-6); }
.ds3-wide__body > table.ds3-area + .note { margin-top: var(--space-3); }
.ds3-area--narrow { max-width: 40rem; }
.ds3-state { font-size: var(--step--1); font-weight: 500; letter-spacing: 0.02em; }
@media (min-width: 64rem) { table.record.ds3-area td.ds3-full samp { white-space: nowrap; } }

/* On the phone a measured row folds denser than D-17's one-pair-per-line: the run or room on its own line, then its
   figures as small label-over-value pairs that sit side by side and wrap. Ten runs at six lines each was a wall of
   repeated labels; this keeps every pair (the cell's data-label) and roughly a third of the height. */
@media (max-width: 63.99rem) {
  table.record.ds3-area tr { display: flex; flex-wrap: wrap; column-gap: var(--space-5); row-gap: var(--space-2); }
  table.record.ds3-area td { display: block; padding: 0; }
  table.record.ds3-area td::before { display: block; }
  table.record.ds3-area td:first-child { flex-basis: 100%; }
  table.record.ds3-area td:first-child::before { content: none; }   /* the room or run names itself; the caption names the table */
  table.record.ds3-area td.ds3-full, table.record.ds3-area tr.ds3-said-row td { flex-basis: 100%; }
}

/* ---------- The printed quotation's place, until the build fills it (D-15 frame; D-23 slot): a dashed box, as a
   draft's status is, because nothing in it is a record yet ---------- */
.ds3-docslot {
  margin-top: var(--space-4);
  max-width: 52rem;
  padding: var(--space-6) var(--space-5);
  border: 1px dashed var(--ink);
}

/* ---------- cw2-126 (2026-10-20): the three figures, each in the unit she types, beside the unit she chose, with the
   whole millimetres the page will send under them (ADR-097 (g)). The unit is a set of choices, never a select. ---------- */
.ds3-measure__row { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-5); row-gap: var(--space-1); }
.ds3-measure__row > .ds3-num { width: 9rem; flex: none; }
.ds3-part { display: inline-flex; align-items: center; gap: var(--space-2); }
.ds3-part > .ds3-num--part { width: 5.5rem; flex: none; }
.ds3-part__unit { font-size: var(--step--1); }
.ds3-units { margin: 0; padding: 0; border: 0; min-width: 0; }
.ds3-sent { font-size: var(--step--1); font-variant-numeric: tabular-nums; }

/* ---------- cw2-171 (2026-10-21, ruling (21), F-4): each panel thickness is chosen from the card's own list (R7's
   panel.thickness_mm), each figure in millimetres and in inches, with free entry kept as the list's last choice. A
   fieldset with a legend, as the finish's sets are; the list stacks, one choice to a line; the box for another
   thickness sits under its choice, indented to the choice's words, and shows only while that choice is made. ---------- */
.ds3-thick { margin: 0; padding: 0; border: 0; min-width: 0; }
.ds3-thick > legend { padding: 0; }
.ds3-thick > .field__hint { margin-top: var(--space-2); }
.ds3-thick__list { margin-top: var(--space-1); }
.ds3-thick__other { margin-top: var(--space-1); padding-left: calc(1.25rem + var(--space-2)); }
.ds3-thick__wait, .ds3-thick__none { display: flex; align-items: center; min-height: var(--tap); margin: 0; }
.ds3-four > .ds3-card-said { margin-top: var(--space-4); }
.ds3-four > .ds3-card-said + .note { margin-top: var(--space-2); }
/* ==== end of part 5 ==== */

/* ---------- FR-3 (fr3-001): the rate card's preview under its versions - the record table and the facts, reused ---------- */
.ds3-pv > * + * { margin-top: var(--space-5); }
.ds3-pv__part { padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.ds3-pv__part > h3 { font-size: var(--step-1); }
.ds3-pv__part > * + * { margin-top: var(--space-4); }
.ds3-pv__part > .empty { padding: 0; border-top: 0; }
.ds3-pv__scroll { overflow-x: auto; }
.ds3-pv__shown { color: var(--muted); font-size: var(--step--1); }

/* ---------- FR-2 (fr3-005): a new version of the rate card, for administrators - the face's fields, record tables and
   acts, reused; the controls inside a table row are kept compact, and a select shows its own arrow ---------- */
.ds3-ce > * + * { margin-top: var(--space-5); }
.ds3-ce > .ds3-pv__part > * + * { margin-top: var(--space-4); }
.ds3-ce > .ds3-pv__part > h3, .ds3-ce > h3, #ce-pv-h { font-size: var(--step-1); }
.ds3-ce select.field__control { appearance: auto; font-family: var(--sans); }
.ds3-ce__lists { display: grid; gap: var(--space-4); }
.ds3-ce__table td { vertical-align: middle; }
.ds3-ce__table .field__control { min-width: 7rem; padding: var(--space-1) var(--space-2); min-height: var(--tap); }
.ds3-ce__table td.num .field__control { text-align: right; min-width: 6rem; }
.ds3-ce__table .act-quiet { padding: 0 var(--space-4); white-space: nowrap; }
.ds3-ce .field__control[aria-invalid="true"] { border-width: 2px; }
#ce-check > p + p { margin-top: var(--space-2); }
.ds3-ce__discard > * + * { margin-top: var(--space-3); }
@media (min-width: 64rem) { .ds3-ce__lists { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ds3-ce__lists > .field__hint { grid-column: 1 / -1; } }
@media (max-width: 63.99rem) {
  .ds3-ce__table .field__control { min-width: 0; }
  .ds3-ce__table td.num .field__control { text-align: left; }
}

/* ---------- FR-7 (fr3-010): "From the rate card" on the typed road's finish - the record table and the face's fields,
   reused; the row's name is its header cell; at phone width the rows fold as every record table does ---------- */
.ds3-cat > * + *, #cat-some > * + *, #dw-cat-some > * + * { margin-top: var(--space-4); }
.ds3-cat__part { padding-top: var(--space-4); border-top: 1px solid var(--rule); }
.ds3-cat__part > h3 { font-size: var(--step-1); }
.ds3-cat__part > * + * { margin-top: var(--space-3); }
.ds3-cat__table th[scope="row"] { font-weight: 500; text-align: left; padding: var(--space-3) var(--space-3) var(--space-3) 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.ds3-cat__table td { vertical-align: middle; }
.ds3-cat__table .field__control { width: 7rem; padding: var(--space-1) var(--space-2); min-height: var(--tap); text-align: right; }
.ds3-cat__table .field__control[aria-invalid="true"] { border-width: 2px; }
.ds3-cat__chosen { font-weight: 500; }
/* round 2 (fr3-010r): a tick box per row, its label the item's name; the quantity box beside the card's unit, closed
   until the row is ticked */
.ds3-cat__table th[scope="row"] .ds3-choice { font-weight: 500; }
.ds3-cat__table .ds3-choice input[aria-invalid="true"] { outline: 2px solid var(--ink); outline-offset: 2px; }
.ds3-cat__control { display: inline-flex; align-items: center; gap: var(--space-2); }
.ds3-cat__table .field__control:disabled { border-style: dashed; border-color: var(--muted); background: transparent; cursor: not-allowed; }
.ds3-cat__unit { white-space: nowrap; }
.ds3-cat__derived { color: var(--muted); }
.ds3-cat__missing { font-weight: 500; }
@media (max-width: 63.99rem) {
  .ds3-cat__table th[scope="row"] { display: block; padding: 0 0 var(--space-1); border: 0; }
  .ds3-cat__table .field__control { text-align: left; }
}

/* ---------- FR-8 (hlp-002): help on the rate card page - the page's own box under its heading, and a small "?" beside
   each part of the card and each commercial term that opens a bubble. The "?" is small to see and a full tap target to
   touch; the bubble is as wide as its row allows, so it never runs off a phone's screen ---------- */
.help-box { max-width: var(--measure); background: var(--sheet); padding: 0 var(--space-4); }
.help-box__summary { min-height: var(--tap); padding: var(--space-3) 0; font-weight: 500; cursor: pointer; }
.help-box__lines { padding: 0 0 var(--space-4) 1.25rem; max-width: var(--measure); }
.help-box__lines > li + li { margin-top: var(--space-2); }
@media (min-width: 64rem) {
  .help-page { display: grid; grid-template-columns: var(--rail) minmax(0, var(--measure)); column-gap: var(--space-7); }
  .help-page > .help-box { grid-column: 2; }
}
.help-head { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.help-head > h3 { font-size: var(--step-1); }
.help-row { position: relative; }
.help-q {
  appearance: none;
  position: relative;
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: var(--step--1);
  font-weight: 500;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
}
.help-q::before { content: ""; position: absolute; inset: -0.625rem; }   /* the tap target: 1.5rem + 2 x 0.625rem = 44 px */
.help-q:hover { border-width: 2px; }
.help-q[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
dt > .help-q { margin-left: var(--space-2); }
.help-bubble {
  position: absolute;
  z-index: 5;
  left: 0;
  top: calc(100% + var(--space-2));
  width: min(26rem, 100%);
  padding: var(--space-3) var(--space-4) var(--space-4);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font-size: var(--step--1);
  font-weight: 400;
  line-height: 1.5;
  text-align: left;
}
.help-bubble > * + * { margin-top: var(--space-2); }
.help-bubble__title { font-size: var(--step-0); font-weight: 500; }


/* ---------- FR-1: the drawing preview on the quotation page (dxf-preview.js) ----------
   The panel sits in "The drawing file", under the download. The drawing is inline SVG on a white sheet in a framed,
   scrollable box; the layer chips are pressed buttons (ink when shown, paper when hidden); zoom widens the drawing
   inside the box, which then scrolls. Wraps to one column of controls at phone width. */
.dxp { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--rule); }
.dxp > * + * { margin-top: var(--space-4); }
.dxp > h3 { font-size: var(--step-1); font-weight: 500; }
.dxp__shown > * + * { margin-top: var(--space-4); }
.dxp__bar { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-6); align-items: center; }
.dxp__tools { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.dxp__chip {
  appearance: none;
  min-height: var(--tap);
  padding: 0 var(--space-4);
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-decoration: line-through;
}
.dxp__chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); text-decoration: none; }
.dxp__chip:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.dxp__chip[aria-pressed="false"]:hover { text-decoration: line-through underline; }
.ds3-acts .act-quiet.dxp__zoom, .act-quiet.dxp__zoom { padding: 0 var(--space-4); }
.act-quiet.dxp__zoom:hover { padding: 0 calc(var(--space-4) - 1px); }
.act-quiet.dxp__zoom:disabled { border-style: dashed; color: var(--muted); cursor: not-allowed; }
.act-quiet.dxp__zoom:disabled:hover { border-width: 1px; padding: 0 var(--space-4); }
.dxp__frame {
  overflow: auto;
  max-height: 80vh;
  border: 1px solid var(--ink);
  background: var(--paper);
  -webkit-overflow-scrolling: touch;
}
.dxp__svg { display: block; width: 100%; height: auto; max-width: none; }
@media (max-width: 63.99rem) {
  .dxp__bar { gap: var(--space-3); }
  .dxp__frame { max-height: 70vh; }
}

/* FR-5: what the card in force prices, above the finish choices; a choice with no rate stays on the list, greyed */
.ds3-covers { margin-top: var(--space-4); margin-bottom: var(--space-5); max-width: var(--measure); }
.ds3-covers > * + * { margin-top: var(--space-2); }
.ds3-covers__h { font-weight: 500; }
.ds3-covers__none > p { color: var(--ink); font-weight: 500; }
.ds3-covers__none > p + p { margin-top: var(--space-2); }
.ds3-choice--norate { color: var(--muted); cursor: not-allowed; }
.ds3-choice--norate input { cursor: not-allowed; }
.ds3-norate { font-size: var(--step--1); }
