/* ==========================================================================
   CINCH — cinchcodes.ca marketing page

   COLOUR IS SUPERSEDED BY THE PRODUCT (bar.md §COLOUR, round 3).
   cinch-app/app.py is the source of truth. DESIGN.md §2's "orange = provenance"
   is overturned; it contradicts the shipping app. The mapping now is:

     green  (--verified)    verified, cited, source-backed. Citations. CTAs.
     amber  (--unverified)  unverified: edition flags, superseded editions,
                            the no-jurisdiction refusal, pasted source.
     ember  (no token)      the single brand accent. IDENTITY ONLY — it appears
                            exactly once per surface, inside the logo lockup
                            SVG, and never as a UI action. Deliberately unused
                            in this stylesheet; the token documents the rule.
     clay   (--fail)        the only failure colour. Form validation, nothing else.

   Page canvas stays WHITE. The app's cream #F3F1EA is the exact look DESIGN.md
   §0 names as the trap and is deliberately not carried over.

   Other hard rules: no shadows of any kind, 4px radius everywhere, flat fills
   only, warm paper = source panel only. Motion is the hero demo plus three
   ambient plates (bar.md 21–24), all suppressed under prefers-reduced-motion.

   PROSE MEASURE: every measure is expressed in `ch`, never px. `ch` resolves
   against the element's OWN font-size, so one token holds the 68-character cap
   at 11px and at 19px alike. A 640px column is ~68 characters at 17px but ~110
   at 13px, which is how the footnotes ran long in the first round.
   ========================================================================== */

/* ---------- Fonts (self-hosted only — no external requests) ----------
   Two families. Archivo is the app's own --font-ui and now carries display AND
   body (bar.md 7); Bricolage Grotesque is gone, and IBM Plex Sans went with it
   because Archivo took its role. IBM Plex Mono stays for clause numbers,
   edition years and all tabular data (bar.md 8). */
@font-face {
  font-family: "Archivo";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/archivo-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/archivo-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/archivo-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Archivo";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/archivo-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-mono-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/plex-mono-500.woff2") format("woff2");
}

/* ---------- Tokens — values from cinch-app/app.py's token block ---------- */
:root {
  /* Brand green — surface, structure and action. app.py --green-700/800/950. */
  --green:          #0F6E56;  /* --green-700: brand primary, CTA fill, links */
  --green-deep:     #09523F;  /* inverted band background, CTA hover */
  --green-ink:      #062F25;  /* footer, headings wanting brand tint */
  --green-wash:     #E8F1ED;  /* table header fill, tinted surfaces */
  --green-pale:     #D8EDE4;  /* app --green-100: citation text on inverted bands */

  /* VERIFIED — citation affordances. app.py .cite / --accent-code exactly. */
  --verified:            #1F6B4A;              /* app --green-600 */
  --verified-wash:       rgba(31, 107, 74, .08);  /* app --accent-code-wash */
  /* app --accent-code-wash-strong. Kept as the mirror of the app's token even
     though the chip now sits above it — see --verified-wash-chip-open. */
  --verified-wash-strong: rgba(31, 107, 74, .20);
  /* The chip's own two fills. They sit ABOVE the app's wash pair on purpose:
     the chip has to out-mass everything else green inside the source panel,
     and the highlight it certifies sits directly under it (see .source__body
     mark, which is now an underline at .05 against the chip's .14/.24). */
  --verified-wash-chip:  rgba(31, 107, 74, .14);
  --verified-wash-chip-open: rgba(31, 107, 74, .24);

  /* UNVERIFIED — app's --note-warn-* set. Edition flags, superseded editions,
     the no-jurisdiction refusal, pasted source. NEVER form validation. */
  --unverified:      #8A5A2B;  /* app --amber-700 / --note-warn-fg */
  --unverified-wash: #FDF3E3;  /* app --amber-50  / --note-warn-bg */
  --unverified-line: #ECD9B8;  /* app --amber-200 / --note-warn-border */

  /* EMBER — the single brand accent, at most once per surface, never a UI
     action. Its one appearance on this page is the bookmark inside
     assets/logo-lockup.svg, which is identity and therefore exempt.

     There is deliberately NO --ember token. The colour exists only inside the
     logo SVGs. Declaring it here would put a loaded gun on the table: the one
     rule that cannot bend is that ember never marks a citation, and a token
     nobody may use is an invitation to use it. #D85A30 is recorded here in a
     comment so its absence reads as a decision rather than an oversight. */

  /* CLAY — the only failure colour. app.py --text-danger. */
  --fail:           #A23B2D;  /* app --clay-600 */
  --fail-line:      #D9C2BD;  /* app --clay-200 */

  /* Neutrals — green-tinted, never pure grey, never pure black. */
  --ink:            #12211C;
  --ink-muted:      #5A6B64;
  --ink-faint:      #8A9891;  /* 20px+ text and non-text decoration ONLY */
  --hairline:       #DDE3E0;
  --band:           #F4F6F5;
  --paper:          #FFFFFF;  /* the canvas stays white — see the header note */
  --paper-warm:     #FAF7F0;  /* source-document panel ONLY — DESIGN.md §3 */

  --font-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", "Consolas", monospace;

  --radius: 4px;
  --container: 1200px;

  /* The 68-character cap, re-measured for Archivo. `ch` is the width of "0",
     and Archivo's zero is proportionally wider against its lowercase than
     Plex Sans's was, so the same box yields FEWER rendered characters — the
     Plex-era 48ch token now lands around 61 characters. Re-measured across
     every prose element on the page after the typeface change, not guessed:
     51ch of box put one footer line at 69 characters, so the token is 50ch,
     which lands the worst line on the page at 67. */
  --measure: 50ch;

  /* The scrim that holds white text WCAG-compliant over an ambient plate on a
     deep-green band. At 0.90 even an all-white video frame leaves white body
     at 7.0:1 and 80%-white secondary copy at 5.2:1. */
  --band-scrim: rgba(9, 82, 63, 0.90);
}

/* ---------- Reset / base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

/* Links never fall back to the UA blue — a fourth hue is forbidden, and a
   failed asset must not be able to introduce one. */
a {
  color: var(--green);
  text-decoration-color: currentColor;
}

/* No animation anywhere by default. The hero demo, the ambient plates and the
   FAQ accordion (user-initiated, 400ms+) opt back in explicitly. */
* {
  transition: none;
}

/* Focus rings on every interactive element — never removed, only replaced. */
:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}
/* Only the inverted bands flip the ring. The footer is on the page canvas now,
   so it keeps the green ring every other light surface uses. */
.invert :focus-visible {
  outline-color: var(--paper);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--green-ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus-visible {
  left: 12px;
  top: 12px;
}

/* Text that only assistive tech reads. Used where a picture of a control
   carries information a sighted reader gets from the picture and a screen
   reader would otherwise lose — never to hide something from sighted
   readers that they ought to see. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

.section {
  padding-block: 96px;
}
.section--band {
  background: var(--band);
}

/* The two inversions. `isolation` + a positioned container keep the ambient
   plate strictly behind the content, never over it. */
.invert {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--green-deep);
  color: var(--paper);
}
.invert > .container {
  position: relative;
  z-index: 1;
}
.invert .section-lede,
.invert p {
  color: rgba(255, 255, 255, 0.8);
}
.invert h2,
.invert h3 {
  color: var(--paper);
}

/* The measure, applied at each element's own size. */
p,
li,
.prose {
  max-width: var(--measure);
}

/* ---------- Type scale — re-tuned for Archivo ----------
   Archivo carries a larger x-height and a narrower set width than Bricolage,
   so at equal px it reads bigger and denser. Display sizes step down slightly,
   line-heights open a fraction, and tracking tightens as size grows
   (DESIGN.md §4's one rule). */
h1,
h2,
h3,
.display,
.heading-lg,
.heading {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  text-wrap: balance;
}

/* DISPLAY — retuned for Archivo, which is what the face change never got.
   Bricolage's short descenders tolerated 1.02; Archivo's are long and its
   x-height is tall, so at 1.02 a descender cleared the next line's ascenders by
   about 4px. 1.10 puts that clearance at ~18px, which is where the reference
   sits. Tracking comes back from -0.032em (drawn for a wider face) to -0.02em.

   THE RAG. The headline is "Find your code reference in under 30 seconds".
   With `text-wrap: balance` and an 18ch cap it broke 392 / 315 / 475 — longest
   line LAST, with a 160px notch in the middle. Balance is removed and the
   column is sized so ordinary greedy wrapping produces the only two-line break
   the string allows:

       Find your code reference      <- longest
       in under 30 seconds           <- shortest

   The size is driven off the COPY COLUMN, not the viewport, via container
   query units, so the same ratio holds at every width: line 1 always renders at
   about 95% of the column and the rag always descends. 8.4cqw is measured, not
   guessed — "Find your code reference" sets at 0.0887 x font-size per px of
   column, so 8.4% leaves a 5% margin at every breakpoint from 360px up. */
.display {
  font-size: 44px; /* fallback for engines without container query units */
  font-size: clamp(27px, 8.4cqw, 52px);
  line-height: 1.10;
  letter-spacing: -0.02em;
  max-width: 20ch;
  text-wrap: wrap;
}
/* SECTION HEADING (h2). It used to run 42px/700 — the same weight as the
   display and only 1.16x its size, so a section heading and the page's one
   display line read as the same rank. It now steps down to the 32px slot AND
   loses a weight grade, so the display out-ranks it on both axes at every
   width the page is built for:

       1440   display 48.8/700  >  h2 32/600     1.52x + a weight step
       1280   display 48.8/700  >  h2 32/600     1.52x + a weight step
       1024   display 41.0/700  >  h2 26.6/600   1.54x + a weight step
        768   display 52.0/700  >  h2 26/600     2.00x + a weight step
        375   display 27.5/700  >  h2 22/600     1.25x + a weight step
        360   display 27.0/700  >  h2 22/600     1.23x + a weight step

   Measured in Chromium at each of those six widths, not derived.

   The display cannot be raised past ~51px without breaking its rag: "Find your
   code reference" sets at 11.28x its font-size and the copy column is 581px at
   the widest container, so 8.4cqw already spends 95% of the column on line one.
   The rank therefore comes from the h2 stepping DOWN, which is the half of the
   ratio that is actually free to move.

   The 2.6vw ramp exists because the display is sized off the COPY COLUMN, and
   that column narrows between 1280 and 1024 while the viewport does not. Fixing
   the h2 at 32px would have left 40.9 against 32 at 1024 — 1.28x. Tracking the
   viewport keeps the ratio above 1.5 across the whole two-column range. */
.heading-lg {
  font-size: clamp(26px, 2.6vw, 32px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.018em;
  max-width: 22ch;
}
/* A PAGE TITLE, not a section heading. privacy.html, terms.html and
   get-your-codes.html have no `.display` — their h1 is the biggest thing on the
   page and has to out-rank their own h2s, so it keeps the old 42/700 treatment
   while `.heading-lg` on an h2 steps down. 42 against the 26px h2 slot is
   1.62x plus a weight step. */
h1.heading-lg {
  font-size: clamp(34px, 3.6vw, 42px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 20ch;
}
/* The sub-heading slot under a section h2. It was 32px, which is where the h2
   now sits, so it steps down to 26 and keeps the ladder strictly descending. */
.heading {
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
}
.heading-sm {
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.muted {
  color: var(--ink-muted);
}

.eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}
.invert .eyebrow {
  color: rgba(255, 255, 255, 0.8);
}

.tnum {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

.clause {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

.section-head {
  margin-bottom: 56px;
}
.section-lede {
  margin-top: 16px;
  color: var(--ink-muted);
  font-size: 19px;
  line-height: 1.55;
  max-width: var(--measure);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}
.btn--primary {
  background: var(--green);
  color: var(--paper);
  border-color: var(--green);
}
.btn--primary:hover {
  background: var(--green-deep);
  border-color: var(--green-deep);
}
/* On green-deep sections the CTA is white-filled with green-deep text */
.btn--inverse {
  background: var(--paper);
  color: var(--green-deep);
  border-color: var(--paper);
}
.btn--inverse:hover {
  background: var(--green-wash);
  border-color: var(--green-wash);
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius);
  color: var(--ink);
  text-decoration: none;
}
.nav__logo img {
  height: 30px;
  width: auto;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin-left: auto;
}
.nav__links li {
  max-width: none;
}
.nav__links a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius);
}
.nav__links a:not(.btn):hover {
  color: var(--green);
}
.nav .btn {
  padding: 10px 18px;
  font-size: 15px;
}
/* Mobile menu button — hidden on desktop, the only way to the links below 860px */
.nav__toggle {
  display: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 11px 16px;
  cursor: pointer;
}
.nav__toggle:hover {
  border-color: var(--green);
  color: var(--green);
}

/* ---------- Hero ---------- */
.hero {
  padding-block: 72px 96px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  /* stretch, not start: the copy column takes the row's full height so its
     ambient plate can bottom out level with the demo frame. */
  align-items: stretch;
}
/* The copy column is the display type's container: `.display` is sized in cqw
   against THIS box, which is why the rag holds at every width. It is also a
   flex column, so the ambient plate can be pushed to its foot. */
.hero__copy {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
}
/* The hero CTA is a button, not a bar: it keeps its intrinsic width inside the
   flex column. */
.hero__copy > .btn {
  align-self: flex-start;
}
.hero__copy .display {
  margin-bottom: 20px;
}
/* The tagline is the hero's eyebrow. It inherits `.eyebrow` wholesale — 12px,
   600, 0.09em, uppercase, --green — so the hero head reads with exactly the
   same grammar as every other section head on the page. Only the space under it
   is local, because the display below it is much larger than a section h2.

   THE STACK IT REPLACES: display 48.8 → tagline 22/600 → sub 19/400 → CTA. Two
   of those four levels sat 3px apart and both read bold-ish, so the hero had no
   obvious second rank. The stack is now 12 → 48.8 → 19 → CTA: one dominant
   line, one brand mark, one lede, one action. */
.hero__tagline {
  margin-bottom: 14px;
}
/* The hero's only body-scale line, and now the only thing between the headline
   and the CTA. */
.hero__sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-muted);
  margin-bottom: 32px;
}

@media (min-width: 1024px) {
  .hero__grid {
    /* 53/47, up from 51/49. The copy column has to be wide enough to carry
       “Find your code reference” on one line at display size — that is the
       break that makes the rag descend — but every pixel taken off the demo
       comes back as demo height, so the shift is the smallest one that works. */
    grid-template-columns: minmax(0, 53fr) minmax(0, 47fr);
    gap: 56px;
  }
}

/* ---------- Ambient visuals (bar.md 21–24) ----------
   Exactly three on the page: the hero, and the two inverted bands. Each is
   slow, continuous, looped, muted, chrome-free, carries no text, and is
   subordinate — it never competes with the citation chip or a CTA.

   DEGRADATION LADDER, in order: video → poster still → flat fill. The wrapper
   always paints the flat fill itself, so a missing file yields a quiet plate,
   never a broken element or an empty box.

   REDUCED MOTION: there is no `autoplay` attribute anywhere. Playback is
   started by JS only when prefers-reduced-motion is `no-preference`, so under
   reduced motion — and with no JS at all — the poster still simply stands
   there. Nothing to pause, nothing to suppress.

   STACKING: every plate is pointer-events:none and sits at z-index 0 under a
   z-index 1 container, so it can never end up over the content. */
.ambient {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  pointer-events: none;
}
/* Taken out of flow deliberately: the wrapper's height is decided by the
   layout it sits in (flex in the hero, inset:0 on the bands), never by the
   clip's intrinsic aspect ratio. A video left in flow reports its own 16:9 box
   and quietly becomes the tallest thing in the hero column. */
.ambient video,
.ambient img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}
/* Every plate carries a scrim: it is what keeps the visual muted and
   subordinate, and on the inverted bands it is what keeps text compliant. */
.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* --- Hero plate: blank textured paper, raking light, one fold --------------
   ASSET CONTRACT: assets/ambient-hero.mp4 / .jpg is blank stock — texture,
   a raking light, a single fold. NO LINEWORK AND NO NUMERALS. The previous
   plate was a fabricated technical drawing carrying invented dimension
   callouts (2320, 22125, 13590), which is the wrong asset for a page whose
   thesis is that it never invents a number, and it had to be blurred to 6px
   until no digit resolved. With nothing to hide, the blur drops to 1px —
   enough to keep the plate soft and subordinate, light enough that the paper
   grain actually reads — and the 1.16 scale-up that hid the blur's soft edge
   is gone. The scrim comes down with the blur, from 0.34 to 0.30, because a
   grain that is only just legible does not need to be held down as hard.

   If the replacement asset has not landed, the plate will show the old
   drawing at 1px blur with its numerals legible. That is a ship blocker, not
   a rendering bug: confirm the file before launch.

   The filter is on the <video>, so the POSTER STILL gets exactly the same
   treatment and the reduced-motion state cannot look different.

   PLACEMENT: the plate lives inside the copy column (see .hero__copy) and is
   pushed to its foot, so the copy column bottoms out level with the demo. It
   is the base of the composition, not a band parked under it. */
.hero__ambient {
  /* Fills whatever the copy leaves, so the two hero columns end together. */
  flex: 1 1 auto;
  min-height: 132px;
  margin-top: 40px;
  width: 100%;
  border: 1px solid var(--hairline);
  background: var(--band); /* flat fill — the last rung of the ladder */
}
/* The plate is an open reference volume in raking light, so printed pages ARE
   in frame. Generated type is nonsense letterforms: at 3x magnification no word
   resolves, but it still reads as text-shaped. On a page whose whole claim is
   that it never invents anything, "no word is legible" is not a high enough
   bar — it has to read unambiguously as out-of-focus paper. Hence 3px, not the
   1px the blank-paper plate needed. Do not lower this without re-checking a
   magnified frame.

   IT IS A DUOTONE, NOT A PHOTOGRAPH — bar.md mech. 14.
   The clip's own stock is warm: sampled straight, its frames mean rgb(81,68,58)
   and its poster rgb(86,75,67) — red-dominant, which is a warm paper surface,
   and mech. 14 gives warm paper to the source-document panel and to nothing
   else. saturate(0.78) left that warmth intact and only the 0.30 scrim was
   holding it down, so any measurement taken of the plate's own pixels — a
   poster frame, a screenshot with the scrim not composited — read cream.

   grayscale(1) removes the warmth AT SOURCE rather than covering it. What
   remains is a neutral grey the scrim then tints green, so the plate is a green
   duotone by construction: there is no state, and no way of sampling it, in
   which it can come back warm. Measured after: source rgb(66,66,66), composited
   rgb(46,71,64) — blue above red, green dominant. Do not put saturation back. */
.hero__ambient video {
  filter: blur(3px) grayscale(1) brightness(0.95);
  transform: scale(1.06); /* hides the blur's soft edge at this radius */
}
.hero__ambient::after {
  background: rgba(9, 82, 63, 0.34);
}

/* Band plates — full-bleed behind an inverted section. */
.band-ambient {
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: 0;
  background: var(--green-deep); /* flat fill — the last rung of the ladder */
}
.band-ambient::after {
  background: var(--band-scrim);
}

/* --- Thesis plate: one ember ribbon curving over green bookcloth -----------
   ASSET CONTRACT: assets/ambient-thesis.mp4 / .jpg is a single ember satin
   ribbon travelling across deep-green bookcloth under a moving light. The
   previous plate was antique leather-bound books — a stock "knowledge = old
   tomes" trope, in the cream-and-leather register DESIGN.md §0 names as the
   trap, and an accidental irony on a band whose own amber system exists to
   flag superseded editions. It also crushed to luminance 0.032–0.104 against
   the band's own 0.066, so it made the brand green MUDDIER, not richer.

   The new treatment is built to enrich the green rather than dull it: the
   0.55 brightness crush is gone, saturation is pushed to 1.25 so the
   bookcloth's own green compounds with the band's, and the ribbon keeps its
   chroma. Only the highlight end is capped, and only as far as the text floor
   requires.

   MEASURED AS A WORST CASE, so the numbers hold for whatever frame the clip
   actually contains rather than only for the poster. Take the brightest
   pixel any source could have — pure white. brightness(0.66) then
   contrast(1.06) caps it at 171; composited under a 0.76 scrim over
   --green-deep, the band cannot get lighter than rgb(48, 103, 89), L = 0.111.
   Against that ceiling:
       white body copy      6.5:1
       80%-white secondary  4.9:1   (the tightest normal-size case here)
       white specimen chip  6.5:1   as a solid fill, and 11.3:1 inside the
                                    specimen card, see .invert .chip
   Every real frame is darker than that, so every real contrast is higher.

   Against the OLD treatment the highlight ceiling is unchanged, but the
   mid-tones come up ~27% (a mid-grey source pixel lands at 82 rather than 65)
   and saturation goes from 1.05 to 1.25 — which is the whole point: the plate
   now compounds with the band's green instead of laying grey over it.
   Re-measure against the delivered clip's brightest frame before launch. */
.band-ambient--thesis video {
  filter: brightness(0.66) contrast(1.06) saturate(1.25);
}
.band-ambient--thesis::after {
  background: rgba(9, 82, 63, 0.76);
}

/* --- Beta plate: green bookbinding cloth, light sweep, dust ---------------
   MEASURED (corrected): the brightest raw pixel in the clip is rgb(138,156,135),
   not the rgb(45,62,50) an earlier reading recorded. The light sweep crosses the
   frame from roughly t=1.6s to t=4.4s, so the peak is sustained, not a stray
   pixel. At a 0.55 scrim the composited background reached rgb(67,116,94) and
   put 80%-white secondary copy at 4.13:1 — under the 4.5:1 AA floor, and four
   normal-size elements in this band use that value (.eyebrow, .section-lede,
   .label__hint, .beta__privacy).
   AA needs 0.64 minimum (4.53:1); 0.66 is used for headroom at 4.66:1. */
.band-ambient--beta video {
  filter: saturate(1.05);
}
.band-ambient--beta::after {
  background: rgba(9, 82, 63, 0.66);
}

/* ---------- Hero demo (the signature) ---------- */
.demo {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.demo__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hairline);
}
.demo__bar-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.demo__bar-live {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted); /* --ink-faint is 20px+/decoration only */
  text-align: right;
}
/* The stage is sized by JS to the SETTLED height of the scene on screen, so the
   frame never holds a column of empty white while a scene reveals, and never
   carries slack under a settled source panel. Falls back to auto without JS. */
.demo__stage {
  display: grid;
  align-items: start;
  padding: 20px 20px 20px;
  overflow: hidden;
}
.demo__scene {
  grid-area: 1 / 1;
  visibility: hidden;
  opacity: 0;
}
.demo__scene.is-active {
  visibility: visible;
  opacity: 1;
}

.demo__label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted); /* was --ink-faint: ~2.8:1, fails at 11px */
  margin-bottom: 6px;
}
.demo__q {
  margin-bottom: 16px;
}
/* The question arrives as ONE reveal of 500ms, not as characters. No caret —
   a caret implies per-character timing. */
.demo__q-text {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  max-width: var(--measure);
  opacity: 0;
  transform: translateY(6px);
}
.demo__scene.is-asked .demo__q-text {
  opacity: 1;
  transform: none;
}

.demo__a {
  border-top: 1px solid var(--hairline);
  padding-top: 16px;
  opacity: 0;
  clip-path: inset(0 0 100% 0); /* reveals downward */
}
.demo__scene.is-answered .demo__a {
  opacity: 1;
  clip-path: inset(0 0 -8px 0);
}
/* Body size, on the §4 scale. It was 16px, which is not a size the scale has. */
.demo__a-text {
  font-size: 17px;
  line-height: 1.6;
  max-width: var(--measure);
}
.demo__nocite {
  margin-top: 12px;
  font-size: 13px; /* the §3 caption size */
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* UNVERIFIED flag — amber, matching the app's --note-warn-* set and the 3px
   amber left rule it puts on .pastecard. Truthful use only: a superseded
   edition, or no jurisdiction. The WORD carries the meaning as well as the
   amber, because green and amber are near-identical under deuteranopia. */
.flag {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--unverified-wash);
  border: 1px solid var(--unverified-line);
  border-left: 3px solid var(--unverified);
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink);
  max-width: var(--measure);
}
.flag__word {
  font-weight: 600;
  color: var(--unverified);
  white-space: nowrap;
}

/* ---------- Citation chip — VERIFIED, therefore GREEN ----------
   Shape is DESIGN.md §7 unchanged; the hue is app.py's .cite.

   THE CHIP HAS TO BE THE MOST DELIBERATE OBJECT IN THE PANEL, and it was not.
   At a 1px border and a 0.08/0.20 fill it was out-massed by the <mark> in the
   source panel directly beneath it: identical hue, identical 0.20 alpha, and
   370x37px of it against the chip's 178x25. The highlighter was beating the
   proof object at its own colour, inside the same frame. Three changes, all
   inside §7's shape rules (no lift, no scale, no shadow, 4px radius):
     · border 1px -> 2px, so the chip has an edge the eye catches
     · fill .08 -> .14 at rest, .20 -> .24 while open
     · the <mark> gives up its filled block entirely (see .source__body mark)
   Measured result: chip fill 4.8x the highlight's alpha and 2.7x its edge
   weight; the highlight carries no fill mass at all.

   AFFORDANCE (§7 permits no lift, no scale, no shadow): the clause number
   carries a dotted underline at rest, which is the one conventional
   "this opens something" signal that costs no depth and no motion. It goes
   solid on hover, focus and while the source is open. */
.chip {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  vertical-align: baseline;
  background: var(--verified-wash-chip);
  border: 2px solid var(--verified);
  border-radius: var(--radius);
  padding: 3px 8px;
  margin-left: 2px;
  cursor: pointer;
  font-family: var(--font-body);
}
.chip__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  color: var(--verified);
  text-decoration: underline dotted currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.chip__meta {
  font-size: 11px;
  line-height: 1.4;
  color: var(--ink-muted);
  white-space: nowrap;
}
.chip:hover,
.chip.is-open {
  border-color: var(--verified);
  background: var(--verified-wash-chip-open);
}
.chip:hover .chip__num,
.chip:focus-visible .chip__num,
.chip.is-open .chip__num {
  text-decoration-style: solid;
}
.chip:focus-visible {
  outline: 2px solid var(--verified);
  outline-offset: 2px;
}

/* The chip on an inverted band — INVERTED, not tinted.
   It used to be a 0.14 wash of pale mint inside a 0.55 mint border, with
   #D8EDE4 text. Measured against the composited band that put the chip number
   at 10.1:1 while the .specimen__text it certifies sat at 12.2:1 — the proof
   was dimmer than the prose it was proving, in the one place on the page where
   the whole argument lands. So the chip becomes a solid plate:

       chip fill     #FFFFFF solid, against the specimen card's own composited
                     fill (L 0.043 worst case)   ->  11.3:1, and it is a filled
                     mass rather than a hairline outline
       chip number   --green-ink #062F25 on that fill  ->  14.6:1
       chip meta     --ink-muted on that fill           ->   5.6:1
       .specimen__text  white on the card fill          ->  11.3:1

   The chip now out-contrasts the sentence on both counts instead of losing to
   it. Green is still the meaning — the number is set in the darkest green on
   the ramp, and the fill is the same white the band already uses for type —
   so bar.md #1 is untouched. */
.invert .chip {
  background: var(--paper);
  border-color: var(--paper);
}
.invert .chip__num {
  color: var(--green-ink);
}
.invert .chip__meta {
  color: var(--ink-muted);
}
.invert .chip:hover,
.invert .chip.is-open {
  background: var(--green-pale);
  border-color: var(--green-pale);
}
.invert .chip:focus-visible {
  outline-color: var(--paper);
}

/* ---------- Source-document panel ----------
   The ONLY warm-paper surface on the page (DESIGN.md §3). Its 3px left rule is
   GREEN: this is a verified corpus source. A pasted or unverified source would
   take the amber left rule instead — that distinction is the product's actual
   semantics, not decoration. */
.source {
  margin-top: 16px;
  background: var(--paper-warm);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--verified);
  border-radius: var(--radius);
  padding: 16px 20px;
  opacity: 0;
  transform: translateX(32px); /* slides in from the right */
  visibility: hidden;
}
.demo__scene.is-sourced .source {
  opacity: 1;
  transform: translateX(0);
  visibility: visible;
}
.source__meta {
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: 8px;
  max-width: var(--measure);
}
.source__path {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  color: var(--ink);
  margin-bottom: 8px;
}
/* §3 specifies 13px for the panel's text. It was 14px. */
.source__body {
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink);
  max-width: var(--measure);
}
/* The highlight is SUBORDINATE to the chip, deliberately. It used to be a
   filled block in exactly the chip's colour at exactly the chip's alpha, and
   at 370x37px against 178x25px it out-massed the object it was supposed to
   support. It is now an underline plus a 0.05 breath of the same green: the
   passage still reads as the cited one, but there is no second filled green
   object anywhere in the panel. Nothing else about the panel changes. */
.source__body mark {
  background: rgba(31, 107, 74, .05);
  color: inherit;
  padding: 1px 3px;
  border-radius: var(--radius);
  text-decoration: underline;
  text-decoration-color: rgba(31, 107, 74, .55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.source__note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.5;
  color: var(--ink-muted); /* was --ink-faint: ~2.8:1, fails at 11px */
  max-width: var(--measure);
}

/* Motion — nothing under 400ms */
@media (prefers-reduced-motion: no-preference) {
  .demo__stage {
    transition: height 500ms ease;
  }
  .demo__scene {
    transition: opacity 500ms ease, visibility 0s linear 500ms;
  }
  .demo__scene.is-active {
    transition: opacity 500ms ease, visibility 0s;
  }
  .demo__q-text {
    transition: opacity 500ms ease, transform 500ms ease;
  }
  .demo__a {
    transition: clip-path 600ms ease, opacity 600ms ease;
  }
  .source {
    transition: opacity 500ms ease, transform 500ms ease, visibility 0s linear 500ms;
  }
  .demo__scene.is-sourced .source {
    transition: opacity 500ms ease, transform 500ms ease, visibility 0s;
  }
}
/* While the machine measures each scene's settled height, nothing may move. */
.demo.is-measuring .demo__stage,
.demo.is-measuring .demo__scene,
.demo.is-measuring .demo__q-text,
.demo.is-measuring .demo__a,
.demo.is-measuring .source {
  transition: none !important;
}

/* Reduced motion: scene 1 rendered static and complete, panel open (JS
   also bails; these rules make the no-JS/reduced state legible on its own) */
@media (prefers-reduced-motion: reduce) {
  .demo__scene--static {
    visibility: visible;
    opacity: 1;
  }
  .demo__scene--static .demo__q-text {
    opacity: 1;
    transform: none;
  }
  .demo__scene--static .demo__a {
    opacity: 1;
    clip-path: none;
  }
  .demo__scene--static .source {
    opacity: 1;
    transform: none;
    visibility: visible;
  }
  .demo__bar-live {
    visibility: hidden;
  }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.step {
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 32px;
}
.step__num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--green);
  display: block;
  margin-bottom: 16px;
}
.step h3 {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-bottom: 10px;
}
.step p {
  color: var(--ink-muted);
  font-size: 15px;
  line-height: 1.55;
}

/* The refusal card. Amber left rule: this is the surface that says "the code
   isn't in your library" — the page's own unverified state, and the same
   semantic the app gives its pastecard. Two columns so the card uses its width
   honestly instead of leaving the right half of a 1200px container empty. */
.refusal {
  margin-top: 32px;
  border: 1px solid var(--unverified-line);
  border-left: 3px solid var(--unverified);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 28px 32px;
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr);
  gap: 32px;
  align-items: baseline;
}
.refusal__label {
  font-size: 17px;
  font-weight: 600;
  color: var(--unverified);
  max-width: 24ch;
}
.refusal__body p {
  font-size: 19px;
  line-height: 1.55;
  max-width: var(--measure);
}
.refusal strong {
  font-weight: 600;
  color: var(--green-ink);
}

/* ---------- Why citations (inversion #1) ---------- */
.thesis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 48px;
}
.thesis__block h3 {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.18;
  margin-bottom: 12px;
}
.thesis__block p {
  font-size: 17px;
  line-height: 1.6;
}

/* The specimen — the culminating idea. Eyebrow, a full line of air, then the
   sentence at answer size inside a bounded card so the chip reads as a
   specimen rather than as another line of the same paragraph. */
.specimen {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.specimen__eyebrow {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8); /* §6 fixes inverted secondary at 0.8 */
  margin-bottom: 16px;
}
/* The card was three grades of low-opacity white and no fill at all — a ghost
   outline with no material of its own, holding the page's most important
   object. It now has a real surface: a deeper green than the band, so the
   specimen sits IN something rather than floating over it. The recess also
   does work for the chip, dropping the local background to L 0.043 worst case
   and putting the white chip plate at 11.3:1 against its immediate surround. */
/* The border is the inverted hairline token — DESIGN.md §6 fixes it at
   rgba(255,255,255,.18) and it is the value every other rule on an inverted
   surface uses. It was rgba(216,237,228,.32), a one-off tinted white at nearly
   twice the opacity: the only hairline on the page that answered to nothing. */
.specimen__card {
  background: rgba(6, 47, 37, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 32px;
}
.invert .specimen__text {
  font-size: 19px;
  line-height: 1.55;
  color: var(--paper);
  max-width: var(--measure);
}
.specimen__after {
  font-size: 15px;
  line-height: 1.55;
  max-width: var(--measure);
}
.specimen .chip {
  cursor: pointer;
}

/* ---------- Jurisdictions: the Code library still ----------
   A framed still of the app's own #libraryView. DESIGN.md §5: product UI is
   framed, not staged — 1px hairline, 4px radius, no browser chrome, no device
   mockup, no tilt, no shadow, no gradient glow.

   Everything inside runs at UI scale (11–14px) rather than page-prose scale.
   That size difference is what tells a reader this is a picture of software
   and not another block of the page's own copy, and it is the same move the
   hero demo frame already makes. */
.libmock {
  margin: 0 0 48px;
}
.libmock__frame {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.libmock__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--hairline);
}
.libmock__bar-title {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.01em;
}
.libmock__bar-note {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.libmock__body {
  padding: 24px;
}
.libmock__head h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 6px;
}
.libmock__head p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-muted);
  /* The page's prose measure is 50ch; this holds the same rhythm at UI size
     rather than running to the app's own wider column. */
  max-width: 52ch;
  margin: 0 0 20px;
}

/* The upload affordance. It is the point of the whole still, so it is the one
   thing inside the frame that gets a surface of its own. */
.libmock__add {
  background: var(--band);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
}
.libmock__add h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 12px;
}
.libmock__fields,
.libmock__jur,
.libmock__tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.libmock__jur {
  margin-top: 8px;
}
.libmock__tools {
  margin-bottom: 10px;
}
.libmock__tools--2 {
  gap: 16px;
  margin-bottom: 14px;
}

/* Pictures of controls — spans, not inputs, so nothing here can be typed in,
   tabbed to, or submitted. They carry aria-hidden in the markup. */
.mockfield,
.mocksel,
.mockfile {
  font-size: 13px;
  line-height: 1.4;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
  padding: 8px 10px;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mockfield--name { flex: 1 1 260px; min-width: 0; }
.mockfield--year { flex: 0 1 120px; min-width: 0; }
.mockfield--search { flex: 1 1 240px; min-width: 0; }
.mocksel {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.mocksel::after {
  content: "\25BE";
  color: var(--ink-muted);
  font-size: 11px;
}
.mockfile {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  /* Height is pinned rather than padded so it lands on the same 36px baseline
     as the fields either side of it; the inner button is shorter than the
     text those fields carry. */
  min-height: 36px;
  padding: 0 10px 0 5px;
  min-width: 0;
}
.mockfile__btn {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--band);
  color: var(--ink);
  padding: 3px 9px;
  font-size: 12px;
  flex: 0 0 auto;
}
.mockfile__name {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.mockbtn {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  background: var(--green);
  color: var(--paper);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 8px 14px;
  white-space: nowrap;
}
.mocktog {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-muted);
}
.mocktog__box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  background: var(--green);
  color: var(--paper);
  font-size: 10px;
  line-height: 1;
}
.mocklink {
  font-size: 12px;
  color: var(--ink-muted);
}
.libmock__count {
  font-size: 12px;
  color: var(--ink-muted);
  margin: 0 0 8px;
}

.libmock__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.libmock__table th[scope="col"] {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0 10px 7px;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.libmock__table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  vertical-align: middle;
  line-height: 1.35;
}
.libmock__table .mono {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  white-space: nowrap;
}
/* Group headers: the app groups by jurisdiction by default, so the still does
   too, or the toggle above it would be showing a state the table contradicts. */
.libmock__group th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--green-ink);
  background: var(--green-wash);
  padding: 6px 10px;
  border-bottom: 1px solid var(--hairline);
}
.libmock__gcount {
  font-weight: 400;
  letter-spacing: 0;
  color: var(--ink-muted);
}
.libmock__gcount::before { content: "\00b7\00a0"; }
.jbadge {
  display: inline-block;
  font-size: 12px;
  color: var(--ink-muted);
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1px 8px;
  white-space: nowrap;
}
/* Ready is the app's own green — verified, indexed, citable. Anything short of
   ready is neutral, never amber: a file still being indexed is not a judgment
   call, it is just not finished. Amber on this page means “look closer”. */
.libst {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  white-space: nowrap;
}
.libst--ready {
  color: var(--verified);
}
.libmock figcaption {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: var(--measure);
}


/* ---------- Trust ---------- */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.trust__block {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
}
.trust__block h3 {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 600;
  letter-spacing: -0.012em;
  margin-bottom: 10px;
}
.trust__block p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* ---------- Pricing ---------- */
.tiers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  align-items: stretch;
}
.tier {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.tier--featured {
  border-color: var(--green);
}
.tier__head {
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--hairline);
}
.tier--featured .tier__head {
  background: var(--green-wash);
}
.tier__name {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 600;
  letter-spacing: -0.012em;
}
.tier__for {
  font-size: 13px;
  color: var(--ink-muted);
  margin-top: 2px;
  max-width: var(--measure);
}
.tier__body {
  padding: 24px 32px 32px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 20px;
}
/* The 32px slot: Archivo 600, -0.018em — same as .heading, and it steps to
   25px on mobile with the rest of that slot. */
.tier__price {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  max-width: 16ch;
}
.tier__price small {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  color: var(--ink-muted);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}
.tier ul {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 15px;
  color: var(--ink);
}
.tier li {
  padding-left: 22px;
  position: relative;
}
.tier li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.tier .btn {
  margin-top: auto;
  justify-content: center;
}
.tier .btn--secondary {
  background: var(--paper);
  color: var(--green);
  border: 1px solid var(--green);
}
.tier .btn--secondary:hover {
  background: var(--green-wash);
}
/* Every plan gets every feature, so the features live once, here, rather
   than in three lists that would invite someone to make them differ. Hairline
   panel, same check-mark list as the tiers, no colour of its own. */
.tiers__includes {
  margin-top: 24px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 32px;
}
.tiers__includes-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.tiers__includes ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 32px;
  font-size: 15px;
  color: var(--ink);
}
.tiers__includes li {
  padding-left: 22px;
  position: relative;
  max-width: 46ch;
}
.tiers__includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
@media (max-width: 700px) {
  .tiers__includes { padding: 20px; }
}
.pricing__note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* ---------- FAQ ---------- */
/* Two columns: the head and its counterweight on the left, the questions on the
   right. The rules align to the column, not to nothing. */
/* Two columns: the head and its counterweight on the left, the questions on the
   right.

   THE COLUMN IS ANCHORED AT BOTH ENDS. Sticky positioning did not solve the
   imbalance it was added for: the aside rendered 340px tall in a 512px row, so
   172px of the column carried nothing, and a sticky box inside a 340px grid
   area has no travel to move through — it never actually stuck. The aside now
   stretches to the row height and pushes its ledger to the foot with
   `margin-top:auto`, so the head sits on the accordion's first hairline and the
   ledger's last rule lands on the accordion's last one. The void in the middle
   is intentional whitespace between two anchored masses rather than a column
   that ran out.

   The ledger rows are the counterweight: three hairline rows at the same rhythm
   as the accordion's own, running the full width of the column. */
.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 64px;
  align-items: stretch;
}
.faq-layout__aside {
  display: flex;
  flex-direction: column;
}
.faq-layout__aside .section-head {
  margin-bottom: 24px;
}
.faq-layout__aside .faq__ledger {
  margin-top: auto;
  padding-top: 32px;
}
.faq__counter {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: var(--measure);
}
.faq__ledger {
  margin-top: 32px;
}
.faq__ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  line-height: 1.5;
}
.faq__ledger-row:last-child {
  border-bottom: 1px solid var(--hairline);
}
.faq__ledger dt {
  color: var(--ink-muted);
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-size: 12px;
  flex: none;
}
.faq__ledger dd {
  color: var(--ink);
  text-align: right;
}
.faq__ledger .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  color: var(--green);
}
.faq__ledger a {
  text-decoration: underline;
  text-underline-offset: 3px;
  border-radius: var(--radius);
}
.faq details {
  border-top: 1px solid var(--hairline);
}
.faq details:last-child {
  border-bottom: 1px solid var(--hairline);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 4px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -0.012em;
  border-radius: var(--radius);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--green);
  flex: none;
}
.faq details[open] summary::after {
  content: "\2212";
}
.faq .faq__body {
  overflow: hidden;
}
/* Body size, on the §4 scale. It was 16px, which the scale does not contain. */
.faq .faq__body p {
  padding: 0 4px 24px;
  color: var(--ink-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: var(--measure);
}

/* ---------- Beta CTA (inversion #2) ---------- */
.beta__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
/* The two stacked inputs used to be 332px and 320px, both starting at x=714,
   so their right edges missed each other by 12px in the page's primary
   conversion form: the email field was `flex: 1 1 260px` inside a flex row
   with the button, and the jurisdiction field was a flat `max-width: 320px`
   that had no way of knowing what the first one resolved to.

   One grid now owns the whole form. Column 1 is the field column, column 2 is
   the button; `.field-row` becomes `display: contents` so its children join
   the form's grid instead of forming a track of their own. Both inputs are
   placed in column 1, so they are the same width by construction, not by
   coincidence — at any container width, in any font. */
.beta form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
}
.beta .field-row {
  display: contents;
}
.beta label,
.beta .form-msg,
.beta__privacy {
  grid-column: 1 / -1;
}
.beta input[type="email"],
.beta input[type="text"] {
  grid-column: 1;
}
.beta .field-row .btn {
  grid-column: 2;
}
.beta label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 8px;
}
.beta .label--optional {
  margin-top: 20px;
}
.beta .label__hint {
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
}
.beta input[type="email"],
.beta input[type="text"] {
  min-width: 0;
  width: 100%;
  font-family: var(--font-body);
  font-size: 17px;
  padding: 13px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.beta input::placeholder {
  color: var(--ink-muted);
}
/* Form errors are CLAY — the page's only failure colour. Amber is reserved for
   product judgment (an edition mismatch, a superseded code, a missing
   jurisdiction) and a typo in an email address is none of those.
   The clay ring sits on the white field, where clay reads at 6.6:1. The
   sentence itself stays white: clay text on green-deep would be ~1.4:1, so the
   band gets a clay RULE (non-text, 3:1 is the bar) and a ⚠ instead. */
.beta input[aria-invalid="true"] {
  border: 2px solid var(--fail);
}
.form-msg {
  display: none;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.5;
  max-width: var(--measure);
}
.form-msg.is-error {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-left: 12px;
  border-left: 3px solid var(--fail-line);
  color: #ffffff;
  font-weight: 600;
}
.form-msg.is-error::before {
  content: "\26A0";
  flex: none;
}
.form-msg a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form-msg.is-ok {
  display: block;
  color: #ffffff;
  font-weight: 600;
}
.form-msg.is-working {
  display: block;
  color: rgba(255, 255, 255, 0.8);
}
.beta__privacy {
  margin-top: 16px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
  max-width: var(--measure);
}
.beta__privacy a {
  color: #ffffff;
}

/* ---------- Footer ----------
   THE FOOTER IS ON WHITE, AND THIS IS THE POINT OF IT.

   It used to be --green-ink, sitting flush under the --green-deep beta band
   with about a 10px seam between them. Measured: 793px of unbroken green at the
   foot of the page. bar.md 13 allows exactly two full-bleed deep-green
   inversions and the footer is not one of them — but a 793px green mass reads
   as a third, and worse, it stops the beta band reading as a BAND at all. The
   page just turns green and stays green.

   Returning the footer to the page canvas restores the closing inversion: the
   beta band now has white above it and white below it, so it reads as the
   bracket it is. The green hairline on top is the only mark of the join. */
.footer {
  background: var(--paper);
  color: var(--ink-muted);
  border-top: 1px solid var(--green);
  padding-block: 64px 48px;
}
.footer__lockup {
  display: flex;
  justify-content: center; /* the one permitted centred element */
  margin-bottom: 48px;
}
.footer__lockup img {
  height: 40px;
  width: auto;
}
.footer__contact {
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  margin-bottom: 24px;
  font-size: 15px;
  line-height: 1.55;
  /* Tighter than --measure on purpose: this line carries an email address, and
     the narrow glyphs in "hello@cinchcodes.ca" fit ~4 more characters into the
     same box than ordinary prose does. Measured at 70 characters on --measure,
     66 here. The cap is on rendered characters, not on the token. */
  max-width: 46ch;
}
.footer__contact a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer__row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--hairline);
  padding-top: 24px;
  font-size: 13px;
}
.footer__row p {
  max-width: none;
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  list-style: none;
}
.footer__links li {
  max-width: none;
}
.footer a {
  color: var(--green);
  text-decoration: none;
  border-radius: var(--radius);
}
.footer a:hover {
  color: var(--green-deep);
}

/* ---------- Legal pages (privacy.html, terms.html) ----------
   Same stylesheet, same grammar. A single measure-bounded column. */
.legal {
  padding-block: 64px 96px;
}
.legal__lede {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: var(--measure);
}
.legal__meta {
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink-muted);
  max-width: var(--measure);
}
.legal h2 {
  font-size: clamp(19px, 2.1vw, 26px);
  font-weight: 600;
  line-height: 1.18;
  letter-spacing: -0.018em;
  margin-top: 56px;
  margin-bottom: 16px;
  max-width: 24ch;
}
.legal h3 {
  font-family: var(--font-body);
  font-size: clamp(18px, 1.9vw, 22px);
  font-weight: 600;
  line-height: 1.32;
  letter-spacing: -0.012em;
  margin-top: 32px;
  margin-bottom: 10px;
}
/* Tighter than --measure: the 68-character cap is on RENDERED characters, and
   legal prose runs to more narrow letters per line than the marketing copy the
   token was tuned against — 50ch put three lines here at 70–71. Measured, not
   assumed; 47ch lands the worst line on both legal pages at 66. */
.legal p,
.legal li {
  max-width: 47ch;
}
.legal p {
  margin-bottom: 16px;
}
.legal ul {
  list-style: none;
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}
.legal li {
  padding-left: 22px;
  position: relative;
}
.legal li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 1px;
  background: var(--green);
}
.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Anything legal has not signed off on is marked, never invented. Amber is the
   correct hue for it: this is the page's own unverified material. */
.tbc {
  display: inline-block;
  background: var(--unverified-wash);
  border: 1px solid var(--unverified-line);
  border-radius: var(--radius);
  padding: 1px 6px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--unverified);
}
.legal__back {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .beta__grid,
  .faq-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  /* Stacked: the aside sits above the questions, so there is no row height to
     stretch to and nothing to bottom-align against. The ledger returns to
     ordinary flow directly under the counter line. */
  .faq-layout__aside .faq__ledger {
    margin-top: 32px;
    padding-top: 0;
  }
}

@media (max-width: 860px) {
  .section {
    padding-block: 56px;
  }
  /* .display is NOT stepped here. Its size is driven off the copy column in
     cqw, which already scales it continuously from 360px up and keeps the
     two-line descending rag at every width. A fixed mobile size would break
     that — it is what produced the 216 / 173 / 261 rag at 375px. */
  /* The heading ladder below the display COMPRESSES WITH IT rather than sitting
     at fixed sizes. It has to: `.display` is driven off the copy column, and at
     375px "Find your code reference" only fits on one line at about 27px — a
     hero headline smaller than every section heading is a worse fault than a
     small hero headline. Below 860px the hero stacks, so the copy column
     becomes the full page width and the display jumps to its 52px cap, which
     is why the h2 needs a mobile ramp of its own rather than the 2.6vw one:

         360px   display 27.0/700 > h2 22/600 > 19 > 18 > body 17
         375px   display 27.5/700 > h2 22/600 > 19 > 18 > body 17
         480px   display 36.3/700 > h2 26/600 > 19 > 18 > body 17
         768px   display 52.0/700 > h2 26/600 > 19 > 18 > body 17
         860px   display 52.0/700 > h2 26/600 > 19 > 18 > body 17

     The h2 cap here (26) is the desktop rule's floor, so the two regimes meet
     at 860/861 with no step. The 26px and 22px slots need no mobile override
     at all — their own clamps already floor at 19 and 18. */
  .heading-lg {
    font-size: clamp(22px, 5.6vw, 26px);
  }
  /* The page-title h1 on the legal and codes pages keeps its own ramp; it has
     no `.display` above it to out-rank it. */
  h1.heading-lg {
    font-size: clamp(26px, 6.4vw, 34px);
  }
  .faq summary {
    font-size: clamp(17px, 4.4vw, 19px);
  }
  .hero {
    padding-block: 32px 48px;
  }
  .hero__grid {
    gap: 32px;
  }
  .hero__copy .display {
    margin-bottom: 12px;
  }
  .hero__tagline {
    margin-bottom: 10px;
  }
  .hero__sub {
    font-size: 17px;
    margin-bottom: 24px;
  }
  /* Stacked hero: the plate is REMOVED, not resized.

     It exists to make the desktop copy column bottom out level with the demo —
     a composition problem that does not exist once the hero stacks. On a phone
     it was taking a 140px band between the CTA and the demo and pushing the
     citation chip to y=871 in an 812px viewport: the single thing that has to
     land in the first ten seconds, shoved below the fold by decoration.

     Measured before: chip 871–915. After: see the rule below. The plate is
     aria-hidden ornament, so removing it costs a phone visitor nothing. */
  .hero__ambient {
    display: none;
  }
  .steps,
  .thesis,
  .trust,
  .tiers {
    grid-template-columns: 1fr;
  }
  .thesis {
    gap: 32px;
  }
  .refusal,
  .specimen {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .specimen {
    gap: 24px;
  }
  .refusal__body p {
    font-size: 17px;
  }
  /* The links move into a panel the toggle opens — never simply hidden. */
  .nav__toggle {
    display: inline-flex;
  }
  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 4px 24px 20px;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
  }
  .nav__links.is-open {
    display: flex;
  }
  .nav__links li {
    border-top: 1px solid var(--hairline);
  }
  .nav__links a:not(.btn) {
    display: block;
    padding: 14px 0;
    font-size: 17px;
  }
  .nav__cta {
    border-top: 0;
    padding-top: 16px;
  }
  .nav__cta .btn {
    justify-content: center;
    width: 100%;
  }
  .step,
  .refusal,
  .tier__head,
  .tier__body {
    padding: 20px;
  }
  .specimen__card {
    padding: 20px;
  }
  .demo__stage {
    padding: 16px;
  }
  .source {
    padding: 14px 16px;
  }
}

/* ---------- The Code library still at phone width ----------
   Five columns do not fit 360px, and a horizontally-scrolling panel inside a
   page that never scrolls sideways anywhere else would be the only one of its
   kind. Each row becomes a card, code name first, status right under it.
   Nothing scrolls, and nothing is dropped.

   The card layout below is why index.html writes role="table" / "rowgroup" /
   "row" / "columnheader" / "rowheader" / "cell" onto this table by hand:
   display:block and display:grid strip the implicit table roles in Chromium,
   and the figure would reach a screen reader at phone width as a pile of
   generic boxes. The stale block that used to stand here claimed those roles
   for a different table that no longer exists on this page; it was removed
   rather than corrected. */
@media (max-width: 700px) {
  .libmock__body {
    padding: 16px;
  }
  .libmock__table {
    display: block;
  }
  .libmock__table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .libmock__table tbody {
    display: grid;
    gap: 10px;
  }
  /* Two columns, three rows — not five stacked blocks. Stacking every cell put
     each card at 194px and the still ran to 1900px on a phone; paired left and
     right it lands near 120px and the whole library is still one glance. */
  .libmock__table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 12px;
  }
  /* The group header keeps its band and stays a single full-width strip. */
  .libmock__table tr.libmock__group {
    display: block;
    border: 0;
    padding: 0;
    margin-top: 6px;
  }
  .libmock__table tbody > tr:first-child.libmock__group {
    margin-top: 0;
  }
  .libmock__table td {
    display: block;
    border-bottom: 0;
    padding: 0;
    max-width: 100%;
  }
  .libmock__table td:nth-child(1) {          /* Code */
    grid-area: 1 / 1 / 2 / 3;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
  }
  .libmock__table td:nth-child(4) {          /* Status */
    grid-area: 2 / 1 / 3 / 2;
  }
  .libmock__table td:nth-child(3) {          /* Jurisdiction */
    grid-area: 2 / 2 / 3 / 3;
    justify-self: end;
  }
  .libmock__table td:nth-child(2) {          /* Edition */
    grid-area: 3 / 1 / 4 / 2;
  }
  .libmock__table td:nth-child(5) {          /* Added */
    grid-area: 3 / 2 / 4 / 3;
    justify-self: end;
    text-align: right;
  }
  /* Status and code name are self-describing; the other three cells are bare
     values that need their column header back. The jurisdiction badge already
     says the province in words, so it takes no eyebrow. */
  .libmock__table td:nth-child(2)::before,
  .libmock__table td:nth-child(5)::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 2px;
  }
  /* The pictured controls stop competing for a single row and stack. */
  .mockfield--name,
  .mockfield--year,
  .mockfield--search,
  .mockfile,
  .mockbtn {
    flex: 1 1 100%;
    min-width: 0;
  }
  .mockbtn {
    text-align: center;
  }
}

/* ---------- Touch targets ----------
   The chip is the page's signature control and at phone width it was 25px
   tall — well under the 44px minimum. It grows by PADDING and MIN-HEIGHT
   only: same 4px radius, same 2px border, same colours, no lift, no scale,
   no shadow, so DESIGN.md §7's shape survives intact. Centring replaces
   baseline alignment because a 44px box no longer sits on the text baseline
   in any useful way. */
@media (max-width: 700px), (pointer: coarse) {
  .chip {
    min-height: 44px;
    padding: 8px 10px;
    align-items: center;
  }
}

/* The button leaves the field's row rather than crushing it. Both inputs stay
   in the same single column, so they stay exactly the same width. */
@media (max-width: 560px) {
  .beta form {
    grid-template-columns: minmax(0, 1fr);
  }
  .beta .field-row .btn {
    grid-column: 1;
    justify-content: center;
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  /* The status label is load-bearing (it explains the hold); the decorative
     window title is not, so it yields the width. */
  .demo__bar-title {
    display: none;
  }
}

/* The 420px step-down the tagline used to need is gone with the tagline's own
   22px size: it renders at eyebrow scale now and needs no breakpoint. */


/* ==========================================================================
   GET YOUR CODES — get-your-codes.html

   A directory of OUTBOUND links to publishers. CINCH hosts no codes, so this
   page has no download of its own and nothing here may ever style one.

   STATUS VOCABULARY — four states. ONE of them is coloured.

     .status--free        NEUTRAL --ink. The word carries it.
     .status--paid        NEUTRAL --ink-muted. The word carries it.
     .status--unknown     NEUTRAL --ink-muted. The word carries it.
     .status--restricted  --unverified amber, ▲ glyph AND the words. The only
                          coloured status on the page.

   WHY FREE IS NOT GREEN ANY MORE. #1F6B4A is --verified, and the entire
   discipline attached to that token — in the app, on the landing page, in the
   demo — is that green means source-backed, cited, verified. On this page it
   was being spent on the word "Free", meaning no fee. Two unrelated meanings
   wearing one colour, on a site whose whole argument is that colour carries
   meaning. Money is not provenance. Free is now plain ink and the word does the
   work, which also leaves amber as the single coloured signal here — so the one
   state a reader must not skim past is the only one that is not neutral.

   Ember is not referenced here, as everywhere else in this file.

   MEASURE: prose caps at 46ch, not the 50ch --measure token, for the same
   reason the legal pages drop to 47ch — this copy runs to narrower letters
   per line than the marketing voice the token was tuned against, so 50ch
   overshoots. `ch` resolves at each element's own font-size, so one number
   holds the 68-character cap at 13px and at 19px alike.

   Measured, not assumed: at 47ch — the legal pages' value — the worst line
   here was the Vancouver carve-out note at 67 rendered characters, which
   passes with one character to spare and no more. 46ch lands it at 65.
   ========================================================================== */

.codes {
  padding-block: 64px 96px;
}
/* THE RAG. "Where to get your code PDFs" rendered "Where to get" (240px) over
   "your code PDFs" (302px): a 26% step UP, and a break that cut the sentence
   between the verb and its object. `text-wrap: balance` was doing it — balance
   optimises for equal line lengths and has no opinion about which line ought to
   be the longer one. Balance comes off and the box is capped instead, so
   ordinary greedy wrapping produces the only descending break the string
   allows:

       Where to get your      <- 343px at 42px
       code PDFs              <- 209px

   16ch sits above "Where to get your" and below "Where to get your code" at
   every size this h1 renders at, from 26px on a 360px phone to 42px at 1280.
   Same fix, and the same reasoning, as the index headline. */
.codes h1 {
  max-width: 16ch;
  text-wrap: wrap;
}
.codes__lede {
  margin-top: 16px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 46ch;
}
.codes__intro {
  margin-top: 32px;
}
.codes__intro p {
  max-width: 46ch;
  margin-bottom: 16px;
}
.codes__intro p:last-child {
  margin-bottom: 0;
}
.codes__intro strong {
  font-weight: 600;
  color: var(--green-ink);
}
.codes__checked {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: 46ch;
}

/* ---------- The status key ----------
   Stated once, up front, so the two badges in the tables never have to be
   guessed at. Same tonal ladder as the rest of the site: --band on --paper,
   hairline, 4px, no shadow. */
.keycard {
  margin-top: 32px;
  background: var(--band);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 20px 24px;
  max-width: 760px;
}
.keycard__title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 14px;
  max-width: none;
}
.keylist {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
}
.keylist > li {
  max-width: none;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: 6px 20px;
  align-items: baseline;
}
.keylist__def {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 46ch;
}

/* ---------- Status badges ---------- */
.status {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  justify-self: start;
}
/* Free — plain ink. Not --verified green: see the note at the top of this
   section. "No fee" and "source-backed" are different claims and must not
   share a colour. */
.status--free {
  color: var(--ink);
  white-space: nowrap;
}
/* Paid — the same neutral, one grade quieter. A price is a fact about the
   publisher, not a warning, so it gets no colour and no glyph. */
.status--paid {
  color: var(--ink-muted);
  white-space: nowrap;
}
/* No verified source. An absence, stated. It is deliberately NOT amber: amber
   means "look closer before you rely on this", and there is nothing here to
   look closer at. Muted ink is what a blank is supposed to look like. */
.status--unknown {
  color: var(--ink-muted);
}
/* Free but restricted — the app's --note-warn-* set, the same treatment .flag
   and .tbc already carry. The word does the work; the amber reinforces it. */
.status--restricted {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  color: var(--unverified);
  background: var(--unverified-wash);
  border: 1px solid var(--unverified-line);
  border-radius: var(--radius);
  padding: 4px 8px;
  max-width: 100%;
}
.status__glyph {
  font-size: 10px;
  line-height: 1;
}

/* ---------- A jurisdiction ---------- */
.jgroup {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.jgroup__lede {
  margin-top: 12px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 46ch;
}

/* ---------- The source table ----------
   Four columns: code, edition, status, where to download. Column widths are
   fixed on the three right-hand columns so the edition column stacks and
   aligns on its tabular figures, and the code name takes whatever is left. */
/* The table is capped rather than run to the full 1152px container. At full
   width the three fixed right-hand columns took 532px and the Code column
   absorbed the remaining 620px to hold names that set at about 250px in most
   rows — a third of the table was empty column. At 900px the Code column lands
   near 368px, which is close to the 46ch the code-name span is capped at
   anyway, so the rows read as rows instead of as widely-spaced fragments. */
.srctable {
  width: 100%;
  max-width: 900px;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 15px;
}
.srctable caption {
  text-align: left;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-muted);
  margin-bottom: 10px;
  max-width: 46ch;
}
.srctable th[scope="col"] {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0 16px 8px 0;
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
}
.srctable td {
  padding: 14px 16px 14px 0;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  vertical-align: top;
  line-height: 1.4;
  max-width: none;
}
.srctable th:last-child,
.srctable td:last-child {
  padding-right: 0;
}
.srctable th:nth-child(2), .srctable td:nth-child(2) { width: 88px; }
.srctable th:nth-child(3), .srctable td:nth-child(3) { width: 200px; }
.srctable th:nth-child(4), .srctable td:nth-child(4) { width: 244px; }

/* The code name is a SPAN inside the cell, not the cell itself, because
   max-width is ignored on a table-cell box — and without it the Québec row,
   which is the longest name on the page, rendered one line at 84 characters
   in a 620px column. The span takes the cap; the column keeps its width. */
.srctable__code {
  display: block;
  font-weight: 600;
  max-width: 46ch;
}
.srctable__sub {
  display: block;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink-muted);
  max-width: 46ch;
}
/* Edition years: Plex Mono, tabular, so a stacked column aligns — the same
   contract .clause and .libmock__table .mono carry. */
.srctable .mono,
.codenote .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
  white-space: nowrap;
}

/* ---------- The jurisdictions with no verified source ----------
   Three columns, not four: there is no edition to state, because there is no
   verified document to state one from. Same grammar otherwise, same restack.
   It carries no link of any kind — that is the whole point of it. */
.srctable--pending th:nth-child(2),
.srctable--pending td:nth-child(2) { width: 200px; }
.srctable--pending th:nth-child(3),
.srctable--pending td:nth-child(3) { width: 320px; }
.srctable__none {
  display: block;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.45;
  max-width: 46ch;
}

/* ---------- Jurisdiction filter ----------
   The page carries eleven jurisdictions and about 170 listings, which is more
   than anyone scrolls. The select narrows it to one. It is hidden in markup and
   revealed by script, so a reader without JS gets the whole page rather than a
   control that does nothing. Styled as a line of text with a rule under it, not
   as a form: it is a reading control, and a boxed input here would read as the
   start of a signup. */
.jxbar {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 28px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hairline);
}
.jxbar__label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.jxbar__select {
  font-family: inherit;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 2px solid var(--green);
  border-radius: 0;
  padding: 2px 22px 4px 2px;
  cursor: pointer;
  /* Native chevron sits too far from the text once the box is gone. */
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--green) 50%),
                    linear-gradient(135deg, var(--green) 50%, transparent 50%);
  background-position: right 8px top 12px, right 3px top 12px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.jxbar__select:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}
.jxbar__count {
  margin-left: auto;
  font-size: 13px;
  color: var(--ink-muted);
}

/* ---------- Municipal documents ----------
   A different table from the codes above it, because these are different
   objects: a city design manual has no edition year and no free/paid state to
   report, and borrowing those columns would imply we had checked something we
   had not. Municipality leads, because a reader scanning this has a city in
   mind before they have a document in mind. */
.jgroup__muni {
  margin-top: 40px;
}
.srctable--muni th:nth-child(1),
.srctable--muni td:nth-child(1) { width: 132px; }
.srctable--muni th:nth-child(2),
.srctable--muni td:nth-child(2) { width: auto; }
.srctable--muni th:nth-child(3),
.srctable--muni td:nth-child(3) { width: 104px; }
.srctable--muni th:nth-child(4),
.srctable--muni td:nth-child(4) { width: 244px; }
.srctable__muni {
  font-weight: 600;
  color: var(--ink);
}
/* Neutral ink, like Free and Paid. This says what kind of document it is, not
   whether anything is wrong with it, so it gets no colour. */
.doctype {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  white-space: nowrap;
}

/* ---------- Outbound links ----------
   Every one of these leaves the site, so every one names the host it goes to
   and carries an arrow. The visually-hidden tail gives the link an accessible
   name that says which document and that it opens a new tab — "nrc.canada.ca"
   on its own would read as five identical links in a row. */
.srclink {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  font-size: 14px;
  font-weight: 600;
  color: var(--green);
  text-decoration: none;
  max-width: 100%;
}
.srclink__host {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: break-word;
  min-width: 0;
}
.srclink__ext {
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}
.srclink:hover {
  color: var(--green-deep);
}

/* ---------- Notes under a table ----------
   Two kinds. The plain one is neutral: extra links, file sizes, permanent
   identifiers. The caution one is amber, and only ever carries something a
   reader would be worse off not knowing before they download — a superseded
   printing, a licence restriction, a code that does not apply where they
   think it does. Amber is never decoration here. */
.codenote {
  margin-top: 20px;
  background: var(--paper);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 760px;
}
.codenote--caution {
  background: var(--unverified-wash);
  border-color: var(--unverified-line);
  border-left: 3px solid var(--unverified);
}
.codenote__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 8px;
  max-width: 46ch;
}
.codenote--caution .codenote__label {
  color: var(--unverified);
}
.codenote p {
  font-size: 15px;
  line-height: 1.55;
  max-width: 46ch;
}
.codenote p + p {
  margin-top: 10px;
}
.codenote__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 12px;
  max-width: 100%;
}

/* ---------- Closing ---------- */
.codes__close {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.codes__close p {
  margin-top: 16px;
  max-width: 46ch;
}

/* ---------- The landing page's one line out to this page ----------
   One line, next to the Code library figure. The list itself never appears on
   the landing page — a directory of government links there would bury the
   figure it is standing next to. */
.codes-pointer {
  margin-top: 24px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 46ch;
}
.codes-pointer a {
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- The source table becomes cards ----------
   Same move the Code library still makes, for the same reason: four columns,
   one of them a URL host, do not survive a phone. The breakpoint is 900px
   rather than the 700px used elsewhere because this table's right-hand three
   columns are fixed-width and the code names are long — below 900px the code
   column starts wrapping to four lines while the row stays one line tall.

   Semantics survive: the header row is visually hidden rather than removed so
   header association still holds, and the cell that becomes a bare value
   (edition) gets its column header back as generated content. The code name,
   the status and the link are self-describing and take no eyebrow. Nothing
   scrolls sideways at any width. */
@media (max-width: 900px) {
  .srctable {
    display: block;
  }
  .srctable caption {
    display: block;
  }
  .srctable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
  }
  .srctable tbody {
    display: grid;
    gap: 10px;
  }
  .srctable tr {
    display: grid;
    grid-template-columns: minmax(0, auto) minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    border: 1px solid var(--hairline);
    border-radius: var(--radius);
    padding: 14px;
  }
  .srctable td {
    display: block;
    border-bottom: 0;
    padding: 0;
    width: auto;
    max-width: 100%;
  }
  .srctable th:nth-child(2), .srctable td:nth-child(2),
  .srctable th:nth-child(3), .srctable td:nth-child(3),
  .srctable th:nth-child(4), .srctable td:nth-child(4) {
    width: auto;
  }
  .srctable td:nth-child(1) {            /* Code */
    grid-area: 1 / 1 / 2 / 3;
  }
  .srctable td:nth-child(2) {            /* Edition */
    grid-area: 2 / 1 / 3 / 2;
  }
  .srctable td:nth-child(3) {            /* Status */
    grid-area: 2 / 2 / 3 / 3;
  }
  .srctable td:nth-child(4) {            /* Where to download */
    grid-area: 3 / 1 / 4 / 3;
    padding-top: 4px;
  }
  .srctable td:nth-child(2)::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-muted);
    margin-bottom: 3px;
  }
  /* The three-column variant: jurisdiction across the top, then the status and
     the stated absence side by side. Its second cell is the status badge, which
     says what it is in words, so it takes no generated eyebrow. */
  .srctable--pending th:nth-child(2),
  .srctable--pending td:nth-child(2),
  .srctable--pending th:nth-child(3),
  .srctable--pending td:nth-child(3) {
    width: auto;
  }
  .srctable--pending td:nth-child(1) { grid-area: 1 / 1 / 2 / 3; }
  .srctable--pending td:nth-child(2) { grid-area: 2 / 1 / 3 / 2; }
  .srctable--pending td:nth-child(3) { grid-area: 2 / 2 / 3 / 3; }
  .srctable--pending td:nth-child(2)::before { content: none; }

  /* The municipal variant restacks into four bands rather than three. Its
     columns are municipality, document, type, link -- and the document title is
     the longest thing in the row, so it takes a band of its own instead of
     sharing one with the type the way an edition shares with a status. The
     municipality leads, because that is what a reader is scanning for. */
  .srctable--muni th:nth-child(1), .srctable--muni td:nth-child(1),
  .srctable--muni th:nth-child(2), .srctable--muni td:nth-child(2),
  .srctable--muni th:nth-child(3), .srctable--muni td:nth-child(3) {
    width: auto;
  }
  .srctable--muni td:nth-child(1) { grid-area: 1 / 1 / 2 / 3; }
  .srctable--muni td:nth-child(2) { grid-area: 2 / 1 / 3 / 3; }
  .srctable--muni td:nth-child(3) { grid-area: 3 / 1 / 4 / 3; }
  .srctable--muni td:nth-child(4) { grid-area: 4 / 1 / 5 / 3; padding-top: 4px; }
  .srctable--muni td:nth-child(2)::before { content: none; }
}

/* The key's two columns stop being two columns before the definition column
   gets narrower than the badge sitting next to it. */
@media (max-width: 620px) {
  .keylist > li {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }
  .keycard,
  .codenote {
    padding: 16px;
  }
}

/* ---------- Codes page: answer-first block, key facts, FAQ ----------
   Added for search and answer engines, but written for the reader first: the
   answer block is the direct answer to "where do I get the NBC", the key-facts
   list is the five things a professional most often gets wrong, and the FAQ
   repeats them as questions people actually type. Same tokens, rules and
   46ch prose cap as the rest of this page; no new colour. */
.codes__answer {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.codes__answer > p {
  margin-top: 16px;
  max-width: 46ch;
}
.codes__facts ul {
  margin: 0;
  padding-left: 1.1em;
  display: grid;
  gap: 8px;
}
.codes__facts li {
  max-width: 46ch;
}
.codes__faq {
  margin-top: 56px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
}
.codes__qa {
  margin-top: 24px;
}
.codes__qa p {
  margin-top: 8px;
  max-width: 46ch;
}
.codes__qa h3 {
  max-width: 40ch;
}
