/* Security Cheat Sheets: one stylesheet for screen and print.
   The sheet <article> is the document; what you see on screen is what the PDF prints. */

/* Self-hosted (SIL OFL, see fonts/OFL.txt): no requests to Google, and PDFs render offline in CI. */
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light dark;
  --paper: #ffffff;
  --desk: #e2e6ea;
  --ink: #132232;
  --ink-2: #485868;
  --ink-3: #6a7988;
  --rule: #d2d9e0;
  --grid: #d3dae1;
  --gap: #edf0f3;
  --link: #0a57a6;
  /* Urgency ramp for deadline tiers, most urgent first. Only used where it encodes urgency. */
  --t1: #b1001c;
  --t2: #dc4a1b;
  --t3: #eb9d10;
  --t4: #7d97af;
  --t5: #bac5cf;
  --attack: #b1001c;
  --attack-tint: rgba(177, 0, 28, 0.2);
  --ok: #1d7444;
  --warn: #8a5800;
  --draft-bg: #fff2cc;
  --draft-ink: #5a4200;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121a22;
    --desk: #0a0f14;
    --ink: #e3e9ee;
    --ink-2: #a6b2be;
    --ink-3: #84919e;
    --rule: #283440;
    --grid: #26323d;
    --gap: #1a232c;
    --link: #79b2ee;
    --t1: #ff4d5d;
    --t2: #ff7c48;
    --t3: #ffb52f;
    --t4: #7d97af;
    --t5: #3e4b58;
    --attack: #ff4d5d;
    --attack-tint: rgba(255, 77, 93, 0.18);
    --ok: #63d394;
    --warn: #ffc65c;
    --draft-bg: #31280c;
    --draft-ink: #ffe09b;
  }
}

/* ---- Base ------------------------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.5 var(--font); }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
a { color: var(--link); text-underline-offset: 0.15em; }
code { font-size: 0.92em; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -100px; z-index: 10; padding: 8px 12px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 8px; }
.print-only { display: none; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 20px 24px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 1.125rem; font-weight: 800; color: var(--ink); text-decoration: none; }
.site-header nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-size: 0.9375rem; }
.site-header nav a { color: var(--ink-2); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); text-decoration: underline; }

/* The mark repeats the map legend: covered, being written, not covered. */
.mark { flex: none; width: 20px; height: 20px; }
.mark__covered { fill: var(--ink); }
.mark__planned { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.mark__gap { fill: var(--grid); }

.site-footer { border-top: 1px solid var(--rule); }
.site-footer__inner {
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) auto;
  gap: 10px 32px;
  align-items: baseline;
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 40px;
  color: var(--ink-2);
  font-size: 0.875rem;
}
.site-footer__brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; }
.site-footer__brand .mark { align-self: center; }
.site-footer__about { max-width: 36em; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer nav a { color: var(--ink-2); }
.site-footer nav a:hover { color: var(--ink); }
@media screen and (max-width: 899px) {
  .site-footer__inner { grid-template-columns: minmax(0, 1fr); padding: 24px 16px 32px; }
}

.fresh {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  vertical-align: 1px;
}
.fresh[hidden] { display: none; }
.fresh[data-status="current"] { color: var(--ok); }
.fresh[data-status="due"] { color: var(--warn); }
.fresh[data-status="overdue"] { color: var(--attack); }
.tag { display: inline-block; padding: 0 7px; background: var(--draft-bg); color: var(--draft-ink); font-size: 0.75rem; font-weight: 700; }

/* ---- Library index --------------------------------------------------------------------------- */

.library { max-width: 1240px; margin: 0 auto; padding: 40px 24px 80px; }
.library__intro h1 {
  max-width: 14em;
  font-size: clamp(2.25rem, 1.2rem + 3.8vw, 3.75rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.lede { max-width: 34em; margin-top: 20px; color: var(--ink-2); font-size: 1.3125rem; line-height: 1.45; }

/* Capability map: domains as columns, one cell per capability. Visual weight follows coverage:
   filled means a sheet exists, dashed means one is being written, a light outline means a gap. */
.map { margin-top: 64px; }
.map__head { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 10px 32px; align-items: baseline; }
.map__head h2,
.sheets h2 { font-size: 1.3125rem; font-weight: 800; }
.map__head p { max-width: 40em; color: var(--ink-2); }
.map__legend { grid-column: 2; display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 0; list-style: none; color: var(--ink-2); font-size: 0.875rem; }
.map__legend li { display: flex; align-items: center; gap: 8px; }
.swatch { width: 20px; height: 14px; }
.swatch--covered { background: var(--ink); }
.swatch--planned { border: 1.5px dashed var(--ink-3); }
.swatch--gap { border: 1px solid var(--grid); }
.map__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px 24px; margin-top: 28px; }
.domain h3 {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding-top: 10px;
  border-top: 3px solid var(--ink);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}
.domain__count { flex: none; color: var(--ink-3); font-size: 0.8125rem; font-weight: 400; }
.domain__caps { display: grid; gap: 6px; margin-top: 10px; padding: 0; list-style: none; }
.cap { position: relative; min-height: 50px; padding: 9px 12px; font-size: 0.9375rem; line-height: 1.35; }
.cap__name { display: block; font-weight: 700; }
.cap__status { display: block; color: var(--ink-3); font-size: 0.8125rem; }
.cap--gap { padding: 8px 11px; border: 1px solid var(--grid); color: var(--ink-3); }
.cap--gap .cap__name { font-weight: 400; }
.cap--planned { padding: 7.5px 10.5px; border: 1.5px dashed var(--ink-3); color: var(--ink-2); }
.cap--covered { background: var(--ink); color: var(--paper); }
.cap--covered .cap__name { color: var(--paper); text-decoration: none; }
.cap--covered .cap__name::after { content: ""; position: absolute; inset: 0; }
.cap--covered:hover .cap__name { text-decoration: underline; text-underline-offset: 3px; }
.cap--covered .cap__name:focus-visible { outline-color: var(--paper); }
.cap__answer { display: block; margin-top: 4px; font-size: 0.8125rem; opacity: 0.85; }
@media screen and (max-width: 1099px) {
  .map__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 599px) {
  .map__head { grid-template-columns: minmax(0, 1fr); }
  .map__legend { grid-column: 1; }
  .map__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

.sheets { margin-top: 80px; }
.index { margin-top: 18px; padding: 0; list-style: none; border-top: 2px solid var(--ink); }
.index__row {
  position: relative;
  display: grid;
  grid-template-columns: 15rem minmax(0, 1fr) 15rem;
  gap: 6px 32px;
  align-items: baseline;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.index__topic { font-size: 1.5rem; font-weight: 800; line-height: 1.2; color: var(--ink); text-decoration: none; }
a.index__topic::after { content: ""; position: absolute; inset: 0; }
.index__row:hover a.index__topic { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.index__answer { max-width: 36em; font-size: 1.125rem; line-height: 1.45; }
.index__meta { display: grid; gap: 6px; justify-items: start; color: var(--ink-2); font-size: 0.875rem; }
.index__badges { display: flex; flex-wrap: wrap; gap: 6px; }
.index__badges .fresh { margin-left: 0; }
.index__pdf { position: relative; z-index: 1; color: var(--link); font-weight: 700; }

.how { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 16px 32px; margin-top: 88px; }
.how h2 { font-size: 1.3125rem; font-weight: 800; }
.how dl { display: grid; gap: 20px; max-width: 38em; }
.how dt { font-weight: 800; }
.how dd { margin-top: 2px; color: var(--ink-2); }

/* ---- Sheet page ------------------------------------------------------------------------------ */

.page-sheet { background: var(--desk); }
.sheet-layout {
  display: grid;
  grid-template-columns: minmax(0, 960px) 13.5rem;
  justify-content: center;
  gap: 32px;
  padding: 0 24px 72px;
}
.sheet { min-width: 0; padding: 48px 56px 44px; background: var(--paper); border: 1px solid var(--rule); }

.note { margin-bottom: 28px; padding: 10px 14px; font-size: 0.875rem; }
.note[hidden] { display: none; }
.note--draft { background: var(--draft-bg); color: var(--draft-ink); }
.note--stale { background: var(--attack-tint); font-weight: 700; }

.sheet__head { margin-bottom: 44px; padding-bottom: 32px; border-bottom: 2px solid var(--ink); }
.sheet h1 {
  max-width: 16em;
  font-size: clamp(2.25rem, 1.5rem + 2.4vw, 3rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
}
.answer { max-width: 34em; margin-top: 16px; font-size: 1.3125rem; line-height: 1.42; }
.meta { display: flex; flex-wrap: wrap; gap: 10px 36px; margin-top: 24px; font-size: 0.875rem; }
.meta dt { color: var(--ink-3); }
.meta dd { font-weight: 700; }

.sheet__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 52px 48px; align-items: start; }
.block--full { grid-column: 1 / -1; }
.block > h2 { margin-bottom: 14px; font-size: 1.3125rem; font-weight: 800; line-height: 1.2; }
.block__intro { max-width: 44em; margin: -6px 0 18px; color: var(--ink-2); }
.block h3 { font-size: 1rem; font-weight: 800; line-height: 1.3; }
sup.cite { line-height: 0; }
.cite a { padding: 0 0.1em; font-size: 0.72em; font-weight: 700; text-decoration: none; }
.cite + .cite::before { content: ","; font-size: 0.72em; }

/* The patch clock: tier rows over a shared log time axis. */
.clock { --label-w: 15.5rem; --pre: 0%; --span: 78%; }
.clock.has-before { --pre: 11%; --span: 70%; }
.clock__axis-row,
.tier { display: grid; grid-template-columns: var(--label-w) minmax(0, 1fr); column-gap: 28px; }
.clock__axis { grid-column: 2; border-bottom: 2px solid var(--ink); }
.clock__before { max-width: 34em; margin-bottom: 4px; color: var(--attack); font-size: 0.8125rem; font-weight: 700; line-height: 1.35; }
.clock__ticks { position: relative; height: 26px; }
.clock__tick {
  position: absolute;
  bottom: 5px;
  left: calc(var(--pre) + var(--p) * var(--span));
  transform: translateX(-50%);
  color: var(--ink-2);
  font-size: 0.8125rem;
  white-space: nowrap;
}
.clock__tick.is-origin { color: var(--ink); font-weight: 700; }
.clock__tiers { padding: 0; list-style: none; }
.tier { border-bottom: 1px solid var(--rule); }
.tier__label { padding: 14px 0; }
.tier__name { display: flex; align-items: center; gap: 8px; }
.tier__name::before { content: ""; flex: none; width: 10px; height: 10px; background: var(--tone); }
.tier__label p { margin-top: 3px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.4; }
.tier__track { position: relative; min-height: 60px; }
.tier__grid { position: absolute; top: 0; bottom: 0; left: calc(var(--pre) + var(--p) * var(--span)); width: 1px; background: var(--grid); }
.tier__grid.is-origin { width: 2px; margin-left: -1px; background: var(--ink); }
.has-before .tier__track::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--pre);
  background: repeating-linear-gradient(135deg, var(--attack-tint) 0 5px, transparent 5px 10px);
}
.tier__bar {
  position: absolute;
  top: 50%;
  left: var(--pre);
  width: calc(var(--to) * var(--span));
  height: 14px;
  margin-top: -7px;
  background: var(--tone);
  transform-origin: left center;
}
.tier__contain {
  position: absolute;
  top: 50%;
  left: calc(var(--pre) + var(--p) * var(--span));
  width: 3px;
  height: 22px;
  margin: -11px 0 0 -1.5px;
  background: var(--paper);
}
.tier__contain span {
  position: absolute;
  bottom: calc(100% + 1px);
  left: 50%;
  padding: 0 3px;
  background: var(--paper);
  transform: translateX(-50%);
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.tier__deadline {
  position: absolute;
  top: 50%;
  left: calc(var(--pre) + var(--to) * var(--span) + 10px);
  display: flex;
  align-items: baseline;
  gap: 4px;
  padding: 2px 4px 2px 0;
  background: var(--paper);
  line-height: 1;
  white-space: nowrap;
  transform: translateY(-50%);
}
.tier__n { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.02em; }
.tier__unit { color: var(--ink-2); font-size: 0.875rem; font-weight: 700; }
.clock figcaption { max-width: 52em; margin-top: 14px; color: var(--ink-2); font-size: 0.875rem; }

@media (prefers-reduced-motion: no-preference) {
  .tier__bar { animation: grow 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(150ms + var(--i) * 90ms); }
  .tier__deadline,
  .tier__contain { animation: appear 300ms ease-out both; animation-delay: calc(650ms + var(--i) * 90ms); }
}
@keyframes grow { from { transform: scaleX(0); } }
@keyframes appear { from { opacity: 0; } }

/* Ranked actions: the boxed "remember this" block. */
.block--ranked { padding: 22px 24px 6px; border: 2px solid var(--ink); }
.ranked { padding: 0; list-style: none; counter-reset: rank; }
.ranked > li { display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: 10px; padding-bottom: 16px; counter-increment: rank; }
.ranked > li::before { content: counter(rank); font-size: 2.25rem; font-weight: 200; line-height: 0.9; }
.ranked p,
.steps p { margin-top: 2px; color: var(--ink-2); font-size: 0.9375rem; }

/* Steps: a sequence, so numbered and connected. */
.steps { padding: 0; list-style: none; counter-reset: step; }
.steps > li { position: relative; padding: 2px 0 18px 42px; counter-increment: step; }
.steps > li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--paper);
  font-size: 0.8125rem;
  font-weight: 800;
}
.steps > li:not(:last-child)::after { content: ""; position: absolute; top: 28px; bottom: 0; left: 13px; width: 2px; background: var(--rule); }

.list { padding-left: 1.15em; }
.list > li + li { margin-top: 8px; }
.list > li::marker { color: var(--ink-3); }
.block--full > .list { columns: 2; column-gap: 48px; }
.block--full > .list > li { break-inside: avoid; }

.columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.column { padding-top: 12px; border-top: 2px solid var(--ink); }
.column h3 { margin-bottom: 8px; }
.column .list { font-size: 0.9375rem; }

/* Reporting clocks: steps sit on a line, numbers knocked out of it. */
.timelines { display: grid; gap: 28px; }
.block--full .timelines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.timeline__scope { margin: 3px 0 14px; color: var(--ink-2); font-size: 0.875rem; }
/* A dot on the line marks each step; the date sits below it, so long dates never crowd the line. */
.timeline__steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  gap: 0 14px;
  padding: 18px 0 0;
  list-style: none;
}
.timeline__steps::before { content: ""; position: absolute; top: 5px; right: 0; left: 0; height: 2px; background: var(--ink); }
.timeline__steps > li { position: relative; }
.timeline__steps > li::before {
  content: "";
  position: absolute;
  top: -18px;
  left: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 3px var(--paper);
}
.timeline__at { display: block; font-size: 1.0625rem; font-weight: 800; line-height: 1.3; }
.timeline__what { display: block; margin-top: 3px; color: var(--ink-2); font-size: 0.875rem; line-height: 1.4; }

.sheet__foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 24px 48px;
  margin-top: 60px;
  padding-top: 22px;
  border-top: 2px solid var(--ink);
  font-size: 0.875rem;
}
.sheet__foot h2 { margin-bottom: 10px; font-size: 1rem; font-weight: 800; }
.changes dt { font-weight: 700; }
.changes dd { margin-bottom: 10px; color: var(--ink-2); }
.sources { padding-left: 1.6em; color: var(--ink-2); }
.sources li + li { margin-top: 5px; }
.sources li:target { background: var(--draft-bg); color: var(--ink); }
.sources a { color: var(--ink); }
.sources__host { color: var(--ink-3); }

/* Rail: screen-only tools beside the document. */
.rail { position: sticky; top: 24px; align-self: start; font-size: 0.9375rem; }
.rail__group + .rail__group { margin-top: 36px; }
.rail__title { margin-bottom: 10px; font-size: 0.875rem; font-weight: 800; }
.button {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  font: 700 0.9375rem/1.3 var(--font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { box-shadow: inset 0 0 0 1px var(--ink); }
.button--primary { background: var(--ink); color: var(--paper); }
.button--primary:hover { box-shadow: inset 0 0 0 2px var(--paper); }
.button + .button { margin-top: 8px; }
.rail__more { display: flex; gap: 16px; margin-top: 12px; font-size: 0.875rem; }
.rail__status { min-height: 1.4em; margin-top: 8px; color: var(--ink-2); font-size: 0.8125rem; }
.toc { padding: 0; list-style: none; font-size: 0.875rem; }
.toc a { display: block; padding: 4px 0 4px 12px; border-left: 2px solid var(--rule); color: var(--ink-2); text-decoration: none; }
.toc a:hover,
.toc a[aria-current="location"] { border-color: var(--ink); color: var(--ink); }
.toc a[aria-current="location"] { font-weight: 700; }

.crumbs { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-bottom: 14px; color: var(--ink-3); font-size: 0.875rem; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }

/* ---- Responsive ------------------------------------------------------------------------------ */
/* Screen only: A4's printable width (about 700px) would otherwise trigger the phone layout in the PDF. */

@media screen and (max-width: 1239px) {
  .sheet-layout { grid-template-columns: minmax(0, 960px); gap: 16px; }
  .rail { position: static; order: -1; }
  .rail__toc { display: none; }
  .rail__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
  .rail__actions .rail__title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .button { width: auto; }
  .button + .button { margin-top: 0; }
  .rail__more { margin: 0 0 0 8px; }
  .rail__status { flex-basis: 100%; min-height: 0; margin: 0; }
}

@media screen and (max-width: 899px) {
  .index__row,
  .how { grid-template-columns: minmax(0, 1fr); }
  .columns { grid-template-columns: minmax(0, 1fr); }
}

@media screen and (max-width: 759px) {
  .site-header { padding: 16px; }
  .library { padding: 24px 16px 64px; }
  .sheet-layout { gap: 0; padding: 0; }
  .rail { padding: 0 16px 16px; }
  .sheet { padding: 28px 16px 36px; border-width: 1px 0 0; }
  .sheet__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .sheet__foot { grid-template-columns: minmax(0, 1fr); }
  .block--ranked { padding: 18px 16px 4px; }
  .block--full .timelines { grid-template-columns: minmax(0, 1fr); }
  .block--full > .list { columns: 1; }
  .clock { --span: 66%; }
  .clock.has-before { --pre: 12%; --span: 64%; }
  .clock__axis-row,
  .tier { grid-template-columns: minmax(0, 1fr); }
  .clock__axis { grid-column: 1; }
  .tier__label { padding-bottom: 0; }
  .tier__track { min-height: 64px; }
  .tier__n { font-size: 1.75rem; }
  .clock__tick.is-minor { display: none; }
}

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

@page { size: A4; margin: 10mm 12mm 13mm; }

@media print {
  :root {
    color-scheme: light;
    --paper: #fff;
    --desk: #fff;
    --ink: #000;
    --ink-2: #333;
    --ink-3: #555;
    --rule: #c8c8c8;
    --grid: #e4e4e4;
    --link: #000;
    --t1: #b1001c;
    --t2: #dc4a1b;
    --t3: #eb9d10;
    --t4: #7d97af;
    --t5: #bac5cf;
    --attack: #b1001c;
    --attack-tint: rgba(177, 0, 28, 0.15);
    --draft-bg: #fff2cc;
    --draft-ink: #5a4200;
  }
  /* Cheat-sheet density: 7.5pt body text, tighter rhythm, same structure as the screen. */
  html { font-size: 10px; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none !important; }
  .site-header, .site-footer, .crumbs, .rail, .skip, .note--stale { display: none !important; }
  .print-only { display: block; }
  a { color: inherit; text-decoration: none; }
  .sheet-layout { display: block; padding: 0; }
  .sheet { padding: 0; border: 0; }
  .note--draft { margin-bottom: 10px; padding: 4px 8px; }
  .sheet__head { margin-bottom: 14px; padding-bottom: 10px; }
  .sheet h1 { font-size: 22pt; }
  .answer { max-width: none; margin-top: 6px; font-size: 11pt; }
  .meta { gap: 4px 28px; margin-top: 8px; }
  .sheet__grid { gap: 12px 24px; }
  .block > h2 { margin-bottom: 5px; font-size: 11pt; }
  .block__intro { max-width: none; margin: -2px 0 6px; }
  /* Lists may split between items; headings stay with their content; charts and boxes stay whole. */
  .clock, .block--ranked, .block--timelines, .list > li, .steps > li, .sources li { break-inside: avoid; }
  .block > h2, .block__intro, .column h3 { break-after: avoid; }

  .clock { --label-w: 19rem; }
  .tier__label { padding: 5px 0; }
  .tier__label p { margin-top: 1px; }
  .tier__track { min-height: 36px; }
  .tier__bar { height: 10px; margin-top: -5px; }
  .tier__contain { height: 16px; margin-top: -8px; }
  .tier__n { font-size: 16pt; }
  .clock figcaption { max-width: none; margin-top: 6px; }

  .block--ranked { padding: 12px 14px 4px; }
  .ranked > li { padding-bottom: 8px; }
  .ranked > li::before { font-size: 1.75rem; }
  .steps > li { padding-bottom: 8px; }
  .list > li + li { margin-top: 3px; }
  .columns { gap: 16px; }
  .column { padding-top: 6px; }
  .timelines { gap: 12px; }
  .timeline__scope { margin-bottom: 8px; }

  .sheet__foot { grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 16px; padding-top: 10px; font-size: 7.5pt; }
  .sheet__foot h2 { margin-bottom: 4px; }
  .changes > div { display: flex; gap: 8px; }
  /* Only the latest entry prints: every review adds one, and the full history stays online. */
  .changes > div + div { display: none; }
  .changes dd { margin-bottom: 2px; }
  .sources { columns: 2; column-gap: 24px; }
  .sources li + li { margin-top: 2px; }
}
