/* shared/euah.css — the SOLE stylesheet for EUAH tools */

/* Clarity City — brand primary typeface, self-hosted (SIL OFL 1.1, see shared/fonts/LICENSE) */
@font-face {
  font-family: "Clarity City";
  src: url("fonts/ClarityCity-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Clarity City";
  src: url("fonts/ClarityCity-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
/* SemiBold retired 2026-08-18: the brand type page names Regular and Medium only. */

:root {
  --orange: #FF7D41;
  --green: #1EB71E;
  /* Text-safe deeper shades (R7-04, 2026-11-03): the bright orange and green are 2.3 to 2.7:1
     on white or beige. Use these for small text; keep the bright ones for fills and marks. */
  --orange-text: #B04A12;
  --green-text: #0E7A0E;
  --white: #FFFFFF;
  --cream: #FBFAF6;
  --beige: #F6F3EA;
  --warm-grey: #E9E4D1;
  --dark-warm-grey: #BBB5A2;
  --grey-brown: #605B46;
  --black-brown: #2B2218;
  --pink: #F5CAC4;

  /* One wash per COM-B component, from the hues of shared/comb-diagram.svg. Fill only, for
     the determinant name pill and the previous-research component chips — see DESIGN.md
     "COM-B component tints" for why these are washes and not the figure's own saturated
     red/amber/green (a pill is small text; white on that amber is 3.03:1). */
  --comb-cap: #F6E6E6;
  --comb-mot: #FAF0E2;
  --comb-opp: #E8F3E9;

  /* ONE column width for every page, tool and index alike. It is the widest thing any
     page needs (the ILM matrix, the Match comparison table), and the rest sit in it too:
     a reader paging through a tool should never see the column change size under them. */
  --page-width: 960px;
  /* Prose measure. Owner's call, 2026-09-14: prose FILLS the column. It was 48rem (720px at
     the 15px root, the old 70ch), which was invisible while the column was 640px and became
     a 168px ragged right edge once the column went to 960px for the upgrade tiles: every
     paragraph stopped short of the right edge that every field, grid and button reached.
     Alignment won over reading measure, and the ILM page's opt-in became the rule. The token
     stays so there is one place to put a cap back. */
  --measure: 100%;

  --font: "Clarity City", "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  /* Mono, for the tool index numbers only (landing cards + masthead signature). No IBM Plex
     Mono ships in the repo, so a system monospace stack stands in — the numbers are "01/02",
     which any mono renders the same. */
  --mono: ui-monospace, "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  /* Intra-component micro step — chip padding, checkbox optical alignment.
     2/3/6px ad-hoc values are not permitted; snap onto this token instead. */
  --step-4: 4px;
  --step-8: 8px;
  --step-12: 12px;
  --step-16: 16px;
  --step-20: 20px;
  --step-32: 32px;
  --step-40: 40px;

  --radius: 4px; /* every rectangular surface and control (DESIGN.md Shapes) */

  --base-size: 15px;
  --scale: 1.3;

  /* THE type scale — six steps, no others (see DESIGN.md "Typography").
     Every font-size in this file must reference one of these tokens;
     tests/css-scale.test.js fails the build if a raw value creeps in. */
  --size-display: calc(var(--base-size) * var(--scale) * var(--scale) * var(--scale)); /* 33px  */
  --size-headline: calc(var(--base-size) * var(--scale) * var(--scale));               /* 25px  */
  --size-title: calc(var(--base-size) * var(--scale));                                 /* 19.5px */
  --size-body: 1rem;                                                                   /* 15px  */
  --size-small: 0.9rem;                                                                /* 13.5px */
  --size-label: 0.8333rem;                                                             /* 12.5px */
}

/* ---------- Reset & base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html { font-size: var(--base-size); }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--black-brown);
  line-height: 1.3; /* brand: 120–130% leading for body */
}

/* Brand: headings in Regular weight — hierarchy comes from scale, case, spacing,
   and colour, never font weight alone. 1.3 type scale from 15px. */
h1, h2, h3, h4 {
  margin: 0 0 var(--step-12);
  font-weight: 400;
  text-wrap: balance;
}
/* Sizes land on the brand's named tiers: h1 = 33px (brand H3), h2 = 25px (brand H4).
   Brand specifies 0% letter-spacing and 110% / 120% leading for those tiers —
   the -0.5% tracking belongs to H1/H2 (78/59pt display sizes we never use here. */
h1 { font-size: var(--size-display); line-height: 1.1; }
h2 { font-size: var(--size-headline); line-height: 1.2; }
h3 { font-size: var(--size-title); line-height: 1.2; }
/* Prose fills its column (--measure is 100%). max-width is kept rather than dropped so a
   cap can come back in one place if the long teach passages prove too wide to read. */
p { margin: 0 0 var(--step-16); max-width: var(--measure); text-wrap: pretty; }
/* Bold inside prose is the system's Medium, not the browser's 700: the family carries two
   weights and 700 is not one of them (DESIGN.md Typography). */
p strong { font-weight: 500; }

a { color: var(--black-brown); }

/* ---------- Accessibility utilities ---------- */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The skip link sits above the masthead and slides into view on focus. */
.skip-link {
  position: absolute;
  top: 0;
  left: var(--step-8);
  z-index: 200;
  padding: var(--step-12) var(--step-16);
  background: var(--white);
  color: var(--black-brown);
  border-radius: 0 0 var(--radius) var(--radius);
  transform: translateY(-120%);
}
.skip-link:focus { transform: none; }

/* A half-rated rating control (owner 2026-09-18): declared before the focus-visible rule
   below, same specificity, so a focused control still shows the orange ring over this. */
.comb-half select, .comb-half .seg--meter {
  outline: 2px solid var(--pink);
  outline-offset: 2px;
}

/* ONE focus ring for every control: 2px Ink Black Brown, 2px off the edge. Orange on cream is
   2.4:1, under the 3:1 a focus indicator needs (WCAG 1.4.11); Black Brown is 15:1 on cream
   and on white. Orange stays an action colour.
   `button` is in the list by element, not only by class (2026-11-17): the planner's cards and
   chips are plain buttons with no .btn class, so they showed the browser's blue ring or, where
   a rule set `outline: none`, an orange border alone. A new button now gets the ring by
   default. Do not add `outline: none` to a button's focus rule. */
.btn:focus-visible, button:focus-visible, [role="button"]:focus-visible, .progress-seg:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible,
a:focus-visible, summary:focus-visible, .tour-link:focus-visible, .tour-dot:focus-visible,
.ilm-bubble:focus-visible, .places-pill-remove:focus-visible, .skip-link:focus-visible {
  outline: 2px solid var(--black-brown);
  outline-offset: 2px;
}
/* Headings receive programmatic focus on step change (screen-reader landing point) —
   not operable, so no visible ring. */
h1:focus, h2:focus, h3:focus { outline: none; }

fieldset { border: 0; margin: 0; padding: 0; }
legend { padding: 0; }

/* `hidden` is only a UA rule (display: none), and ANY author display declaration outranks
   it — so .btn's `display: inline-flex` left hidden buttons on screen, which is why Reset
   view sat beside the 2D chart it does nothing for. !important rather than source order,
   because the rule has to hold whatever a component declares later. */
[hidden] { display: none !important; }

/* ---------- Layout ---------- */

/* Content and chrome both read --page-width, so the header, progress bar, cards and
   footer all align to the same column. */
.journey {
  max-width: var(--page-width);
  margin: 0 auto;
  /* Tighter top than bottom: the save bar sits right above, and a full --step-32 there read as
     a large empty gap between the utility bar and the first card. Bottom keeps the roomier
     end-of-page space. */
  padding: var(--step-16) var(--step-16) var(--step-32);
}

/* Shared horizontal geometry for page chrome (header, progress, save bar) —
   everything aligns to the same column as the content cards. */
.chrome-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 var(--step-16);
}

.site-header .header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--step-16);
  padding-top: var(--step-12);
  padding-bottom: var(--step-12);
}

/* The way back to the tools index. Every tool page is reached FROM the index, and until
   now the only exit was the browser's back button. It sits before the tool name, at the
   same size and case, separated by a hairline so the two labels read as two things rather
   than one long title — grey-brown against the name's black-brown carries the same
   hierarchy without a second type size. */
.site-header .header-titles {
  display: flex;
  align-items: center;
  gap: var(--step-12);
  min-width: 0;
}
.site-header .header-back {
  font-weight: 500;
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-brown);
  text-decoration: none;
  white-space: nowrap;
  /* 24px minimum target (WCAG 2.5.8): the label alone is 15px tall. */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
}
.site-header .header-back:hover,
.site-header .header-back:focus-visible {
  color: var(--black-brown);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.site-header .header-rule {
  width: 1px;
  align-self: stretch;
  background: var(--warm-grey);
  flex: none;
}

/* Tool title as a brand label: all-caps, letter-spaced (brand: section headers
   and tab labels are all-caps with letter spacing). */
.site-header .header-row strong {
  font-weight: 500;
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--black-brown);
}

/* PER-TOOL SIGNATURE (design handoff 4a). A coloured 6px top edge and a mono index number
   in the masthead give each tool a fixed identity a deep-linked page still carries. The
   number is the tool's reading order on the landing page; the colour pairs with the landing
   card. On a signed masthead the tool name reads as a name (15px, sentence case) rather than
   the all-caps label above — the back-link keeps the label size, so the two stay distinct. */
/* The diagnosis tool and the planner are two halves of one journey (2026-09-02 split), so
   they wear the SAME signature: a third page colour would invent a distinction the reader
   does not have. Only the matrix, which answers a different question, differs. */
.site-header--ilm, .site-header--diagnose, .site-header--planner { border-top: 6px solid var(--warm-grey); }
.site-header--ilm { border-top-color: var(--orange); }
.site-header--diagnose, .site-header--planner { border-top-color: var(--black-brown); }
.header-tool-no { font-family: var(--mono); font-size: var(--size-body); line-height: 1; }
.site-header--ilm .header-tool-no { color: var(--orange); }
.site-header--diagnose .header-tool-no,
.site-header--planner .header-tool-no { color: var(--black-brown); }
.site-header--ilm .header-row strong,
.site-header--diagnose .header-row strong,
.site-header--planner .header-row strong {
  font-size: var(--size-body);
  text-transform: none;
  letter-spacing: 0;
}

/* The Planner's pages sit on the warm-sand surface, so the tool that carries a program plan
   reads as its own place; the Matrix keeps the cream ground. */
body.tool-diagnose, body.tool-planner { background: var(--beige); }

.org-logo {
  height: 52px;
  width: auto;
  display: block;
  flex: none;
}

/* Every page credits two partners rather than one, so the marks sit in a group at the
   right of the header instead of a lone image — index.html spells it inline, tool pages get
   the same markup from shared/chrome.js.

   The heights look mismatched if you set them equal. monash-bwa-logo.png is padded inside
   its own canvas: at .org-logo's 52px, the block of ink is 34px and the MONASH mark within
   it is only 21px. race-2030.png is trimmed to its content, so every pixel of its height is
   ink. 26px there lands the RACE mark on the same cap-to-baseline band as MONASH — matching
   the declared heights instead would render RACE half again too big.

   The rule and the 8px gaps are lifted from the divider already drawn inside the Monash
   lock-up: same hairline, same 34px block height, so the three marks read as one credit
   line rather than a logo with something bolted on. */
.header-partners {
  display: flex;
  align-items: center;
  gap: var(--step-8);
  flex: none;
}
.partner-logo {
  height: 26px;
  width: auto;
  display: block;
  flex: none;
}
.partner-rule {
  width: 1px;
  height: 34px;
  background: var(--warm-grey);
  flex: none;
}

/* ---------- Progress bar ---------- */

.progress {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cream);
  padding: var(--step-12) 0;
}

/* The segments paint the bar, so the track itself is just their positioning
   context — no background of its own. Overflow stays visible so the step nodes
   can sit proud of the bar. */
.progress-track {
  position: relative;
  height: 6px;
}

/* The bar IS the navigation: one segment per page, each a button. The 2px
   trimmed off each segment's right edge draws the breaks in the line — the gaps
   between segments are the ticks, so there is no separate element to keep in
   sync with them. */
.progress-seg {
  position: absolute;
  top: 0;
  height: 100%;
  padding: 0;
  border: 0;
  background: var(--warm-grey);
  cursor: pointer;
  z-index: 1;
}

/* A 6px-tall button is an unusable target, so each segment claims a 24px band
   without changing layout (WCAG 2.5.8). Segments are ~32px wide at this column
   width, so the bands tile the bar rather than overlapping. */
.progress-seg::before {
  content: "";
  position: absolute;
  top: -9px;
  bottom: -9px;
  left: 0;
  right: 0;
}

.progress-seg:first-of-type { border-radius: var(--radius) 0 0 var(--radius); }
.progress-seg:last-of-type { border-radius: 0 var(--radius) var(--radius) 0; }

.progress-seg.reached { background: var(--orange); }
.progress-seg.locked { cursor: not-allowed; }

/* Pages the user's COM-B ratings say aren't worth their time. Declared AFTER .reached so
   it wins for a skipped page that sits behind you. Dark Warm Grey is the palette's
   "nothing here" value — the bar keeps its full length either way, so nothing appears to
   grow or shrink as ratings change. Still reachable by a direct jump; just not a tab stop. */

/* No current-page marker: the run of orange ends at the page you are on, so the
   colour already says where you are. Keyboard focus is carried by the standard
   orange focus ring, and the pointer cursor carries operability. */

/* Macro-step nodes: one at the start of each of the 3 steps + journey's end.
   Decoration only — the segment underneath carries the click, so a node that
   captured pointer events would punch a dead spot in the navigation. */
.progress-node {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  /* 2px is deliberate — a 1px ring is invisible on a 14px node. */
  border: 2px solid var(--dark-warm-grey);
  pointer-events: none;
  z-index: 2;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.progress-node.reached {
  background: var(--orange);
  border-color: var(--orange);
}

/* Location metadata — all-caps letter-spaced per brand labelling rules. */
.progress-text {
  display: block;
  margin-top: var(--step-8);
  font-size: var(--size-label);
  color: var(--grey-brown);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Journey steps ---------- */

/* A page change is an instant swap. A 0.25s fade and 8px rise were declared here until
   2026-11-17 and never ran: a transition cannot start from `display: none`, so the page always
   appeared at once. The rules went; what the reader sees did not change. */
section[data-screen] {
  display: none;
}

section[data-screen].active {
  display: block;
}

body.embedded .site-header {
  display: none;
}

/* ---------- Card ---------- */

.card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--step-20);
  margin-bottom: var(--step-20);
}

/* Brand card pattern: white card on cream with a beige header strip carrying the
   sentence-case title in Black brown. Step cards get it via their leading h2. */
.card > h2:first-child {
  background: var(--beige);
  margin: calc(var(--step-20) * -1) calc(var(--step-20) * -1) var(--step-20);
  padding: var(--step-12) var(--step-20);
  border-radius: var(--radius) var(--radius) 0 0;
}

.card-header {
  background: var(--beige);
  margin: calc(var(--step-20) * -1) calc(var(--step-20) * -1) var(--step-20);
  padding: var(--step-12) var(--step-20);
  border-radius: var(--radius) var(--radius) 0 0;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--size-label);
  color: var(--grey-brown);
}

/* ---------- Landing: the two-tool suite cards (design handoff 4a) ----------
   The two tools read as peers, each with its own colour: a 6px top edge, a mono index
   number, and (for the Planner) its own warm-sand surface. Spacing and type land on the
   repo's tokens, so the handoff's 24/10/18px and 28px number snap to 20/8/16px and the
   headline size — the handoff's own instruction is to use the repo's conventions. */
.landing-sub { color: var(--grey-brown); }

.tool-grid {
  display: grid;
  /* Three since the 2026-09-02 split. auto-fit rather than repeat(3,1fr) so the row drops to
     two and then one as the viewport narrows, without a second breakpoint to keep in step. */
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--step-20);
  margin-bottom: var(--step-20);
}
.tool-card {
  display: flex;
  flex-direction: column;
  gap: var(--step-20);
  padding: var(--step-20);
  border-radius: 0 0 var(--radius) var(--radius);
  border-top: 6px solid var(--warm-grey);
}
.tool-card--ilm { background: var(--white); border-top-color: var(--orange); }
/* The two halves of the journey read as one pair against the matrix. */
.tool-card--diagnose,
.tool-card--planner { background: var(--beige); border-top-color: var(--black-brown); }

.tool-card__meta { display: flex; align-items: baseline; justify-content: space-between; gap: var(--step-12); }
.tool-card__no { font-family: var(--mono); font-size: var(--size-headline); line-height: 1; }
.tool-card--ilm .tool-card__no { color: var(--orange); }
.tool-card--diagnose .tool-card__no,
.tool-card--planner .tool-card__no { color: var(--black-brown); }
.tool-card__label {
  font-size: var(--size-label);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grey-brown);
}

.tool-card__text { display: flex; flex-direction: column; gap: var(--step-8); }
.tool-card__text h2 {
  margin: 0;
  font-size: var(--size-title);
  font-weight: 500;
  line-height: 1.25;
  color: var(--black-brown);
}
.tool-card__text p { margin: 0; }

/* Both Open buttons are filled orange so the tools read as peers — a deliberate, owner-
   approved departure from one-accent-per-view, since both are the same action. Hover is an
   inset ink hairline, colour and fill unchanged; focus keeps the shared ring. */
.tool-card__open {
  flex: 1 1 auto;
  min-height: 44px;
  padding: 0 var(--step-16);
  background: var(--orange);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--step-12);
  font-size: var(--size-small);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--black-brown);
  text-decoration: none;
}
/* The bottom row of each card: the Open button. margin-top:auto lives here now, so both
   cards' buttons sit on the same line regardless of what else the row holds. */
.tool-card__actions {
  margin-top: auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--step-12);
}
/* Hover ring is the shared one, added to .btn.primary:hover below (the stylesheet is
   allowed exactly two box-shadows). */

@media (max-width: 880px) {
  .tool-grid { grid-template-columns: 1fr; }
}

/* Tool 04, the Kumu systems map: the card treatment at full width, holding the embed
   instead of an Open button. Kumu's own snippet is 940x600; the window keeps the height and
   takes the card's width, so it never scrolls the page sideways on a phone.
   SHRUNK TO 80% (owner, 2026-09-15, first 85%): Kumu's sidebar text was too large and Kumu has no
   setting for it, and a cross-site frame cannot be restyled from here. So the frame is drawn
   larger by 1/0.8 and scaled down into the window, which shrinks everything inside it,
   buttons included; readers zoom the map back up if they need to. The border sits on the
   window, not the frame, so it is not scaled to a hairline. */
.tool-window { background: var(--white); margin-bottom: var(--step-20); }
.tool-window__viewport {
  height: 600px;
  overflow: hidden;
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
}
.tool-window__frame {
  display: block;
  /* ponytail: 0.8 written three times; change all three together. */
  width: calc(100% / 0.8);
  height: calc(600px / 0.8);
  border: 0;
  transform: scale(0.8);
  transform-origin: 0 0;
}

/* The embed snippet is one long unbreakable line; keep it scrolling inside its own card so
   a narrow screen scrolls the code, not the whole page. */
.card pre { overflow-x: auto; max-width: 100%; }

.section-label {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--size-label);
  color: var(--grey-brown);
  border-bottom: 1px solid var(--warm-grey);
  padding-bottom: var(--step-8);
  margin-bottom: var(--step-16);
}

/* ---------- Buttons ---------- */

/* Brand buttons: thin orange border, black-brown all-caps letter-spaced label,
   ~44px tall; hover = orange fill with BLACK BROWN text (never white on orange —
   fails contrast and is off-spec). Navigation buttons carry a right-aligned →. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--step-12);
  min-height: 44px;
  padding: 0 var(--step-20);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  background: transparent;
  color: var(--black-brown);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--size-small);
  font-family: var(--font);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.btn:hover {
  background: var(--orange);
  color: var(--black-brown);
}

.btn.primary {
  background: var(--orange);
  color: var(--black-brown);
}

/* :not(:disabled) rather than a `box-shadow: none` override on the disabled rule — CSS
   :hover still matches a disabled button, and cancelling the ring afterwards would put a
   third box-shadow in a stylesheet that is allowed exactly two (tests/css-tokens.test.js). */
.btn.primary:hover:not(:disabled):not([aria-disabled="true"]),
.tool-card__open:hover {
  /* The palette is closed (DESIGN.md "Colors") — no lighter-orange tint. The button firms
     up with a 1px Ink Black Brown inset ring instead of a colour shift. Shared with the
     landing's Open buttons so the stylesheet keeps exactly two box-shadows. */
  background: var(--orange);
  box-shadow: inset 0 0 0 1px var(--black-brown);
}

/* A tool that exists but is not published yet. The affordance stays on the card so the
   suite still reads as three tools rather than two and a gap, and `disabled` does the rest
   without any script: not focusable, skipped by tab, announced as unavailable. Declared
   after .primary so it wins on source order — both are two-class selectors. */
.btn:disabled,
.btn:disabled:hover,
.btn[aria-disabled="true"],
.btn[aria-disabled="true"]:hover {
  background: transparent;
  border-color: var(--dark-warm-grey);
  color: var(--grey-brown);
  cursor: not-allowed;
}

.btn.ghost {
  border-color: var(--warm-grey);
}

.btn.ghost:hover {
  background: var(--warm-grey);
  color: var(--black-brown);
}

/* A per-row Remove button (pages 2 and 6's Chosen tab, phone only — owner, 2026-09-11
   council pick, draft A's rows). Narrower than a step action, but the Buttons component's
   44px minimum height still comes straight through from .btn unmodified; the label stays
   Small, all-caps (Buttons: "action button labels... sit at Small, not Label" — removing an
   item is the row's own action, not utility-bar metadata). */
.btn.small { padding: 0 var(--step-12); }

/* Right-pointing arrow on forward-navigation buttons (brand: "apply this to every
   navigation button"), pushed to the far right of the button. */
.btn.nav-forward {
  justify-content: space-between;
  min-width: 220px;
  text-align: left;
}
.btn.nav-forward::after {
  content: "\2192";
  font-weight: 400;
}
.btn.nav-back::before {
  content: "\2190";
  font-weight: 400;
}

/* ---------- Fields ---------- */

.field {
  margin-bottom: var(--step-16);
}

.field label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--size-label);
  color: var(--grey-brown);
  margin-bottom: var(--step-8);
}

/* Input text sits at Small, matching the hint line beneath it (owner's call —
   see DESIGN.md "The Input-Matches-Hint Rule"). This is deliberately NOT Body:
   the field group reads as one quiet block rather than the box shouting over
   its own label. Small is the floor — input text never goes below it. */
.field input,
.field textarea,
.field select {
  width: 100%;
  font-family: var(--font);
  font-size: var(--size-small);
  color: var(--black-brown);
  padding: var(--step-12);
  /* Grey Brown, not Warm Grey: a field's edge needs 3:1 against the page (WCAG 1.4.11) and
     Warm Grey on cream is 1.3:1. */
  border: 1px solid var(--grey-brown);
  /* Orange left accent marks the editable field — the one place in the system
     that carries a coloured side-stripe (owner's call; see DESIGN.md Inputs).
     3px so it reads as an accent rather than a heavier border. */
  border-left: 3px solid var(--orange);
  border-radius: var(--radius);
  background: var(--cream);
}

.field textarea { min-height: 96px; resize: vertical; }
/* The Why not box on the rating pages: two rows to start, then it grows with its text (growTextarea in the Define page). */
.field textarea.comb-why { width: 100%; min-height: 0; resize: none; overflow: hidden; }

/* Placeholders read as hints, not values: italic + paler than real input text.
   The paleness is Grey brown at 85% over the cream field (~4.5:1) — as light as
   WCAG AA allows for text. The palette's lighter neutrals sit near 2:1 and are
   not usable here, so opacity is the only honest way to go paler. */
.field input::placeholder,
.field textarea::placeholder {
  color: var(--grey-brown);
  opacity: 0.85;
  font-style: italic;
}

/* Hint line under the input — support voice, not body voice. */
.field > p {
  font-size: var(--size-small);
  color: var(--grey-brown);
  margin: var(--step-8) 0 0;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: 2px solid var(--black-brown);
  outline-offset: 2px;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 125, 65, 0.25);
}

/* ---------- Chips ---------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--step-4);
  padding: var(--step-4) var(--step-12);
  border-radius: var(--radius);
  background: var(--beige);
  color: var(--grey-brown);
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Icons mark concepts, never take part-, comb-, function- or verdict-colour — they stay
   ink and just shouldn't stretch a flex row. */
.icon { flex: none; }

/* A rating page is one COM-B component, so its table header takes that component's tint
   instead of the shared orange — the header and the name pills under it then read as one
   block. Black brown text is already the .match-table header colour and clears AA on all
   three washes (12.9-13.9:1), so only the fill changes.

   The priorities table keeps the orange header: it mixes all three components, so no single
   tint is true of it. */
.comb-table.comb-cap thead th { background: var(--comb-cap); }
.comb-table.comb-mot thead th { background: var(--comb-mot); }
.comb-table.comb-opp thead th { background: var(--comb-opp); }

/* The COM-B component tint, applied to a chip. Black brown rather than the chip's default
   Grey brown: 12.9-13.9:1 on these washes against Grey brown's 5.0-5.6:1, and the pill is
   the row's label so it should read as ink, not as metadata. */
/* A placed chip on the planner's phases board is a button (keyboard removal): drop the
   button's own border and font so it looks like every other chip. */
.match-lane-body button.chip { border: 0; font-family: inherit; text-align: left; }
.chip.comb-cap { background: var(--comb-cap); color: var(--black-brown); }
.chip.comb-mot { background: var(--comb-mot); color: var(--black-brown); }
.chip.comb-opp { background: var(--comb-opp); color: var(--black-brown); }

/* THE DETERMINANTS BEHIND A QUESTION (the concept rework, 2026-09-08). A rating row asks
   one question; the CACTIS determinants behind it ride under the prompt as a tighter run of
   the same tinted pills, so the taxonomy stays visible without competing with the row's own
   name pill. Each carries the determinant's own question as a title attribute. */
.chip-row.comb-behind { gap: var(--step-4); margin: var(--step-8) 0 0; }
.comb-behind .chip { padding: var(--step-4) var(--step-8); }

/* ---------- Places picker (the location field, step 2) ---------- */

.places-wrap { position: relative; }

.places-sugg {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + var(--step-4));
  background: var(--white);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  max-height: 280px;
  overflow: auto;
  z-index: 5;
  font-size: var(--size-small);
}
.places-sugg[hidden] { display: none; }

.places-sugg .grp {
  padding: var(--step-8) var(--step-12) var(--step-4);
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-brown);
}

.places-sugg [role="option"] { padding: var(--step-8) var(--step-12); cursor: pointer; }
.places-sugg [role="option"][aria-selected="true"],
.places-sugg [role="option"]:hover { background: var(--beige); }
.places-sugg .none { padding: var(--step-8) var(--step-12); color: var(--grey-brown); }

.places-mono { font-family: var(--mono); }

.places-pills { display: flex; flex-wrap: wrap; gap: var(--step-8); margin-top: var(--step-8); }
/* No pills, no row: the container keeps its top margin when empty, which pushed everything
   below the location field eight pixels further down than the rhythm asks for. */
.places-pills:empty { display: none; }

/* Reuses .chip's beige-pill shape (DESIGN.md Chips: beige pill, no border), but the label
   prints at Black brown in sentence case — a place name is not a category label, so the
   uppercase/grey-brown treatment .chip gives its own text is wrong here. */
.places-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--step-4);
  padding: var(--step-4) var(--step-4) var(--step-4) var(--step-12);
  border-radius: var(--radius);
  background: var(--beige);
  color: var(--black-brown);
  font-size: var(--size-small);
}

/* The reader's own words: no place file backs this pill, so it carries a dashed border on
   white instead of the beige fill every matched pill gets. */
.places-pill-custom { background: var(--white); border: 1px dashed var(--dark-warm-grey); }

.places-pill-kind {
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-brown);
}

.places-pill-remove {
  border: 0;
  background: transparent;
  color: var(--grey-brown);
  font-size: var(--size-small);
  line-height: 1;
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 999px;
  cursor: pointer;
}
.places-pill-remove:hover,
.places-pill-remove:focus-visible { background: var(--orange); color: var(--black-brown); }

/* ---------- Journey-type list (step 3) ---------- */

.choice-list { display: flex; flex-direction: column; gap: var(--step-12); }

.choice-row {
  display: flex;
  align-items: flex-start;
  gap: var(--step-12);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: var(--step-16);
  cursor: pointer;
}
.choice-row:hover { border-color: var(--dark-warm-grey); }
.choice-row input[type="checkbox"] { accent-color: var(--orange); width: 18px; height: 18px; flex: none; margin-top: var(--step-4); }
.choice-row strong { font-weight: 400; }
.choice-row .choice-text { display: block; color: var(--grey-brown); font-size: var(--size-small); margin-top: var(--step-4); }

/* The name pill's own column. Four departures from .chip, all because this is a NAME that
   has to wrap, not a one-line label:

   - sentence case, because the chip's uppercase turns "Knowledge (Cost-Benefit Awareness)"
     into a four-line block;
   - wrapping rather than truncating — the longest name is 43 characters and no column in a
     four-column table can hold that on one line;
   - the house radius, like every other box;
   - full cell width with the text centred, so the column is an even stack of tinted blocks.
     Shrink-to-fit left a ragged edge where a two-word name sat next to a four-line one, and
     the short ones read as undersized rather than as short. */
.comb-name-cell .chip {
  display: flex;
  justify-content: center;
  white-space: normal;
  text-align: center;
  text-transform: none;
  letter-spacing: normal;
  border-radius: var(--radius);
}

/* ---------- Milestone ---------- */

/* Milestone: text stays Black brown (green #1EB71E on white is 2.7:1 — fails as
   text). The single permitted green per page is the small check disc, decorative
   alongside the ✓-free wording. */
.milestone {
  display: flex;
  align-items: baseline;
  gap: var(--step-8);
  color: var(--black-brown);
  font-weight: 500;
  margin-bottom: var(--step-20);
}
.milestone::before {
  content: "\2713";
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: var(--size-label);
  line-height: 20px;
  text-align: center;
  align-self: center;
}

/* ---------- Welcome mini-map ---------- */

/* Brand "stat block" row pattern: label hard-left in grey brown, value hard-right
   in black brown medium, 1px warm-grey dividers between rows — no zebra fills,
   no per-row boxes. */
.minimap {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: var(--step-16);
}

.minimap-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--step-12);
  padding: var(--step-12) 0;
  border-bottom: 1px solid var(--warm-grey);
  font-size: var(--size-small);
}

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

.minimap-row strong {
  font-weight: 400;
  color: var(--grey-brown);
}

.minimap-row > span {
  color: var(--black-brown);
  font-weight: 500;
}

.minimap-row .chip { white-space: nowrap; align-self: flex-start; }
/* The part icon is inline text here (a template string), so it needs baseline and gap by hand. */
.minimap-row .icon { vertical-align: -0.2em; margin-right: var(--step-4); }

/* Statement-example rows: chip left, statement reads as normal prose. */
.statement-row { justify-content: flex-start; }
.statement-row > span:last-child {
  flex: 1;
  color: var(--black-brown);
  font-weight: 400;
}
.statement-row strong {
  font-weight: 500;
  color: var(--black-brown);
}

/* Fixed label column so every example statement starts at the same x-position;
   longer type names wrap inside the chip. Centred against its row rather than pinned to the
   top: on the evidence page each row carries a multi-line bullet list, and a pill sitting at
   the first line reads as a heading for that line rather than a label for the group. */
.statement-row .chip {
  align-self: center;
  flex: 0 0 128px;
  white-space: normal;
  text-align: center;
  border-radius: var(--radius); /* house radius (DESIGN.md Shapes) */
  line-height: 1.25;
  padding: var(--step-4) var(--step-12);
}

.footnote {
  margin-top: var(--step-16);
}

/* Evidence block (step 8): the definitions disclosure is followed directly by
   prose rather than by another field, so it needs its own closing space. */
.ilm-evidence .example-toggle {
  display: block;
  margin-bottom: var(--step-16);
}

.ilm-evidence .minimap {
  margin-bottom: var(--step-16);
}

/* ---------- Review gap summary ---------- */

.gap-summary {
  background: var(--beige);
  border-radius: var(--radius);
  padding: var(--step-12) var(--step-16);
  margin-bottom: var(--step-16);
  font-size: var(--size-small);
  color: var(--grey-brown);
}

.gap-summary a { margin-right: var(--step-12); }

/* ---------- Example toggle — THE standard disclosure pattern (see DESIGN.md) ---------- */

.example-toggle summary {
  display: flex;
  align-items: center;
  min-height: 24px; /* WCAG 2.5.8 */
  cursor: pointer;
  color: var(--grey-brown);
  font-size: var(--size-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  list-style: none;
}

.example-toggle summary::-webkit-details-marker { display: none; }

.example-toggle summary::before {
  content: "\25B8";
  display: inline-block;
  margin-right: var(--step-8);
  /* Disclosure marker is a sanctioned orange usage (DESIGN.md Accent Orange);
     the summary text itself stays Grey Brown — only the glyph goes orange. */
  color: var(--orange);
  transition: transform 0.15s ease;
}

.example-toggle[open] summary::before { transform: rotate(90deg); }

/* The disclosure needs air above it — it belongs to the field it follows, but it
   is a separate affordance, not another line of the hint stack. */
.example-toggle { margin-top: var(--step-16); }

/* Revealed examples are indented bullets, not a tinted box: they are an aside
   the reader skims, so they recede rather than forming another container to
   parse. Paler than surrounding text via the same 85% treatment as placeholders
   — Grey Brown at 85% on white is ~5.7:1, comfortably AA. */
.example-body {
  margin: var(--step-8) 0 0;
  padding-left: var(--step-20);
  list-style: disc;
  font-size: var(--size-small);
  color: var(--grey-brown);
  opacity: 0.85;
}

.example-body li {
  margin: 0 0 var(--step-8);
  padding: 0;
}

.example-body li:last-child { margin-bottom: 0; }
.example-body li::marker { color: var(--dark-warm-grey); }

/* On the evidence page the per-upgrade barrier list sits between two paragraphs;
   example-body ends flush (right inside the example toggles), so here it takes the
   paragraph rhythm itself. */
.ilm-evidence .example-body { margin-bottom: var(--step-16); }

.example-toggle[open] summary {
  margin-bottom: var(--step-8);
}

/* Checkboxes and radios paint themselves in the browser's own accent — a bright system
   blue — unless told otherwise. The slider already claims the orange; these did not, so
   every tick and dot in the suite was an eleventh colour the closed palette does not
   contain. It shows up worst in the Match tool, whose whole selection flow is checkboxes
   and radios where the Define tool mostly uses sliders. */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--orange);
}

/* ---------- Upgrade picker (step 2) ---------- */

/* These rules used to be comma-grouped with .method-card, which shared the same treatment.
   When the method cards were removed the whole block went with them and took the upgrade
   tiles' border, padding, hover and selected state with it — the picker rendered as bare
   photos and text you could not tell were selectable. Kept standalone now so the tiles
   cannot be collateral damage a second time. */
.upgrade-tile {
  position: relative;
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: var(--step-16);
  margin-bottom: var(--step-12);
  cursor: pointer; /* the WHOLE tile is the control, so the whole tile takes the pointer */
  transition: border-color 0.15s ease, background 0.15s ease;
}

.upgrade-tile:hover { border-color: var(--dark-warm-grey); }
/* The checkbox inside is visually hidden, so the ring goes on the tile (as on the housing tiles). */
.upgrade-tile:focus-within {
  outline: 2px solid var(--black-brown);
  outline-offset: 2px;
}

.upgrade-tile.selected {
  border-color: var(--orange);
  background: var(--cream);
}

/* Visible selected marker — selection must not ride on border colour alone. Screen readers
   get aria-checked from the radiogroup; this label is the sighted equivalent. */
.upgrade-tile.selected::after {
  content: "\2713 selected";
  position: absolute;
  top: var(--step-12);
  right: var(--step-12);
  padding: var(--step-4) var(--step-12);
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--black-brown);
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Three columns at full width — twelve tiles land as four even rows, and the smaller
   thumbnail keeps the whole picker nearer one screen.
   Column COUNT is not a media query: the grid sits inside the tool's reading-width column,
   so it is ~568px wide whether the viewport is 700px or 1400px, and a viewport breakpoint
   would be answering a question nobody asked. auto-fill measures the space that actually
   exists — 3 columns here, 2 in a narrow embed, 1 on a phone — with no breakpoint to keep
   in step with the container. The 170px floor is what stops a label like
   "Roof / ceiling insulation" from wrapping to three lines. */
.upgrade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: var(--step-12);
}
.upgrade-grid .upgrade-tile { margin-bottom: 0; }
/* The planner's journey tiles (intro page, no-diagnosis path, owner 2026-09-18): the three
   journeys side by side in the upgrade tiles' clothes, title over a short line of text. */
.journey-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: var(--step-12); }
.journey-tile strong { display: block; margin-bottom: var(--step-4); padding-right: calc(var(--step-32) * 3); } /* room for the Selected badge */
.journey-tile .choice-text { display: block; font-size: var(--size-small); color: var(--grey-brown); }
@media (max-width: 700px) { .journey-grid { grid-template-columns: 1fr; } }
.upgrade-tile strong { font-weight: 400; }

/* Thumbnail bleeds to the tile's edges rather than sitting inside its padding — an inset
   photo inside a bordered tile reads as a picture pasted onto a form. The negative margins
   are the tile's own padding, unwound; the top corners follow the tile's own.
   Optional by design: a tile whose photo has not landed yet keeps the plain layout,
   because the image removes itself rather than collapsing to a gap. */
.upgrade-thumb {
  display: block;
  width: calc(100% + var(--step-32));
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin: calc(var(--step-16) * -1) calc(var(--step-16) * -1) var(--step-12);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--warm-grey); /* holds the shape while the image loads */
}


/* ---------- Save / restore bar ---------- */

.save-bar {
  padding: var(--step-8) 0;
}

.save-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--step-8) var(--step-16);
}

/* Utility chrome, not primary actions. Demoted 2026-08-18 (DESIGN.md "Demoted utility
   bar"): four bordered boxes above every screen outweighed the step card they served, and
   on a phone they wrapped to two rows and pushed the actual question below the fold.
   Borderless Label-size text keeps every affordance and gives the height back. */
.save-bar .btn {
  min-height: 34px;
  font-size: var(--size-label);
  padding: 0 var(--step-4);
  width: auto;
  border: none;
  background: none;
  color: var(--grey-brown);
}
.save-bar .btn:hover:not(:disabled) {
  background: none;
  color: var(--black-brown);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

/* Tutorial sits on the left as a label with a lightbulb; the file actions cluster on the right
   as icons, pushed there by the group's auto margin. */
.btn-with-icon { display: inline-flex; align-items: center; gap: var(--step-8); }
.save-bar .btn svg { display: block; flex: none; }
.save-actions { display: flex; align-items: center; gap: var(--step-8); flex: none; margin-left: auto; }
/* Icon buttons: square target, the SVG centred; the label is the tooltip/aria-label, so the
   hover is a tint (the text-underline the labelled buttons use would sit under nothing). */
.save-bar .icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 0 var(--step-8);
}
.save-bar .icon-btn svg { display: block; }
/* The short word under each icon (owner, 2026-11-03). */
.save-bar .icon-btn { flex-direction: column; gap: var(--step-4); padding-top: var(--step-4); padding-bottom: var(--step-4); }
.save-bar .icon-btn .icon-btn-label { font-size: var(--size-label); line-height: 1.2; letter-spacing: 0; text-transform: none; }
.save-bar .icon-btn:hover:not(:disabled) {
  background: var(--beige);
  text-decoration: none;
  border-radius: var(--radius);
}
/* Immediate tooltip on hover/focus — an icon-only button needs its name on the way in. The
   native `title` is not used: it lags a second and is unreliable when the pointer is over the
   SVG rather than the button. Shown below the button (into the content area, clear of the
   sticky progress bar above). data-tip is set from the tool's ui strings in index.html. */
.save-bar .icon-btn[data-tip]:hover::after,
.save-bar .icon-btn[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  top: calc(100% + var(--step-4));
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--black-brown);
  color: var(--cream);
  font-size: var(--size-label);
  letter-spacing: 0.02em;
  text-transform: none;
  padding: var(--step-4) var(--step-8);
  border-radius: var(--radius);
  pointer-events: none;
  z-index: 20;
}

.microcopy {
  font-size: var(--size-small);
  color: var(--grey-brown);
}

/* ---------- Welcome-back card ---------- */

.welcome-back {
  background: var(--beige);
}

/* ---------- Step footer & on-screen report ---------- */

/* Generous gap before the action zone — the one deliberately larger break inside
   a card (brand: vary vertical rhythm; whitespace separates, not rules). */
.step-footer {
  display: flex;
  justify-content: space-between;
  gap: var(--step-12);
  margin-top: var(--step-32);
}
/* The gate note (what a page still needs before Next opens; both tools): breathing room
   above it, right aligned so it sits directly over the Next button, and the footer closes
   up under it (owner, 2026-09-18). On the phone the footer is column-reverse with Next on
   top, so the note still sits right above Next. */
[data-gate-note] { text-align: right; margin: var(--step-32) 0 0; }
/* The note is a live region that stays on the page (shared/wizard.js), so "no note" is an
   empty one, not a hidden one. */
[data-gate-note]:empty { margin: 0; }
[data-gate-note]:not(:empty) + .step-footer { margin-top: var(--step-12); }

.btn-row {
  display: flex;
  gap: var(--step-12);
  flex-wrap: wrap;
  margin-bottom: var(--step-20);
}

.btn-row + .section-label,
.no-print > .section-label:not(:first-child) {
  margin-top: var(--step-32);
}

/* Quiet destructive action — no colour claim, smaller presence. */
/* The intro gate's two ways in: the diagnosis tool in green, carrying on in the pale red.
   Both keep Black brown text, as the orange primary does. */
.btn.go { background: var(--green); border-color: var(--green); color: var(--black-brown); }
.btn.go:hover { background: color-mix(in srgb, var(--green) 85%, var(--black-brown)); border-color: transparent; }
.btn.soft-warn { background: var(--pink); border-color: var(--pink); color: var(--black-brown); }
.btn.soft-warn:hover { background: color-mix(in srgb, var(--pink) 85%, var(--black-brown)); border-color: transparent; }
#upgrade-picker { margin-top: var(--step-16); }
#design-summary { margin-top: var(--step-20); }
.plain-list { margin: 0 0 var(--step-16); padding-left: 1.1em; }
.plain-list li { margin: 0 0 var(--step-8); }
.plain-list li:last-child { margin-bottom: 0; }
/* The Regular-Heading Rule (DESIGN.md): Medium (500) marks values and labels, never a bold
   heading — this list's page-title strong is a label naming the page the clause belongs to. */
.plain-list strong { font-weight: 500; }

.btn.danger-quiet {
  border-color: var(--warm-grey);
  color: var(--grey-brown);
}
.btn.danger-quiet:hover {
  background: var(--warm-grey);
  color: var(--black-brown);
}

.report table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 var(--step-16);
}

.report td {
  padding: var(--step-8) var(--step-12);
  border-bottom: 1px solid var(--warm-grey);
  vertical-align: top;
}

.report tr:last-child td { border-bottom: none; }

/* Report is a document, not a screen (DESIGN.md Do's): the metadata label
   column reads as an all-caps label, per "generous margins, spacing and
   typographic scale carrying the hierarchy". */
.report td:first-child {
  width: 38%;
  color: var(--grey-brown);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: var(--size-label);
}

.report h2 {
  font-size: var(--size-title);
  margin-top: var(--step-32);
  padding-bottom: var(--step-8);
  border-bottom: 1px solid var(--warm-grey); /* section rule — the only place rules belong */
}

/* Display is bound to "report titles only" (DESIGN.md) — this is the only
   report title in the product. */
.report .report-header h1 { font-size: var(--size-display); }
/* In the planner's review page the same title is an h2 (one h1 per page), so it drops the
   section-heading rule and margin that .report h2 carries. */
.report .report-header h2 { font-size: var(--size-display); margin-top: 0; padding-bottom: 0; border-bottom: 0; }

.report ul { margin: 0 0 var(--step-12); padding-left: 1.2em; }

.report-fallback { color: var(--grey-brown); font-style: italic; }

/* The report's theory-of-change chain (2026-09-11): page 9's bands read as a document. One
   grid row per phase: phase glyph and name, arrow, the strategy cards, arrow, the state
   cards (tinted by COM-B component, determinant glyph in front). A header row names the
   three parts. Under 640px a row stacks and the arrows point down. */
.report-chain-row { display: grid; grid-template-columns: 150px 24px 1fr 24px 1fr; gap: var(--step-12); align-items: center; border-top: 1px solid var(--warm-grey); padding: var(--step-12) 0; }
.report-chain-head { border-top: none; font-size: var(--size-small); color: var(--grey-brown); align-items: start; }
.report-chain-head strong { display: block; font-size: var(--size-label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange-text); }
.report-chain-phase { display: flex; align-items: center; gap: var(--step-8); font-weight: 500; font-size: var(--size-small); }
.report-chain-phase .icon { flex: none; }
.report-chain-col { display: flex; flex-direction: column; gap: var(--step-8); min-width: 0; }
.report-chain-node { background: var(--white); border: 1px solid var(--warm-grey); border-radius: var(--radius); padding: var(--step-8) var(--step-12); font-size: var(--size-small); }
.report-chain-node .lv { display: block; font-size: var(--size-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey-brown); margin-bottom: var(--step-4); }
.report-chain-state { display: flex; gap: var(--step-8); align-items: flex-start; }
.report-chain-state .icon { flex: none; }
.report-chain-state.comb-cap { background: var(--comb-cap); }
.report-chain-state.comb-mot { background: var(--comb-mot); }
.report-chain-state.comb-opp { background: var(--comb-opp); }
.report-chain-arrow { height: 2px; background: var(--dark-warm-grey); position: relative; }
.report-chain-arrow::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid var(--dark-warm-grey); border-right: 0; }
.report-chain-end { background: var(--beige); border-radius: var(--radius); padding: var(--step-12) var(--step-16); }
.report-parked-list { list-style: none; padding-left: 0; }
.report-parked-item { display: flex; gap: var(--step-8); align-items: flex-start; margin-bottom: var(--step-12); }
.report-parked-item .icon { flex: none; color: var(--grey-brown); }
.report-parked-def { margin: var(--step-4) 0 0; font-size: var(--size-small); color: var(--grey-brown); }
@media (max-width: 640px) {
  .report-chain-row { grid-template-columns: 1fr; }
  .report-chain-head div:empty { display: none; }
  .report-chain-arrow { width: 2px; height: 18px; justify-self: center; }
  .report-chain-arrow::after { right: -4px; top: auto; bottom: -1px; border: 5px solid transparent; border-top: 7px solid var(--dark-warm-grey); border-bottom: 0; }
}

/* ---------- Statement banner & recap ---------- */

.statement-banner,
.recap-item {
  background: var(--beige);
  border-radius: var(--radius);
  padding: var(--step-16);
  margin-bottom: var(--step-16);
}

.banner-label {
  display: block;
  font-size: var(--size-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--grey-brown);
  margin-bottom: var(--step-8);
}

/* Brand "Large body" character: Medium weight, 130% leading — the style the
   guidelines reserve for emphasized lead text, at our scale's 1.3 rung. */
.banner-value {
  margin: 0;
  font-size: var(--size-title);
  font-weight: 500;
  line-height: 1.3;
  color: var(--black-brown);
}

/* Program notes only: the target behaviour is the fact the whole page hangs off,
   so it takes bold Accent Orange. NOTE THE TRADEOFF — orange on the beige banner
   measures 2.3:1, which fails WCAG AA (4.5:1) and even the large-text floor
   (3:1). It is set at 19.5px bold, so it is legible, but low-vision users will
   struggle. The statement is never the ONLY place this information appears (it
   is restated in the recap, the review screen and the report, all in Ink), so no
   content is lost — but this is a deliberate, owner-approved exception to
   "orange is never body text", not an oversight. */
.statement-banner .banner-value {
  color: var(--orange);
  font-weight: 700;
}

.recap-item .banner-value { font-size: var(--size-body); }

/* An empty statement is not the most important thing on the page — it is the absence of it.
   The banner's orange bold would otherwise win on specificity and shout a placeholder. */
.statement-banner .banner-value.banner-empty {
  color: var(--grey-brown);
  font-weight: 400;
}

/* Measured contrast of #BBB5A2 on the beige recap background is 1.85:1 — the
   Placeholder Rule (DESIGN.md) says the palette's lighter neutrals sit near
   2:1 and are never used for text. Grey Brown is 6.14:1 on beige; italic
   preserves the "nothing here yet" read without failing AA. */
.banner-empty { color: var(--grey-brown); font-style: italic; font-size: var(--size-small); }

.recap-jump {
  display: inline-block;
  margin-top: var(--step-8);
  color: var(--grey-brown);
  text-decoration: underline;
  cursor: pointer;
}

/* ---------- Legal footer (shared/legal.js) ---------- */

/* Aligned to the same column as every other piece of chrome, separated by
   the one permitted horizontal rule, and set at microcopy scale so it reads as
   the legal small print it is. */
.legal-footer {
  margin-top: var(--step-40);
  padding: var(--step-32) 0 var(--step-40);
  border-top: 1px solid var(--warm-grey);
}

.legal-footer p {
  margin: 0 0 var(--step-12);
  max-width: var(--measure); /* long prose — same right edge as the cards above it */
  font-size: var(--size-small);
  line-height: 1.4;
  color: var(--grey-brown);
}

.legal-contact {
  margin-bottom: var(--step-20);
}

.legal-contact p {
  margin: 0;
}
/* The phone and email links are 19px tall as bare text: a 24px target (WCAG 2.5.8). */
.legal-contact a {
  display: inline-block;
  padding: var(--step-4) 0;
}

.legal-footer .banner-label {
  margin-top: var(--step-20);
}

/* The disclaimer folds (DESIGN.md "Folded legal footer"): the obligation is to carry the
   text, not to spend half a screen on it. Copyright and contact stay visible above. */
.legal-fold summary {
  display: flex;
  align-items: center;
  min-height: 24px; /* WCAG 2.5.8 */
  cursor: pointer;
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-brown);
  list-style: none;
}
.legal-fold summary::-webkit-details-marker { display: none; }
.legal-fold summary::before {
  content: "\25B8"; /* ▸ — same marker family as example-toggle, grey not orange: chrome */
  display: inline-block;
  margin-right: var(--step-4);
  transition: transform 120ms ease;
}
.legal-fold[open] summary::before { transform: rotate(90deg); }
.legal-fold > p:first-of-type { margin-top: var(--step-12); }

/* ---------- Toast ---------- */

#toastRegion { position: static; }
.toast {
  position: fixed;
  bottom: var(--step-20);
  left: 50%;
  transform: translateX(-50%);
  background: var(--black-brown);
  color: var(--white);
  padding: var(--step-12) var(--step-20);
  border-radius: var(--radius);
  font-size: var(--size-small);
}

/* ---------- Print ---------- */

/* The browser's own Print on a journey page: every page is hidden in print (below), so this
   one line stands in for them. Added by shared/chrome.js where a tool carries a save bar. */
.print-notice { display: none; }
@media print {
  .print-notice { display: block; font-size: var(--size-title); margin: 0; }
}

/* A long address in running text wraps rather than pushing the page wider than the screen. */
.journey a, .report a { overflow-wrap: anywhere; }

@media print {
  .no-print,
  .progress,
  .btn {
    display: none !important;
  }

  body {
    background: var(--white);
    color: var(--black-brown); /* #000 is outside the ten-value palette */
  }

  section[data-screen] {
    display: none !important; /* must beat section[data-screen].active { display:block } */
  }

  .report-container {
    display: block;
  }

  details > summary { display: none; }
  details:not([open]) > *:not(summary) { display: block !important; }

  .report-section {
    break-inside: avoid;
  }

  @page {
    margin: 2cm;
  }
}

/* ---------- Small screens ---------- */

@media (max-width: 480px) {
  .journey { padding: var(--step-16) var(--step-12); }
  .chrome-inner { padding: 0 var(--step-12); }
  /* The three marks shrink together, at the ratio the full-size rule sets below —
     shrinking .org-logo alone would leave RACE larger than MONASH. */
  .org-logo { height: 22px; }
  .partner-logo { height: 11px; }
  .partner-rule { height: 14px; }
  /* Room is tight enough at this width that the hairline is the first thing to go, and
     the pair wraps rather than clipping the tool name against the logo. */
  .site-header .header-titles { gap: var(--step-8); flex-wrap: wrap; }
  .site-header .header-rule { display: none; }
  .card { padding: var(--step-16); }
  .card > h2:first-child {
    margin: calc(var(--step-16) * -1) calc(var(--step-16) * -1) var(--step-16);
    padding: var(--step-12) var(--step-16);
  }
  .btn { width: 100%; }
  .save-bar .btn { width: auto; }
  .step-footer { flex-direction: column-reverse; } /* forward action on top */
  .btn.nav-forward { min-width: 0; }
}

/* ---------- Reduced motion ---------- */

/* One blanket rule, not one per animated element (DESIGN.md Do's: "give every
   animation a prefers-reduced-motion alternative") — enumerating them one by
   one is what let four transitions (progress fill, progress nodes, buttons,
   selectable-tile borders) escape coverage before. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Survey items (Discover) ---------- */

/* The survey's own preamble. Body size, not microcopy: a respondent reads this as the
   opening of the questionnaire, not as a footnote about it. */
.survey-intro {
  font-size: var(--size-body);
  color: var(--black-brown);
  margin-bottom: var(--step-12);
}

/* Each item is a printable question: statement, what it is measuring, response scale.
   Boxed like the rating grid so a long instrument stays scannable, and printable as-is —
   this page is meant to leave the tool on paper or in a form builder. */
.survey-item {
  background: var(--beige);
  border-radius: var(--radius);
  padding: var(--step-16);
  margin-bottom: var(--step-12);
}
.survey-question {
  font-size: var(--size-body);
  color: var(--black-brown);
  margin: 0 0 var(--step-8);
  max-width: none;
}
.survey-item .microcopy { margin: 0 0 var(--step-12); }

/* The response options, one plain list per item (owner, 2026-09-14): numbered when the
   order carries meaning (a scale), bulleted when it does not. Replaces the five boxes, which
   broke "Moderately confident" mid-word at table width. */
.survey-options { margin: 0; padding-left: var(--step-20); font-size: var(--size-small); }
.survey-options li { margin: 0 0 var(--step-4); }
.survey-options li.survey-option--not-scored { list-style: none; }

/* ---------- COM-B model figure ---------- */

/* The diagram is the one image in the journey, so it gets the section rhythm rather than
   a frame — no card, no border, the whitespace does the separating. It is drawn at
   660x420 and never grows past that; below ~660px it shrinks with the card. */
.comb-figure {
  margin: var(--step-32) 0;
  text-align: center;
}
.comb-figure img {
  display: block;
  width: 100%;
  max-width: 480px;
  height: auto;
  margin: 0 auto;
}

/* ---------- COM-B target grid (one page per domain) ---------- */

/* One sub-box per target. A flat list of questions reads as one wall; boxing each one is
   what makes them separable at a glance. Beige tint + 8px is the system's tinted box
   (never a border — the tone does the separating). */

.comb-box {
  background: var(--beige);
  border-radius: var(--radius);
  padding: var(--step-16);
  margin-bottom: var(--step-12);
}

.comb-question {
  font-size: var(--size-body);
  color: var(--black-brown);
  margin: 0 0 var(--step-8);
  max-width: none;
}

.comb-box .microcopy { margin: 0 0 var(--step-12); }

/* The definition, collapsed behind "Explain this". Tighter above than the standard
   disclosure because here it belongs to the question directly above it rather than closing
   off a field, and the box is compact. */
.comb-explain { margin: 0 0 var(--step-12); }

.comb-definition {
  margin: var(--step-8) 0 0;
  font-size: var(--size-small);
  color: var(--grey-brown);
  max-width: none;
}

/* Question and stage-running count on one row. The count ("12 of 25") is the user's only
   sense of position across the three rating pages; muted so it reads as wayfinding, not
   as part of the question. */
.comb-q-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--step-16);
  margin-bottom: var(--step-12); /* carries the spacing the question's own margin used to */
}
.comb-q-row .comb-question { margin-bottom: 0; }
.comb-count {
  font-size: var(--size-label);
  color: var(--grey-brown);
  white-space: nowrap;
}
.comb-stage-intro { margin-bottom: var(--step-16); }

/* "Applies to draught proofing and curtains" — shown only on a box that some, but not all,
   of the chosen upgrades raise. Muted and tight to the question it qualifies. */
.comb-applies-to {
  margin-top: calc(var(--step-8) * -1);
  margin-bottom: var(--step-12);
  font-style: italic;
}

/* The "high impact on uptake" sparkle (owner, 2026-09-18): green like the planner's star,
   alone in the top right corner of the icon cell (.match-star-corner's placement), and the
   tip line above the table all green in the planner's footnote font. 14px matches .match-star. */
.comb-q-icon.has-impact { position: relative; display: inline-block; }
.comb-impact-mark { position: absolute; top: calc(-1 * var(--step-8)); right: calc(-1 * var(--step-12)); width: 18px; height: 18px; color: var(--green); }
.comb-impact-legend { color: var(--green); font-weight: 600; }
.comb-impact-legend svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--green); }

/* Room to improve: a full-width five-point slider. Ordinal question, ordinal control. */
.comb-score { margin-bottom: var(--step-12); }

/* Label and live readout share one row. The readout names the current position — the one
   visible record of what the slider is set to, since the track itself labels only its
   endpoints. "Not yet judged" renders muted so an unanswered box can never be mistaken
   for a deliberate "Not at all" (both parked the handle at the same left edge). */
.comb-score-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--step-16);
}
.comb-readout {
  font-size: var(--size-small);
  font-weight: 500;
  white-space: nowrap;
}
.comb-readout.unrated {
  font-weight: 400;
  font-style: italic;
  color: var(--grey-brown);
}

/* The range slider is gone (2026-08-18): ratings are the .seg segmented meter now, so
   the hidden-thumb tricks this section used to need went with it. */

/* Endpoint labels only, flush to the ends of the track: the scale reads as a range
   rather than as five phrasings to compare. */
.comb-scale {
  display: flex;
  justify-content: space-between;
  gap: var(--step-16);
  margin-top: var(--step-4);
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--grey-brown);
}
/* Deliberately narrow: the end labels read as two tight lines under the ends of the track
   rather than one long line that crowds the middle of the scale. */
.comb-scale span { max-width: 40%; line-height: 1.25; }
.comb-scale span:first-child { text-align: left; }
.comb-scale span:last-child { text-align: right; }

/* "Who installs" (Define step 3, 2026-09-14). ONE continuous track across the full width:
   a program sits somewhere between a professional and the household, and a stepped control
   turned that into a choice of five phrasings. The thumb is the system's orange selection
   marker; the track is the warm-grey rule every divider uses. Reuses .comb-scale for the
   two endpoint labels.

   Unset is genuinely empty (the rating rows' rule): .is-unset parks the thumb in the middle
   and greys it, so a slider nobody has touched never reads as an answer of "A mix". */
/* The static label above it already leaves 8, the gap every other label takes to its control. */
.installer { margin-top: 0; }
/* Two classes deep on purpose: `.field input` marks every box you type in with a cream fill,
   a 1px border and the 3px orange left accent, and it outranks a single class. A track is not
   a box you type in, so all three come off here. */
.installer .installer-track {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  width: 100%;
  height: 32px; /* the row is the touch target; the track itself is the 4px rule */
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}
.installer-track::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: var(--warm-grey);
}
.installer-track::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: var(--warm-grey);
}
.installer-track::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -9px; /* centres the thumb on the 4px track */
  border: 0;
  border-radius: 50%;
  background: var(--orange);
}
.installer-track::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--orange);
}
.installer.is-unset .installer-track::-webkit-slider-thumb { background: var(--dark-warm-grey); }
.installer.is-unset .installer-track::-moz-range-thumb { background: var(--dark-warm-grey); }
/* The house focus ring (the same 2px orange outline every other control takes), drawn
   around the track row rather than as a glow on the thumb: the stylesheet carries exactly
   two box-shadows by design, and neither of them is this. */
.installer-track:focus-visible { outline: 2px solid var(--black-brown); outline-offset: 2px; border-radius: var(--radius); }
/* The one line under the track says only that the slider has not been touched, and goes the
   moment it is: a word under a moving thumb would make a proportion read as a Likert scale. */
.installer-readout { display: block; text-align: center; margin-top: var(--step-4); }
.installer:not(.is-unset) .installer-readout { display: none; }

/* THE QUESTIONS INSIDE A CARD (2026-09-14). Define pages 2 and 3 each hold more than one
   question, and the rhythms are DESIGN.md's: 32 between sections, 16 between two fields of
   one question, 8 to 12 inside a component.

   A <fieldset> is its own block formatting context, so a field's bottom margin cannot
   collapse out of it — left alone it sits inside the box and silently adds to whatever gap
   follows (the upgrade grid was reading 48). The question block therefore ends where its
   last field ends, and every gap below is set explicitly. */
.card > fieldset > :last-child { margin-bottom: 0; }
/* Who and where: two fields of one question, the field rhythm. */
.card > fieldset + fieldset { margin-top: var(--step-16); }
/* Which upgrades, and who installs: each a new section in its card. */
.card > .upgrade-field,
.card > .installer-field { margin-top: var(--step-32); }
/* A section that opens with a sentence of body text (owner, 2026-09-14): the section break
   moves up to the sentence, and the sentence sits close to the micro-label it introduces. */
.card > .section-intro { margin-top: var(--step-32); margin-bottom: var(--step-8); }
.card > .section-intro + fieldset { margin-top: 0; }
/* The count belongs to the grid it counts, so it sits inside the component's rhythm. */
.upgrade-grid + .microcopy { margin-top: var(--step-8); }

.comb-not-relevant {
  display: flex;
  align-items: center;
  gap: var(--step-8);
  margin-bottom: var(--step-12);
  font-size: var(--size-small);
  color: var(--grey-brown);
  cursor: pointer;
  min-height: 24px; /* WCAG 2.5.8 */
}
.comb-not-relevant input { width: 18px; height: 18px; flex: none; }

.comb-confidence { margin-bottom: 0; }

/* The orange left accent marks "this is yours to fill in" across the tool, but inside a
   box that is ALREADY all input it just adds noise — twelve of them stripe the page. */
.comb-confidence select { border-left: 1px solid var(--grey-brown); }

.comb-confidence select:disabled,
.seg:disabled span { opacity: 0.5; cursor: not-allowed; }

/* The priority is derived, never entered, so it gets a label without a control. */
.field-label-static {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--size-label);
  color: var(--grey-brown);
  margin-bottom: var(--step-8);
}

/* Step 10 — priorities recap, reusing the recap-item shell. */
.comb-priority-row {
  margin: 0 0 var(--step-4);
  font-size: var(--size-body);
  color: var(--black-brown);
}
.comb-priority-row:last-child { margin-bottom: 0; }

/* ---------- Journey type picker (step 3) ---------- */

/* Multi-select, so real checkboxes — the whole box is the label. Selected takes the same
   orange border + cream fill as every other selection in the system. */
.journey-type {
  display: flex;
  align-items: flex-start;
  gap: var(--step-12);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  padding: var(--step-16);
  margin-bottom: var(--step-12);
  cursor: pointer;
}
.journey-type:hover { border-color: var(--dark-warm-grey); }
.journey-type.selected { border-color: var(--orange); background: var(--cream); }
.journey-type strong { display: flex; align-items: center; gap: var(--step-8); font-weight: 500; margin-bottom: var(--step-4); }
.journey-type-text {
  display: block;
  font-size: var(--size-small);
  color: var(--grey-brown);
}
/* The survey page's three either-or choices sit side by side (owner, 2026-09-14): each pair
   is one grid row, the section label above it spans both. One column again on a phone. */
.survey-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--step-12); margin-bottom: var(--step-12); }
.survey-pair > .section-label { grid-column: 1 / -1; }
.survey-pair .journey-type { margin-bottom: 0; }
@media (max-width: 700px) { .survey-pair { grid-template-columns: 1fr; } }

/* ---------- Scope summary ---------- */

/* ---------- Segmented meter (DESIGN.md "Segmented meter") ----------
   Five real radios styled as one row of numbered cells. Replaces the range slider
   (2026-08-18): the data is five named categories, so the widget is five cells —
   unanswered is genuinely empty, which retires the hidden-thumb CSS and the
   synthetic-change click handler the slider needed. Quantity fills from the neutral
   ramp (Grey Brown on Warm Grey dividers), never orange. */
.seg {
  display: inline-flex;
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
  padding: 0;
  margin: 0;
}
.seg label { display: block; cursor: pointer; }
.seg label + label { border-left: 1px solid var(--warm-grey); }
/* The input stays in the DOM for semantics and keyboard; the cell span is its face. */
.seg input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
  pointer-events: none;
}
.seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--step-32);
  min-height: 36px;
  padding: 0 var(--step-8);
  font-size: var(--size-label);
  letter-spacing: 0.06em;
  color: var(--grey-brown);
  user-select: none;
  -webkit-user-select: none;
}
.seg label:hover span { background: var(--beige); }
.seg input:focus-visible + span {
  outline: 2px solid var(--black-brown);
  outline-offset: -3px;
  border-radius: var(--radius);
}
/* Meter variant: the checked cell and every cell before it fill — a level, not a pick. */
.seg--meter label:has(input:checked) span,
.seg--meter label:has(~ label input:checked) span {
  background: var(--grey-brown);
  color: var(--cream);
}
.seg--meter label:has(~ label input:checked):hover span,
.seg--meter label:has(input:checked):hover span { background: var(--grey-brown); }
/* Choice variant (Yes / No): only the answer fills, in Ink — a pick, not a level. */
.seg--choice input:checked + span {
  background: var(--black-brown);
  color: var(--cream);
  font-weight: 500;
}
.seg--choice span { min-width: 52px; }

/* ---------- Triage table (DESIGN.md "Triage table") ----------
   Match step 3. The carry/park decision is a comparison, so drivers sit in rows the eye
   can read down, not in stacked cards it has to remember. Header row is the brand's
   Documents table format: orange fill, all-caps Label, Black Brown. */
.match-table-wrap {
  border-radius: var(--radius);
  overflow-x: auto;
  background: var(--white);
}
.match-table {
  width: 100%;
  border-collapse: collapse;
}
.match-table thead th {
  background: var(--orange);
  color: var(--black-brown);
  text-align: left;
  font-size: var(--size-label);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--step-12) var(--step-16);
}
/* Labels longer than about four words read in sentence case (owner, 2026-11-03). ui.js adds
   .label-sentence to any label of five words or more; the Define table sets it directly. */
.label-sentence { text-transform: none !important; letter-spacing: 0 !important; }
.match-table thead th.label-sentence { text-transform: none; letter-spacing: 0; }
.match-table tbody td {
  padding: var(--step-16);
  border-top: 1px solid var(--warm-grey);
  vertical-align: top;
}
.match-table tbody tr:first-child td { border-top: none; }
.match-table .match-driver-prompt {
  margin: 0 0 var(--step-8);
  font-size: var(--size-body);
  color: var(--black-brown);
  max-width: 44ch;
}
.match-table .comb-explain { margin: var(--step-8) 0 0; }
/* Column ratios from the approved mockup: the driver reads, the two decisions sit
   beside it at a glance. */
/* Four columns since 2026-08-19, when the tinted name pill got its own leading column here
   as it has in Define. These base ratios are the Match leverage table's — every other
   .match-table (Define's two rating tables, the survey table) declares its own below. */
.match-table thead th:nth-child(1) { width: 16%; }
.match-table thead th:nth-child(2) { width: 32%; }
.match-table thead th:nth-child(3) { width: 27%; }
.match-table thead th:nth-child(4) { width: 25%; }
/* Blocks and their read-out sit on one line: the answer reads beside the level. */
.match-room-cell {
  display: flex;
  align-items: center;
  gap: var(--step-12);
  flex-wrap: wrap;
}
.match-room-readout {
  font-size: var(--size-label);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey-brown);
  font-weight: 500;
  white-space: nowrap;
}
/* The Yes/No cells read as compact caps chips, per the mockup. */
.match-table .seg--choice span {
  min-height: 0;
  min-width: 0;
  padding: var(--step-8) var(--step-12);
  text-transform: uppercase;
}

/* ---------- Block meter (the triage table's segmented-meter variant) ----------
   The approved mockup's small level blocks: no outer border, gaps between cells, the
   chosen label read out beside them (.match-room-readout). Radios and the level-fill
   behaviour come from .seg / .seg--meter; only the face changes. */
.seg--blocks {
  border: none;
  background: none;
  border-radius: 0;
  overflow: visible;
}
.seg--blocks label { padding: var(--step-4) 0; }
.seg--blocks label + label { border-left: none; margin-left: var(--step-4); }
.seg--blocks span {
  min-width: 24px; /* with the label's padding, a 24 x 24 target (WCAG 2.5.8) */
  min-height: 16px;
  padding: 0;
  border-radius: var(--radius);
  background: var(--warm-grey);
}
.seg--blocks label:hover span { background: var(--dark-warm-grey); }

/* ---------- The generated survey, as a table ----------
   Statement left, the same five-point scale right, on every row. The scale is a column, so
   it is laid out as one. Wider statement column than the rating tables: a survey item is a
   whole sentence in the respondent's voice, and the scale needs only its five boxes. */
.survey-table thead th:nth-child(1) { width: 13%; }
.survey-table thead th:nth-child(2) { width: 52%; }
.survey-table thead th:nth-child(3) { width: 35%; }
.survey-table .survey-question { margin: 0; }
/* The driver's glyph with its names under it, in the same .comb-name-cell the rating table
   draws (owner, 2026-09-14), so one concept keeps one glyph everywhere. The glyph carries its
   component's tint, the same wash the rating pages put on their headers; the survey's own
   header stays the house orange. */
.survey-table td.comb-name-cell { vertical-align: top; }
.survey-table .comb-q-icon { padding: var(--step-8); border-radius: var(--radius); color: var(--black-brown); }
.survey-table .comb-q-icon.comb-cap { background: var(--comb-cap); }
.survey-table .comb-q-icon.comb-mot { background: var(--comb-mot); }
.survey-table .comb-q-icon.comb-opp { background: var(--comb-opp); }
/* The instrument prints, and a respondent filling it in on paper needs the header on every
   page rather than only the first. */
@media print {
  .survey-table thead { display: table-header-group; }
}

/* ---------- The strategies page (Match step 6, "one grammar" rework, 2026-09-10) ----------
   The determinant rail (Match step 5) that used to live here — a fixed left-hand nav plus a
   two-column levers/approaches panel — retired the same day: the left board of the
   drag-and-drop pair below carries the determinant strip and the lever disclosures instead,
   and .drag-board / .match-drag-wrap (below) size the columns now. */

/* The target state we are aiming for, shown under the determinant strip — the same context
   the statements page shows, so the board opens straight on the levers instead of repeating
   it. The determinant name stays the label; this reads as the sentence beneath it, in ink
   because it is the content, not metadata. */
.match-rail-state {
  display: block;
  margin: var(--step-4) 0 0;
  color: var(--black-brown);
}

/* A lever's strategies, in a tray below its disclosure. Pale green (owner, 2026-09-10; the
   Dark Warm Grey tray before it read as mud), the same wash the priorities page's "higher
   priority" box uses, so the tray reads as content, not as an alarm. */
.match-subgroup-nested {
  margin: var(--step-8) 0 var(--step-16) var(--step-20);
  padding: var(--step-16) var(--step-16) var(--step-4);
  background: color-mix(in srgb, var(--green) 8%, var(--white));
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--white));
  border-radius: var(--radius);
}

/* The tray heading: Black brown, weight and wider tracking, air beneath. No underline — the
   strategy cards below already read as their own rows. */
.match-subgroup-nested .section-label {
  border-bottom: none;
  padding-bottom: 0;
  color: var(--black-brown);
  font-weight: 600;
  opacity: 0.72;
  margin-bottom: var(--step-8);
}

/* Page 8's armed-strategy style moved to .match-strat-card[aria-current="true"] below
   (2026-09-11, lines and full-width cards). (.match-lever-fold and the
   .match-real-card.match-strat column layout that used to sit here retired 2026-09-10 with
   draft F, page 6's stacked-determinant rework.) */

/* ---------- Page 6, draft F (2026-09-10): determinants stack full-width and open in
   place. Levels by the tonal stack: white determinant card (orange when open) -> beige
   panel -> white lever cards that fold open -> strategy rows inside, one line each. ---------- */
.match-acc-hint { margin: 0 0 var(--step-12); }
.match-acc { display: flex; flex-direction: column; gap: var(--step-8); }
.match-acc .priority-card { width: 100%; display: flex; }
.match-acc .priority-card[aria-current="true"] { border-color: var(--orange); background: var(--cream); border-radius: var(--radius) var(--radius) 0 0; }
.match-acc-panel { background: var(--beige); border: 1px solid var(--orange); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); padding: var(--step-12); margin-top: calc(var(--step-8) * -1); }
.match-acc-state { font-size: var(--size-small); color: var(--black-brown); margin: 0 0 var(--step-12); }
.match-acc-state span, .match-acc-levers-label { display: block; font-size: var(--size-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey-brown); margin: 0 0 var(--step-4); }
.match-acc-levers-label { margin-bottom: var(--step-8); }
/* One lever, as a card that folds open to its strategies. Summary reads as a beige header
   strip with a chevron at the right (2026-09-11, owner: draft "style 2" from the mock,
   its .s2 block minus the "N to sort" count — no count, no text marker, the chevron alone
   says open/closed). Hover border matches every other card on this page. */
.match-lever-card { background: var(--white); border: 1px solid var(--warm-grey); border-radius: var(--radius); margin-top: var(--step-8); }
.match-lever-card:hover { border-color: var(--orange); }
.match-lever-card > summary {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--step-4) var(--step-8);
  padding: var(--step-8) var(--step-12); cursor: pointer; list-style: none;
  background: var(--beige); border-radius: var(--radius);
}
.match-lever-card[open] > summary { border-radius: var(--radius) var(--radius) 0 0; }
.match-lever-card summary::-webkit-details-marker { display: none; }
.match-lever-card-name { font-size: var(--size-body); font-weight: 500; color: var(--black-brown); }
.match-lever-card-desc { font-size: var(--size-small); color: var(--grey-brown); }
/* The chevron: pushed to the right end, rotates open; prefers-reduced-motion turns the
   transition off through the blanket rule below, not a rule of its own. */
.match-lever-card-chev { margin-left: auto; width: 24px; height: 24px; flex: none; color: var(--orange); transition: transform 0.15s; }
.match-lever-card[open] .match-lever-card-chev { transform: rotate(180deg); }
.match-lever-card-body { border-top: 1px solid var(--warm-grey); padding: var(--step-4) var(--step-12) var(--step-8); }
/* One strategy, one wrapping line: grip, star when recommended, name, its short line, then
   its own "An example" disclosure at the end (flex-basis 100% so it drops to its own row). */
.match-strat-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--step-4) var(--step-8); width: 100%; text-align: left; font: inherit; font-size: var(--size-small); color: var(--black-brown); background: none; border: 0; border-top: 1px solid var(--beige); padding: var(--step-8) 0; cursor: grab; }
.match-strat-line:first-child { border-top: 0; }
.match-strat-line:hover { background: var(--cream); }
/* A pressed program's strategies are read-only: no grab cursor. */
.match-strat-line.locked { cursor: default; }
/* The keyboard path's armed card (owner Q6, 2026-09-11) reuses the drag's own opacity —
   real drag already adds .dragging via dragstart, this covers the one card shape (page 6's
   strategy row) that dragstart's generic rule never got a matching opacity rule for. */
.match-strat-line.dragging { opacity: 0.4; }
.match-strat-line .match-strat-name { font-size: var(--size-body); font-weight: 500; }
.match-strat-line .match-strat-desc { color: var(--grey-brown); }
.match-strat-line .match-strat-ex { margin: 0; flex-basis: 100%; }
/* A linked example bullet's hover/focus tooltip (2026-09-11): one plain sentence on what
   that example did, in the .priority-card[data-tip] card style. Shown only on hover or
   keyboard focus, nothing at rest. .example-body li is already position:relative-free (no
   overflow:hidden ancestor between here and the lever card), so nothing else needs it. */
.match-strat-ex li { position: relative; }
.match-strat-ex a[data-tip]:hover::after,
.match-strat-ex a[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  left: 0;
  top: 100%;
  margin-top: var(--step-4);
  z-index: 5;
  width: max-content;
  max-width: 100%;
  white-space: normal;
  background: var(--white);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  color: var(--black-brown);
  font-size: var(--size-small);
  padding: var(--step-8) var(--step-12);
}
.match-grip { width: 8px; height: 18px; flex: none; fill: var(--dark-warm-grey); align-self: center; }
.match-strat-line:hover .match-grip { fill: var(--grey-brown); }
/* The tip that explains the star, bold and green (owner, 2026-09-14). Scoped to the
   techniques page's teach copy, which carries no other bold. Positive Green on cream is
   2.6:1 (measured against the cream ground), under the 4.5:1 floor, so it is an owner exception like the orange statement on
   Program notes: the sentence names the star in words and the star itself sits beside every
   recommended row, so nothing here is carried by colour alone. */
.teach-desk strong, .teach-phone strong { color: var(--green-text); }
/* R7-04: the bold words in the page introductions use the deeper green (4.5:1 or better).
   The Tip line is the one bright exception: it names the green star and stays bright. */
.teach-desk strong.teach-tip, .teach-phone strong.teach-tip { color: var(--green); }
.match-star { width: 14px; height: 14px; flex: none; fill: var(--green); stroke: var(--green); align-self: center; }
.match-star-corner { position: absolute; top: var(--step-8); right: var(--step-8); }
.match-strat-card { position: relative; }
/* U-06 (owner, 2026-11-03, option D): a technique's number, on its card and on every chip it
   is placed in. Only the pressed technique draws lines on page 8, so the number is the link. */
.match-num {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 20px; height: 20px; padding: 0 var(--step-4); box-sizing: border-box; border-radius: 999px;
  background: var(--black-brown); color: var(--white);
  font-size: var(--size-label); font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums;
}
.match-lane-body .chip { display: inline-flex; align-items: center; gap: var(--step-4); min-height: 28px; padding-top: var(--step-4); padding-bottom: var(--step-4); box-sizing: border-box; }
/* The link lines that replace the right board's determinant list (.match-real-dets,
   retired): one path per kept approach per determinant it works on, drawn over the whole
   wrap. The open determinant's lines are orange; see drawLinks() in tools/match/index.html. */
.match-drag-wrap.match-linked { position: relative; }
.match-drag-wrap.match-linked .drag-gutter { visibility: hidden; }
.match-drag-wrap.match-linked .match-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.match-drag-wrap.match-linked .match-links path { fill: none; stroke: var(--dark-warm-grey); stroke-width: 1.5; }
.match-drag-wrap.match-linked .match-links path.on { stroke: var(--orange); stroke-width: 2; }
.match-drag-wrap.match-linked .match-links circle { fill: var(--dark-warm-grey); }
.match-drag-wrap.match-linked .match-links circle.on { fill: var(--orange); }
@media (max-width: 700px) {
  .match-drag-wrap.match-linked .match-links { display: none; }
  .match-drag-wrap.match-linked .drag-gutter { visibility: visible; }
}

/* ---------- The phase lanes (Match step 8, "one grammar" rework, 2026-09-10) ----------
   The routes-and-phases checklist that used to live here retired the same day: each kept
   strategy is placed in one or more of these lanes instead of the whole plan sharing one
   phase list. */
/* The By phase tab's own microcopy (owner, 2026-09-11 council pick): hidden above 700px,
   where this board is never read only — see the max-width: 700px block for where it shows. */
.match-phone-byphase-note { display: none; }
.match-lane { margin-top: var(--step-12); }
.match-lane:first-child { margin-top: 0; }
/* The drop-off phases (journeys.dropOffStages): Attention Pink, the palette's "check this"
   wash, around the whole lane, with the note in Black Brown (owner, 2026-09-18). The lane
   body keeps its own cream so the chips still read as a drop zone. */
.match-lane-dropoff { background: var(--white); border: 1px solid var(--warm-grey); border-left: 4px solid var(--orange); border-radius: var(--radius); padding: var(--step-8); margin-left: calc(-1 * var(--step-8)); margin-right: calc(-1 * var(--step-8)); }
.match-lane-dropoff-note { margin: 0 0 var(--step-4); color: var(--black-brown); }
.match-lane-dropoff .match-lane-body { background: var(--white); }
.match-lane h4 { display: flex; align-items: center; gap: var(--step-8); margin: 0 0 var(--step-4); font-size: var(--size-small); font-weight: 500; }
/* Dashed like .drop-box, but one per lane: .over here is an INVITATION shown on every lane
   at once while a strategy is armed, not a drag-hover state (the drop-box wrapper's own
   .over already gives drag-hover feedback). */
.match-lane-body { min-height: 40px; border: 1px dashed var(--warm-grey); border-radius: var(--radius); padding: var(--step-8); cursor: pointer; display: flex; flex-wrap: wrap; gap: var(--step-4); }
.match-lane-body.over { border-color: var(--orange); background: var(--cream); }
.match-lane-body .match-real-card { cursor: pointer; }
/* A placed strategy reads as a chip, not a card (2026-09-11): sentence case and Small size
   override .chip's shouted uppercase Label size, since this is a name, not a taxonomy tag.
   The armed strategy's own chips take the orange fill, matching its lines. */
.match-lane-body .chip { text-transform: none; letter-spacing: 0; font-size: var(--size-small); cursor: grab; }
.match-lane-body .chip.on { background: var(--orange); color: var(--black-brown); }
/* The left board's strategy card (2026-09-11): full width, the lever eyebrow on its own
   line, then the grip and the name — .match-real-card stays a compact inline card for
   other boards, so this is its own class rather than a modifier on it. Drag it to a lane
   to place it, or to remove it drag a placed chip back here (owner, 2026-09-11: no
   crosses). A details cannot sit inside a button, so the card is a div — the actual arm
   target is the inner .match-strat-arm button; description and the "Suggested phases"
   fold sit under it, still inside the draggable card. */
.match-strat-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--step-4);
  width: 100%; font-size: var(--size-small); color: var(--black-brown);
  background: var(--white); border: 1px solid var(--warm-grey); border-radius: var(--radius);
  padding: var(--step-8) var(--step-12); cursor: grab; margin-bottom: var(--step-8);
}
.match-strat-card:last-child { margin-bottom: 0; }
.match-strat-card:hover { border-color: var(--orange); }
.match-strat-card.dragging { opacity: 0.4; }
.match-strat-card[aria-current="true"] { border-color: var(--orange); background: var(--cream); }
.match-strat-arm {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--step-4);
  width: 100%; text-align: left; font: inherit; color: inherit;
  background: none; border: 0; padding: 0; cursor: pointer;
}
.match-strat-arm:focus-visible { outline: 2px solid var(--black-brown); outline-offset: 2px; }
.match-strat-card .match-real-lv { display: block; }
.match-strat-card .nm { font-size: var(--size-body); font-weight: 500; display: inline-flex; align-items: center; gap: var(--step-8); }
.match-strat-card .match-strat-desc { color: var(--grey-brown); }
/* The phone's own open/closed chevron (owner, 2026-09-11 council pick): hidden above
   700px, where the card's arm button still arms rather than expands — see the
   max-width: 700px block for where it shows and rotates. */
.match-strat-phone-chev { display: none; }
.match-strat-sugg { width: 100%; }
/* The "Suggested phases" fold's own list (page 8, owner Q5, 2026-09-11): a label ("This
   strategy", then one per determinant) followed by its chips, one row each, no bullets. */
.match-sugg-list { list-style: none; margin: var(--step-8) 0 0; padding: 0; display: flex; flex-direction: column; gap: var(--step-4); }
.match-sugg-list li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--step-4); }
.match-sugg-label { font-size: var(--size-small); color: var(--grey-brown); margin-right: var(--step-4); }
/* The By phase tab's own read-only cursor lives with the rest of the Choose/Chosen toggle
   CSS below (owner, 2026-09-11 council pick: the phone chip is plain text now, not a
   click-to-remove tap target — see .match-lane-body .chip in the max-width: 700px block). */

/* ---------- The priorities table ----------
   The same triage table one more time, but READ-ONLY: it plays back what was judged on the
   three rating pages, ranked worst-scoring first. Nothing here is an input, so the meter is
   plain spans rather than radios — .seg--static reuses the block sizing and the fill colour
   without the interactive machinery. */
.seg--static {
  display: flex;
  gap: var(--step-4);
  align-items: center;
}
.seg--static span {
  min-width: 22px;
  min-height: 12px;
  border-radius: var(--radius);
  background: var(--warm-grey);
}
.seg--static span.on { background: var(--grey-brown); }

/* Priorities page (2026-09-09): three groups of cards, glyph + short name, question in the tooltip. */
.priority-group {
  margin: var(--step-16) 0 0; padding: var(--step-16);
  border: 1px solid var(--warm-grey); border-radius: var(--radius); background: var(--white);
}
.priority-group h3 { margin: 0 0 var(--step-4); }
/* Group washes (owner, 2026-09-09): approved green, very light, for higher priority; a
   light orange for lower priority; the pink attention wash for needs more evidence, which
   sits first. Cards stay white on every wash so the glyph and name read the same everywhere. */
.priority-group-high { background: color-mix(in srgb, var(--green) 8%, var(--white)); border-color: color-mix(in srgb, var(--green) 30%, var(--white)); }
.priority-group-low { background: color-mix(in srgb, var(--orange) 14%, var(--white)); border-color: color-mix(in srgb, var(--orange) 40%, var(--white)); }
.priority-group-unclear { background: var(--beige); border-color: var(--warm-grey); }
.priority-group .priority-card { background: var(--white); }
.priority-card { position: relative; }
/* The full question shows under the name (owner, 2026-11-03), so no hover tooltip. */
.priority-card-text { display: flex; flex-direction: column; }
.priority-card-q { display: block; margin-top: var(--step-4); font-size: var(--size-small); line-height: 1.35; color: var(--grey-brown); }
.priority-card:has(.priority-card-q) { align-items: flex-start; }
/* The interview guide (Define page 15, qualitative route) */
/* The guide's items render in the survey's own table since 2026-09-14; only the section
   head and its big question keep rules of their own. */
.guide-group { margin: var(--step-16) 0 0; }
.guide-opener { font-size: var(--size-title); margin-bottom: var(--step-12); }
.priority-grid { display: flex; flex-wrap: wrap; gap: var(--step-8); margin-top: var(--step-12); }
.priority-card {
  display: inline-flex; align-items: center; gap: var(--step-8);
  padding: var(--step-8) var(--step-12); border: 1px solid var(--warm-grey); border-radius: var(--radius);
  background: var(--white); color: var(--black-brown); text-decoration: none;
  font: inherit; text-align: left;
}
.priority-card:hover, .priority-card:focus-visible { border-color: var(--orange); }
.priority-card .comb-q-icon { color: var(--grey-brown); }
.priority-group-dim .priority-card { opacity: 0.55; }
/* The name label (owner, 2026-09-11: the phone keeps the concept icon, short name and
   formal name together — checkbox box, icon, name, in that order left to right). Desktop
   is unchanged either way: .priority-card-short and .priority-card-formal sit inline, one
   space apart, reading exactly as the old single "short (Formal name)" span did — only the
   phone breaks the formal name onto its own line below, see the max-width: 700px block. */
/* The strategies page's determinant strip (step 6, 2026-09-10): the same treatment a chosen
   card gets in the drop box, here marking which determinant's levers show below. */
.priority-card[aria-current="true"] { border-color: var(--orange); background: var(--cream); }
.priority-group + .btn-row { margin-top: var(--step-16); }

/* The Choose/Chosen toggle (pages 2, 6 and 8; owner, 2026-09-11 council pick: draft A's
   rows inside draft B's toggle), phone only — hidden above 700px (DESIGN.md Layout,
   Responsive: this tool never runs a second phone-only navigation on desktop). Shape
   follows the Chips component rather than a button; the pressed tab takes
   the Orange-Is-Action Rule's fill, its label staying Black Brown per the Black-On-Orange
   Rule. Each tab still clears the Buttons component's 44px minimum height. */
.match-phone-tabs {
  display: none;
  border: 1px solid var(--warm-grey); border-radius: var(--radius); background: var(--white);
  padding: var(--step-4); gap: var(--step-4); margin: 0 0 var(--step-12);
}
.match-phone-tabs button {
  flex: 1; border: 0; background: transparent; font: inherit; font-size: var(--size-small);
  min-height: 44px; padding: var(--step-8) var(--step-12); border-radius: var(--radius);
  color: var(--black-brown); cursor: pointer;
}
.match-phone-tabs button[aria-pressed="true"] { background: var(--orange); }

/* Copy on the phone says tick, not drag (owner, 2026-09-11 council pick): steps 2, 6 and 8
   carry both a teach-desk and a teach-phone paragraph (tools/match/content.js, buildStep);
   only one shows per breakpoint. Every other step's teach carries neither class and is
   shown at every width, unchanged. */
.teach-phone { display: none; }
@media (max-width: 700px) {
  .teach-desk { display: none; }
  .teach-phone { display: block; }
}

/* The drag page (step 2, 2026-09-10): source boxes on the left, the drop box on the right.
   Cards are buttons with draggable="true" — the grab cursor and the dragging state are the
   only things native HTML5 drag needs styled; the drop feedback is the drop box's own. */
.match-drag-wrap { display: grid; grid-template-columns: 1fr 44px 1fr; gap: var(--step-12); align-items: stretch; margin-top: var(--step-16); }
.drag-board { border: 1px solid var(--dark-warm-grey); border-radius: var(--radius); background: var(--white); display: flex; flex-direction: column; min-height: 320px; }
.drag-board-head { display: flex; align-items: center; justify-content: space-between; gap: var(--step-12); padding: var(--step-12) var(--step-16); border-bottom: 1px solid var(--warm-grey); }
.drag-board-head h3 { margin: 0; font-size: var(--size-body); }
.drag-board-body { padding: var(--step-12) var(--step-16) var(--step-16); flex: 1; display: flex; flex-direction: column; }
.drag-board-body .priority-group { margin-top: var(--step-12); }
.drag-board-body .priority-group h4 { margin: 0 0 var(--step-4); font-size: var(--size-small); }
.drag-board-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--step-12); padding: var(--step-12) var(--step-16); border-top: 1px solid var(--warm-grey); }
.drag-gutter { font-size: var(--size-small); color: var(--grey-brown); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--step-8); text-align: center; white-space: normal; }
.drag-gutter svg { color: var(--orange); }
/* The keyboard path's one-line hint under the boards (owner Q6, 2026-09-11): desktop only,
   below 700px the boards stack as a checklist and the tap path works instead. */
.match-keyboard-hint { display: none; margin-top: var(--step-8); }
.priority-card[draggable] { cursor: grab; }
.priority-card.dragging { opacity: 0.4; }
.drop-box { border: 2px dashed var(--dark-warm-grey); }
.drop-box.over { background: var(--cream); border-color: var(--orange); }
/* A wasted click's nudge (owner Q6, 2026-09-11): pressing a source card on desktop pulses the
   nearest target box's dashed border to orange twice, then the class comes off (1200ms, JS).
   Reduced motion (the blanket rule above forces animation-duration near 0 and one iteration)
   resolves almost instantly to the keyframes' own end state, which is orange — so the border
   still shows orange for the same 1200ms, it just does not pulse to get there. */
@keyframes nudge-pulse {
  0% { border-color: var(--orange); }
  25% { border-color: var(--warm-grey); }
  50% { border-color: var(--orange); }
  75% { border-color: var(--warm-grey); }
  100% { border-color: var(--orange); }
}
.nudge { animation: nudge-pulse 1.2s ease-in-out; }
/* Owner Q6 (2026-09-11): the empty target's own text IS the instruction ("drag a card here"),
   so it is made the largest thing in the box — findability over decoration. Same on phone: no
   breakpoint override narrows it back down. Not scoped to .drop-box: the reworked page 6, 8
   and 9 empty states (a sentence plus a Back button) sit directly in the page, not a board. */
.drop-empty { margin: auto; padding: var(--step-20) 0; text-align: center; color: var(--black-brown); font-weight: 500; font-size: var(--size-body); }
.drop-empty + .btn { display: block; margin: var(--step-12) auto 0; }
.drop-box .priority-card { cursor: pointer; }
.drag-remove { margin-left: var(--step-4); color: var(--grey-brown); font-size: var(--size-body); line-height: 1; }
/* Desktop: a chosen card has moved across, so the left board hides it. Extended to
   .match-strat-line (draft F, 2026-09-10): every page's left-board cards are kept the same
   way. Page 8's .match-strat-card is NOT in this list (2026-09-11): its cards stay on the
   left after placing, so there is no "chosen" state to hide. */
@media (min-width: 701px) {
  .drag-source .priority-card[data-chosen="true"] { display: none; }
  /* Page 6 (owner, 2026-09-11): a kept strategy stays on the left, greyed and ticked, so it
     is clear it is already on the right; dragging it back to the left removes it. */
  .drag-source .match-strat-line[data-chosen="true"] { opacity: 0.45; }
  .drag-source .match-strat-line[data-chosen="true"] .match-strat-name::before { content: "\2713\00a0"; }
  /* Owner Q6 (2026-09-11): the gutter's own instruction findable, desktop only — the phone
     layout's gutter text already reads plainly beside the down arrow in a checklist page. */
  .drag-gutter span { font-size: var(--size-body); font-weight: 500; }
  .match-keyboard-hint { display: block; }
}
/* Phone: the boards stack, the arrow points down, and the left board reads as a checklist:
   every card stays put with a box that ticks when chosen; the board below fills as it does. */
@media (max-width: 700px) {
  .match-drag-wrap { grid-template-columns: 1fr; }
  .drag-gutter { flex-direction: row; }
  .drag-gutter svg { transform: rotate(90deg); }
  .drag-board { min-height: 0; }
  .drag-source .priority-card,
  .drag-source .match-strat-line { cursor: pointer; }
  .drag-source .priority-card::before,
  .drag-source .match-strat-line::before {
    content: ""; flex: none; width: 16px; height: 16px; border: 1.5px solid var(--dark-warm-grey); border-radius: var(--radius); background: var(--white);
  }
  /* The driver cards on page 6 are not sortable items: no checklist box on them. */
  .match-acc .priority-card::before { content: none; }
  .drag-source .priority-card[data-chosen="true"]::before,
  .drag-source .match-strat-line[data-chosen="true"]::before {
    content: "\2713"; color: var(--white); background: var(--orange); border-color: var(--orange);
    font-size: var(--size-label); line-height: 14px; text-align: center;
  }
  .drag-all-moved { display: none; }
  /* Owner, 2026-09-11 council pick: every phone row is at least a 44px tap target; page 2's
     own checklist box grows to 22px (draft A), page 6's technique box is unchanged at 16px. */
  .drag-source .priority-card, .drag-source .match-strat-line { min-height: 44px; }
  .drag-source .priority-card::before { width: 22px; height: 22px; }
  /* The formal driver name drops onto its own line under the short name (owner, 2026-09-11:
     checkbox box, icon, name with the formal name under it) — Small, sentence case, per the
     Case-Decides-Size Rule (supporting text at Label must stay all-caps, this is not). */
  .priority-card-formal { display: block; font-size: var(--size-small); color: var(--grey-brown); margin-top: var(--step-4); }

  /* The Choose/Chosen toggle (pages 2, 6, 8 — owner, 2026-09-11 council pick): one board
     shows at a time, so the gutter's arrow-and-instruction has nothing to point between any
     more, and which board shows follows the wrap's own data-phone-tab attribute. */
  .match-phone-tabs { display: flex; }
  .drag-gutter { display: none; }
  .match-drag-wrap[data-phone-tab="chosen"] .drag-source { display: none; }
  .match-drag-wrap[data-phone-tab="choose"] .drop-box { display: none; }

  /* Page 6: a technique already kept under another carried driver (owner, 2026-09-11
     council pick) — ticked and dimmed like a chosen row above, plus its own sub-line
     naming where. */
  .match-strat-line[data-kept-elsewhere="true"] { opacity: 0.55; }
  .match-strat-line[data-kept-elsewhere="true"]::before {
    content: "\2713"; color: var(--white); background: var(--orange); border-color: var(--orange);
    font-size: var(--size-label); line-height: 14px; text-align: center;
  }
  .match-strat-elsewhere-note { display: block; flex-basis: 100%; font-size: var(--size-small); color: var(--grey-brown); }

  /* Page 8: the fold reads as an always-open panel on the phone instead (owner, 2026-09-11
     council pick), so the desktop's own "Suggested phases" disclosure and arm hint stay
     out of the way there. */
  .match-strat-sugg, .match-strat-hint { display: none; }
  .match-strat-card { cursor: pointer; }
  .match-strat-phone-chev { display: inline-block; margin-left: auto; }
  .match-strat-card[data-phone-open="true"] .match-strat-phone-chev { transform: rotate(90deg); }
  .match-strat-phone-panel { margin-top: var(--step-8); width: 100%; }
  .match-strat-phone-phases { display: flex; flex-wrap: wrap; gap: var(--step-8); margin-bottom: var(--step-8); }
  /* The phase chip (draft A): a chip with its own 14px tick box, filling orange when on —
     the Orange-Is-Action Rule and the Black-On-Orange Rule both carried straight over from
     the chosen-row tick above. 36px minimum height per the Buttons component. */
  .match-phase-chip {
    display: inline-flex; align-items: center; gap: var(--step-8); min-height: 36px;
    padding: var(--step-4) var(--step-12); border: 1px solid var(--dark-warm-grey);
    border-radius: var(--radius); background: var(--white); color: var(--black-brown);
    font: inherit; font-size: var(--size-small); cursor: pointer;
  }
  .match-phase-chip[aria-pressed="true"] { border-color: var(--orange); }
  .match-phase-chip i {
    width: 14px; height: 14px; border: 1.5px solid var(--dark-warm-grey);
    border-radius: var(--radius); display: inline-block;
  }
  .match-phase-chip[aria-pressed="true"] i { background: var(--orange); border-color: var(--orange); }
  .match-strat-phone-sugg { font-size: var(--size-small); }

  /* Page 8's By phase tab (owner, 2026-09-11 council pick): read only, so its lane chips no
     longer invite a tap (the base rule above stays grab, for desktop's own drag-to-move). */
  .match-lane-body .chip { cursor: default; }
  .match-phone-byphase-note { display: block; }
  /* No drag dots on the tick-list layout (owner, 2026-11-03): nothing drags there. */
  svg.match-grip { display: none; }
}
/* Without a diagnosis, the three source boxes are the COM-B components, tinted the same
   pale washes the rating pages' table heads use. */
.priority-group-cap { background: var(--comb-cap); }
.priority-group-mot { background: var(--comb-mot); }
.priority-group-opp { background: var(--comb-opp); }
/* The two ways forward, under the groups: the intro paragraphs then the buttons. */
.fork-intro { margin-top: var(--step-16); }
.fork-intro + .fork-intro { margin-top: var(--step-8); }
.comb-priority-table thead th:nth-child(1) { width: 42%; }
.comb-priority-table thead th:nth-child(2) { width: 26%; }
.comb-priority-table thead th:nth-child(3) { width: 32%; }
.comb-priority-table .chip { white-space: normal; }
.comb-priority-table td p.microcopy { margin: var(--step-4) 0 0; }
.comb-priority-table .match-driver-prompt + .chip { margin-top: var(--step-4); }

/* The left severity stripe was retired 2026-08-19. It was a third encoding of the verdict —
   the row already carries the name pill's component tint and the verdict pill's own colour —
   and a coloured bar butting up against a tinted pill read as an artefact rather than as a
   signal. The verdict is still said in colour and in words, in the last column. */
.comb-priority-table thead th:nth-child(1) { width: 16%; }
.comb-priority-table thead th:nth-child(2) { width: 30%; }
.comb-priority-table thead th:nth-child(3) { width: 22%; }
.comb-priority-table thead th:nth-child(4) { width: 32%; }

/* The break between the three sections of the priorities table — the calls you can act on,
   the ones with no call earned yet, and the ones scoped out. Space rather than a heavier
   rule: every horizontal rule in this system is 1px warm grey (DESIGN.md's
   Rules-Between-Only Rule), and space is what it separates with. */
.comb-priority-table tbody tr.comb-section-start td { padding-top: var(--step-32); }
/* Owner's call, 2026-08-19: status colour on the verdict pill, green for a priority through
   to ink for one that is not. Two DESIGN.md house rules bend for it, both noted there — the
   One Green Rule (a table can show several green pills, not one), and "orange never marks
   status" (Unclear is orange here).

   Ruled out takes no colour at all: the whole row dims instead, which is the one case where
   the signal is "stop reading this" rather than "read this as X". */
.comb-priority-table tbody tr.band-na { opacity: 0.6; }

/* Text goes to Black brown on every fill. At label size (12.5px) this is small text, so
   it needs the full 4.5:1: the default chip's Grey brown measures 2.55:1 on green and
   2.68:1 on orange and fails outright, where Black brown clears it on all four
   (green 5.84, orange 6.14, pink 10.51, warm grey 12.26). Ruled-out keeps the neutral chip
   and rides the row's own dimming. */
/* The band class sits on the CHIP, not on an ancestor, so these work wherever a verdict is
   shown: Define's priorities table, and Match's step 3, which reads the same verdict back.
   (The row still carries its own band class — that is what dims a ruled-out row.) */
.band-chip.band-high { background: var(--green); color: var(--black-brown); }
/* The levers page's "Recommended" pill: full green, Black brown text (5.9:1). */
.chip-recommended { background: var(--green); color: var(--black-brown); margin-left: var(--step-8); font-size: var(--size-label); letter-spacing: 0.06em; text-transform: uppercase; padding: var(--step-4) var(--step-8); vertical-align: middle; }
.band-chip.band-unclear { background: var(--orange); color: var(--black-brown); }
/* Not-a-priority is INK, not pink. Pink sat directly beside the Capability name tint,
   which is also pink, and the two read as one thing. Cream on Black brown is 14.95:1. */
.band-chip.band-low { background: var(--black-brown); color: var(--cream); }
.band-chip.band-medium { background: var(--warm-grey); color: var(--black-brown); }

/* The comparison table's prose cells keep a measure of their own — a 44ch cell in a
   960px table, not a paragraph running the width of the column. */
.match-table p { max-width: 44ch; }
/* Below 560px the comparison collapses to labelled blocks — the data-label on each cell
   becomes the row's own header, so nothing depends on a thead that is no longer there. */
@media (max-width: 560px) {
  .match-table thead { display: none; }
  .match-table, .match-table tbody, .match-table tr, .match-table td { display: block; }
  .match-table tbody td { border-top: none; padding: var(--step-4) var(--step-16); }
  .match-table tbody td:first-child { padding-top: var(--step-16); }
  .match-table tbody td:last-child { padding-bottom: var(--step-16); }
  .match-table tbody tr { border-top: 1px solid var(--warm-grey); }
  .match-table tbody tr:first-child { border-top: none; }
  .match-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: var(--size-label);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--grey-brown);
    margin-bottom: var(--step-4);
  }
  .match-table td.label-sentence[data-label]::before { text-transform: none; letter-spacing: 0; }
}

/* ---------- Attention notice (DESIGN.md "Attention Pink") ----------
   The "check this before you continue" wash — caution, not error. Canonical use: the
   stale-diagnosis banner. */
.notice-attention {
  background: var(--pink);
  color: var(--black-brown);
  border-radius: var(--radius);
  padding: var(--step-12) var(--step-16);
  margin-bottom: var(--step-16);
}
.notice-attention p { margin: 0 0 var(--step-8); }
/* A page that did not load fully: a fault in the connection, not in the reader's work, so
   white with an orange rule rather than a warning wash (owner, 2026-11-03). */
.notice-reload { background: var(--white); border-left: 4px solid var(--orange); color: var(--black-brown); }
.notice-reload p { margin: 0 0 var(--step-8); }

/* ---------- Resources note (Define page 2) ----------
   Guidance, not caution: the neutral wash, so it reads as a pointer rather than an alarm. */
.resources-note {
  background: var(--warm-grey);
  color: var(--black-brown);
  border-radius: var(--radius);
  padding: var(--step-12) var(--step-16);
  margin: 0 0 var(--step-16);
}

.ilm-chart {
  position: relative;
  margin: var(--step-16) 0;
}
.ilm-svg {
  width: 100%;
  height: auto;
  display: block;
}
.ilm-tick {
  font-family: var(--font);
  font-size: var(--size-label); /* resolves in SVG user space, scales with the viewBox */
  fill: var(--grey-brown);
  /* In 3D a numeral can land on a tinted block face or a grid line. Same cream halo the
     data labels use; on the flat chart it sits on plain background and does nothing. */
  paint-order: stroke;
  stroke: var(--cream);
  stroke-width: 3px;
  stroke-linejoin: round;
}
.ilm-axis {
  font-family: var(--font);
  font-size: var(--size-label);
  fill: var(--grey-brown);
}
.ilm-label {
  font-family: var(--font);
  font-size: var(--size-label);
  fill: var(--black-brown);
  /* cream halo keeps a label legible when it crosses a neighbouring circle */
  paint-order: stroke;
  stroke: var(--cream);
  stroke-width: 3px;
}
.ilm-bubble {
  cursor: default;
}
/* Leader from a bubble to its label — annotation, so thinner and quieter than
   any data mark. */
.ilm-leader {
  stroke: var(--dark-warm-grey);
  stroke-width: 1px;
  fill: none;
}
.ilm-bubble:focus-visible circle:first-child {
  stroke: var(--black-brown);
  stroke-width: 2px;
}
.ilm-tooltip {
  position: absolute;
  transform: translate(-50%, -100%);
  background: var(--white);
  border: 1px solid var(--warm-grey);
  padding: var(--step-8) var(--step-12);
  font-size: var(--size-small);
  pointer-events: none;
  max-width: 220px;
}
/* Empty-state note, centred over the (still drawn) axes. */
.ilm-chart-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 34ch;
  text-align: center;
  background: var(--cream);
  border: 1px solid var(--warm-grey);
  padding: var(--step-12) var(--step-16);
  margin: 0;
}
.ilm-legend {
  display: flex;
  gap: var(--step-12);
  align-items: center;
  flex-wrap: wrap;
  margin: var(--step-12) 0;
}
.ilm-legend-item {
  display: inline-flex;
  align-items: center;
  gap: var(--step-8);
  font-size: var(--size-small);
}
.ilm-swatch {
  width: var(--step-12);
  height: var(--step-12);
  border-radius: 999px;
  display: inline-block;
}
/* .ilm-swatch.hatch removed 2026-08-18 — diagonal stripes read as "disabled", and the
   chart now fills Mental Effort solid grey-brown instead of hatching it. */

/* Size key: the chart's third encoding. Two circles rather than a written scale,
   because the reader's question is "which way round does this run", not "how many
   percent is this one". They sit on the same baseline so the size difference is the
   only thing that reads. The dots are decoration — the sentence beside them carries
   the meaning, so the pair is aria-hidden. */
.ilm-legend-size {
  display: inline-flex;
  align-items: center;
  gap: var(--step-8);
  flex-wrap: wrap;
}
.ilm-size-key {
  display: inline-flex;
  align-items: center;
  gap: var(--step-4);
}
.ilm-size-dot {
  display: inline-block;
  border-radius: 999px;
  /* Neutral, not a barrier colour: size is independent of which barrier a circle
     shows, and borrowing one of the three hues here would imply otherwise. */
  background: var(--dark-warm-grey);
}
.ilm-size-dot.sm { width: var(--step-8); height: var(--step-8); }
.ilm-size-dot.lg { width: var(--step-16); height: var(--step-16); }

/* 2D/3D toggle, under the figure. The hint sits beside the button rather than under
   the chart so it appears only while there is something to explain. */
/* One row under the chart: sample-size note left, view switch right. */
.ilm-below {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--step-12);
  flex-wrap: wrap;
  margin-top: var(--step-8);
}
.ilm-below > .microcopy { margin: 0; flex: 1 1 14rem; }
.ilm-howto > summary {
  display: inline-flex;
  align-items: center;
  gap: var(--step-8);
  min-height: 30px;
  padding: 0 var(--step-12);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  color: var(--black-brown);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: var(--size-label);
  cursor: pointer;
}
.ilm-howto > summary::before { content: none; }
.ilm-howto > summary::after { content: "\25BE"; color: var(--orange); }
.ilm-howto[open] > summary::after { content: "\25B4"; }
.ilm-howto > summary:hover {
  background: var(--orange);
}
/* Compact: a secondary control sitting beside a caption, not a step control, so it
   does not need the 44px presence the journey buttons have. 30px still clears the 24px
   WCAG 2.5.8 target with room over. */
.btn.btn-compact {
  min-height: 30px;
  padding: 0 var(--step-12);
  gap: var(--step-8);
  font-size: var(--size-label);
}
/* grab, not pointer: the whole plot is a rotation surface, not a link. */
.ilm-chart.is-3d { cursor: grab; touch-action: none; }
.ilm-chart.is-3d.dragging { cursor: grabbing; }
.ilm-chart.is-3d:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* The three axis rods, crossing where the dividing planes meet. Thicker than anything
   else in the frame and round-capped, so they read as one solid armature rather than as
   three more lines among the block edges. */
.ilm-axis-rod {
  stroke: var(--grey-brown);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-opacity: 0.7;
  fill: none;
}
/* The outer edges that carry the numbers and the names. Deliberately lighter than the
   rods: they are a ruler laid against the volume, not the axes themselves. */
.ilm-axis-edge {
  stroke: var(--grey-brown);
  stroke-width: 1.5;
  stroke-opacity: 0.5;
  fill: none;
}
/* Axis names ride in a pill so they stay readable over a tinted block face. */
.ilm-axis-pill {
  fill: var(--cream);
  fill-opacity: 0.92;
  stroke: var(--warm-grey);
  stroke-width: 1;
}
/* The outer cube: twelve hairlines, the only outline left in the view. It exists so the
   tinted blocks read as divisions OF something rather than as free-floating sheets. */
.ilm-cage { stroke: var(--dark-warm-grey); stroke-width: 1; stroke-opacity: 0.35; fill: none; }
/* Ruled on the far walls only. Fainter than the cube edges it hangs off, because a grid
   is a reading aid and must never compete with the marks it helps you read. */
.ilm-grid { stroke: var(--dark-warm-grey); stroke-width: 1; stroke-opacity: 0.22; fill: none; }


/* The legend swatch for a payoff tier: a wash of the same colour its blocks carry, but
   stronger than they are. A block covers a large area so a faint tint reads clearly; a
   12px square at the same strength does not, and the yellow tier all but vanished on
   cream. Still short of full saturation, so it does not read as a fourth barrier colour. */
.ilm-box-swatch {
  width: var(--step-12);
  height: var(--step-12);
  opacity: 0.6;
  display: inline-block;
}
.ilm-map-svg {
  width: 100%;
  height: auto;
  display: block;
}
.ilm-zone {
  fill: var(--beige);
  stroke: var(--dark-warm-grey);
  stroke-width: 1px;
  cursor: pointer;
}
.ilm-zone:hover {
  fill: var(--warm-grey);
}
.ilm-zone.active {
  fill: var(--orange);
}
.ilm-zone:focus-visible {
  outline: none;
  stroke: var(--black-brown);
  stroke-width: 2px;
}
.print-only {
  display: none;
}
@media print {
  .print-only {
    display: block;
  }
  /* The matrix page is its own report: override the blanket
     section[data-screen] print hide (which serves the Define tool). */
  section[data-screen].ilm-printable.active {
    display: block !important;
  }
  /* On paper the hidden data table IS the record — undo .sr-only on its wrapper. */
  .ilm-print-wrap {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }
  .ilm-print-table {
    position: static;
    width: 100%;
    height: auto;
    margin: var(--step-16) 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    border-collapse: collapse;
  }
  .ilm-print-table td,
  .ilm-print-table th {
    border-bottom: 1px solid var(--warm-grey);
    padding: var(--step-8) var(--step-12);
    text-align: left;
  }
}

/* ILM hero map (matrix page): zoomable zone/postcode locator beside the chart */
/* Workspace: navigation column (area filters + map) left, the result — the
   matrix — right and dominant, divided by a rule. */
.ilm-workspace {
  display: grid;
  grid-template-columns: minmax(220px, 300px) 1fr;
  gap: var(--step-20);
  align-items: start;
  margin: var(--step-20) 0;
}
@media (max-width: 820px) {
  .ilm-workspace {
    grid-template-columns: 1fr;
  }
}
.ilm-area-filters .field {
  margin-bottom: var(--step-12);
}
.ilm-postcode-row {
  display: flex;
  gap: var(--step-4);
}
.ilm-postcode-row input {
  width: 100%;
  min-width: 0;
}
.ilm-area-filters #ilm-postcode-result {
  margin: 0 0 var(--step-8);
}
.ilm-area-filters #ilm-postcode-result:empty {
  display: none;
}
.ilm-zone-split:empty {
  display: none;
}
.ilm-zone-split .btn {
  display: inline-flex;
  width: auto;
  padding: 0 var(--step-12);
  margin: 0 var(--step-8) var(--step-8) 0;
}
#ilm-unscored-note:empty {
  display: none;
}
.ilm-zone-desc {
  margin-top: var(--step-16);
  padding-top: var(--step-12);
  border-top: 1px solid var(--warm-grey);
}
.ilm-zone-desc p:last-child {
  margin-bottom: 0;
}
.ilm-result {
  border-left: 1px solid var(--warm-grey);
  padding-left: var(--step-20);
  min-width: 0; /* a grid child must be allowed to shrink or the SVG overflows */
}
@media (max-width: 820px) {
  .ilm-result {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--warm-grey);
    padding-top: var(--step-16);
  }
}
.ilm-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--step-16);
  flex-wrap: wrap;
}
.ilm-result-head .microcopy {
  margin: 0;
}
/* The legend takes the free width so the housing tiles stay pinned right even
   when there is nothing plotted and the legend is empty. */
.ilm-result-head .ilm-legend {
  flex: 1;
  margin: 0;
}
/* Housing filters as picture tiles, sitting on the result panel. */
.ilm-housing {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: var(--step-8);
}
.ilm-housing-tile {
  position: relative; /* contains the visually-hidden input below */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--step-4);
  padding: var(--step-8) var(--step-12);
  border: 1px solid var(--warm-grey);
  border-radius: var(--radius);
  color: var(--grey-brown);
  font-size: var(--size-small);
  cursor: pointer;
  min-width: 76px;
}
.ilm-housing-tile:hover {
  border-color: var(--dark-warm-grey);
}
.ilm-housing-tile.selected {
  border-color: var(--orange);
  background: var(--beige);
  color: var(--black-brown);
}
/* Selection never rides on border colour alone (DESIGN.md, Selection): the ✓ marker is
   the state. Both tiles start selected here, and without the marker they simply looked
   like two orange boxes with no way to tell chosen from choosable. */
.ilm-housing-tile.selected::after {
  content: "\2713";
  position: absolute;
  top: var(--step-4);
  right: var(--step-8);
  font-size: var(--size-label);
  color: var(--orange);
}
/* The tick is the state; the box itself would double up next to the glyph. */
.ilm-housing-tile input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.ilm-housing-tile:focus-within {
  outline: 2px solid var(--black-brown);
  outline-offset: 2px;
}
/* A housing type with no data for the chosen zone (Apartments in zones 3 and 4, where the
   survey reached no apartment dwellers). Dashed + muted reads as "not available", and the
   reason arrives as a tooltip on hover or keyboard focus rather than as visible text, so
   both tiles keep the same height (owner, 2026-09-03). A struck-through tile alone did not
   say why, so the tooltip carries words (owner, 2026-09-07). */
.ilm-housing-tile.disabled {
  border-style: dashed;
  color: var(--dark-warm-grey);
  cursor: not-allowed;
}
.ilm-housing-tile.disabled:hover {
  border-color: var(--warm-grey);
}
/* Built from data-tip rather than the native title attribute: title on a label wrapping a
   disabled input is unreliable across browsers, and this version is legible and instant.
   Absolutely positioned so showing it never moves the tiles. */
.ilm-housing-tile[data-tip]::before {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + var(--step-4));
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: max-content;
  max-width: 160px;
  padding: var(--step-4) var(--step-8);
  border-radius: var(--radius);
  background: var(--black-brown);
  color: var(--cream);
  font-size: var(--size-label);
  line-height: 1.3;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 120ms ease;
}
.ilm-housing-tile[data-tip]:hover::before,
.ilm-housing-tile[data-tip]:focus-within::before {
  opacity: 1;
  visibility: visible;
}
/* The tick marker also uses ::after on this element, so the tooltip takes ::before. A
   disabled tile is never selected, so the two never appear together. */
.ilm-glyph {
  width: var(--step-32);
  height: var(--step-32);
}
/* Closing band: what the survey was, and the plain-language comparison. */
.ilm-explainer {
  margin-top: var(--step-32);
  padding-top: var(--step-20);
  border-top: 1px solid var(--warm-grey);
}
.ilm-comparison {
  background: var(--beige);
  padding: var(--step-16);
  margin-bottom: var(--step-16);
}
.ilm-comparison p:last-child {
  margin-bottom: 0;
}
.ilm-comparison:empty {
  display: none;
}
.ilm-map-wrap {
  position: relative;
  margin: var(--step-16) 0;
}
.ilm-map-wrap .ilm-map-svg {
  touch-action: none; /* the map owns its gestures: drag pans, wheel zooms */
  cursor: grab;
}
/* Bottom left: open ocean south-west of the continent, so the controls sit in
   the emptiest corner of the frame at the default view. */
.ilm-map-controls {
  position: absolute;
  bottom: var(--step-8);
  left: var(--step-8);
  display: flex;
  gap: var(--step-4);
}
.ilm-map-controls .btn {
  padding: var(--step-4) var(--step-12);
  min-width: 0;
}
/* Top left, clear of the controls — both can be on screen at once. */
.ilm-map-status {
  position: absolute;
  left: var(--step-8);
  top: var(--step-4);
  margin: 0;
}
.ilm-pc {
  fill: var(--white);
  fill-opacity: 0.01; /* invisible but clickable */
  stroke: var(--dark-warm-grey);
  stroke-width: calc(0.6px * var(--map-scale, 1));
  cursor: pointer;
}
.ilm-pc:hover {
  fill: var(--warm-grey);
  fill-opacity: 0.55;
}
/* The selected postcode is filled SOLID, not tinted. It sits inside a zone that is already
   orange, so an orange wash at 0.35 only shifted the shade a little and the selection read
   as an outline you had to hunt for. Solid black-brown is the one value on this map nothing
   else uses, so at any zoom the eye goes straight to it. */
.ilm-pc.active {
  stroke: var(--black-brown);
  stroke-width: calc(1.4px * var(--map-scale, 1));
  fill: var(--black-brown);
  fill-opacity: 1;
}
.ilm-zone {
  stroke-width: calc(1px * var(--map-scale, 1));
}

/* ILM print overrides live at the end of the file on purpose: they have the same
   specificity as the screen rules above, so only source order lets them win. */
@media print {
  /* On paper the navigation column is gone, so the chart takes the full width
     instead of sitting in the second column of a grid with a hole in it. */
  .ilm-workspace {
    display: block;
  }
  .ilm-result {
    border-left: none;
    padding-left: 0;
  }
  .ilm-chart {
    max-width: 640px;
  }
}

/* ------------------------------------------------------------------------- */
/* Match tool (tools/match/)                                                 */
/* ------------------------------------------------------------------------- */

/* The theory-of-change map's figure, the intervention cards and their zoom/pan chrome were
   cut to the archive folder (theory-of-change-map, under this repo's archive/) on
   2026-09-10 — see its README for why and how to bring them back. */

/* The theory-of-change chain (step 9, 2026-09-11: phase bands — "the arrows get really
   messy" and "the phases guide the vertical arrangement", owner). One band per phase,
   stacked: each band is its own three-column grid — the phase people meet a strategy in,
   the strategies placed there, the states they produce — with curved lines drawn PER BAND
   over that band's own grid: phase to strategy, strategy to state. Nothing crosses between
   bands, so the lines stay short. A legend strip at the top names the three columns once,
   its own columns matching the band grid. Under 700px a band stacks to one column and its
   lines hide (see drawLinks9 in tools/match/index.html). */
.match-chain-legend {
  display: grid; grid-template-columns: 180px 1fr 1fr; gap: var(--step-12);
  padding: var(--step-12) var(--step-16); margin: var(--step-16) 0; border: 1px solid var(--warm-grey);
  border-radius: var(--radius); background: var(--beige); font-size: var(--size-small);
}
.match-chain-legend b {
  display: block; font-size: var(--size-label); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--orange-text); margin-bottom: var(--step-4);
}
/* The bands' stack — no longer a grid itself, each .match-band inside it is. */
.match-chain-cols { display: flex; flex-direction: column; }
.match-band {
  position: relative; display: grid; grid-template-columns: 180px 1fr 1fr; gap: var(--step-16);
  align-items: start; border-top: 1px solid var(--warm-grey); padding: var(--step-16) 0;
}
.match-band:first-child { border-top: none; }
.match-chain-col { display: flex; flex-direction: column; gap: var(--step-8); min-width: 0; }
.match-node { background: var(--white); border: 1px solid var(--warm-grey); border-radius: var(--radius); padding: var(--step-8) var(--step-12); font-size: var(--size-small); }
.match-node.on { border-color: var(--orange); background: var(--cream); }
.match-node.dim { opacity: 0.45; }
.match-node-phase { display: flex; align-items: center; gap: var(--step-8); font-weight: 500; }
.match-node-strat { display: block; width: 100%; text-align: left; font: inherit; font-size: var(--size-small); color: var(--black-brown); cursor: pointer; }
.match-node-strat:hover, .match-node-strat:focus-visible { border-color: var(--orange); }
.match-node-strat .match-real-lv { display: block; }
.match-node-strat .nm { font-size: var(--size-small); font-weight: 500; }
.match-node-state { display: flex; gap: var(--step-8); align-items: flex-start; }
.match-node-state .comb-q-icon { flex: none; }
.match-node-state .st-label { display: block; font-size: var(--size-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--grey-brown); margin-bottom: var(--step-4); }
.match-band .match-links { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.match-band .match-links path { fill: none; stroke: var(--dark-warm-grey); stroke-width: 1.5; }
.match-band .match-links path.on { stroke: var(--orange); stroke-width: 2; }
.match-band .match-links circle { fill: var(--dark-warm-grey); }
.match-band .match-links circle.on { fill: var(--orange); }
.match-chain-end { margin-top: var(--step-16); background: var(--beige); border-radius: var(--radius); padding: var(--step-12) var(--step-16); font-size: var(--size-small); }
.match-chain-end strong { display: block; margin-bottom: var(--step-4); }
@media (max-width: 700px) {
  .match-chain-legend { grid-template-columns: 1fr; }
  .match-band { grid-template-columns: 1fr; }
  .match-band .match-links { display: none; }
}

/* The program strip and the kept/placed cards (steps 6 and 8, "one grammar" rework,
   2026-09-10; first drawn for the retired "What is realistic for your program?" page).
   Boards reuse .drag-board / .drop-box / .priority-grid from the room page (step 2) above;
   the rules here are what that page does not already carry. .match-real-card is its own
   class rather than reusing .priority-card, which forces a stacked look these pages do not
   want. */
/* The six-lever primer (owner, 2026-09-11), above the strip: a plain block, not beige, so
   it never reads as the strip's optional add-on — DESIGN.md's tint-beige role is reserved
   for content that carries weight, and this is background reading, not a callout. The list
   is sentence-case supporting text, so it takes Small (Case-Decides-Size Rule); the lever
   label is Medium, never bold (Regular-Heading Rule: Medium marks values and labels, bold
   is banned). */
.match-levers-primer { margin: var(--step-16) 0; }
.match-levers-primer-list {
  list-style: none;
  margin: var(--step-8) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--step-8);
  font-size: var(--size-small);
}
.match-levers-primer-list strong { font-weight: 500; }
/* The closing note sits off the last bullet by one inside-a-component step (coordinator, 2026-09-11 walk). */
.match-levers-primer > .microcopy { margin-top: var(--step-8); }
/* Folded on a phone (owner, 2026-11-03): the summary is the whole heading. */
details.match-levers-primer > summary,
details.match-real-programs > summary { cursor: pointer; font-size: var(--size-body); }
details.match-levers-primer[open] > summary,
details.match-real-programs[open] > summary { margin-bottom: var(--step-8); }
details.match-levers-primer { border: 1px solid var(--warm-grey); border-radius: var(--radius); padding: var(--step-12); background: var(--white); }

/* The strip is a boxed, optional add-on (Tint Beige box, DESIGN.md's "emphasis container"
   for callouts), not part of the plan itself. */
.match-real-programs {
  margin: var(--step-16) 0;
  background: var(--beige); border: 1px solid var(--warm-grey); border-radius: var(--radius);
  padding: var(--step-12);
}
.match-real-programs .section-label { margin-bottom: var(--step-8); }
/* A normal-case chip, not the shouted uppercase .chip: this strip is a set of
   toggle buttons, not a taxonomy label. */
.match-real-chip {
  display: inline-flex; align-items: center;
  font: inherit; font-size: var(--size-small);
  padding: var(--step-4) var(--step-12);
  border: 1px solid var(--dark-warm-grey); border-radius: var(--radius);
  background: var(--white); color: var(--black-brown);
  cursor: pointer;
}
.match-real-chip:hover { border-color: var(--orange); }
/* Black-On-Orange Rule (DESIGN.md): black-brown text on the orange, not white. */
.match-real-chip[aria-pressed="true"] { background: var(--orange); color: var(--black-brown); border-color: var(--orange); }
/* Small caps eyebrow, the lever a card sits under — same role .match-chain-eyebrow plays,
   inline rather than block since it sits at the head of a card, not above one. */
.match-real-lv { font-size: var(--size-label); letter-spacing: 0.06em; text-transform: uppercase; color: var(--grey-brown); }
/* A compact left-board card: lever eyebrow INLINE before the label, not stacked above it. */
.match-real-card {
  display: inline-flex; align-items: center; gap: var(--step-8);
  padding: var(--step-4) var(--step-12); border: 1px solid var(--warm-grey); border-radius: var(--radius);
  background: var(--white); color: var(--black-brown); font: inherit; font-size: var(--size-small);
  text-align: left; cursor: grab;
}
.match-real-card:hover, .match-real-card:focus-visible { border-color: var(--orange); }
.match-real-card.dragging { opacity: 0.4; }
/* Version-2 card (owner, 2026-09-10): one per approach, its determinants listed inside. */
.match-real-approach {
  position: relative;
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--step-4);
  width: 100%; padding: var(--step-12) var(--step-32) var(--step-12) var(--step-12); border: 1px solid var(--warm-grey); border-radius: var(--radius);
  background: var(--white); color: var(--black-brown); font: inherit; text-align: left; cursor: grab;
}
/* No hover border on desktop (owner, 2026-09-11: click never moves anything there, drag
   does) — focus-visible stays for keyboard users. */
.match-real-approach:focus-visible { border-color: var(--orange); }
.match-real-approach.dragging { opacity: 0.4; }
/* The approach name, 600 weight (owner, 2026-09-11: no cross — drag the card back to the
   left board to remove it, or click it, the phone path). */
.match-real-name { font-weight: 600; display: flex; align-items: center; width: 100%; }
/* The determinants a right-board card serves: a wrapping row of glyph + short name. */
.match-real-dets { display: flex; flex-wrap: wrap; gap: var(--step-4) var(--step-12); }
.match-real-det { display: inline-flex; align-items: center; gap: var(--step-4); font-size: var(--size-label); color: var(--grey-brown); }
.match-real-det .comb-q-icon { flex: none; }
/* A pressed program's own board: read-only, in the pale green tray colour — same card shape
   as the reader's own kept card (2026-09-11), so .match-real-approach's own layout carries
   the eyebrow, the name and one .match-prog-how line per determinant pair, evenly gapped. */
.match-real-approach.prog { cursor: default; background: color-mix(in srgb, var(--green) 8%, var(--white)); border-color: color-mix(in srgb, var(--green) 30%, var(--white)); }
/* One "how" line per determinant pair: the glyph names the determinant, so the line itself
   carries only what the program did about it. */
.match-prog-how { display: flex; align-items: flex-start; gap: var(--step-8); width: 100%; margin: 0; font-size: var(--size-small); color: var(--grey-brown); }
.match-prog-how .comb-q-icon { flex: none; }
/* Full orange (owner, 2026-09-11) so the example's caption stands out; Black brown text on
   orange, per DESIGN.md's Black-On-Orange Rule. */
.match-real-cap {
  margin: 0 0 var(--step-12); padding: var(--step-8) var(--step-12);
  background: var(--orange); color: var(--black-brown); border-radius: var(--radius);
  font-size: var(--size-small);
}
.match-real-cap a { color: var(--black-brown); }
.match-real-cap strong { display: block; }
/* A pressed program's board is read-only feedback, not a drop target — solid orange, the
   same signal .drop-box.over gives mid-drag, held rather than momentary. */
.drop-box.showing { border-style: solid; border-color: var(--orange); }
/* Phone: no drag there, so the card that click-removes on a phone reads as a tap target,
   not a grab handle (base rule above stays grab, for desktop). */
@media (max-width: 700px) {
  .match-real-approach { cursor: pointer; }
}

/* The levers page's worked example (step 6, 2026-09-10, moved here from the blueprint's
   chain rows): same scale as the strategies line above it, its link in Black brown. */
.match-approach-example { display: block; margin-top: var(--step-4); font-size: var(--size-small); color: var(--grey-brown); }
.match-approach-example a { color: var(--black-brown); }

.check-row {
  display: flex;
  align-items: flex-start;
  gap: var(--step-8);
  font-size: var(--size-small);
  padding: var(--step-4) 0;
}
.check-row input { margin-top: var(--step-4); flex: 0 0 auto; }

/* Any run of chips that sit together. Chips are inline-block with no margin of their own,
   so two appended side by side touch, and a wrapped pair collides vertically — the row owns
   the spacing instead, which is also what lets a long pair wrap cleanly in a narrow column.
   (It served the target-statement cards' "why is this here" chips until 2026-08-19; the
   white-surface override went with them, and would have clobbered the verdict colours.) */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--step-8);
  margin: 0 0 var(--step-8);
}

/* The "not a priority yet" nudge closes the card, so it needs separating from the
   example disclosure above it — without this it reads as part of that disclosure. */
/* ---------- The Define tool's rating table ----------
   Shares .match-table (orange header, row rules, mobile collapse) and overrides only what
   differs: its third column holds a <select> whose options are whole sentences, so it needs
   more room than the Match table's two-letter Yes/No cells, and the determinant column can
   give it up. Scoped to .comb-table so the Match table keeps its own approved ratios. */
.comb-table thead th:nth-child(1) { width: 13%; }
.comb-table thead th:nth-child(2) { width: 30%; }
/* The first column is one glyph per question (2026-09-09), centred and in the page's ink. */
.comb-table td.comb-name-cell { vertical-align: middle; }
.comb-q-icon { display: flex; justify-content: center; align-items: center; color: var(--grey-brown); }
/* The plain name under the glyph on the rating pages (owner, 2026-09-09). */
.comb-name-cell { text-align: center; }
.comb-q-short { display: block; margin-top: var(--step-4); font-size: var(--size-small); color: var(--grey-brown); line-height: 1.3; }
.comb-table thead th:nth-child(3) { width: 23%; }
.comb-table thead th:nth-child(4) { width: 34%; }
/* The select fills its cell rather than sizing to the widest option, which clipped
   "We have some local evidence" to "We have some local ev". */
.comb-table .comb-confidence select { width: 100%; }
.comb-table .comb-confidence label.sr-only + select { margin-top: 0; }

/* CONCEPT HEADER ROW, inside a rating table's body (the concept rework, 2026-09-08): one
   plain-language question groups the determinant rows under it. Full width comes free from
   colspan="4"; left-aligned and normal weight because this is a question, not a shouted
   column label like .match-table thead th. Tinted the same as the table's own head so a
   reader sees it as this page's own grouping rather than a stray row breaking the table. */
.comb-table tr.comb-concept th {
  text-align: left;
  font-weight: 400;
  padding: var(--step-16);
  border-top: 1px solid var(--warm-grey);
}
.comb-table tr.comb-concept th strong { font-weight: 500; margin-right: var(--step-8); }
.comb-table.comb-cap tr.comb-concept th { background: var(--comb-cap); }
.comb-table.comb-mot tr.comb-concept th { background: var(--comb-mot); }
.comb-table.comb-opp tr.comb-concept th { background: var(--comb-opp); }

/* The part label on the three-part concepts' rows ("In terms of cost/time/effort"), above
   the prompt it prefixes. No existing class reads as small caps — .comb-star-hint is plain
   microcopy — so this is a new one, sized and coloured the same as that hint. */
.comb-part-label {
  margin: 0 0 var(--step-4);
  font-size: var(--size-label);
  color: var(--grey-brown);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* The shared scale, printed once under the column header instead of beneath all 29 meters.
   Lower-case and unspaced: it is a footnote to the header, not a second header. */
.match-table thead th .th-note {
  display: block;
  margin-top: var(--step-4);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--size-label);
  opacity: 0.75;
}

/* A row parked as "not relevant" keeps its question legible but stops competing for
   attention with the rows still to be judged. */
/* Only what is switched off fades: the icon, the meter and the confidence select. The text
   and the controls that stay live (the tick that undoes "not relevant", the Why not field,
   Explain this) keep full colour; at 0.6 they fell to 2.7:1, under AA's 4.5:1. */
.comb-row-na .comb-q-icon,
.comb-row-na td:nth-child(n+3) { opacity: 0.6; }

/* A control started but not finished (owner 2026-09-18): the pink outline lives on
   .comb-half select/.seg--meter, declared near the top of this file, before the
   focus-visible rule, so a focused half-rated control still shows the orange ring. */
.comb-half-hint { color: var(--grey-brown); margin-top: var(--step-4); }

/* THE TWO HALVES OF A COM-B COMPONENT, above each rating grid. Two cards side by side
   rather than a paragraph, because the point is that these are two DIFFERENT questions:
   set as prose the distinction reads as elaboration and gets skimmed. Beige ground, no
   border and no shadow — house style keeps rules between things, not boxes around them,
   so the fill alone separates them from the questions underneath.
   Single column below the fold-point: side-by-side halves narrower than about 15em stop
   being scannable, which is the only thing they are for. */
.comb-split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15em, 1fr));
  gap: var(--step-12);
  margin: 0 0 var(--step-20);
}

.comb-split-card {
  background: var(--beige);
  border-radius: var(--radius);
  padding: var(--step-16);
}

.comb-split-card strong {
  display: block;
  font-weight: 500;
  margin-bottom: var(--step-4);
}

.comb-split-card p {
  margin: 0;
  font-size: var(--size-small);
  color: var(--grey-brown);
}

/* The count is the card's quietest line: it changes per program, so it must not read as
   part of the definition above it. */
.comb-split-card p.microcopy { margin-top: var(--step-8); }

/* Only rendered on a box the user has typed over, so it sits under the hints as a quiet
   undo rather than a control competing with the textarea. */
.match-statement-restore { margin-top: var(--step-8); }

/* Statements page (step 3, 2026-09-10 rework): a table, the same shape as Define's rating
   pages, in place of the list-rail-plus-editor the merged tool used. */

/* The page-level reframe, above the worked example. */
.match-statement-reframe { margin: 0 0 var(--step-12); }

/* The aim column's textarea fills its cell rather than sizing to its cols attribute. */
.match-table .match-statement-textarea { width: 100%; min-height: 6em; }

/* The wording hint under the theory-of-change state box, which otherwise sits flush
   against the textarea it explains. */
.toc-lane .microcopy { margin: var(--step-8) 0 0; }

/* The carry/park radios moved into the triage table (2026-08-18) as a .seg--choice —
   the .match-override card block went with the cards. */

/* On paper the lanes keep their boxes but lose the editing chrome. */
@media print {
  .toc-box { resize: none; }
}

/* The guided tutorial (shared/tour.js). The dim is four solid scrim divs framing the
   spotlit rect — the palette rule allows no new rgba(), so dimming is a palette colour
   at reduced opacity, and the frame's hole is the click-through window. Everything is
   position: fixed and JS-measured; only the cosmetics live here. */
.tour-layer { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.tour-scrim {
  position: fixed;
  background: var(--black-brown);
  opacity: 0.55;
  pointer-events: auto;
}
.tour-ring {
  position: fixed;
  border: 2px solid var(--orange);
  border-radius: var(--radius);
  pointer-events: none;
}
.tour-card {
  position: fixed;
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--step-16);
  max-width: 360px;
  pointer-events: auto;
  font-size: var(--size-small);
}
/* When no spot beside the target fits (narrow screens, full-viewport targets), the
   card docks as a bottom sheet instead of floating over the spotlight. */
.tour-card--sheet {
  left: 0;
  right: 0;
  bottom: 0;
  top: auto;
  max-width: none;
  border-radius: var(--radius) var(--radius) 0 0;
  max-height: 45vh;
  overflow-y: auto;
}
.tour-card strong { display: block; margin-bottom: var(--step-4); }
.tour-card p { margin: var(--step-4) 0; }
.tour-card-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--step-12);
}
/* The buttons take the card's full width and wrap onto a second line when the last stop's
   three do not fit; labels never break mid-phrase. The stop counter sits on the exits line. */
.tour-card-btns { display: grid; grid-template-columns: max-content max-content; justify-content: end; gap: var(--step-8); }
.tour-card-btns .btn { white-space: nowrap; }
/* Back left, Next/Finish right; the last stop's alternative exit takes its own line above
   them, content-sized and right aligned, so the two navigation buttons stay together. */
.tour-card-btns [data-tour-back] { grid-column: 1; }
.tour-card-btns [data-tour-next] { grid-column: 2; }
.tour-card-btns [data-tour-finish-alt] { grid-row: 1; grid-column: 1 / -1; justify-self: end; }
.tour-card-exits { align-items: center; }
.tour-count { margin-left: auto; white-space: nowrap; }
.tour-card-exits {
  display: flex;
  gap: var(--step-16);
  margin-top: var(--step-8);
}
.tour-link {
  background: none;
  border: none;
  padding: var(--step-4) 0;
  min-height: 24px;
  font-size: var(--size-label);
  color: var(--grey-brown);
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}
.tour-arrow {
  position: fixed;
  border: 8px solid transparent;
  pointer-events: none;
}
.tour-arrow--up { border-bottom-color: var(--white); }
.tour-arrow--down { border-top-color: var(--white); }
.tour-arrow--left { border-right-color: var(--white); }
.tour-dot {
  position: fixed;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--orange);
  color: var(--black-brown);
  border: 2px solid var(--white);
  font-size: var(--size-label);
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  pointer-events: auto;
}
.tour-bubble {
  position: fixed;
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--step-12);
  max-width: 260px;
  font-size: var(--size-label);
  pointer-events: auto;
}
@keyframes tour-flash {
  0% { outline-color: var(--orange); }
  100% { outline-color: transparent; }
}
.tour-flash {
  outline: 3px solid transparent;
  outline-offset: 2px;
  animation: tour-flash 1.4s ease-out 2;
}

/* Intervention-card technique rows (step 22) carry the CACTIS number, name and
   description, the same three lines the step-19 picker shows. */
.check-row strong { display: block; font-weight: 600; }

