/* =========================================================================
   PC Fieldbook: a field manual for the home PC
   Ink on white stock, signal-orange index tabs, NOTE / CAUTION / WARNING plates.
   ========================================================================= */

/* ---------- Fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-latin-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/atkinson-next-latin-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('fonts/atkinson-next-latin-italic-var.woff2') format('woff2');
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --paper: oklch(1 0 0);
  --ink: oklch(0.2 0.01 45);
  --ink-soft: oklch(0.29 0.01 45);
  --ink-2: oklch(0.4 0.01 45);
  --ink-3: oklch(0.49 0.01 45);
  --rule: oklch(0.86 0.004 45);
  --panel: oklch(0.966 0 0);
  --panel-2: oklch(0.93 0 0);
  --signal: oklch(0.72 0.175 48);
  --signal-deep: oklch(0.66 0.185 45);
  --signal-ink: oklch(0.5 0.15 42);
  --note: oklch(0.44 0.13 258);
  --note-bg: oklch(0.965 0.018 258);
  --warn: oklch(0.49 0.18 27);
  --warn-bg: oklch(0.968 0.018 27);
  --done: oklch(0.47 0.12 150);
  --done-bg: oklch(0.955 0.035 150);
  --on-ink: oklch(0.94 0.004 45);
  --on-ink-2: oklch(0.8 0.006 45);
  --focus: oklch(0.44 0.13 258);

  --font-display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --font-text: 'Atkinson Hyperlegible Next', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Mono', 'SF Mono', Consolas, monospace;

  --step--1: 0.9375rem;
  --step-0: clamp(1.0625rem, 1rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.1875rem, 1.1rem + 0.35vw, 1.3125rem);
  --step-2: clamp(1.4375rem, 1.2rem + 0.9vw, 1.8125rem);
  --step-3: clamp(1.75rem, 1.35rem + 1.6vw, 2.5rem);
  --step-4: clamp(2.125rem, 1.45rem + 2.9vw, 3.5rem);
  --step-5: clamp(2.75rem, 1.5rem + 5.2vw, 5.5rem);

  --wrap: 76rem;
  --gutter: clamp(1rem, 0.55rem + 2vw, 2rem);
  --band: clamp(3.25rem, 2rem + 5vw, 6.5rem);
  --radius: 4px;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
  --rule-heavy: 2px solid var(--ink);

  --z-sticky: 10;
  --z-thumbs: 20;
  --z-nav: 30;
  --z-consent: 40;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-stretch: 80%;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
p, li { text-wrap: pretty; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
::selection { background: var(--signal); color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -10rem; z-index: var(--z-consent);
  background: var(--ink); color: var(--paper); padding: 0.75rem 1rem; font-weight: 700; border-radius: var(--radius);
}
.skip:focus { top: 0.75rem; }
.icon { width: 1.25em; height: 1.25em; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.875rem; padding: 0.6rem 1.15rem;
  font-family: var(--font-display); font-weight: 700; font-stretch: 100%; font-size: 1rem; line-height: 1.1;
  border: var(--rule-heavy); border-radius: var(--radius);
  text-decoration: none; cursor: pointer;
  transition: background-color 160ms var(--ease), color 160ms var(--ease), transform 160ms var(--ease);
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn:active { transform: translateY(1px); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-soft); }
.btn--line { background: transparent; color: var(--ink); }
.btn--line:hover { background: var(--ink); color: var(--paper); }
.btn[aria-pressed='true'].btn--ink { background: var(--done); border-color: var(--done); }
.btn[aria-pressed='true'].btn--line { background: var(--ink); color: var(--paper); }
.linklike {
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px;
}

/* ---------- Strip + masthead ---------- */
.strip { background: var(--ink); color: var(--on-ink); font-size: 0.875rem; line-height: 1.4; }
.strip__inner { display: flex; justify-content: space-between; gap: 1rem; padding-block: 0.5rem; }
.strip__right { color: var(--on-ink-2); }
@media (max-width: 52rem) { .strip__right { display: none; } }

.masthead { background: var(--paper); border-bottom: var(--rule-heavy); position: relative; z-index: var(--z-nav); }
.masthead__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); flex: none; }
.logo__mark { width: 2.125rem; height: 2.125rem; }
.lm-book { fill: var(--ink); }
.lm-tab { fill: var(--signal); }
.lm-line { stroke: var(--paper); }
.logo__name {
  font-family: var(--font-display); font-weight: 800; font-stretch: 82%;
  font-size: 1.4375rem; letter-spacing: -0.01em; line-height: 1;
}
.logo--light { color: var(--on-ink); }
.logo--light .lm-book { fill: var(--on-ink); }
.logo--light .lm-line { stroke: var(--ink); }

.masthead__search { position: relative; flex: 1 1 16rem; max-width: 22rem; margin-left: auto; }
.masthead__search .icon { position: absolute; left: 0.8rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.masthead__search input {
  width: 100%; height: 2.875rem; padding: 0 0.9rem 0 2.6rem;
  border: 1.5px solid var(--ink-3); border-radius: var(--radius); background: var(--paper); font-size: 1rem;
}
.masthead__search input::placeholder { color: var(--ink-3); opacity: 1; }
.masthead__search input:focus { border-color: var(--ink); }

.nav ul { display: flex; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: block; padding: 0.7rem 0.75rem; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 650; font-stretch: 95%; font-size: 1.0625rem; line-height: 1.2;
  text-decoration: none; color: var(--ink);
  background-image: linear-gradient(var(--signal), var(--signal));
  background-repeat: no-repeat; background-position: 0.75rem calc(100% - 0.4rem); background-size: 0 3px;
  transition: background-size 220ms var(--ease);
}
.nav a:hover, .nav a[aria-current='page'] { background-size: calc(100% - 1.5rem) 3px; }

.nav-toggle {
  display: none; align-items: center; gap: 0.55rem; margin-left: auto;
  min-height: 2.875rem; padding: 0 0.9rem; border: var(--rule-heavy); border-radius: var(--radius);
  background: var(--paper); font-family: var(--font-display); font-weight: 700; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 1.125rem; height: 2px; background: currentColor; position: relative;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ''; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded='true'] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 64rem) {
  .masthead__search { max-width: 16rem; }
  .nav a { padding-inline: 0.55rem; font-size: 1rem; }
}
@media (max-width: 56rem) {
  .masthead__inner { flex-wrap: wrap; gap: 0.75rem; padding-block: 0.65rem; }
  .masthead__search { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav { display: none; flex-basis: 100%; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; gap: 0; border-top: 1px solid var(--rule); padding-top: 0.5rem; }
  .nav a { padding: 0.85rem 0.25rem; border-bottom: 1px solid var(--rule); border-radius: 0; background-position: 0.25rem calc(100% - 0.35rem); }
  .nav a:hover, .nav a[aria-current='page'] { background-size: 2.5rem 3px; }
}

/* ---------- Thumb index (wide screens only) ---------- */
.thumbs { display: none; }
@media (min-width: 90rem) and (min-height: 46rem) {
  .thumbs { display: block; position: fixed; right: 0; top: 11rem; z-index: var(--z-thumbs); }
  .thumbs ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
  .thumbs a {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    width: 2.75rem; padding: 0.6rem 0 0.75rem; margin-left: auto;
    background: var(--panel-2); color: var(--ink); text-decoration: none;
    border-radius: 6px 0 0 6px;
    transition: width 220ms var(--ease), background-color 160ms var(--ease);
  }
  .thumbs__n { font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.125rem; line-height: 1; }
  .thumbs__label {
    writing-mode: vertical-rl; transform: rotate(180deg);
    font-family: var(--font-display); font-weight: 650; font-stretch: 110%; font-size: 0.8125rem; letter-spacing: 0.04em;
  }
  .thumbs a:hover { width: 3.25rem; background: var(--rule); }
  .thumbs a[aria-current='true'] { width: 3.5rem; background: var(--ink); color: var(--signal); }
}

/* ---------- Shared type pieces ---------- */
.h-section { font-size: var(--step-4); font-stretch: 76%; font-weight: 820; line-height: 1; letter-spacing: -0.01em; }
.h-section--sm { font-size: var(--step-3); }
.band { padding-block: var(--band); border-top: var(--rule-heavy); }
.band__head { max-width: 48rem; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
.band__head > p { margin-top: 0.9rem; color: var(--ink-2); font-size: var(--step-1); max-width: 40rem; }
.band__head--split { max-width: none; display: grid; gap: 1rem 3rem; align-items: end; }
@media (min-width: 60rem) { .band__head--split { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); } .band__head--split > p { margin-top: 0; } }

.code-tab {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 3.1rem; height: 1.875rem; padding: 0 0.5rem;
  background: var(--signal); color: var(--ink);
  font-family: var(--font-display); font-weight: 750; font-stretch: 112%; font-size: 0.9375rem; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: 0.02em;
  border-radius: var(--radius) 9px 9px var(--radius);
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.code-tab--xl { min-width: 4.25rem; height: 2.75rem; font-size: 1.3125rem; }

.meta { display: inline-flex; align-items: center; gap: 0.4rem; }
.meta .icon { width: 1.05em; height: 1.05em; color: var(--ink-3); }

/* ---------- Cover (home hero) ---------- */
.cover { background: var(--signal); color: var(--ink); border-bottom: var(--rule-heavy); overflow: hidden; }
.cover :focus-visible { outline-color: var(--ink); }
.cover__grid {
  display: grid; gap: clamp(2.25rem, 4vw, 4rem); align-items: center;
  padding-block: clamp(2.5rem, 1.5rem + 5vw, 5.5rem);
}
@media (min-width: 62rem) { .cover__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); } }
.cover__edition {
  font-family: var(--font-display); font-weight: 700; font-stretch: 118%; font-size: 0.875rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.cover__edition span { margin-inline: 0.35rem; opacity: 0.55; }
.cover__title {
  margin-top: 1.1rem; font-size: var(--step-5); font-stretch: 72%; font-weight: 860;
  line-height: 0.92; letter-spacing: -0.015em; word-spacing: 0.05em; max-width: 11.5ch;
}
.cover__lede { margin-top: 1.4rem; font-size: var(--step-1); line-height: 1.5; max-width: 34rem; }
.cover__search { margin-top: 2rem; max-width: 34rem; }
.cover__search-label { display: block; font-family: var(--font-display); font-weight: 700; font-stretch: 100%; margin-bottom: 0.5rem; }
.cover__field {
  position: relative; display: flex; align-items: stretch;
  background: var(--paper); border: var(--rule-heavy); border-radius: var(--radius); padding: 0.3rem;
}
.cover__field > .icon { position: absolute; left: 0.95rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.cover__field input {
  flex: 1; min-width: 0; border: 0; background: transparent; padding: 0 0.5rem 0 2.6rem; height: 2.875rem; font-size: 1.0625rem;
}
.cover__field input::placeholder { color: var(--ink-3); opacity: 1; }
.cover__field input:focus { outline: none; }
.cover__field:focus-within { box-shadow: 0 0 0 3px var(--ink); }
.cover__field .btn { flex: none; }
.cover__facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin: 1.5rem 0 0; padding: 0; list-style: none; font-weight: 650; }
.cover__facts li { display: inline-flex; align-items: center; gap: 0.4rem; }
.cover__facts .icon { width: 1.15em; height: 1.15em; stroke-width: 2.5; }
@media (max-width: 30rem) {
  .cover__field { flex-wrap: wrap; }
  .cover__field input { flex-basis: 100%; }
  .cover__field .btn { flex: 1 1 100%; margin-top: 0.3rem; }
  .cover__field > .icon { top: 1.75rem; }
}

/* ---------- Fig. 1 ---------- */
.fig { margin: 0; background: var(--paper); border: var(--rule-heavy); border-radius: var(--radius); }
.fig__frame { padding: clamp(0.75rem, 2vw, 1.25rem) clamp(0.5rem, 2vw, 1.25rem) 0; }
.fig__art { width: 100%; height: auto; overflow: visible; }
.fig__art path, .fig__art rect, .fig__art circle { fill: none; stroke: var(--ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.fig__art .thin { stroke-width: 1.6; }
.fig__art .hair { stroke-width: 1.2; stroke: var(--ink-3); }
.fig__art .dash { stroke-dasharray: 3 5; }
.fig__art .fill-paper { fill: var(--paper); }
.fig__art .fill-ink { fill: var(--ink); stroke: none; }
.fig__art .stroke-paper { stroke: var(--paper); stroke-width: 2.4; }

.callout__lead { stroke-width: 1.6 !important; stroke-dasharray: 1; stroke-dashoffset: 0; }
.fig__art .callout__dot { fill: var(--ink); stroke: none; }
.fig__art .callout__ring { fill: var(--paper); stroke-width: 2.4; transition: fill 180ms var(--ease); }
.callout__letter {
  font-family: var(--font-display); font-weight: 800; font-stretch: 100%; font-size: 17px;
  fill: var(--ink); transition: fill 180ms var(--ease);
}
.callout:nth-child(1) { --d: 0ms; } .callout:nth-child(2) { --d: 90ms; } .callout:nth-child(3) { --d: 180ms; }
.callout:nth-child(4) { --d: 270ms; } .callout:nth-child(5) { --d: 360ms; } .callout:nth-child(6) { --d: 450ms; }
.callout__ring, .callout__letter, .callout__dot { transform-box: fill-box; transform-origin: center; }
@media (prefers-reduced-motion: no-preference) {
  .callout__lead { animation: lead-draw 700ms var(--ease) both; animation-delay: calc(300ms + var(--d)); }
  .callout__dot { animation: stamp 300ms var(--ease) both; animation-delay: calc(260ms + var(--d)); }
  .callout__ring, .callout__letter { animation: stamp 420ms var(--ease) both; animation-delay: calc(700ms + var(--d)); }
}
@keyframes lead-draw { from { stroke-dashoffset: 1; } }
@keyframes stamp { from { opacity: 0; transform: scale(0.55); } }

.fig:has([data-callout-link='A']:is(:hover, :focus-visible)) [data-callout='A'] .callout__ring,
.fig:has([data-callout-link='B']:is(:hover, :focus-visible)) [data-callout='B'] .callout__ring,
.fig:has([data-callout-link='C']:is(:hover, :focus-visible)) [data-callout='C'] .callout__ring,
.fig:has([data-callout-link='D']:is(:hover, :focus-visible)) [data-callout='D'] .callout__ring,
.fig:has([data-callout-link='E']:is(:hover, :focus-visible)) [data-callout='E'] .callout__ring,
.fig:has([data-callout-link='F']:is(:hover, :focus-visible)) [data-callout='F'] .callout__ring { fill: var(--ink); }
.fig:has([data-callout-link='A']:is(:hover, :focus-visible)) [data-callout='A'] .callout__letter,
.fig:has([data-callout-link='B']:is(:hover, :focus-visible)) [data-callout='B'] .callout__letter,
.fig:has([data-callout-link='C']:is(:hover, :focus-visible)) [data-callout='C'] .callout__letter,
.fig:has([data-callout-link='D']:is(:hover, :focus-visible)) [data-callout='D'] .callout__letter,
.fig:has([data-callout-link='E']:is(:hover, :focus-visible)) [data-callout='E'] .callout__letter,
.fig:has([data-callout-link='F']:is(:hover, :focus-visible)) [data-callout='F'] .callout__letter { fill: var(--signal); }

.fig__cap {
  display: flex; gap: 0.75rem; align-items: baseline; flex-wrap: wrap;
  padding: 0.85rem clamp(0.85rem, 2vw, 1.25rem) 0.6rem; border-top: 1px solid var(--rule); margin-top: 0.5rem;
  font-size: 0.9375rem; color: var(--ink-2);
}
.fig__no { font-family: var(--font-display); font-weight: 800; font-stretch: 115%; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); font-size: 0.875rem; }
.fig__legend {
  list-style: none; margin: 0; padding: 0 0.5rem 0.5rem;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}
.fig__legend a {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.75rem;
  min-height: 2.875rem; padding: 0.45rem 0.6rem; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font-weight: 600; line-height: 1.3; font-size: 1rem;
  transition: background-color 160ms var(--ease);
}
.fig__legend a:hover, .fig__legend a:focus-visible { background: var(--panel); }
.fig__key {
  display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 50%;
  border: 2px solid var(--ink); font-family: var(--font-display); font-weight: 800; font-size: 0.9375rem; line-height: 1;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.fig__legend a:hover .fig__key, .fig__legend a:focus-visible .fig__key { background: var(--ink); color: var(--signal); }
.fig__code { font-family: var(--font-display); font-weight: 700; font-stretch: 112%; font-size: 0.875rem; color: var(--signal-ink); font-variant-numeric: tabular-nums; }

/* ---------- Troubleshooting chart ---------- */
.chart__filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 2.75rem; padding: 0.4rem 0.95rem 0.4rem 0.6rem;
  border: 1.5px solid var(--ink); border-radius: var(--radius); background: var(--paper); cursor: pointer;
  font-family: var(--font-display); font-weight: 650; font-stretch: 100%; font-size: 1rem;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.chip[data-filter='all'] { padding-left: 0.95rem; }
.chip__n {
  display: grid; place-items: center; min-width: 1.5rem; height: 1.5rem; border-radius: 3px;
  background: var(--panel-2); font-weight: 800; font-size: 0.875rem;
}
.chip:hover { background: var(--panel); }
.chip[aria-pressed='true'] { background: var(--ink); color: var(--paper); }
.chip[aria-pressed='true'] .chip__n { background: var(--signal); color: var(--ink); }

.chart__wrap { border: var(--rule-heavy); border-radius: var(--radius); overflow: hidden; }
.chart__table { width: 100%; border-collapse: collapse; }
.chart__table thead th {
  text-align: left; padding: 0.8rem 1rem; background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 700; font-stretch: 112%; font-size: 0.8125rem;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.chart__group th {
  text-align: left; padding: 0.7rem 1rem; background: var(--panel);
  font-family: var(--font-display); font-weight: 800; font-stretch: 85%; font-size: 1.125rem;
  border-top: var(--rule-heavy);
}
.chart__table tbody:first-of-type .chart__group th { border-top: 0; }
.chart__n {
  display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; margin-right: 0.6rem; border-radius: 3px;
  background: var(--signal); font-size: 0.9375rem; vertical-align: 0.05em;
}
.chart__table tr[data-topic] > * { padding: 0.85rem 1rem; border-top: 1px solid var(--rule); vertical-align: top; text-align: left; }
.chart__table tr[data-topic] th { font-weight: 700; width: 36%; }
.chart__table tr[data-topic] th a {
  text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.chart__table tr[data-topic] th a:hover { text-decoration-color: var(--ink); }
.chart__table tr[data-topic] td { color: var(--ink-2); }
.chart__table tr[data-topic]:hover > * { background: oklch(0.985 0 0); }
.chart__proc { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); font-weight: 600; }
.chart__proc .code-tab { height: 1.625rem; min-width: 2.75rem; font-size: 0.875rem; }
.chart__time { white-space: nowrap; text-align: right !important; font-variant-numeric: tabular-nums; }
td.chart__time { color: var(--ink-3) !important; }
@media (max-width: 48rem) {
  .chart__table, .chart__table tbody, .chart__table tr, .chart__table th, .chart__table td { display: block; }
  .chart__table tbody[hidden] { display: none; }
  .chart__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .chart__table tr[data-topic] { border-top: 1px solid var(--rule); padding: 0.9rem 1rem; display: grid; gap: 0.35rem; }
  .chart__table tr[data-topic] > * { border: 0; padding: 0; width: auto !important; text-align: left !important; }
  .chart__table tr[data-topic] td[data-label='Probable cause']::before { content: 'Probable cause: '; font-weight: 700; color: var(--ink); }
  .chart__time { display: none !important; }
}

/* ---------- Sequence (virus path) ---------- */
.sequence { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; counter-reset: seq; }
@media (min-width: 52rem) { .sequence { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; } }
.sequence__item { position: relative; }
.sequence__item a { display: grid; gap: 0.55rem; height: 100%; text-decoration: none; color: var(--ink); padding: 0 1.5rem 0.25rem 0; }
.sequence__n {
  display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border-radius: var(--radius);
  background: var(--ink); color: var(--paper); position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 850; font-stretch: 85%; font-size: 1.625rem;
  transition: background-color 180ms var(--ease), color 180ms var(--ease);
}
@media (min-width: 52rem) {
  .sequence__item:not(:last-child)::after {
    content: ''; position: absolute; top: 1.625rem; left: 3.25rem; right: 0; height: 2px;
    background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 11px);
  }
}
.sequence__title { margin-top: 0.6rem; font-family: var(--font-display); font-weight: 780; font-stretch: 84%; font-size: var(--step-2); line-height: 1.1; }
.sequence__note { color: var(--ink-2); }
.sequence__meta { font-family: var(--font-display); font-weight: 650; font-stretch: 108%; font-size: 0.875rem; color: var(--ink-3); }
.sequence__meta span { margin-inline: 0.2rem; }
.sequence__item a:hover .sequence__n { background: var(--signal); color: var(--ink); }
.sequence__item a:hover .sequence__title { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 0.15em; }
.sequence__aside {
  display: flex; gap: 0.75rem; align-items: flex-start; margin-top: 2.5rem; padding: 1rem 1.25rem;
  border: 2px solid var(--warn); border-radius: var(--radius); background: var(--warn-bg); max-width: 52rem;
}
.sequence__aside .icon { color: var(--warn); width: 1.5rem; height: 1.5rem; margin-top: 0.1rem; }
.sequence__aside a { font-weight: 700; text-decoration-color: var(--warn); text-underline-offset: 0.18em; }

/* ---------- Contents (TOC) ---------- */
.band--contents { background: var(--panel); }
.contents { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) {
  .contents { grid-template-columns: 19rem minmax(0, 1fr); gap: 4rem; align-items: start; }
  .contents__intro { position: sticky; top: 2rem; }
}
.contents__intro p { margin: 1rem 0 1.5rem; color: var(--ink-2); }
.toc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
.toc__section { border-top: var(--rule-heavy); padding-top: 0.9rem; }
.toc__head { display: flex; align-items: baseline; gap: 0.9rem; text-decoration: none; color: var(--ink); }
.toc__n { font-family: var(--font-display); font-weight: 880; font-stretch: 70%; font-size: var(--step-4); line-height: 0.9; color: var(--signal-ink); min-width: 1.6ch; }
.toc__title { font-family: var(--font-display); font-weight: 800; font-stretch: 80%; font-size: var(--step-2); line-height: 1.1; }
.toc__lead { flex: 1; min-width: 1.5rem; border-bottom: 2px dotted var(--ink-3); transform: translateY(-0.3em); transition: border-color 160ms var(--ease); }
.toc__count { font-family: var(--font-display); font-weight: 650; font-stretch: 108%; font-size: 0.875rem; color: var(--ink-2); white-space: nowrap; }
.toc__head:hover .toc__title { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
.toc__items { list-style: none; margin: 0.6rem 0 0; padding: 0 0 0 calc(1.6ch * 1.9 + 0.9rem); display: grid; }
.toc__items a { display: flex; align-items: baseline; gap: 0.8rem; min-height: 2.75rem; padding-block: 0.55rem; text-decoration: none; color: var(--ink); }
.toc__code { font-family: var(--font-display); font-weight: 750; font-stretch: 110%; font-size: 0.9375rem; color: var(--signal-ink); min-width: 2.2rem; font-variant-numeric: tabular-nums; }
.toc__t { font-weight: 600; }
.toc__items .toc__lead { border-bottom-width: 1.5px; border-bottom-color: var(--ink-3); }
.toc__min { font-size: 0.9375rem; color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.toc__items a:hover .toc__t { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.toc__items a:hover .toc__lead, .toc__head:hover .toc__lead { border-bottom-color: var(--signal-deep); }
@media (max-width: 36rem) { .toc__items { padding-left: 0; } .toc__items .toc__lead { min-width: 0.75rem; } }

/* ---------- Independence band ---------- */
.independent { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 60rem) { .independent { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: 4rem; } }
.independent__text > p:first-of-type { margin-top: 1.1rem; color: var(--ink-2); font-size: var(--step-1); max-width: 42rem; }
.independent__small { margin-top: 1rem; font-size: 0.9375rem; color: var(--ink-3); }
.official { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }
.official--stack { grid-template-columns: 1fr; margin-top: 0.85rem; }
.official a {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 0.75rem;
  padding: 0.75rem 1rem; min-height: 2.875rem; border: 1.5px solid var(--ink); border-radius: var(--radius);
  text-decoration: none; color: var(--ink); background: var(--paper);
  transition: background-color 160ms var(--ease);
}
.official a:hover { background: var(--panel); }
.official__name { font-family: var(--font-display); font-weight: 800; font-stretch: 90%; font-size: 1.125rem; line-height: 1.2; }
.official__url { grid-row: 2; color: var(--ink-2); font-size: 0.9375rem; }
.official .icon { grid-row: 1 / span 2; grid-column: 2; align-self: center; color: var(--ink-3); width: 1.1rem; height: 1.1rem; }

/* ---------- Plates: NOTE / CAUTION / WARNING ---------- */
.plate {
  margin-block: 1.5rem; padding: 0 1.15rem 1.05rem; border: 2px solid var(--ink); border-radius: var(--radius);
  background: var(--paper); max-width: 46rem;
}
.plate > * + * { margin-top: 0.6rem; }
.plate__label {
  display: flex; align-items: center; gap: 0.55rem;
  margin: 0 -1.15rem 0.85rem; padding: 0.45rem 1.15rem;
  font-family: var(--font-display); font-weight: 800; font-stretch: 122%; font-size: 0.8125rem;
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1.3;
}
.plate__label::before { content: ''; flex: none; width: 0.8rem; height: 0.8rem; background: currentColor; }
.plate__label + * { margin-top: 0 !important; }
.plate--note { border-color: var(--note); background: var(--note-bg); }
.plate--note .plate__label { color: var(--note); border-bottom: 1px solid oklch(0.85 0.05 258); }
.plate--note .plate__label::before { border-radius: 50%; }
.plate--caution .plate__label { background: var(--signal); color: var(--ink); border-bottom: 2px solid var(--ink); }
.plate--caution .plate__label::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 0.95rem; }
.plate--caution .plate__label::after {
  content: ''; flex: 1; height: 0.7rem; margin-left: 0.4rem;
  background: repeating-linear-gradient(-45deg, var(--ink) 0 5px, transparent 5px 11px);
}
.plate--warning { border-color: var(--warn); }
.plate--warning .plate__label { background: var(--warn); color: var(--paper); }
.plate--warning .plate__label::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); width: 0.95rem; }
.plate a { font-weight: 700; }
.plate--feature { padding: 0 1.5rem 1.5rem; max-width: none; }
.plate--feature .plate__label { margin-inline: -1.5rem; padding-inline: 1.5rem; margin-bottom: 1.15rem; }
.plate__title { font-size: var(--step-3); font-stretch: 78%; line-height: 1.02; }
.plate--feature > p:not(.plate__label) { color: var(--ink-2); }
.plate__links { list-style: none; padding: 0; margin: 1.15rem 0 0 !important; display: grid; gap: 0.4rem; }
.plate__links a {
  display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--warn);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.plate__links a::before { content: '→'; margin-right: 0.5rem; text-decoration: none; display: inline-block; }
.plate--wide { max-width: none; margin-top: 2.5rem; }

/* ---------- Ledger (included / not included) ---------- */
.ledger { display: grid; border: var(--rule-heavy); border-radius: var(--radius); }
@media (min-width: 52rem) { .ledger { grid-template-columns: 1fr 1fr; } .ledger__col + .ledger__col { border-left: var(--rule-heavy); } }
@media (max-width: 51.99rem) { .ledger__col + .ledger__col { border-top: var(--rule-heavy); } }
.ledger__col { padding: 1.5rem clamp(1.15rem, 3vw, 2rem) 1.25rem; }
.ledger__h { display: flex; align-items: center; gap: 0.6rem; font-size: var(--step-2); font-stretch: 84%; margin-bottom: 0.75rem; }
.ledger__h .icon { width: 1.75rem; height: 1.75rem; padding: 0.25rem; border-radius: 50%; background: var(--done); color: var(--paper); stroke-width: 2.6; }
.ledger__col--not .ledger__h .icon { background: var(--warn); }
.ledger ul { list-style: none; margin: 0; padding: 0; }
.ledger li { padding-block: 0.7rem; border-top: 1px solid var(--rule); }
.ledger__foot { margin-top: 1.25rem; color: var(--ink-2); }
.ledger__foot a { font-weight: 700; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* ---------- Page heads ---------- */
.page-head { border-bottom: var(--rule-heavy); padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem); }
.page-head__inner { max-width: calc(var(--wrap) + var(--gutter) * 2); }
.page-head__label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 750; font-stretch: 118%; font-size: 0.875rem;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 0.9rem;
}
.page-head__label::before { content: ''; width: 0.85rem; height: 0.85rem; background: var(--signal); border-radius: 2px; }
.page-head h1 { font-size: var(--step-5); font-stretch: 74%; font-weight: 850; line-height: 0.95; letter-spacing: -0.012em; max-width: 18ch; }
.page-head__lede { margin-top: 1.1rem; font-size: var(--step-1); color: var(--ink-2); max-width: 44rem; }
.page-head__stamp {
  display: inline-block; margin-top: 1.25rem; padding: 0.3rem 0.65rem; border: 1.5px solid var(--ink); border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 650; font-stretch: 105%; font-size: 0.875rem;
}

/* Breadcrumbs */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; list-style: none; margin: 0 0 1rem; padding: 0; font-family: var(--font-display); font-weight: 650; font-stretch: 102%; font-size: 0.9375rem; }
.crumbs li + li::before { content: '/'; margin-right: 0.5rem; color: var(--ink-3); }
.crumbs a { color: var(--ink-2); text-underline-offset: 0.18em; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); }

/* ---------- Section pages ---------- */
.section-head { background: var(--signal); border-bottom: var(--rule-heavy); }
.section-head :focus-visible { outline-color: var(--ink); }
.section-head__inner { display: grid; gap: 0.5rem 2.5rem; align-items: end; padding-block: clamp(2rem, 1.25rem + 4vw, 4.5rem); }
@media (min-width: 48rem) { .section-head__inner { grid-template-columns: auto minmax(0, 1fr); } }
.section-head__n { font-family: var(--font-display); font-weight: 900; font-stretch: 66%; font-size: clamp(6rem, 3rem + 14vw, 13rem); line-height: 0.78; letter-spacing: -0.03em; }
.section-head .crumbs a, .section-head .crumbs li + li::before { color: var(--ink); }
.section-head h1 { font-size: var(--step-5); font-stretch: 74%; font-weight: 860; line-height: 0.95; }
.section-head__lede { margin-top: 1rem; font-size: var(--step-1); max-width: 46rem; line-height: 1.5; }
.section-head__meta { margin-top: 1rem; font-family: var(--font-display); font-weight: 700; font-stretch: 110%; font-size: 0.9375rem; }
.section-head__meta span { margin-inline: 0.3rem; opacity: 0.55; }

.topic-body { display: grid; gap: 3rem; padding-block: clamp(2.5rem, 5vw, 4.5rem); }
@media (min-width: 60rem) { .topic-body { grid-template-columns: minmax(0, 1fr) 19rem; gap: 4rem; align-items: start; } }
.topic-aside { display: grid; gap: 1.25rem; }
@media (min-width: 60rem) { .topic-aside { position: sticky; top: 1.5rem; } }
.topic-aside__box { border: var(--rule-heavy); border-radius: var(--radius); padding: 1.1rem 1.15rem 1.15rem; }
.topic-aside__box > p { color: var(--ink-2); font-size: 0.9375rem; margin-top: 0.4rem; }
.topic-aside__h { font-size: 1.125rem; font-stretch: 105%; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 800; }
.topic-aside__list { list-style: none; margin: 0.6rem 0 0; padding: 0; }
.topic-aside__list a { display: flex; align-items: center; gap: 0.65rem; min-height: 2.875rem; padding-block: 0.35rem; text-decoration: none; color: var(--ink); font-weight: 600; border-top: 1px solid var(--rule); }
.topic-aside__list li:first-child a { border-top: 0; }
.topic-aside__list a:hover span:last-child { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.topic-aside__n { display: grid; place-items: center; width: 1.6rem; height: 1.6rem; border-radius: 3px; background: var(--panel-2); font-family: var(--font-display); font-weight: 800; font-size: 0.9375rem; }
.topic-aside__list .icon { color: var(--ink-3); }

/* ---------- Procedure rows ---------- */
.proc-list { list-style: none; margin: 0; padding: 0; border-top: var(--rule-heavy); }
.proc a {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.35rem 1.25rem; align-items: start;
  padding: 1.15rem 0.25rem; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink);
  transition: background-color 160ms var(--ease);
}
.proc a:hover { background: oklch(0.985 0 0); }
.proc .code-tab { margin-top: 0.1rem; }
.proc__body { display: grid; gap: 0.3rem; }
.proc__title { font-family: var(--font-display); font-weight: 760; font-stretch: 86%; font-size: var(--step-1); line-height: 1.2; }
.proc__summary { color: var(--ink-2); }
.proc__topic { font-family: var(--font-display); font-weight: 650; font-stretch: 108%; font-size: 0.875rem; color: var(--ink-3); }
.proc__meta { display: grid; gap: 0.3rem; color: var(--ink-3); font-size: 0.9375rem; white-space: nowrap; padding-top: 0.15rem; }
.proc a:hover .proc__title { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.proc a:hover .code-tab { background: var(--ink); color: var(--signal); }
@media (max-width: 40rem) {
  .proc a { grid-template-columns: auto minmax(0, 1fr); column-gap: 0.9rem; }
  .proc__meta { grid-column: 2; display: flex; gap: 1.1rem; padding-top: 0.2rem; }
}
.proc-list--compact { margin-top: 1rem; }
.proc-list--compact .proc__summary { display: none; }
.proc-list--grid { border-top: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); }
.proc-list--grid .proc a {
  grid-template-columns: minmax(0, 1fr); height: 100%; padding: 1.15rem; gap: 0.75rem;
  border: var(--rule-heavy); border-radius: var(--radius); background: var(--paper);
}
.proc-list--grid .proc .code-tab { justify-self: start; }
.proc-list--grid .proc__meta { display: flex; gap: 1.1rem; grid-column: auto; align-self: end; }

/* ---------- Procedure page ---------- */
.guide-head { border-bottom: var(--rule-heavy); padding-block: clamp(1.75rem, 1rem + 3vw, 3.25rem) clamp(1.75rem, 1rem + 2.5vw, 2.75rem); }
.guide-head__title { display: flex; align-items: flex-start; gap: 1rem; }
.guide-head__title .code-tab { margin-top: 0.35rem; }
.guide-head h1 { font-size: var(--step-4); font-stretch: 78%; font-weight: 840; line-height: 1.02; max-width: 24ch; }
.guide-head__deck { margin-top: 1rem; font-size: var(--step-1); color: var(--ink-2); max-width: 46rem; line-height: 1.5; }
@media (min-width: 40rem) { .guide-head__deck { margin-left: 5.25rem; } .guide-head .dataplate { margin-left: 5.25rem; } }
@media (max-width: 39.99rem) { .guide-head__title { flex-direction: column; gap: 0.75rem; } .guide-head__title .code-tab { margin-top: 0; } }

.dataplate {
  margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  border: var(--rule-heavy); border-radius: var(--radius); max-width: 56rem;
}
.dataplate > div { padding: 0.7rem 1rem 0.75rem; border-right: 1px solid var(--rule); }
.dataplate > div:last-child { border-right: 0; }
.dataplate dt { font-family: var(--font-display); font-weight: 750; font-stretch: 115%; font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }
.dataplate dd { margin: 0.2rem 0 0; font-weight: 650; font-size: 1rem; line-height: 1.35; }
@media (max-width: 47.99rem) {
  .dataplate { grid-template-columns: 1fr 1fr; }
  .dataplate > div { border-right: 0; border-top: 1px solid var(--rule); }
  .dataplate > div:nth-child(odd) { border-right: 1px solid var(--rule); }
  .dataplate > div:nth-child(-n + 2) { border-top: 0; }
  .dataplate > div:first-child { grid-column: 1 / -1; border-right: 0; }
  .dataplate > div:nth-child(2) { border-top: 1px solid var(--rule); }
}

.guide-grid { display: grid; gap: 2.5rem; padding-block: clamp(2rem, 4vw, 3.5rem) var(--band); }
@media (min-width: 62rem) { .guide-grid { grid-template-columns: minmax(0, 1fr) 19.5rem; gap: clamp(2.5rem, 5vw, 5rem); align-items: start; } }
.guide-main { min-width: 0; max-width: 47rem; }
.guide-aside { order: -1; }
@media (min-width: 62rem) { .guide-aside { order: 0; position: sticky; top: 1.25rem; max-height: calc(100vh - 2.5rem); overflow: auto; } }

.quick { border: var(--rule-heavy); border-radius: var(--radius); background: var(--panel); padding: 1.1rem 1.25rem 1.2rem; }
.quick__h { font-size: 0.875rem; font-stretch: 120%; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }
.quick p { font-size: var(--step-1); line-height: 1.5; }

.brand-notice { margin-top: 1.25rem; padding: 1rem 1.25rem; border: 2px dashed var(--ink); border-radius: var(--radius); }
.brand-notice__label { font-family: var(--font-display); font-weight: 800; font-stretch: 95%; font-size: 1.0625rem; margin-bottom: 0.3rem; }
.brand-notice p:not(.brand-notice__label) { color: var(--ink-2); font-size: 1rem; }
.brand-notice a { font-weight: 700; color: var(--ink); text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

/* Checklist aside */
.checklist { border: var(--rule-heavy); border-radius: var(--radius); padding: 1rem 1rem 0.9rem; background: var(--paper); }
.checklist__h { font-family: var(--font-display); font-weight: 800; font-stretch: 118%; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; }
.checklist__count { margin-top: 0.25rem; font-weight: 700; font-size: 1rem; }
.checklist.is-complete .checklist__count { color: var(--done); }
.checklist__bar { height: 6px; margin: 0.6rem 0 0.4rem; background: var(--panel-2); border-radius: 3px; overflow: hidden; }
.checklist__bar span { display: block; height: 100%; background: var(--done); transform: scaleX(0); transform-origin: left; transition: transform 320ms var(--ease); }
.checklist__steps { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.checklist__steps li { display: flex; align-items: flex-start; gap: 0.25rem; border-top: 1px solid var(--rule); }
.checklist__steps li:first-child { border-top: 0; }
.checklist__steps input {
  flex: none; width: 1.3rem; height: 1.3rem; margin: 0.8rem 0.35rem 0 0.15rem; accent-color: var(--done); cursor: pointer;
}
.checklist__steps a {
  flex: 1; display: flex; gap: 0.55rem; align-items: flex-start; min-height: 2.875rem; padding: 0.65rem 0.4rem;
  text-decoration: none; color: var(--ink); font-size: 0.9688rem; line-height: 1.35; border-radius: var(--radius);
}
.checklist__n { font-family: var(--font-display); font-weight: 800; font-stretch: 100%; color: var(--ink-3); min-width: 1.1rem; }
.checklist__steps a:hover .checklist__t { text-decoration: underline; text-underline-offset: 0.16em; }
.checklist__steps a.is-current { background: var(--panel); font-weight: 700; }
.checklist__steps a.is-current .checklist__n { color: var(--signal-ink); }
.checklist__steps li.is-done .checklist__t { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }
.checklist__reset { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--ink-2); min-height: 2.75rem; }
.checklist--toc .checklist__steps { margin-top: 0.6rem; }
@media (max-width: 61.99rem) {
  .checklist { padding: 0.9rem 1rem; }
  .checklist__steps, .checklist__reset { display: none; }
  .checklist--toc .checklist__steps { display: block; }
}

/* ---------- Prose ---------- */
.prose { margin-top: 2rem; }
.prose > * + * { margin-top: 1.1rem; }
.prose p, .prose li { max-width: 68ch; }
.prose h2 { font-size: var(--step-3); font-stretch: 80%; margin-top: 2.6rem; scroll-margin-top: 1.25rem; }
.prose h2 + * { margin-top: 0.9rem; }
.prose h3 { font-size: var(--step-2); font-stretch: 84%; margin-top: 2rem; }
.prose a { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; transition: text-decoration-color 160ms var(--ease); }
.prose a:hover { text-decoration-color: var(--ink); }
.prose strong { font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose ul { list-style-type: square; }
.prose li + li { margin-top: 0.45rem; }
.prose li::marker { color: var(--signal-ink); font-weight: 700; }
.prose ol > li::marker { color: var(--ink-2); font-family: var(--font-display); font-weight: 750; }
.prose li > ul, .prose li > ol { margin-top: 0.45rem; }
.prose code {
  font-family: var(--font-mono); font-size: 0.88em; padding: 0.08em 0.38em; border-radius: 3px;
  background: var(--panel); border: 1px solid var(--rule); overflow-wrap: anywhere;
}
.prose kbd, .text-page kbd {
  display: inline-block; font-family: var(--font-mono); font-size: 0.82em; line-height: 1.3; padding: 0.06em 0.45em;
  border: 1.5px solid var(--ink); border-bottom-width: 3px; border-radius: 5px; background: var(--paper); white-space: nowrap;
}
.path { white-space: normal; }
.prose .intro { font-size: var(--step-1); line-height: 1.55; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: var(--rule-heavy); border-radius: var(--radius); max-width: 100%; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.table-wrap caption { text-align: left; padding: 0.75rem 1rem; font-family: var(--font-display); font-weight: 750; font-stretch: 92%; font-size: 1.0625rem; border-bottom: 1px solid var(--rule); }
.table-wrap th, .table-wrap td { padding: 0.7rem 0.95rem; text-align: left; vertical-align: top; }
.table-wrap thead th {
  background: var(--panel); font-family: var(--font-display); font-weight: 750; font-stretch: 112%; font-size: 0.8125rem;
  letter-spacing: 0.06em; text-transform: uppercase; border-bottom: var(--rule-heavy);
}
.table-wrap tbody tr + tr > * { border-top: 1px solid var(--rule); }
.table-wrap th[scope='row'] { font-weight: 700; }

/* Steps */
.steps { list-style: none; padding: 0 !important; margin-top: 2rem !important; counter-reset: step; }
.steps > li {
  position: relative; max-width: none !important; counter-increment: step;
  padding: 1.75rem 0 1.85rem 4.5rem; border-top: var(--rule-heavy); margin-top: 0 !important;
}
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 1.6rem;
  display: grid; place-items: center; width: 3.15rem; height: 3.15rem; border-radius: var(--radius);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-weight: 850; font-stretch: 85%; font-size: 1.5rem; line-height: 1;
  transition: background-color 220ms var(--ease), color 220ms var(--ease);
}
.steps > li.is-done::before { background: var(--done); content: '✓'; font-family: var(--font-text); font-weight: 700; }
.steps > li > * + * { margin-top: 0.9rem; }
.steps > li > h2 { margin-top: 0.35rem; font-size: var(--step-2); font-stretch: 82%; scroll-margin-top: 1.25rem; }
.steps > li > ol, .steps > li > ul { padding-left: 1.3rem; }
.step-done {
  display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1.25rem !important;
  min-height: 2.75rem; padding: 0.45rem 0.95rem; cursor: pointer;
  border: 1.5px solid var(--ink-3); border-radius: var(--radius); background: var(--paper);
  font-family: var(--font-display); font-weight: 680; font-stretch: 100%; font-size: 0.9688rem; color: var(--ink);
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.step-done::before { content: ''; width: 1rem; height: 1rem; border: 1.5px solid currentColor; border-radius: 3px; flex: none; }
.step-done:hover { border-color: var(--ink); background: var(--panel); }
.step-done[aria-pressed='true'] { background: var(--done-bg); border-color: var(--done); color: var(--done); }
.step-done[aria-pressed='true']::before { background: var(--done); border-color: var(--done); clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 86% 8%, 38% 72%); border-radius: 0; }
@media (max-width: 36rem) {
  .steps > li { padding-left: 3.25rem; }
  .steps > li::before { width: 2.4rem; height: 2.4rem; font-size: 1.2rem; top: 1.65rem; }
}

/* Did it solve it? */
.solved { margin-top: 3rem; padding-top: 1.75rem; border-top: var(--rule-heavy); }
.solved__h { font-size: var(--step-2); font-stretch: 84%; }
.solved__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.solved__msg { margin-top: 1rem; color: var(--ink-2); }
.solved__msg a { color: var(--ink); font-weight: 700; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }

.related { background: var(--panel); border-top: var(--rule-heavy); padding-block: clamp(2.5rem, 5vw, 4.5rem); }
.related .h-section { margin-bottom: 1.5rem; }

/* ---------- Text pages (about, policies) ---------- */
.text-page { padding-block: clamp(2rem, 4vw, 3.5rem) var(--band); }
.text-page .prose { margin-top: 0; max-width: 46rem; }
.text-page--toc { display: grid; gap: 2rem; }
@media (min-width: 62rem) {
  .text-page--toc { grid-template-columns: 16rem minmax(0, 46rem); gap: clamp(3rem, 6vw, 5.5rem); align-items: start; }
  .text-toc { position: sticky; top: 1.5rem; }
}
.text-toc { border-top: var(--rule-heavy); padding-top: 0.75rem; }
.text-toc__h { font-family: var(--font-display); font-weight: 800; font-stretch: 118%; font-size: 0.8125rem; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.4rem; }
.text-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.text-toc li { counter-increment: toc; }
.text-toc a { display: flex; gap: 0.6rem; min-height: 2.5rem; padding-block: 0.45rem; text-decoration: none; color: var(--ink-2); font-size: 0.9688rem; line-height: 1.35; border-bottom: 1px solid var(--rule); }
.text-toc a::before { content: counter(toc); font-family: var(--font-display); font-weight: 800; color: var(--signal-ink); min-width: 1.1rem; }
.text-toc a:hover { color: var(--ink); }
@media (max-width: 61.99rem) { .text-toc ol { columns: 2 14rem; column-gap: 1.5rem; } .text-toc li { break-inside: avoid; } }
.text-page .prose > h2:first-child { margin-top: 0; }
.contact-card {
  padding: 1.15rem 1.35rem; border: var(--rule-heavy); border-radius: var(--radius); background: var(--panel);
  font-size: var(--step-1); line-height: 1.6;
}
.contact-card a { font-weight: 700; }

/* ---------- Procedures index (library) ---------- */
.library { padding-block: clamp(2rem, 4vw, 3rem) var(--band); }
.library__search { max-width: 40rem; margin-bottom: 2.5rem; }
.library__label { display: block; font-family: var(--font-display); font-weight: 750; font-stretch: 100%; margin-bottom: 0.5rem; }
.library__field { position: relative; }
.library__field .icon { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.library__field input { width: 100%; height: 3.5rem; padding: 0 1rem 0 2.9rem; border: var(--rule-heavy); border-radius: var(--radius); font-size: 1.125rem; background: var(--paper); }
.library__field input::placeholder { color: var(--ink-3); opacity: 1; }
.library__field input:focus { outline: 3px solid var(--focus); outline-offset: 2px; }
.library__status { margin-top: 0.6rem; color: var(--ink-2); font-size: 0.9688rem; }
.library__group + .library__group { margin-top: 3rem; }
.library__h { display: flex; align-items: center; gap: 0.7rem; font-size: var(--step-3); font-stretch: 78%; margin-bottom: 1rem; }
.library__h a { text-decoration: none; }
.library__h a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 3px; text-underline-offset: 0.12em; }
.library__h .icon { width: 1.6rem; height: 1.6rem; color: var(--ink-3); }
.library__n { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: var(--radius); background: var(--signal); font-size: 1.375rem; font-stretch: 85%; }
.library__empty { padding: 1.5rem; border: 2px dashed var(--ink-3); border-radius: var(--radius); }
.library__empty-h { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); font-stretch: 84%; margin-bottom: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--on-ink); padding-top: clamp(3rem, 6vw, 4.5rem); }
.site-footer :focus-visible { outline-color: var(--signal); }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.18em; }
.site-footer__grid { display: grid; gap: 2.5rem; }
@media (min-width: 48rem) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 68rem) { .site-footer__grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 3rem; } }
.site-footer__brand p { margin-top: 1rem; color: var(--on-ink-2); max-width: 26rem; font-size: 1rem; }
.site-footer__brand .site-footer__owner { font-size: 0.9375rem; }
.site-footer__owner a { text-decoration: underline; text-underline-offset: 0.18em; }
.site-footer__h { font-size: 0.8125rem; font-stretch: 120%; letter-spacing: 0.1em; text-transform: uppercase; color: var(--on-ink-2); margin-bottom: 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li a, .site-footer li .linklike { display: inline-flex; align-items: baseline; gap: 0.6rem; min-height: 2.5rem; padding-block: 0.4rem; font-size: 1rem; }
.site-footer .linklike { text-decoration: none; color: var(--on-ink); }
.site-footer .linklike:hover { text-decoration: underline; text-decoration-color: var(--signal); }
.site-footer__n { font-family: var(--font-display); font-weight: 750; font-stretch: 110%; font-size: 0.875rem; color: var(--signal); min-width: 1.75rem; font-variant-numeric: tabular-nums; }
.site-footer__base { margin-top: 3rem; padding-block: 1.5rem 2rem; border-top: 1px solid oklch(0.38 0.01 45); }
.site-footer__base p { font-size: 0.875rem; color: var(--on-ink-2); max-width: 70rem; }

/* ---------- Cookie banner: a bottom sheet with an index tab ---------- */
.consent { position: fixed; inset-inline: 0; bottom: 0; z-index: var(--z-consent); outline: none; }
.consent:focus-visible .consent__sheet { outline: 3px solid var(--focus); outline-offset: -5px; }
.consent__tab {
  position: absolute; bottom: calc(100% - 2px); left: max(var(--gutter), calc((100% - var(--wrap)) / 2));
  display: flex; align-items: center; gap: 0.5rem; height: 2.125rem; padding: 0 0.9rem 2px;
  background: var(--signal); color: var(--ink); border: var(--rule-heavy); border-bottom: 0; border-radius: 9px 9px 0 0;
  font-family: var(--font-display); font-weight: 800; font-stretch: 120%; font-size: 0.8125rem;
  letter-spacing: 0.1em; text-transform: uppercase; line-height: 1;
}
.consent__tab::before { content: ''; width: 0.6rem; height: 0.6rem; background: var(--ink); border-radius: 50%; }
.consent__sheet {
  background: var(--paper); border-top: var(--rule-heavy);
  box-shadow: 0 -18px 40px -24px oklch(0.2 0.01 45 / 0.45);
  max-height: calc(100vh - 3.5rem); max-height: calc(100dvh - 3.5rem);
  overflow-y: auto; overscroll-behavior: contain;
  padding-block: 1.15rem 1.25rem;
}
.consent__bar { display: grid; gap: 1rem 3rem; align-items: center; }
@media (min-width: 56rem) { .consent__bar { grid-template-columns: minmax(0, 1fr) auto; } }
.consent__title { font-family: var(--font-display); font-weight: 800; font-stretch: 88%; font-size: var(--step-1); line-height: 1.1; }
.consent__text > p:not(.consent__title):not(.consent__links) { margin-top: 0.35rem; max-width: 68ch; color: var(--ink-2); font-size: 1rem; }
.consent__links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 1.5rem; margin-top: 0.2rem; }
.consent__links a, .consent__toggle {
  display: inline-flex; align-items: center; gap: 0.45rem; min-height: 2.75rem;
  font-weight: 700; font-size: 1rem; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.2em;
}
.consent__toggle::after {
  content: ''; width: 0.45rem; height: 0.45rem; margin-top: -0.2rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform 200ms var(--ease), margin 200ms var(--ease);
}
.consent__toggle[aria-expanded='true']::after { transform: rotate(-135deg); margin-top: 0.25rem; }
.consent__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.consent__actions .btn { flex: 1 1 9rem; min-width: 9rem; }
@media (min-width: 56rem) { .consent__actions .btn { flex: none; } }

.consent__settings { max-width: 54rem; margin-top: 0.9rem; border-top: var(--rule-heavy); }
.consent__cats { list-style: none; margin: 0; padding: 0; }
.consent__cat {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.5rem 1.5rem; align-items: start;
  padding-block: 0.9rem; border-bottom: 1px solid var(--rule);
}
.consent__name { font-family: var(--font-display); font-weight: 800; font-stretch: 100%; font-size: 1.0625rem; }
.consent__desc { margin-top: 0.2rem; color: var(--ink-2); font-size: 0.9688rem; max-width: 62ch; }
.consent__always {
  display: inline-flex; align-items: center; gap: 0.4rem; min-height: 2.75rem;
  font-family: var(--font-display); font-weight: 750; font-size: 0.9375rem; color: var(--done); white-space: nowrap;
}
.consent__always::before { content: '✓'; font-weight: 800; }
.consent__save { margin-top: 1rem; }
@media (prefers-reduced-motion: no-preference) {
  .consent:not([hidden]) { animation: sheet-up 420ms var(--ease) both; }
  .consent__settings:not([hidden]) { animation: fade-in 220ms var(--ease) both; }
}
@keyframes sheet-up { from { transform: translateY(calc(100% + 2.5rem)); } }
@keyframes fade-in { from { opacity: 0; transform: translateY(-4px); } }
/* While the banner is up, the end of the page can still scroll clear of it. */
.has-consent body { padding-bottom: var(--consent-h, 0px); }

/* Switch: a square toggle with its state written beside it */
.switch { position: relative; display: inline-flex; align-items: center; gap: 0.6rem; min-height: 2.75rem; cursor: pointer; }
.switch__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.switch__track {
  position: relative; flex: none; width: 3.25rem; height: 1.75rem;
  border: var(--rule-heavy); border-radius: var(--radius); background: var(--paper);
  transition: background-color 180ms var(--ease);
}
.switch__track::after {
  content: ''; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.1rem; height: 1.1rem;
  background: var(--ink); border-radius: 2px; transition: transform 200ms var(--ease), background-color 180ms var(--ease);
}
.switch__state { min-width: 1.75rem; font-family: var(--font-display); font-weight: 750; font-size: 0.9375rem; }
.switch__state::after { content: 'Off'; }
.switch:hover .switch__track { background: var(--panel-2); }
.switch__input:checked ~ .switch__track { background: var(--ink); }
.switch__input:checked ~ .switch__track::after { transform: translateX(1.5rem); background: var(--signal); }
.switch__input:checked ~ .switch__state::after { content: 'On'; }
.switch__input:focus-visible ~ .switch__track { outline: 3px solid var(--focus); outline-offset: 2px; }
@media (forced-colors: active) {
  .switch__track::after { background: CanvasText; }
  .switch__input:checked ~ .switch__track { background: Highlight; }
  .switch__input:checked ~ .switch__track::after { background: Canvas; }
}

/* Checklist note shown when Preferences are off */
.checklist__keep { margin-top: 0.35rem; font-size: 0.9375rem; color: var(--ink-2); line-height: 1.45; }
.checklist__keep .linklike { font-weight: 700; color: var(--ink); min-height: 2.75rem; text-decoration-color: var(--signal); text-decoration-thickness: 2px; }

/* Current settings line on the cookie policy */
.consent-status { padding: 0.8rem 1rem; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--radius); font-weight: 700; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation: none !important; }
}

/* ---------- Print: a procedure prints as a clean manual page ---------- */
@media print {
  .strip, .masthead__search, .nav, .nav-toggle, .thumbs, .guide-aside, .solved, .related, .consent, .checklist__keep, .site-footer__grid, .step-done, .skip { display: none !important; }
  body { font-size: 11pt; }
  .masthead, .guide-head, .page-head { border-bottom-width: 1px; }
  .guide-grid { display: block; padding: 0; }
  .steps > li { break-inside: avoid; }
  .site-footer { background: none; color: #000; padding: 0; }
  .site-footer__base p { color: #000; }
  .prose a::after { content: ' (' attr(href) ')'; font-size: 0.85em; color: #444; }
  .prose a[href^='#']::after, .prose a[href^='../']::after { content: ''; }
}
