/* Regex: one system, after the taste skill (github.com/Leonxlnx/taste-skill, MIT): a software page for a
   fintech audience. Dealt: palette cool-grey-cobalt, type Funnel Display / Funnel Sans + DM Mono,
   radius sharp, buttons tonal, nav centre, mark ring. Fonts are served from fonts/ beside this file (SIL OFL); the
   relative address lets the public request page serve its own copy of both. */
@font-face { font-family: "Funnel Display"; src: url("fonts/funnel-display.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Funnel Sans"; src: url("fonts/funnel-sans.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("fonts/dm-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

/* ---- tokens: the palette as start.mjs printed it, then the system's derived ones */
:root {
  --p-bg: #eef0f3; --p-surface: #e2e5ea; --p-ink: #0b0c0e; --p-muted: #5d6470;
  --p-accent: #1f2de6; --p-accent-ink: #ffffff; --p-action: #1f2de6; --p-action-ink: #ffffff;
  --p-inv-bg: #0b0c0e; --p-inv-surface: #17181a; --p-inv-ink: #eef0f3; --p-inv-muted: #8e8f92;
  --p-inv-accent: #eef0f3; --p-inv-accent-ink: #0b0c0e; --p-inv-action: #eef0f3; --p-inv-action-ink: #0b0c0e;
  --font-display: "Funnel Display", system-ui, sans-serif;
  --font-text: "Funnel Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 400; --display-tracking: -0.03em; --display-tracking-xl: -0.04em;

  color-scheme: light;
  --bg: var(--p-bg); --surface: var(--p-surface); --ink: var(--p-ink); --muted: var(--p-muted);
  --action: var(--p-action); --action-ink: var(--p-action-ink);
  --window: #ffffff;                     /* the product's own UI: entries, rules, diffs */
  --line: color-mix(in oklab, var(--ink) 11%, transparent);
  --line-strong: color-mix(in oklab, var(--ink) 20%, transparent);
  /* state, inside the UI only: the interface stays neutral around it */
  --ok: #0f7a4a; --warn: #9a5b00; --idle: var(--muted);
  --del: #fde4e1; --del-ink: #9b1c12; --ins: #dff3e6; --ins-ink: #11603a;
  --interp: #9a5b00;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --t-label: 13px; --t-small: 14px; --t-body: 16px; --t-lead: 18px; --t-card: 18px; --t-h3: 24px;
  --t-h2: clamp(30px, 1.72vw + 23.3px, 48px);
  --t-h1: clamp(38px, 3.24vw + 25.4px, 72px);
  --t-page: clamp(30px, 1.15vw + 25.5px, 42px);   /* an app page's title: under the hero's h1 */
  --r-sm: 4px; --r-md: 6px; --r-lg: 8px; --r-btn: 4px;
  --btn-h: 44px; --nav: 72px; --gut: 80px; --container: 1280px;
  --ease: cubic-bezier(.2, .8, .2, 1); --ease-enter: cubic-bezier(.22, 1, .36, 1);
  --m-in: 150ms; --m-out: 120ms; --m-press: 90ms;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: var(--p-inv-bg); --surface: var(--p-inv-surface); --ink: var(--p-inv-ink); --muted: var(--p-inv-muted);
    --action: #8f98ff; --action-ink: #0b0c0e; --window: #121315;
    --ok: #5fd39a; --warn: #f0b04f; --interp: #f0b04f;
    --del: #3a1714; --del-ink: #ffb0a6; --ins: #10301f; --ins-ink: #93e4b4;
  }
}
@media (max-width: 1023px) { :root { --gut: 40px; } }
@media (max-width: 639px) { :root { --nav: 56px; --gut: 24px; } }

/* ---- base */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--nav) + var(--s-5)); }
body { font: 400 var(--t-body)/1.6 var(--font-text); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: var(--display-weight); letter-spacing: var(--display-tracking); margin: 0; }
h1 { font-size: var(--t-page); line-height: 1.1; }
h2 { font-size: var(--t-h3); line-height: 1.2; letter-spacing: -0.02em; }
h3 { font-size: var(--t-card); line-height: 1.3; letter-spacing: -0.01em; font-weight: 500; }
p, ul, ol { margin: 0; }
a { color: var(--action); text-decoration: underline; text-decoration-color: color-mix(in oklab, currentColor 30%, transparent);
  text-underline-offset: 3px; text-decoration-thickness: 1px; transition: text-decoration-color var(--m-out) var(--ease); }
a:hover { text-decoration-color: currentColor; transition-duration: var(--m-in); }
:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
::selection { background: color-mix(in oklab, var(--action) 22%, transparent); }
.wrap { width: min(var(--container), 100% - 2 * var(--gut)); margin-inline: auto; }
.i { width: 1em; height: 1em; vertical-align: -.125em; flex: none; }
.mono, .cite, .pid { font-family: var(--font-mono); }
.skip-link { position: absolute; left: 0; top: -100px; background: var(--window); color: var(--ink); padding: var(--s-2) var(--s-3); border-radius: var(--r-sm); z-index: 20; }
.skip-link:focus { top: var(--s-3); }
.cap::first-letter { text-transform: uppercase; }

/* ---- text roles: ink for what people read, muted only for labels, dates and meta */
.meta, .small { color: var(--muted); font-size: var(--t-small); }
.crumbs { color: var(--muted); font-size: var(--t-small); margin-bottom: var(--s-3); }
.crumbs a { color: var(--muted); }
.empty { color: var(--muted); }
.text { white-space: pre-line; }
.label { color: var(--muted); font-size: var(--t-label); font-weight: 500; margin: var(--s-1) 0 var(--s-4); }
.plain { list-style: none; padding: 0; margin: 0; }

/* ---- buttons (tonal), 44px, one pair */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2); height: var(--btn-h); padding: 0 var(--s-5);
  border-radius: var(--r-btn); border: 1px solid transparent; font: 500 var(--t-body)/1 var(--font-text); white-space: nowrap; cursor: pointer;
  text-decoration: none; transition: background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease); }
.btn--primary { background: var(--action); color: var(--action-ink); }
.btn--primary:hover { background: color-mix(in oklab, var(--action) 86%, var(--ink)); }
.btn--secondary { background: color-mix(in oklab, var(--ink) 8%, var(--bg)); color: var(--ink); }
.btn--secondary:hover { background: color-mix(in oklab, var(--ink) 14%, var(--bg)); }
@media (hover: hover) and (pointer: fine) { .btn:hover { transform: translateY(-1px); transition-duration: var(--m-in); } }
.btn:active { transform: translateY(1px) scale(.985); transition-duration: var(--m-press); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s-3); }

/* ---- nav: opaque, a hairline, the words in the middle, a 2px bar under the current one */
.nav { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--line); }
.nav__bar { height: var(--nav); display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: var(--s-5); position: relative; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; justify-self: start; color: var(--ink); text-decoration: none;
  font: var(--display-weight) 20px/1 var(--font-display); letter-spacing: -0.02em; }
.mark { width: 20px; height: 20px; background: var(--ink); -webkit-mask: var(--mark) center / contain no-repeat; mask: var(--mark) center / contain no-repeat;
  --mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M12 2a10 10 0 1 1 0 20 10 10 0 0 1 0-20zm0 5.5a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9z'/%3E%3C/svg%3E"); }
.nav__links { display: flex; gap: var(--s-2); }
.nav__link { position: relative; display: inline-flex; align-items: center; height: var(--btn-h); padding: 0 var(--s-3); color: var(--muted);
  font: 500 15px/1 var(--font-text); text-decoration: none; transition: color var(--m-out) var(--ease); }
.nav__link::before { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: 6px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform var(--m-out) var(--ease); }
.nav__link:hover { color: var(--ink); transition-duration: var(--m-in); }
.nav__link:hover::before { transform: scaleX(1); transform-origin: left; transition-duration: var(--m-in); }
.nav__link[aria-current="page"] { color: var(--ink); }
.nav__link[aria-current="page"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: calc((var(--nav) - var(--btn-h)) / -2 - 1px); height: 2px; background: var(--ink); }

/* ---- footer, dark: the name large, the columns right */
.footer { background: var(--p-inv-bg); color: var(--p-inv-ink); margin-top: var(--s-8); }
.footer__in { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-6) var(--s-7); padding-block: var(--s-8) var(--s-6); }
.footer__name { font: var(--display-weight) clamp(48px, 6vw, 96px)/1 var(--font-display); letter-spacing: var(--display-tracking-xl); }
.footer__cols { display: grid; grid-template-columns: 1fr 2fr; gap: var(--s-6); }
.footer h3 { font: 500 var(--t-label)/1.4 var(--font-text); letter-spacing: 0; color: var(--p-inv-muted); margin-bottom: var(--s-3); }
.footer ul { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.footer a { color: var(--p-inv-ink); text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer__note p { color: var(--p-inv-ink); max-width: 62ch; }
.footer .interp-word { border-bottom: 2px solid var(--interp); }
.footer__legal { grid-column: 1 / -1; padding-top: var(--s-5); border-top: 1px solid color-mix(in oklab, var(--p-inv-ink) 14%, transparent); color: var(--p-inv-muted); font-size: var(--t-label); }
.interp-word { border-bottom: 2px solid var(--interp); }

/* ---- chips: one neutral chip; state is a dot, never a coloured box */
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 var(--s-2); margin: 0 var(--s-1) var(--s-1) 0; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--window); color: var(--ink); font: 500 var(--t-label)/1 var(--font-text); white-space: nowrap; }
.chip.reg { background: var(--ink); border-color: var(--ink); color: var(--bg); font-family: var(--font-mono); letter-spacing: .02em; }
.chip.scope { color: var(--muted); border-style: dashed; background: transparent; }
.chip.in-force::before, .chip.upcoming::before, .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-right: 6px; }
.chip.in-force { color: var(--ok); } .chip.upcoming { color: var(--warn); }
.status { display: inline-flex; align-items: center; height: 26px; font: 500 var(--t-label)/1 var(--font-text); color: var(--ink); }
.status::before { background: var(--idle); }
.status-in-force::before { background: var(--ok); }
.status-upcoming::before { background: var(--warn); box-shadow: 0 0 0 3px color-mix(in oklab, var(--warn) 22%, transparent); }
.status-expired { color: var(--muted); } .status-expired::before { background: transparent; border: 1.5px solid currentColor; }
.status-draft, .status-restricted { color: var(--muted); }
.review { font-size: var(--t-label); color: var(--muted); }
.row-top { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; }
.row-top .chip { margin: 0; }

/* ---- cards: one recipe; a linked card lifts 2px and its border darkens */
.card, .rows, .window, .field, .source-card, .change-para, .regulator, .version, .timeline {
  background: var(--window); border: 1px solid var(--line); border-radius: var(--r-lg); }
.card { position: relative; transition: transform 120ms var(--ease), border-color 120ms var(--ease), box-shadow 120ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .card:has(.stretch):hover, .row:has(.stretch):hover { transform: translateY(-2px); border-color: var(--line-strong);
    box-shadow: 0 8px 24px color-mix(in oklab, var(--ink) 8%, transparent); transition-duration: 180ms; }
}
.stretch { color: var(--ink); text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.go { position: absolute; right: var(--s-4); top: 50%; transform: translateY(-50%); color: var(--muted); transition: transform var(--m-out) var(--ease); }
@media (hover: hover) and (pointer: fine) { :is(.card, .row):hover .go { transform: translate(3px, -50%); color: var(--ink); transition-duration: var(--m-in); } }

/* ---- the hero: now only on the request-access page */
.hero { min-height: calc(100svh - var(--nav)); display: flex; flex-direction: column; padding-block: var(--s-7) var(--s-7); }
.hero__grid { flex: 1; display: grid; grid-template-columns: 5fr 6fr; grid-template-rows: 1fr auto; gap: var(--s-7); align-items: center; }
.notice { font-size: var(--t-small); color: var(--muted); margin-bottom: var(--s-4); }
.hero h1 { font-size: var(--t-h1); line-height: 1.02; letter-spacing: var(--display-tracking-xl); font-weight: 500; max-width: 12ch; }
.hero__lead { font-size: var(--t-lead); line-height: 1.55; margin: var(--s-5) 0 var(--s-6); max-width: 46ch; }
.window { overflow: hidden; box-shadow: 0 24px 64px -24px color-mix(in oklab, var(--ink) 22%, transparent); }

/* ---- circulars: a short strip of dates due, then one line per circular */
.page-lead { font-size: var(--t-lead); line-height: 1.5; color: var(--muted); margin-top: var(--s-3); max-width: 60ch; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }
.filters { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-6); }
.pick { display: grid; gap: var(--s-1); font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.pick select, .find input { height: 40px; min-width: 200px; padding: 0 var(--s-3); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: var(--window); color: var(--ink); font: 400 15px/1 var(--font-text); }
.find { display: block; margin-top: var(--s-5); }
.find input { width: min(100%, 360px); }
.due-strip { margin-bottom: var(--s-7); }
.due-strip h2 { font: 500 var(--t-label)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); margin-bottom: var(--s-3); }
.due { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--s-3); }
.due li { display: grid; grid-template-columns: 48px 1fr; gap: var(--s-3); align-items: start; padding: var(--s-3) var(--s-4); }
.cal { display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: var(--t-label); font-weight: 500; color: var(--muted); padding-bottom: 2px; }
.cal b { display: block; width: 100%; text-align: center; font: var(--display-weight) 20px/1.5 var(--font-display); color: var(--ink); border-bottom: 1px solid var(--line); margin-bottom: 2px; }
.due-kind { display: flex; gap: var(--s-2); align-items: center; font-size: var(--t-label); margin-bottom: 2px; }
.kind { font-weight: 500; color: var(--warn); } .kind-expires { color: var(--muted); }
.rel { color: var(--muted); font-size: var(--t-label); }
.due a { font-weight: 500; font-size: 15px; }
.product-changes { margin-top: var(--s-3); font-size: var(--t-small); display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); margin-bottom: var(--s-4); }
.section-head h2 { margin: 0; }
.page > section + section { margin-top: var(--s-7); }
.page > section > h2 { margin-bottom: var(--s-4); }

/* ---- products: sectors, suites, products; the ones not covered yet in grey */
.sector + .sector { margin-top: var(--s-7); }
.sector h2 { margin-bottom: var(--s-4); }
.suites { list-style: none; padding: 0; columns: 4 220px; column-gap: var(--s-3); }
.suite { padding: var(--s-3) var(--s-4); break-inside: avoid; margin-bottom: var(--s-3); }
.suite.off { background: transparent; border-style: dashed; }
.suite h3 { font-size: var(--t-label); font-weight: 500; color: var(--muted); margin-bottom: var(--s-2); }
.leaves { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.leaf { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); }
.leaf a { font-weight: 500; color: var(--ink); }
.leaf.off { color: color-mix(in oklab, var(--muted) 70%, var(--bg)); }
.topics { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s-3); }
.topic-card { padding: var(--s-4); display: grid; gap: var(--s-1); align-content: start; }
.topic-card a { font-weight: 500; }
.topic-card .note { font-size: var(--t-label); }
/* Regex's rule summary: its own words, set apart from the regulator's text by a dashed rule */
.briefs { display: grid; gap: var(--s-3); }
.brief { padding: var(--s-4) var(--s-5); }
.brief header { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-1) var(--s-3); margin-bottom: var(--s-2); }
.brief h3 { margin: 0; font: 500 17px/1.35 var(--font-text); letter-spacing: 0; }
.brief h3 a { color: var(--ink); text-decoration: none; }
.brief h3 a:hover { text-decoration: underline; }
.brief header .note { font-size: var(--t-label); }
.brief-lines { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.brief-lines li { padding-left: var(--s-3); border-left: 2px dashed var(--line-strong); line-height: 1.5; }
.brief-lines li.stale { border-left-color: var(--warn); }
.brief-cites { display: inline-flex; flex-wrap: wrap; gap: var(--s-1); margin-left: var(--s-2); vertical-align: 1px; }
.brief-cites .pid { padding: 0 var(--s-1); }
.brief-lines .note { display: flex; margin-top: var(--s-1); font-size: var(--t-label); color: var(--warn); }
.brief-by { display: flex; gap: var(--s-2); align-items: center; margin-top: var(--s-3); font-size: var(--t-label); color: var(--muted); }
.brief-by .i { width: 14px; height: 14px; color: var(--warn); }
.in-brief { margin-bottom: var(--s-5); }
.in-brief h3 { margin: 0 0 var(--s-2); font: 500 var(--t-label)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); }
.more-h { margin: var(--s-6) 0 0; font: 500 17px/1.35 var(--font-text); letter-spacing: 0; }

/* ---- change rows (circulars and a product's changes) */
.rows { list-style: none; padding: 0; overflow: hidden; }
.row { position: relative; padding: var(--s-4) var(--s-8) var(--s-4) var(--s-5); background: var(--window); transition: transform 120ms var(--ease), box-shadow 120ms var(--ease); }
.row + .row { border-top: 1px solid var(--line); }
.row h3 { margin: var(--s-2) 0 var(--s-1); }
.row p + p { margin-top: var(--s-2); }
.chips .chip { margin-bottom: 0; }
.row.restricted { background: color-mix(in oklab, var(--ink) 3%, var(--window)); }
.row.restricted .small { color: var(--ink); }
.row.restricted h3 { color: var(--muted); display: flex; align-items: center; gap: var(--s-2); }
/* one line a circular: badges left, title and meta right */
.row.line { display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: var(--s-4); align-items: baseline; padding-block: var(--s-3); }
.row.line .row-top { grid-row: span 2; }
.row.line h3 { margin: 0; font-size: 16px; }
.row.line p + p, .row.line .meta { margin-top: 2px; }

/* ---- app pages */
.page { padding-top: var(--s-7); }
.page-head { margin-bottom: var(--s-6); }
.page-head h1 { max-width: 30ch; margin-top: var(--s-3); }
.page-head .meta { margin-top: var(--s-3); }
.page h2 { margin: var(--s-7) 0 var(--s-4); }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; vertical-align: top; padding: var(--s-2) var(--s-3); border-bottom: 1px solid var(--line); }
.table-wrap { overflow-x: auto; margin: var(--s-3) 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.table-wrap td { font-size: 15px; }
.table-wrap tr:first-child td { font-weight: 500; background: color-mix(in oklab, var(--ink) 3%, var(--window)); }
.table-wrap tr:last-child td { border-bottom: 0; }

.with-side { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s-7); align-items: start; }
.side { position: sticky; top: calc(var(--nav) + var(--s-5)); }
.toc { display: flex; flex-direction: column; margin-top: var(--s-7); }
.toc-h { font-size: var(--t-label); font-weight: 500; color: var(--muted); margin: 0 0 var(--s-2) var(--s-3); }
.toc a { display: flex; justify-content: space-between; align-items: center; gap: var(--s-2); min-height: 36px; padding: 0 var(--s-3); border-radius: var(--r-sm);
  color: var(--ink); font-size: 15px; text-decoration: none; transition: background-color var(--m-out) var(--ease); }
.toc a span:first-child::first-letter { text-transform: uppercase; }
.toc a[aria-current] { background: color-mix(in oklab, var(--ink) 8%, var(--bg)); font-weight: 500; }
.toc a:hover { background: color-mix(in oklab, var(--ink) 6%, var(--bg)); transition-duration: var(--m-in); }
.toc .n { color: var(--muted); font-size: var(--t-label); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 6px; }
.toc a.changed .n::before, .toc a.coming .n::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--action); }
.toc a.coming .n::before { background: var(--warn); }
.source-card { font-size: var(--t-small); color: var(--muted); padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3); }
.source-card strong { color: var(--ink); font-weight: 500; }
.legend { display: flex; gap: var(--s-5); font-size: var(--t-label); color: var(--muted); }
.group { margin-top: var(--s-7); }
.group h3 { font: var(--display-weight) var(--t-h3)/1.2 var(--font-display); letter-spacing: -0.02em; padding-bottom: var(--s-3); margin-bottom: var(--s-2); border-bottom: 1px solid var(--line-strong); }
.para { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: var(--s-4); padding: var(--s-3) 0; scroll-margin-top: calc(var(--nav) + var(--s-5)); }
.para + .para { border-top: 1px solid var(--line); }
.para:target { background: color-mix(in oklab, var(--action) 6%, transparent); }
.para.d1 { margin-left: 20px; } .para.d2 { margin-left: 40px; } .para.d3 { margin-left: 60px; } .para.d4 { margin-left: 80px; }
.para.changed::before, .para.coming::before { content: ""; position: absolute; left: -14px; top: var(--s-3); bottom: var(--s-3); width: 2px; background: var(--action); }
.para.coming::before { background: var(--warn); }
.pid { font-size: var(--t-label); color: var(--muted); height: fit-content; justify-self: start; white-space: nowrap; padding: 3px var(--s-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--window); text-decoration: none; transition: border-color var(--m-out) var(--ease), color var(--m-out) var(--ease); }
.pid:hover { color: var(--ink); border-color: var(--ink); transition-duration: var(--m-in); }
.para .body { min-width: 0; }
.para-meta { font-size: var(--t-small); color: var(--muted); margin-top: var(--s-2); display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-4); align-items: center; }
.para-meta .chip { margin: 0; }
.note { display: inline-flex; align-items: baseline; gap: var(--s-2); }
.note::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--action); transform: translateY(-1px); }
.note-coming::before { background: var(--warn); }
.notes { list-style: none; padding: 0; margin-top: var(--s-2); font-size: var(--t-small); color: var(--muted); }
.verify { font-size: var(--t-small); margin-top: var(--s-2); padding: var(--s-2) var(--s-3); border-left: 2px solid var(--warn); background: color-mix(in oklab, var(--warn) 7%, var(--window)); }
.cite { font-size: .9em; }

/* change detail */
.timeline { display: flex; margin: 0 0 var(--s-6); padding: var(--s-5); overflow-x: auto; }
.step { position: relative; flex: 1 1 0; min-width: 120px; padding: 26px var(--s-3) 0 0; }
.step::before { content: ""; position: absolute; top: 7px; left: 0; right: 0; height: 2px; background: var(--line-strong); }
.step.past::before { background: var(--ink); }
.step::after { content: ""; position: absolute; top: 0; left: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--window); border: 2px solid var(--line-strong); }
.step.past::after { background: var(--ink); border-color: var(--ink); }
.step.key::after { border-color: var(--warn); }
.step.key.past::after { background: var(--warn); }
.step:last-child::before { display: none; }
.step.now { flex: 0 0 auto; min-width: 96px; }
.step.now::after { width: 12px; height: 12px; top: 2px; left: 2px; background: var(--action); border: 0; box-shadow: 0 0 0 4px color-mix(in oklab, var(--action) 20%, transparent); }
.step.now dt { color: var(--action); }
.step dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.step.key dt { color: var(--warn); }
.step dd { margin: 2px 0 0; font-weight: 500; font-variant-numeric: tabular-nums; }
.step .rel, .step .small { display: block; font-weight: 400; }
.detail { grid-template-columns: minmax(0, 1fr) 320px; }
.detail .main > section:first-child { margin-top: 0; }
.facts { display: grid; gap: var(--s-3); }
.field { padding: var(--s-4); font-size: 15px; }
.field h2 { margin: 0 0 var(--s-2) !important; font: 500 var(--t-label)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); }
.field p + p, .field p + ul { margin-top: var(--s-2); }
.field dl dt { display: none; } .field dd { margin: 0; }
.amends li { padding: var(--s-2) 0; border-top: 1px solid var(--line); font-size: var(--t-small); color: var(--muted); }
.regulator, .interp { padding: var(--s-5); }
.regulator h2, .interp h2 { margin: 0 !important; }
.regulator .label, .interp .label { margin: var(--s-1) 0 var(--s-3); }
.regulator .text { font-size: var(--t-lead); line-height: 1.55; }
.interp { margin-top: var(--s-4); border: 1px dashed color-mix(in oklab, var(--interp) 70%, transparent); border-radius: var(--r-lg); background: color-mix(in oklab, var(--interp) 6%, var(--window)); }
.interp .label { color: var(--interp); }
.change-para { margin-bottom: var(--s-4); overflow: hidden; }
.change-para h3 { display: flex; gap: var(--s-3); align-items: baseline; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line); font: 500 15px/1.4 var(--font-text); letter-spacing: 0; }
.change-para > .verify { margin: 0 var(--s-4) var(--s-4); }
.sbs { display: grid; grid-template-columns: 1fr 1fr; }
.sbs .col { padding: var(--s-3) var(--s-4) var(--s-4); min-width: 0; }
.sbs .col + .col { border-left: 1px solid var(--line); }
.sbs h4 { font: 500 var(--t-label)/1.4 var(--font-text); letter-spacing: 0; color: var(--muted); margin-bottom: var(--s-1); }
.notes-diff { margin-top: var(--s-3); font-size: 15px; }
del { background: var(--del); color: var(--del-ink); text-decoration-color: color-mix(in oklab, var(--del-ink) 60%, transparent); padding: 0 2px; border-radius: 2px; }
ins { background: var(--ins); color: var(--ins-ink); text-decoration: none; padding: 0 2px; border-radius: 2px; }

/* who wrote an entry */
.provenance { display: flex; gap: var(--s-2); align-items: flex-start; margin-top: var(--s-4); font-size: var(--t-small); color: var(--muted); }
.provenance.ai { padding: var(--s-3) var(--s-4); border-left: 2px solid var(--warn); background: color-mix(in oklab, var(--warn) 7%, var(--window)); color: var(--ink); }
.provenance.ai .i { color: var(--warn); margin-top: 3px; }
.provenance a { color: inherit; }

/* paragraph page */
.narrow { max-width: 760px; }
.versions { position: relative; padding-left: var(--s-6); }
.versions::before { content: ""; position: absolute; left: 7px; top: var(--s-4); bottom: var(--s-4); width: 2px; background: var(--line-strong); }
.version { position: relative; padding: var(--s-4) var(--s-5); margin-bottom: var(--s-4); }
.version::before { content: ""; position: absolute; left: calc(-1 * var(--s-6) + 1px); top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-strong); }
.version.current { border-color: var(--ink); }
.version.current::before { background: var(--ink); border-color: var(--ink); }
.version.later::before { border-color: var(--warn); }
.version .para-meta { margin: 0 0 var(--s-2); }
.version .para-meta strong { color: var(--ink); font-weight: 500; }

/* ---- request access: the public page for visitors not yet on the allow list, and the owner's list */
.nav__bar.nav__bar--ask { grid-template-columns: 1fr auto; height: var(--nav); padding-block: 0; }
.nav__signin { justify-self: end; color: var(--ink); font: 500 15px/1 var(--font-text); text-decoration: none; }
.nav__signin:hover { text-decoration: underline; }
.ask .hero__grid { grid-template-rows: auto; align-items: start; }
.ask .hero__text { padding-top: var(--s-6); }
.ask__more { margin-top: 0; }
.ask__signin { margin-bottom: var(--s-6); }
.ask__facts { list-style: none; padding: var(--s-5) 0 0; margin: 0; display: grid; gap: var(--s-2); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--t-small); }
.ask__facts b { color: var(--ink); font-weight: 500; }
.ask__form { padding: var(--s-6); display: grid; gap: var(--s-5); }
.ask__form h2 { font-size: var(--t-h3); }
.ask__field { display: grid; gap: var(--s-2); }
.ask__field label { font-weight: 500; font-size: 15px; }
.ask__field .optional { color: var(--muted); font-weight: 400; font-size: var(--t-label); margin-left: var(--s-1); }
.ask__hint { color: var(--muted); font-size: var(--t-small); margin-top: calc(-1 * var(--s-1)); }
.ask__field input, .ask__field textarea { width: 100%; font: 400 var(--t-body)/1.5 var(--font-text); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line-strong); border-radius: var(--r-md); padding: 10px var(--s-3); min-height: var(--btn-h);
  transition: border-color var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease); }
.ask__field textarea { resize: vertical; min-height: 112px; }
.ask__field input:hover, .ask__field textarea:hover { border-color: color-mix(in oklab, var(--ink) 34%, transparent); }
.ask__field input:focus, .ask__field textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px color-mix(in oklab, var(--action) 20%, transparent); }
.ask__field.has-error input, .ask__field.has-error textarea { border-color: var(--del-ink); }
.ask__error { color: var(--del-ink); font-size: var(--t-small); }
.ask__banner { padding: var(--s-3) var(--s-4); border-left: 2px solid var(--del-ink); background: color-mix(in oklab, var(--del) 60%, var(--window)); font-size: var(--t-small); }
.ask__trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ask__send { justify-self: start; }
.ask__done { max-width: 40rem; padding-block: var(--s-8); }
.ask__done h1 { font-size: var(--t-h1); line-height: 1.02; letter-spacing: var(--display-tracking-xl); font-weight: 500; }
.ask__done .hero__lead { margin: var(--s-5) 0 var(--s-6); }
.btn--small { height: 36px; padding: 0 var(--s-4); font-size: 15px; }
.request { padding-right: var(--s-5); }
.request h3 .meta { font-family: var(--font-text); margin-left: var(--s-2); }
.request-email { font-size: 15px; }
.request .btn-row { margin-top: var(--s-3); }
.request-approved, .request-declined { background: color-mix(in oklab, var(--ink) 2%, var(--window)); }
@media (max-width: 639px) { .ask__form { padding: var(--s-5); } .ask__send { justify-self: stretch; } }

/* ---- the hero's entrance: once on load, transform and opacity only; at rest without motion */
@media (prefers-reduced-motion: no-preference) {
  .hero[data-enter] .hero__text > * { animation: rise 520ms var(--ease-enter) both; }
  .hero[data-enter] h1 { animation-duration: 700ms; }
  .hero[data-enter] .notice { animation-delay: 0ms; }
  .hero[data-enter] h1 { animation-delay: 40ms; }
  .hero[data-enter] .hero__lead { animation-delay: 380ms; }
  .hero[data-enter] .btn-row { animation-delay: 440ms; }
  .hero[data-enter] .hero__window { animation: settle 900ms var(--ease-enter) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } }
  @keyframes settle { from { transform: scale(.98); } }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---- smaller screens */
@media (max-width: 1023px) {
  .hero__grid { grid-template-columns: 1fr; gap: var(--s-6); }
  .hero { min-height: 0; }
  .with-side, .detail { grid-template-columns: 1fr; gap: 0; }
  .side { position: static; }
  .facts { order: -1; margin-bottom: var(--s-6); grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .toc { flex-direction: row; overflow-x: auto; gap: var(--s-2); margin-top: var(--s-6); padding-bottom: var(--s-1); }
  .toc-h { display: none; }
  .toc a { flex: none; border: 1px solid var(--line); background: var(--window); min-height: 44px; }
  .footer__in, .footer__cols { grid-template-columns: 1fr; }
}
@media (max-width: 639px) {
  .nav__bar { grid-template-columns: auto 1fr; gap: var(--s-3); }
  .nav__links { justify-self: end; }
  .hero { padding-top: var(--s-6); }
  .row.line { grid-template-columns: 1fr; }
  .row.line .row-top { grid-row: auto; margin-bottom: var(--s-1); }
  .pick, .pick select { width: 100%; }
  .btn-row .btn { flex: 1 1 100%; }
  .sbs { grid-template-columns: 1fr; }
  .sbs .col + .col { border-left: 0; border-top: 1px solid var(--line); }
  .para { grid-template-columns: 1fr; gap: var(--s-1); }
  .para.d1, .para.d2, .para.d3, .para.d4 { margin-left: var(--s-3); }
  .row { padding: var(--s-4) var(--s-7) var(--s-4) var(--s-4); }
  .due { grid-template-columns: 1fr; }
  .timeline { flex-direction: column; padding: var(--s-4); }
  .step { padding: 0 0 var(--s-4) 28px; min-width: 0; }
  .step::before { top: 16px; bottom: 0; left: 7px; right: auto; width: 2px; height: auto; }
  .step.now { min-width: 0; }
}

/* The demo's banner */
.demo-banner { position: relative; z-index: 60; padding: 8px 16px; text-align: center; font: 500 13px/1.4 var(--font-text);
  background: var(--p-action); color: var(--p-action-ink); }
.demo-banner a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
