/* Resenence — the acquisition door ("Start With What You Know"), BRIEF 97 Lane A-page.

   This stylesheet is loaded AFTER styles.css (web/anchor.html) and reuses its tokens, fonts and
   generic components (.panel, .row, .actions, .muted, button, label, input/textarea, .banner,
   .rail) exactly as the expression door does — see docs/design/SURFACES.md for what each of the
   five surfaces (ground/wash/card/booth/nightfall) is for. This door has no instruments (no audio,
   no pitch, no ruler), so it never uses the booth surface: every panel here sits on the card, with
   wash for insets (the drop-style form blocks) — the same "mids working, deeps for text, lights for
   tints" rules, just with no dark screen anywhere on this page.

   Six steps, one hue each, continuing the same spectrum PAGE.md assigns the expression door's five
   (violet/blue/cyan/teal/seafoam) with ginkgo added for the sixth (result) — the guide's own
   accent-timing hue, used here for a HEADING role rather than a warning, exactly as the take clock
   already borrows it on the expression door. */

/* ---- reuse-compatibility decoys (see the HTML comment beside them): never shown, never take space. */
#step-import, #step-understand, #step-study, #step-record, #step-result,
#refDrop, #refFile, #importBtn, #refUrl, #refUrlBtn, #refMicBtn, #refMicStop, #scoreBtn { display: none !important; }

/* ⚑ styles.css's `button { display: inline-flex; ... }` (an author rule) beats the UA stylesheet's
   `[hidden] { display: none }` at equal specificity, so a plain `<button hidden>` — e.g. this page's
   own #foundContinue, and #signoutBtn from the reused gate markup — stays visually visible even
   though `.hidden` is true (confirmed the same way on the expression door's own #signoutBtn; not
   this page's bug to fix in styles.css, which this lane does not own, so it is corrected here for
   every button on THIS page only). */
button[hidden] { display: none !important; }

/* ---- the six-step rail, mapped onto the SAME .rail component the expression door uses ---------- */
#anchorRail::after { width: 8%; }
#anchorRail:has(> [data-astep="found"].on)::after     { width: 24%; }
#anchorRail:has(> [data-astep="present"].on)::after    { width: 40%; }
#anchorRail:has(> [data-astep="stability"].on)::after  { width: 58%; }
#anchorRail:has(> [data-astep="test"].on)::after       { width: 76%; }
#anchorRail:has(> [data-astep="result"].on)::after     { width: 94%; }

[data-astep="bring"]    { --hue-deep: var(--violet-deep);  --hue-mid: var(--violet-mid);  --hue-light: var(--violet-light); }
[data-astep="found"]    { --hue-deep: var(--blue-deep);    --hue-mid: var(--blue-mid);    --hue-light: var(--blue-light); }
[data-astep="present"]  { --hue-deep: var(--cyan-deep);    --hue-mid: var(--cyan-mid);    --hue-light: var(--cyan-light); }
[data-astep="stability"] { --hue-deep: var(--teal-deep);   --hue-mid: var(--teal-mid);    --hue-light: var(--teal-light); }
[data-astep="test"]     { --hue-deep: var(--seafoam-deep); --hue-mid: var(--seafoam-mid); --hue-light: var(--seafoam-light); }
[data-astep="result"]   { --hue-deep: var(--ginkgo-deep);  --hue-mid: var(--ginkgo-mid);  --hue-light: var(--ginkgo-light); }

#anchor-step-bring     { --hue-deep: var(--violet-deep);  --hue-mid: var(--violet-mid); }
#anchor-step-found     { --hue-deep: var(--blue-deep);    --hue-mid: var(--blue-mid); }
#anchor-step-present   { --hue-deep: var(--cyan-deep);    --hue-mid: var(--cyan-mid); }
#anchor-step-stability { --hue-deep: var(--teal-deep);    --hue-mid: var(--teal-mid); }
#anchor-step-test      { --hue-deep: var(--seafoam-deep); --hue-mid: var(--seafoam-mid); }
#anchor-step-result    { --hue-deep: var(--ginkgo-deep);  --hue-mid: var(--ginkgo-mid); }

/* ---- intake form (step 1) ------------------------------------------------------------------- */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.two-col > div { min-width: 0; }

.q-block { border: none; padding: 0; margin: var(--s5) 0 0; }
.q-block legend { font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); color: var(--dim); margin-bottom: var(--s2); padding: 0; }
.q-block legend .hint { text-transform: none; letter-spacing: 0; font-family: var(--font-body); }
.radio-row, .check-row { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body);
  font-size: 15px; color: var(--ink); margin: 0 var(--s4) var(--s2) 0; text-transform: none; letter-spacing: 0; }
.radio-row input, .check-row input { width: 16px; height: 16px; accent-color: var(--violet-deep); }

#carryTranslation { background: var(--wash); border-radius: 14px; padding: var(--s4); margin-top: var(--s4); }

/* ---- narration panels (steps 3-5): the plain-language transcript of what the engine said, in the
   order it said it — MEANING FIRST is enforced by the step machine (web/modules/anchor/session.js),
   not by CSS; this only renders whatever lines land here, in DOM order. */
.narration { font-family: var(--font-body); font-size: 15.5px; color: var(--ink); line-height: 1.6;
  background: var(--wash); border-radius: 14px; padding: var(--s4) var(--s5); white-space: pre-wrap; }
.narration:empty { display: none; }
.narration .n-line { margin: 0 0 4px; }
.narration .n-heading { font-family: var(--font-display); font-weight: 700; color: var(--ink);
  margin: var(--s3) 0 4px; }
.narration .n-word { font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); color: var(--dim); margin-top: var(--s3); }
/* DD-366 cut B: the meeting shows the meanings; how the words are built waits behind one tap (closed by default),
   drawn the way the page's other taps are (.plan-why, the mockup's details.why). */
.narration .meeting-notes { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--border);
  white-space: normal; }
.narration .meeting-notes summary { cursor: pointer; color: var(--violet-deep); text-decoration: underline;
  font-size: 14.5px; }
.narration .meeting-notes-body { margin-top: var(--s2); white-space: pre-wrap; color: var(--ink); }

/* BRIEF 101 (R2), lead-directed: a CARRY unit's forced-choice prompt is multiple lines (the question,
   then "1) ...", "2) ...", "3) ...") in the ONE string the engine sends — `pre-line` keeps the
   engine's own newlines as line breaks (collapsing runs of other whitespace) so the options read as a
   numbered list rather than one run-on sentence. Engine-level legibility fix only, not a redesign. */
.prompt-text { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink);
  margin: var(--s4) 0 var(--s2); white-space: pre-line; }

/* ---- the piece's parts (BRIEF 101, R2) — no new visual design ------- */
.units-box { background: var(--wash); border-radius: 14px; padding: var(--s4) var(--s5); margin: var(--s4) 0; }
.units-box p.muted { margin: 0 0 var(--s2); }
.units-box ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.units-box li { font-family: var(--font-body); font-size: 14.5px; color: var(--dim); }
.units-box li.current { color: var(--ink); font-weight: 700; }
/* Overrides the global pill/mono-caps `button` (styles.css) — a part link reads as plain text inline
   in a sentence, not a call-to-action pill, so its chrome is fully reset here rather than inherited. */
.units-box button.part-link { background: none; border: none; padding: 0; margin: 0; min-height: 0;
  display: inline; font: inherit; font-family: var(--font-body); font-size: inherit; font-weight: 400;
  text-transform: none; letter-spacing: normal; color: var(--violet-deep); text-decoration: underline;
  cursor: pointer; }

/* ---- pilot config + judgment form --------------------------------------------------------------- */
#pilotConfig { background: var(--wash); border-radius: 14px; padding: var(--s4) var(--s5); margin-top: var(--s3); }
#pilotConfig .pilot-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: end; }
#pilotConfig .pilot-row + .pilot-row { margin-top: var(--s3); }
#pilotConfig label { margin-top: 0; }

.judgment-field { margin-bottom: var(--s4); }
.judgment-field label { font-family: var(--font-body); text-transform: none; letter-spacing: 0;
  font-size: 15px; color: var(--ink); font-weight: 600; margin-bottom: 6px; }
.judgment-field textarea { min-height: 56px; }
.judgment-field .q-source { display: block; font-family: var(--font-mono); font-size: var(--text-label-sm);
  color: var(--dim); text-transform: none; letter-spacing: 0; margin-top: 3px; font-weight: 400; }

/* ---- responsive: readable at 390px (task item 4) ----------------------------------------------- */
@media (max-width: 640px) {
  .two-col { grid-template-columns: 1fr; }
  #pilotConfig .pilot-row { grid-template-columns: 1fr; }
}

/* ---- the word map and the plan (BRIEF 104 Lane C; DD-350, R7/R8; R11: process level, polish waits) ------
   Each line of the part is a row of small PAIRS that wrap freely, so nothing scrolls sideways at 375px. A pair
   is the learner's words above, the new language's words below, and the joining line (inline SVG) between. The
   state is carried by the line AND the outline style as well as colour (matched = solid line, nothing at the
   other end = broken line with a cross, not taught yet = dashed, still open = dotted). */
#pilotRow[hidden] { display: none !important; }
.wm, .plan { margin-top: var(--s5); min-width: 0; }
.wm h3, .plan h3 { margin: 0 0 var(--s2); }
.wm-intro, .plan-intro { margin: 0 0 var(--s3); }
.wm-coverage { font-size: 14px; color: var(--dim); margin: var(--s3) 0; }
.wm-legend { list-style: none; margin: 0 0 var(--s2); padding: 0; display: flex; flex-wrap: wrap;
  gap: 6px 14px; font-size: 13px; color: var(--dim); }
.wm-legend li { display: inline-flex; align-items: center; gap: 6px; }
.wm-swatch { display: inline-block; width: 16px; height: 12px; border-radius: 4px; border: 2px solid var(--seafoam-deep);
  background: var(--seafoam-light); box-sizing: border-box; }
.wm-swatch.wm-t-ending { background: var(--teal-light); border-color: var(--teal-deep); }
.wm-swatch.wm-t-particle { background: var(--cyan-light); border-color: var(--cyan-deep); }
.wm-swatch.wm-t-name { background: var(--violet-light); border-color: var(--violet-deep); }
.wm-swatch.wm-t-none { background: transparent; border: 2px dashed var(--body); }
.wm-swatch.wm-t-held_back { background: transparent; border: 2px dashed var(--koi-deep); }
.wm-swatch.wm-t-open { background: var(--wash); border: 2px dotted var(--body); }

.wm-line { background: var(--wash); border-radius: 14px; padding: var(--s3) var(--s4); margin-top: var(--s3); min-width: 0; }
.wm-line-head, .plan-line-head { margin: 0 0 var(--s3); display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 4px var(--s3); min-width: 0; }
.wm-line-n, .plan-line-n { font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); color: var(--dim); }
.wm-line-text, .plan-line-text { font-family: var(--font-body); font-size: 15px; color: var(--ink); min-width: 0;
  overflow-wrap: anywhere; }
.wm-pairs { display: flex; flex-wrap: wrap; gap: var(--s3) var(--s2); align-items: flex-start; }
.wm-pair { display: flex; flex-direction: column; align-items: center; max-width: 100%; min-width: 0;
  background: var(--card-bright); border-radius: 12px; padding: 8px 8px 6px; }
.wm-side { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px; max-width: 100%; }
.wm-wire { display: block; width: 24px; height: 24px; flex: none; }
.wm-wire line, .wm-wire path { stroke: var(--seafoam-deep); stroke-width: 2; fill: none; stroke-linecap: round; }
.wm-wire .wm-dot { fill: var(--seafoam-deep); stroke: none; }
.wm-wire .wm-dash { stroke-dasharray: 3 3; }
.wm-wire .wm-cross { stroke: var(--body); }
.wm-chip, .wm-empty { display: inline-block; font-family: var(--font-body); font-size: 15px; line-height: 1.3;
  padding: 3px 8px; border-radius: 8px; border: 2px solid var(--seafoam-deep); background: var(--seafoam-light);
  color: var(--ink); max-width: 100%; overflow-wrap: anywhere; box-sizing: border-box; }
.wm-empty { background: transparent; border: 2px dashed var(--body); color: var(--dim); font-size: 13px;
  font-style: italic; }
.wm-ending { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 3px; color: var(--teal-deep); }
.wm-tie { color: var(--cyan-deep); font-weight: 700; }
.wm-tag { margin: 6px 0 0; font-size: 12.5px; line-height: 1.4; color: var(--dim); max-width: 22ch; text-align: center; }

.wm-t-ending .wm-wire line { stroke: var(--teal-deep); stroke-width: 3; }
.wm-t-ending .wm-chip { background: var(--teal-light); border-color: var(--teal-deep); }
.wm-t-particle .wm-wire path { stroke: var(--cyan-deep); }
.wm-t-particle .wm-chip { background: var(--cyan-light); border-color: var(--cyan-deep); }
.wm-t-name .wm-wire line { stroke: var(--violet-deep); }
.wm-t-name .wm-wire .wm-dot { fill: var(--violet-deep); }
.wm-t-name .wm-chip { background: var(--violet-light); border-color: var(--violet-deep); }
.wm-t-none .wm-chip { background: transparent; border: 2px dashed var(--body); color: var(--dim); }
.wm-t-none .wm-wire line { stroke: var(--body); }
.wm-t-held_back .wm-chip { background: transparent; border: 2px dashed var(--koi-deep); color: var(--koi-deep); }
.wm-t-held_back .wm-wire line { stroke: var(--koi-deep); }
.wm-t-open .wm-chip { background: var(--wash); border: 2px dotted var(--body); color: var(--ink); }
.wm-t-open .wm-wire line { stroke: var(--body); }

/* a word that can be heard (hear.js): keep the chip compact, the cover text hidden, only the button showing */
.wm-chip.hearable { gap: 4px; flex-wrap: nowrap; }
.wm-chip .hear-cover { display: none; }
.wm-chip .hear-btn, .wm-line-text .hear-btn, .plan-label .hear-btn { min-height: 0; padding: 2px 8px; font-size: 11px; }


.plan-lines { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.plan-line { background: var(--wash); border-radius: 14px; padding: var(--s3) var(--s4); min-width: 0; }
.plan-why { margin-top: var(--s2); font-size: 13px; }
.plan-why summary { cursor: pointer; color: var(--violet-deep); text-decoration: underline; }
.plan-why p { margin: 4px 0 0; max-width: 60ch; }
.plan-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.plan-step { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 6px; max-width: 100%; min-width: 0;
  padding: 3px 9px; border-radius: 999px; background: var(--card-bright); border: 1px solid var(--border);
  font-size: 13.5px; color: var(--ink); }
.plan-verb { font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--dim); }
.plan-kind { font-size: 12px; color: var(--dim); }
.plan-label { min-width: 0; overflow-wrap: anywhere; }
.plan-step.plan-mix { border-style: dashed; }
.plan-step.plan-hear { background: var(--cyan-light); border-color: var(--cyan-deep); }
.plan-step.plan-wide { flex: 1 1 100%; border-radius: 12px; background: var(--seafoam-light); border-color: var(--seafoam-deep); }
.plan-step.plan-milestone { background: var(--ginkgo-light); border-color: var(--ginkgo-deep); }
.plan-deferred { margin-top: var(--s3); font-size: 14px; color: var(--dim); }
.plan-deferred ul { margin: 6px 0 0; padding-left: 20px; }

/* ---- YOUR PIECE and THE TWO-WEEK CHECK (BRIEF 106 Lanes F and G) -------------------------------------------------
   Drawn from docs/design/carry_mockup.html surfaces 4 and 5 at process level (R11: the look comes later), on the
   card and the wash the rest of this page uses. State is hue AND texture, never hue alone (overlay-a11y.md):
   held is seafoam and solid, fading is ginkgo and hatched, due is cyan and dotted, opened but not yet held is blue
   and plain, not opened is a dashed outline. "Still to come" on an angle is koi, which is coaching and never an
   error. No score, no streak, no count of finished things, no red. */
#anchor-step-piece { --hue-deep: var(--seafoam-deep); --hue-mid: var(--seafoam-mid); }
#anchor-step-piece [hidden] { display: none !important; }
/* while a check question is open the record steps back: the question is the whole screen (the mockup's own frame) */
#anchor-step-piece.checking #pieceRecord, #anchor-step-piece.checking .actions { display: none; }

.piece-strip { display: flex; gap: 2px; height: 22px; margin: var(--s4) 0; overflow: hidden; }
.piece-strip.dense { gap: 1px; }
.piece-strip.dense .seg { border-radius: 2px; }
.piece-strip .seg { flex: 1 1 0; min-width: 0; border-radius: 4px; border: 1px solid var(--border); background: var(--card-bright); }
.piece-strip .seg-new { background: transparent; border: 1px dashed var(--mint-deep); }
.piece-strip .seg-worked { background: var(--blue-light); border-color: var(--blue-mid); }
.piece-strip .seg-held { background: var(--seafoam-light); border-color: var(--seafoam-mid); }
.piece-strip .seg-fading { border-color: var(--ginkgo-mid);
  background: repeating-linear-gradient(45deg, var(--ginkgo-light) 0 4px, var(--card-bright) 4px 8px); }
.piece-strip .seg-due { border-color: var(--cyan-mid);
  background: radial-gradient(circle, var(--cyan-mid) 1.2px, transparent 1.6px) 0 0 / 6px 6px, var(--cyan-light); }

.piece-parts { list-style: none; margin: 0 0 var(--s4); padding: 0; display: flex; flex-direction: column; gap: var(--s3); }
.piece-row { background: var(--wash); border-radius: 14px; padding: var(--s3) var(--s4); }
.piece-row .head-row { display: flex; gap: var(--s3); align-items: center; justify-content: space-between; flex-wrap: wrap; }
.piece-row .clock { font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); color: var(--dim); }
.piece-row p.piece-kind { margin: var(--s2) 0 0; font-size: 14.5px; }
.piece-row .piece-sent { color: var(--ink); font-weight: 700; }
.st-chip { display: inline-block; font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); color: var(--ink); padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--card-bright); }
.st-chip.st-held { background: var(--seafoam-light); border-color: var(--seafoam-mid); }
.st-chip.st-worked { background: var(--blue-light); border-color: var(--blue-mid); }
/* texture on the chip is its border, never behind the text: held solid, fading dashed, due dotted */
.st-chip.st-fading { background: var(--ginkgo-light); border: 2px dashed var(--ginkgo-deep); }
.st-chip.st-due { background: var(--cyan-light); border: 2px dotted var(--cyan-deep); }

.piece-angles { margin-top: var(--s2); }
.piece-angles summary { cursor: pointer; color: var(--violet-deep); text-decoration: underline; font-size: 14.5px; }
.angles { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s2); }
.ang { display: inline-flex; flex-direction: column; font-family: var(--font-body); font-size: 14px; color: var(--ink);
  padding: 6px 10px; border-radius: 10px; border: 1px solid var(--border); background: var(--card-bright); }
.ang small { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: var(--tracking); color: var(--dim); }
.ang.took { background: var(--seafoam-light); border-color: var(--seafoam-mid); }
.ang.not { background: var(--koi-light); border-color: var(--koi-mid); border-style: dashed; }
.ang.not small { color: var(--koi-deep); }

/* the check: a sticker card at the top of the piece page (kit: the sticker badge, rotated 12 degrees, ginkgo.light, ink text) */
.check-card { position: relative; background: var(--card-bright); border: 1px solid var(--border); border-radius: var(--radius);
  padding: var(--s5); margin: var(--s4) 0 var(--s5); }
.check-card h3 { margin: var(--s2) 0; }
.check-card .sticker { position: absolute; top: -14px; right: 18px; transform: rotate(12deg); background: var(--ginkgo-light);
  color: var(--ink); font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); text-align: center; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--ginkgo-mid); }
.check-card .lbl { font-family: var(--font-mono); font-size: var(--text-label-sm); text-transform: uppercase;
  letter-spacing: var(--tracking); color: var(--dim); }
.check-heading { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin: var(--s3) 0 var(--s2); }
.check-text { font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.35; margin: 0 0 var(--s3); }
.check-options { display: flex; flex-direction: column; gap: var(--s2); margin: var(--s3) 0 var(--s4); }
.check-option { display: flex; align-items: center; gap: var(--s3); padding: 12px 14px; border-radius: 12px; cursor: pointer;
  background: var(--wash); border: 1px solid var(--border); font-family: var(--font-body); font-size: 16px; color: var(--ink);
  text-transform: none; letter-spacing: 0; margin: 0; }
.check-option input { width: 18px; height: 18px; accent-color: var(--violet-deep); flex: none; }
.check-option:has(input:checked) { border-color: var(--focus-ring); box-shadow: 0 0 0 2px var(--focus-ring); background: var(--card-bright); }
.check-card .inset { background: var(--wash); border-radius: 14px; padding: var(--s3) var(--s4); margin: var(--s3) 0; }
.check-card .inset p { margin: var(--s1) 0 0; }
.check-sent-back { font-weight: 700; color: var(--ink); }
@media (max-width: 640px) { .check-card { padding: var(--s4); } }
