/* VOICE work: a reference people cite in reports and share with colleagues
   IDEA an engineering datasheet for cryptography: exact panels, fine rules, one baseline
   PICTURE home: one secure connection, station by station, marked broken or safe under quantum attack
   COLOUR white ground, near-black ink, cobalt #1240e0 strip and links, pale cobalt zones, one red for "broken"
   TYPE Space Grotesk (headings) + Inter (text); four sizes: 48 / 26 / 17 / 14
   LAYOUT laptop: cobalt strip, title and finding, full-width picture, then two-column sections (heading left, list right)
          phone: strip, title, picture as a vertical route, sections stacked */

:root {
  --bg: #ffffff;
  --ink: #0b0d12;
  --soft: #4a5060;
  --rule: #dfe3ee;
  --field: #8790a6;
  --zone: #eef2ff;
  --zone-2: #f6f7fb;
  --cobalt: #1240e0;
  --cobalt-ink: #ffffff;
  --strip: #1240e0;
  --hot: #c8203f;
  --hot-zone: #fdecef;
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px;
  --col: 720px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0d18;
    --ink: #e8ebf5;
    --soft: #a3abc2;
    --rule: #232a40;
    --field: #59627d;
    --zone: #121a33;
    --zone-2: #0f1426;
    --cobalt: #8aa3ff;
    --cobalt-ink: #0a0d18;
    --strip: #13204f;
    --hot: #ff7088;
    --hot-zone: #2a1220;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--s3); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 17px/1.6 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s2); top: -80px; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 20; }
.skip:focus { top: var(--s2); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 0; }
h1 { font-size: clamp(34px, 4.6vw, 48px); line-height: 1.05; }
h2 { font-size: 26px; line-height: 1.15; }
p { margin: 0; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 max(4vw, 16px); }

/* ---------- strip ---------- */
.strip { background: var(--strip); color: #fff; }
.strip-in { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 600 18px var(--display); letter-spacing: -0.01em; white-space: nowrap; }
.mark { width: 22px; height: 22px; color: #fff; flex: none; }
.strip nav { display: flex; gap: 2px; }
.strip nav a { color: rgba(255,255,255,.82); text-decoration: none; font-size: 15px; font-weight: 500; padding: 17px 12px 15px; border-bottom: 3px solid transparent; white-space: nowrap; }
.strip nav a:hover { color: #fff; }
.strip nav a[aria-current="page"] { color: #fff; border-bottom-color: #fff; }

/* ---------- page shell ---------- */
main.wrap { flex: 1; padding-bottom: var(--s5); }
.intro { padding: var(--s4) 0 var(--s3); }
.intro h1, .intro .toc, .intro .letters, .intro .lede { max-width: none; }
.intro h1 + .lede { margin-top: var(--s2); }
.lede { font-size: 19px; line-height: 1.55; color: var(--soft); max-width: var(--col); }
.toc { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 15px; }
.toc a { color: var(--soft); text-decoration: none; }
.toc a:hover { color: var(--cobalt); text-decoration: underline; }
.intro .toc { margin-top: var(--s3); }

/* ---------- home picture: the anatomy of a connection ---------- */
.anatomy { margin: var(--s2) 0 0; background: var(--zone); padding: var(--s3); }
.flow-title a { color: inherit; text-decoration: none; }
.flow-title a:hover { text-decoration: underline; }
.anatomy figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s3); font-size: 15px; font-weight: 600; margin-bottom: var(--s2); }
.anatomy .key { font-weight: 500; color: var(--soft); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.anatomy .key i { display: inline-block; width: 14px; height: 4px; margin-right: 6px; vertical-align: middle; }
.k-broken { background: var(--hot); }
.k-safe { background: var(--cobalt); }
.stations { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.stations.has-ends { grid-template-columns: 110px repeat(var(--n, 4), minmax(0, 1fr)) 110px; }
.stations .ends { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 14px; color: var(--soft); border: 1.5px dashed var(--field); padding: var(--s2) var(--s1); }
.stations .ends b { font-weight: 600; }
.station > div, .station a { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; background: var(--bg); padding: var(--s2) var(--s2) 18px; text-decoration: none; color: var(--ink); border-top: 5px solid var(--cobalt); }
.station.is-broken > a, .station.is-broken > div { border-top-color: var(--hot); }
.station.is-step > a, .station.is-step > div { border-top-color: var(--ink); }
.is-step .st-fate { color: var(--soft); }
.k-step { background: var(--ink); }
.station a:hover .st-name { text-decoration: underline; text-underline-offset: 3px; }
.station:not(:last-child) > a::after, .station:not(:last-child) > div::after, .has-ends .station > a::after, .has-ends .station > div::after { content: ""; position: absolute; right: -10px; top: 50%; width: 10px; height: 2px; background: var(--field); }
.st-name { font: 600 18px/1.2 var(--display); letter-spacing: -0.01em; }
.st-what { font-size: 15px; line-height: 1.45; color: var(--soft); }
.st-today { font-size: 14px; font-weight: 600; margin-top: auto; padding-top: var(--s1); }
.st-fate { font-size: 14px; line-height: 1.4; color: var(--cobalt); }
.is-broken .st-fate { color: var(--hot); }

/* ---------- finder ---------- */
.finder { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s2) var(--s4); align-items: end; padding: var(--s4) 0 var(--s2); border-bottom: 2px solid var(--ink); }
.search label { display: block; font: 600 15px var(--text); margin-bottom: 6px; }
.search input { width: 100%; font: 16px var(--text); color: var(--ink); background: var(--bg); padding: 12px 14px; border: 1.5px solid var(--field); border-radius: 0; appearance: none; }
.search input::placeholder { color: var(--soft); }
.search input:focus { outline: none; border-color: var(--cobalt); box-shadow: 0 0 0 3px color-mix(in srgb, var(--cobalt) 25%, transparent); }
.finder .toc { padding-bottom: 12px; }
.empty { grid-column: 1 / -1; color: var(--soft); }
body.searching .finder .toc { visibility: hidden; }

/* ---------- sections: heading left, list right ---------- */
.sec { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s2) var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--rule); scroll-margin-top: var(--s3); }
.sec-head h2 { font-size: 24px; }
.sec-head p { margin-top: var(--s1); font-size: 15px; color: var(--soft); max-width: 300px; }
.terms { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s4); }
.terms li { padding: 12px 0; border-top: 1px solid var(--rule); }
.terms li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.terms a { font-weight: 600; text-decoration: none; color: var(--ink); }
.terms a:hover { color: var(--cobalt); text-decoration: underline; }
.terms span { display: block; font-size: 15px; line-height: 1.45; color: var(--soft); margin-top: 2px; }
.letters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: var(--s3); }
.letters a { display: inline-grid; place-items: center; width: 40px; height: 40px; text-decoration: none; font: 600 17px var(--display); color: var(--ink); background: var(--zone); }
.letters a:hover { background: var(--cobalt); color: var(--cobalt-ink); }
.sec.letter .sec-head h2 { font-size: 40px; color: var(--cobalt); line-height: 1; }

/* ---------- term page ---------- */
.doc { display: grid; grid-template-columns: minmax(0, var(--col)) 240px; justify-content: space-between; gap: var(--s5); padding-top: 12px; }
.crumb { font-size: 14px; line-height: 20px; height: 20px; color: var(--soft); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb a { color: var(--soft); text-decoration: none; }
.crumb a:hover { color: var(--cobalt); text-decoration: underline; }
.term .plain { font-size: 20px; line-height: 1.55; margin-top: var(--s2); }
.pair { display: grid; gap: var(--s2); margin-top: var(--s3); }
.picture, .myth { margin: 0; padding: var(--s2) 20px 18px; }
.picture { background: var(--zone); }
.picture figcaption, .myth-h { font-size: 14px; font-weight: 600; color: var(--soft); margin-bottom: 4px; }
.picture p { font: 500 19px/1.45 var(--display); letter-spacing: -0.005em; }
.myth { background: var(--hot-zone); border-left: 4px solid var(--hot); }
.myth .myth-h { color: var(--hot); }
.diagram { margin: var(--s3) 0 0; }
.diagram .scroll { overflow-x: auto; background: var(--zone-2); padding: var(--s2); }
.diagram svg { display: block; width: 100%; height: auto; min-width: 520px; }
.diagram figcaption { font-size: 14px; color: var(--soft); margin-top: var(--s1); }
.term h2 { font-size: 22px; margin: var(--s4) 0 var(--s1); }
.deeper { margin-top: var(--s4); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.deeper summary { cursor: pointer; list-style: none; padding: var(--s2) 0; font: 600 19px var(--display); display: flex; align-items: baseline; gap: 12px; }
.deeper summary::-webkit-details-marker { display: none; }
.deeper summary::after { content: "+"; margin-left: auto; font: 500 24px/1 var(--text); color: var(--cobalt); }
.deeper[open] summary::after { content: "\2212"; }
.deeper summary span { font: 400 15px var(--text); color: var(--soft); }
.deeper p { padding-bottom: var(--s3); }
.reads { list-style: none; padding: 0; margin: 0; }
.reads li { padding: 10px 0; border-top: 1px solid var(--rule); }
.reads li:first-child { border-top: 0; padding-top: 0; }
.reads a { font-weight: 600; }
.reads span { display: block; font-size: 14px; color: var(--soft); }
.terms.related li:nth-child(-n+2) { border-top: 1px solid var(--rule); padding-top: 12px; }
.tools { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--rule); display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s3); align-items: start; }
.copy { font: 600 15px var(--text); color: var(--cobalt-ink); background: var(--cobalt); border: 0; padding: 10px 16px; cursor: pointer; white-space: nowrap; }
.copy:hover { filter: brightness(1.1); }
.cite { font-size: 14px; color: var(--soft); }
.cite span { display: block; font-weight: 600; color: var(--ink); }
.prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); margin-top: var(--s3); }
.prevnext a { text-decoration: none; color: var(--ink); font: 600 18px/1.3 var(--display); padding: var(--s2); background: var(--zone-2); }
.prevnext a:hover { background: var(--zone); }
.prevnext a span { display: block; font: 500 14px var(--text); color: var(--soft); margin-bottom: 2px; }
.prevnext .next { text-align: right; }
.side-in { position: sticky; top: var(--s3); padding-top: 28px; font-size: 15px; }
.side-h { font: 600 15px var(--text); padding-bottom: var(--s1); border-bottom: 2px solid var(--ink); margin-bottom: var(--s1); }
.side ul { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.side li { padding: 6px 0; line-height: 1.35; border-bottom: 1px solid var(--rule); }
.side li a { color: var(--soft); text-decoration: none; }
.side li a:hover { color: var(--cobalt); }
.side li[aria-current] { font-weight: 600; color: var(--ink); box-shadow: inset 3px 0 0 var(--cobalt); padding-left: 10px; }
.side-more a { font-size: 14px; }

/* ---------- deadlines ---------- */
.schedule { border-top: 2px solid var(--ink); margin-top: var(--s2); }
.sch-head { display: grid; grid-template-columns: 110px 150px minmax(0, 1fr) 260px 150px; gap: var(--s3); font-size: 14px; font-weight: 600; color: var(--soft); padding: 10px 0; border-bottom: 1px solid var(--rule); }
.sch-head span:first-child { grid-column: 1 / 3; }
.sch-year { display: grid; grid-template-columns: 110px minmax(0, 1fr); column-gap: var(--s3); border-bottom: 1px solid var(--rule); }
.sch-year h2 { grid-row: 1 / span 20; font-size: 30px; color: var(--cobalt); padding: 14px 0; line-height: 1; }
.sch-row { grid-column: 2; display: grid; grid-template-columns: 150px minmax(0, 1fr) 260px 150px; gap: var(--s3); padding: 14px 0; border-top: 1px solid var(--rule); }
.sch-year h2 + .sch-row { border-top: 0; }
.sch-when { font-weight: 600; white-space: nowrap; }
.sch-who { font-size: 15px; color: var(--soft); }
.sch-who a { margin-left: 4px; }
.sch-status { font-size: 15px; font-weight: 600; color: var(--soft); }
.st-due-now .sch-status, .st-in-force .sch-status, .st-no-public-draft-yet .sch-status { color: var(--hot); }
.st-proposed .sch-status { color: var(--cobalt); }
.aside-note { margin-top: var(--s3); font-size: 15px; color: var(--soft); max-width: var(--col); }

/* ---------- reading list ---------- */
.res-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s4); }
.res-list li { padding: 14px 0; border-top: 1px solid var(--rule); }
.res-list li:nth-child(-n+2) { border-top: 0; padding-top: 0; }
.res-name { font-weight: 600; line-height: 1.35; }
.res-name a { color: var(--ink); text-decoration: none; }
.res-name a:hover { color: var(--cobalt); text-decoration: underline; }
.res-by { font-size: 14px; color: var(--soft); margin-top: 2px; }
.res-by span { margin-left: 10px; padding-left: 10px; border-left: 1px solid var(--field); }
.res-note { font-size: 15px; margin-top: 6px; }

/* ---------- prose ---------- */
.prose { max-width: var(--col); padding-top: var(--s4); }
.prose .lede { margin-top: var(--s2); }
.prose h2 { font-size: 22px; margin: var(--s4) 0 var(--s1); }

/* ---------- footer ---------- */
.foot { border-top: 2px solid var(--ink); padding: var(--s4) 0 var(--s5); font-size: 15px; color: var(--soft); }
.foot-in { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: var(--s2) var(--s4); }
.foot-brand { font: 600 18px var(--display); color: var(--ink); }
.foot-text { max-width: var(--col); }
.foot-links { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 20px; }
.foot-links a { color: var(--soft); }

/* ---------- narrower screens ---------- */
@media (max-width: 1080px) {
  .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stations .ends { display: none; }
  .station a::after { display: none; }
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side-in { position: static; margin-top: var(--s4); padding-top: var(--s3); border-top: 2px solid var(--ink); }
  .side ul, .side-h { display: none; }
  .sch-head { display: none; }
  .sch-year { grid-template-columns: 80px minmax(0, 1fr); }
  .sch-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sch-status { order: -1; font-size: 14px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .strip-in { flex-direction: column; align-items: flex-start; gap: 0; min-height: 0; padding-top: 12px; }
  .strip nav { width: calc(100% + 2 * max(4vw, 16px)); margin: 4px calc(-1 * max(4vw, 16px)) 0; padding: 0 calc(max(4vw, 16px) - 10px); overflow-x: auto; scrollbar-width: none; }
  .strip nav::-webkit-scrollbar { display: none; }
  .strip nav a { padding: 10px 10px 9px; font-size: 14.5px; }
  .intro { padding-top: var(--s3); }
  .lede { font-size: 17px; }
  .anatomy { padding: var(--s2); }
  .finder, .sec, .foot-in { grid-template-columns: minmax(0, 1fr); }
  .finder { gap: var(--s2); }
  .sec { padding: var(--s3) 0; gap: var(--s2); }
  .sec-head p { max-width: none; }
  .foot-links { grid-column: 1; }
  .tools { grid-template-columns: minmax(0, 1fr); }
  .term .plain { font-size: 18px; }
  .prevnext a { font-size: 16px; }
  .sch-year { grid-template-columns: minmax(0, 1fr); }
  .sch-year h2 { grid-row: auto; padding-bottom: 0; }
  .sch-row { grid-column: 1; }
}

/* ---------- diagram marks ---------- */
.diagram .d-box { fill: var(--bg); stroke: var(--field); stroke-width: 1.3; }
.diagram .d-alt { fill: var(--zone-2); stroke-dasharray: 5 4; }
.diagram .d-acc { fill: var(--zone); stroke: var(--cobalt); stroke-width: 1.6; }
.diagram .d-t { font: 600 16px var(--text); fill: var(--ink); }
.diagram .d-box.mono + text { font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
.diagram .d-s { font: 400 14px var(--text); fill: var(--soft); }
.diagram .d-bt { font: 600 14px var(--text); fill: #fff; text-anchor: middle; }
.diagram .d-line { stroke: var(--soft); stroke-width: 1.6; fill: none; }
.diagram .d-head { fill: var(--soft); }
.diagram .d-axis { stroke: var(--rule); stroke-width: 3; }
.diagram .d-dot { fill: var(--cobalt); }
.diagram .d-q { fill: var(--hot); }
.diagram .d-band { fill: var(--zone); stroke: var(--cobalt); stroke-dasharray: 5 4; }
.diagram .d-brace { stroke: var(--soft); stroke-width: 1.5; fill: none; stroke-dasharray: 3 4; }
.diagram .d-bar { fill: var(--cobalt); }
.diagram .d-bar2 { fill: color-mix(in srgb, var(--cobalt) 65%, #0b0d12); }
.diagram .d-bar3 { fill: var(--hot); }
.diagram .d-mark { stroke: var(--hot); stroke-width: 2; stroke-dasharray: 4 4; }
@media (prefers-color-scheme: dark) { .diagram .d-bt { fill: #0a0d18; } }

@media print {
  .strip nav, .side, .tools .copy, .prevnext, .skip, .finder, .foot-links { display: none !important; }
  .strip { background: none; color: #000; border-bottom: 2px solid #000; }
  .brand, .mark { color: #000; }
  .doc { display: block; }
  body { background: #fff; color: #000; }
}

/* ---------- latest ---------- */
.latest-band { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: var(--s2) var(--s4); padding: var(--s3) 0; border-bottom: 1px solid var(--rule); }
.lb-head h2 { font-size: 24px; }
.lb-head a { display: inline-block; margin-top: var(--s1); font-size: 15px; }
.lb-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); }
.lb-list a { display: block; text-decoration: none; color: var(--ink); border-top: 3px solid var(--hot); padding-top: 10px; }
.lb-list a:hover .lb-title { color: var(--cobalt); text-decoration: underline; }
.lb-when { display: block; font-size: 14px; color: var(--soft); }
.lb-title { display: block; font: 600 17px/1.3 var(--display); letter-spacing: -0.01em; margin-top: 4px; }
.news .sec-head { padding-top: 4px; }
.news-when { font: 600 20px var(--display); letter-spacing: -0.01em; }
.news-who { font-size: 15px; color: var(--soft); margin-top: 4px; }
.news-body { max-width: none; }
.news-body h2 { font-size: 24px; margin-bottom: var(--s1); }
.news-body p + p { margin-top: 12px; }
.news-means { background: var(--zone); padding: 12px 16px; }
.news-links { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 15px; }
.news-src { font-size: 14px; color: var(--soft); }
.sec-text { max-width: none; }
.innews { margin-top: var(--s3); border-left: 4px solid var(--hot); padding: 4px 0 4px 16px; }
.innews-h { font-size: 14px; font-weight: 600; color: var(--hot); margin-bottom: 4px; }
.innews p + p { margin-top: 6px; }
.innews a { font-weight: 600; }
.innews span { font-size: 14px; color: var(--soft); margin-left: 6px; white-space: nowrap; }
@media (max-width: 1080px) { .lb-list { grid-template-columns: minmax(0, 1fr); gap: var(--s2); } }
@media (max-width: 760px) { .latest-band { grid-template-columns: minmax(0, 1fr); } .news-when { font-size: 18px; } }

/* ---------- deadlines tracker ---------- */
.years { margin: var(--s2) 0 0; background: var(--zone); padding: var(--s3); }
.years figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1) var(--s3); font-size: 15px; font-weight: 600; margin-bottom: var(--s2); }
.years .key { font-weight: 500; color: var(--soft); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.years .key i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; }
.k-gov { background: var(--cobalt); }
.k-ind { background: color-mix(in srgb, var(--cobalt) 58%, var(--bg)); }
.bars { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; height: 220px; }
.bar { display: grid; grid-template-rows: 22px 1fr 24px; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; font: inherit; color: var(--ink); }
.bar-n { font: 600 15px var(--display); align-self: end; text-align: center; }
.bar-stack { align-self: end; display: flex; flex-direction: column; min-height: 2px; width: 100%; }
.bar-gov { background: var(--cobalt); }
.bar-ind { background: color-mix(in srgb, var(--cobalt) 58%, var(--bg)); }
.bar-y { font-size: 14px; color: var(--soft); text-align: center; align-self: end; border-top: 1px solid var(--field); padding-top: 4px; }
.bar:hover .bar-y, .bar.on .bar-y { color: var(--ink); font-weight: 600; }
.bar.on .bar-stack { outline: 3px solid var(--hot); outline-offset: 2px; }
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 180px)) minmax(0, 1fr); gap: var(--s2); align-items: end; padding: var(--s4) 0 var(--s2); border-bottom: 2px solid var(--ink); position: sticky; top: 0; background: var(--bg); z-index: 5; }
.filters label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.filters select, .filters input { font: 16px var(--text); color: var(--ink); background: var(--bg); border: 1.5px solid var(--field); border-radius: 0; padding: 10px 12px; width: 100%; }
.filters select:focus, .filters input:focus { outline: none; border-color: var(--cobalt); }
.f-out { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; font-size: 15px; color: var(--soft); }
.f-out button { font: 600 15px var(--text); color: var(--cobalt); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.f-out a { font-weight: 600; margin-left: auto; }
.dl-row { display: grid; grid-template-columns: 130px 190px minmax(0, 1fr) 110px 110px 70px; gap: var(--s3); padding: 14px 0; border-bottom: 1px solid var(--rule); }
.dl-row[hidden] { display: none; }
.dl-head { font-size: 14px; font-weight: 600; color: var(--soft); padding: 10px 0; }
.dl-when { font: 600 17px/1.3 var(--display); }
.dl-who p:first-child { font-weight: 600; }
.dl-region, .dl-scope, .dl-note { font-size: 14px; color: var(--soft); }
.dl-what p + p { margin-top: 4px; }
.dl-quote { font-size: 14px; color: var(--soft); font-style: italic; }
.dl-kind, .dl-status, .dl-src { font-size: 15px; }
.dl-status { font-weight: 600; color: var(--soft); }
.st-due-now .dl-status, .st-in-force .dl-status { color: var(--hot); }
.st-proposed .dl-status { color: var(--cobalt); }
.st-done .dl-status { color: var(--soft); font-weight: 500; }
.dl-notes { padding-top: 0; }
.dl-notes h2 { font-size: 22px; margin-bottom: var(--s1); }
@media (max-width: 1080px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); position: static; }
  .dl-head { display: none; }
  .dl-row { grid-template-columns: 110px minmax(0, 1fr); gap: 4px var(--s2); }
  .dl-row > * { grid-column: 2; }
  .dl-when { grid-column: 1; grid-row: 1 / span 5; }
  .dl-kind, .dl-status, .dl-src { display: inline; }
}
@media (max-width: 760px) {
  .years { padding: var(--s2); }
  .bars { gap: 3px; height: 180px; }
  .bar-y { font-size: 11px; writing-mode: vertical-rl; transform: rotate(180deg); border-top: 0; padding: 4px 0 0; justify-self: center; }
  .bar { grid-template-rows: 20px 1fr 44px; }
  .bar-n { font-size: 13px; }
  .filters { grid-template-columns: minmax(0, 1fr); }
  .dl-row { grid-template-columns: minmax(0, 1fr); }
  .dl-row > *, .dl-when { grid-column: 1; grid-row: auto; }
  .f-out a { margin-left: 0; }
}

@media (max-width: 600px) {
  .stations { grid-template-columns: minmax(0, 1fr); }
  .terms, .res-list { grid-template-columns: minmax(0, 1fr); }
  .terms li:nth-child(2), .res-list li:nth-child(2) { border-top: 1px solid var(--rule); padding-top: 12px; }
}

.foot-updated { margin-top: 10px; }
.foot-credit { grid-column: 1 / -1; margin-top: var(--s3); padding-top: var(--s2); border-top: 1px solid var(--rule); font-size: 13.5px; }
.foot-credit a { color: var(--soft); font-weight: 600; }
.lb-list.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.coming .lb-list a { border-top-color: var(--cobalt); }
.lb-who { display: block; font-size: 14px; color: var(--soft); margin-top: 4px; }
.coming .lb-title { font: 500 16px/1.4 var(--text); letter-spacing: 0; }
.dl-link { margin-top: var(--s3); font-weight: 600; }
.dl-link a::after { content: " \2192"; }
@media (max-width: 1080px) { .lb-list.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .lb-list.four { grid-template-columns: minmax(0, 1fr); } }

/* ---------- diagrams page and flows in term pages ---------- */
.flow-stack { display: grid; gap: var(--s3); }
.flow-stack .anatomy { margin: 0; }
.term .anatomy { margin-top: var(--s3); padding: var(--s2); }
.term .stations, .term .stations.has-ends { grid-template-columns: minmax(0, 1fr); gap: 6px; }
.term .station > a, .term .station > div { display: grid; grid-template-columns: 170px minmax(0, 1fr); column-gap: var(--s3); row-gap: 4px; border-top: 0; border-left: 5px solid var(--cobalt); padding: 12px 16px; }
.term .station.is-broken > a, .term .station.is-broken > div { border-left-color: var(--hot); }
.term .station.is-step > a, .term .station.is-step > div { border-left-color: var(--ink); }
.term .station .st-name { grid-row: 1 / span 3; }
.term .station .st-what, .term .station .st-today, .term .station .st-fate { grid-column: 2; }
.term .station .st-today { margin-top: 0; padding-top: 0; }
.term .stations .ends { display: none; }
.term .station > a::after, .term .station > div::after { display: none; }
.term .st-name { font-size: 16px; }
.term .st-what { font-size: 14px; }
.deadlines-flow { margin-bottom: var(--s3); }
.drawings { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.drawings a { text-decoration: none; color: var(--ink); }
.drawings .diagram { margin: 0; }
.drawings figcaption strong { display: block; color: var(--ink); font-size: 15px; }
@media (max-width: 1080px) { .stations.has-ends { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stations { grid-template-columns: repeat(2, minmax(0, 1fr)); } .station > a::after, .station > div::after { display: none; } .drawings { grid-template-columns: minmax(0, 1fr); } }
.key-item { display: inline-flex; align-items: center; }
@media (max-width: 600px) {
  .stations, .stations.has-ends, .term .stations, .term .stations.has-ends { grid-template-columns: minmax(0, 1fr); }
  .anatomy .key { flex-direction: column; align-items: flex-start; gap: 4px; }
}
.sec-flow { grid-column: 1 / -1; }
.sec-flow .anatomy { margin-top: var(--s2); }
body.searching .sec-flow { display: none; }

/* review fixes */
.strip nav a { flex: none; }
.filters select, .filters input { height: 44px; box-sizing: border-box; }
.f-asof { color: var(--soft); margin-left: auto; }
.f-out a { margin-left: 0; }
@media (max-width: 1080px) {
  .dl-row .dl-kind, .dl-row .dl-status, .dl-row .dl-src { grid-column: 2; display: inline-block; }
  .dl-row { grid-template-columns: 110px minmax(0, 1fr) auto auto auto; }
  .dl-row > .dl-who, .dl-row > .dl-what { grid-column: 2 / -1; }
  .dl-row > .dl-kind { grid-column: 2; } .dl-row > .dl-status { grid-column: 3; } .dl-row > .dl-src { grid-column: 4; }
  .dl-row > .dl-kind, .dl-row > .dl-status, .dl-row > .dl-src { margin-top: 6px; font-size: 14px; }
}
@media (max-width: 760px) {
  .dl-row { grid-template-columns: auto auto auto 1fr; column-gap: 14px; }
  .dl-row > .dl-when, .dl-row > .dl-who, .dl-row > .dl-what { grid-column: 1 / -1; }
  .dl-row > .dl-kind { grid-column: 1; } .dl-row > .dl-status { grid-column: 2; } .dl-row > .dl-src { grid-column: 3; }
  .f-asof { margin-left: 0; }
}
.toc .toc-az { color: var(--cobalt); font-weight: 600; }
@media (max-width: 760px) { .strip nav { -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); } }
.flow-finding { flex-basis: 100%; order: 2; font: 500 17px/1.4 var(--display); letter-spacing: -0.005em; color: var(--ink); margin-top: 2px; max-width: 900px; }
.anatomy .key { order: 3; }
.flow-title { order: 1; font-size: 14px; color: var(--soft); font-weight: 600; }
@media (max-width: 600px) { .term .station > a, .term .station > div { grid-template-columns: minmax(0, 1fr); } .term .station .st-name { grid-row: auto; } .term .station .st-what, .term .station .st-today, .term .station .st-fate { grid-column: 1; } }

/* sweep 2: aligned cards, numbers, compare mode, one layout below 900px */
.stations { grid-template-rows: repeat(4, auto); }
.stations > li { grid-row: span 4; display: grid; grid-template-rows: subgrid; }
.stations > li > a, .stations > li > div { grid-row: 1 / -1; display: grid; grid-template-rows: subgrid; height: auto; gap: 6px; }
.stations .st-today { margin-top: 0; padding-top: 4px; align-self: start; }
.station:not(:last-child) > a::after, .station:not(:last-child) > div::after, .has-ends .station > a::after, .has-ends .station > div::after { top: 30px; }
.is-compare .station > a::after, .is-compare .station > div::after { display: none; }
.st-n { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--ink); color: var(--bg); font: 600 12px var(--text); vertical-align: 2px; }
.is-broken .st-n { background: var(--hot); }
.is-safe .st-n { background: var(--cobalt); color: var(--cobalt-ink); }
.flow-finding { text-wrap: balance; max-width: none; }
@media (max-width: 900px) {
  .stations, .stations.has-ends { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; gap: 6px; }
  .stations > li { grid-row: auto; display: block; }
  .stations .ends { display: none; }
  .station > a, .station > div { display: grid; grid-template-rows: none; grid-template-columns: 170px minmax(0, 1fr); column-gap: var(--s3); row-gap: 4px; border-top: 0; border-left: 5px solid var(--cobalt); padding: 12px 16px; }
  .station.is-broken > a, .station.is-broken > div { border-left-color: var(--hot); }
  .station.is-step > a, .station.is-step > div { border-left-color: var(--ink); }
  .station .st-name { grid-row: 1 / span 3; }
  .station .st-what, .station .st-today, .station .st-fate { grid-column: 2; }
  .station > a::after, .station > div::after { display: none !important; }
}
@media (max-width: 600px) {
  .station > a, .station > div { grid-template-columns: minmax(0, 1fr); }
  .station .st-name { grid-row: auto; }
  .station .st-what, .station .st-today, .station .st-fate { grid-column: 1; }
}
.term .stations > li, .term .stations > li > a, .term .stations > li > div { grid-row: auto; grid-template-rows: none; }
.term .stations { grid-template-rows: none; }

/* ---------- compare jurisdictions ---------- */
.compare { margin: var(--s2) 0 var(--s3); }
.compare h2 { font-size: 24px; }
.compare-note { color: var(--soft); font-size: 15px; margin: 6px 0 var(--s2); }
.cmp { width: 100%; border-collapse: collapse; font-size: 15px; font-variant-numeric: tabular-nums; }
.cmp th, .cmp td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.cmp thead th { font-size: 14px; color: var(--soft); font-weight: 600; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.cmp tbody th { font-weight: 600; width: 26%; }
.cmp tbody th a { color: var(--ink); text-decoration: none; }
.cmp tbody th a:hover { color: var(--cobalt); text-decoration: underline; }
.cmp tbody th span { display: block; font-weight: 400; font-size: 14px; color: var(--soft); }
.cmp td:nth-child(4) { font-weight: 600; }
.cmp .none { color: var(--field); }
.cmp tbody tr:hover { background: var(--zone-2); }
@media (max-width: 760px) {
  .cmp thead { display: none; }
  .cmp tr { display: grid; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .cmp th, .cmp td { border: 0; padding: 2px 0; width: auto; }
  .cmp td { display: flex; justify-content: space-between; gap: 12px; }
  .cmp td::before { content: attr(data-l); color: var(--soft); font-weight: 400; }
  .cmp td { text-align: right; }
}
@media (max-width: 760px) { .cmp tbody th { width: auto; } .cmp tr { grid-template-columns: minmax(0, 1fr); } }
.st-date-passed .dl-status { color: var(--soft); font-style: italic; }
.sort-date { font: inherit; font-weight: 600; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; }
.sort-date:hover { color: var(--cobalt); }
.sort-date span { color: var(--cobalt); margin-left: 2px; }
