/* ==========================================================================
   The Printer Field Manual: shared stylesheet
   Design direction: "Cyanotype Field Manual" (PRINTER-01)
   - Palette: Cyanotype Blue #1E4F8A, Drafting Paper #F4F0E6, Graphite #22262C,
     Signal Orange #B4481A, Fog Blue #DCE6F0 (+ derived tints, all checked to WCAG AA)
   - Type: Barlow Condensed (headings), Source Serif 4 (body), DM Mono (labels)
   - Signature: numbered figures with CSS crop marks, § section numbers
   Mobile-first. One radius system: 4px everywhere.
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted, Latin subset) ---------- */
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-400.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("../fonts/dm-mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

/* ---------- 2. Tokens ---------- */
:root {
  /* Palette (from the brief) */
  --blue: #1E4F8A;          /* Cyanotype Blue: links, primary buttons, accents */
  --blue-dark: #163C6B;     /* hover/pressed */
  --paper: #F4F0E6;         /* Drafting Paper: page background */
  --graphite: #22262C;      /* body text */
  --orange: #B4481A;        /* Signal Orange: safety + primary search only */
  --orange-dark: #8E3711;   /* orange text on orange tint (6.4:1) */
  --fog: #DCE6F0;           /* Fog Blue: panel tint, construction lines */

  /* Derived */
  --paper-band: #EAE5D7;    /* warm banded sections + footer */
  --card: #FBF9F3;          /* raised surfaces (step cards, inputs) */
  --fog-2: #E6EDF5;         /* lighter fog for tips */
  --orange-tint: #F7E6DC;   /* safety callout fill */
  --graphite-2: #454B55;    /* secondary text, 7.7:1 on paper */
  --muted: #5A606A;         /* captions, labels, 5.5:1 on paper */
  --rule: rgba(34, 38, 44, .16);
  --rule-strong: rgba(34, 38, 44, .42);
  --line-cyan: rgba(30, 79, 138, .11);   /* construction grid lines */
  --input-border: #6B7079;  /* 4.4:1 on paper (UI component >= 3:1) */

  /* Type */
  --font-head: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --fs-body: 1.0625rem;     /* 17px */
  --lh-body: 1.7;
  --fs-h1: clamp(2.5rem, 1.55rem + 3.4vw, 3.5rem);    /* 40 -> 56px */
  --fs-h2: clamp(1.75rem, 1.35rem + 1.5vw, 2.25rem);  /* 28 -> 36px */
  --fs-h3: clamp(1.3rem, 1.15rem + .6vw, 1.5rem);
  --fs-label: .8125rem;     /* 13px mono labels */

  /* Space */
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1200px;
  --section-y: clamp(56px, 4rem + 3vw, 96px);
  --radius: 4px;

  /* Motion */
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur: 350ms;

  /* Z-index scale */
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-backtop: 300;
  --z-banner: 400;
  --z-dialog: 500;
}

/* ---------- 3. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--graphite);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--blue-dark); text-decoration-thickness: 2px; }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1em; }
p { text-wrap: pretty; }
ul, ol { padding-left: 1.35em; }
li + li { margin-top: .35em; }
strong { font-weight: 600; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; line-height: 1.08; margin: 0 0 .5em; text-wrap: balance; color: var(--graphite); }
h1 { font-size: var(--fs-h1); text-transform: uppercase; letter-spacing: .02em; line-height: 1.02; }
h2 { font-size: var(--fs-h2); text-transform: uppercase; letter-spacing: .02em; }
h3 { font-size: var(--fs-h3); letter-spacing: .01em; line-height: 1.2; }
h4 { font-size: 1.15rem; letter-spacing: .01em; }
hr { border: 0; border-top: 1px solid var(--rule-strong); margin: 2rem 0; }
code, kbd { font-family: var(--font-mono); font-size: .86em; }
kbd { display: inline-block; padding: .05em .45em; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: var(--radius); background: var(--card); line-height: 1.4; }
code.path, code.cmd { background: var(--fog-2); color: var(--graphite); padding: .12em .4em; border-radius: var(--radius); border: 1px solid rgba(30, 79, 138, .18); box-decoration-break: clone; -webkit-box-decoration-break: clone; }
::selection { background: var(--fog); color: var(--graphite); }

/* Focus: visible everywhere, orange ring (4.75:1 on paper) */
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 2px; }
main:focus { outline: none; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: calc(var(--z-dialog) + 1); background: var(--graphite); color: #fff; padding: .7rem 1rem; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; border-radius: var(--radius); text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 68ch; }
.label, .eyebrow { font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; font-weight: 500; color: var(--muted); }
.eyebrow { color: var(--blue); margin: 0 0 .9rem; display: block; }
.lede { font-size: clamp(1.0625rem, 1rem + .35vw, 1.25rem); line-height: 1.6; color: var(--graphite-2); max-width: 62ch; }

/* ---------- 4. Construction grid (signature texture) ---------- */
.grid-bg { position: relative; isolation: isolate; }
.grid-bg::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100% - var(--gutter) * 2, var(--wrap));
  background-image: linear-gradient(to right, var(--line-cyan) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
  border-right: 1px solid var(--line-cyan);
}
.band { background: var(--paper-band); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem;
  font-family: var(--font-head); font-weight: 600; font-size: 1.0625rem; letter-spacing: .05em; text-transform: uppercase;
  line-height: 1.1; white-space: nowrap; text-decoration: none; cursor: pointer;
  border: 1.5px solid var(--blue); border-radius: var(--radius);
  background: var(--blue); color: #fff;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 120ms var(--ease);
}
.btn:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--graphite); border-color: var(--graphite); }
.btn--ghost:hover { background: var(--graphite); color: var(--paper); border-color: var(--graphite); }
.btn--orange { background: var(--orange); border-color: var(--orange); }
.btn--orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn--small { min-height: 40px; padding: .45rem .9rem; font-size: .95rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .6; cursor: not-allowed; }
.text-link { font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 1.0625rem; text-decoration: none; border-bottom: 1.5px solid currentColor; padding-bottom: 1px; }
.text-link:hover { text-decoration: none; border-bottom-width: 3px; }

/* ---------- 6. Header & navigation ---------- */
.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--paper); border-bottom: 1px solid var(--graphite); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; color: var(--graphite); text-decoration: none; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 1.2rem; line-height: 1; margin-right: auto; white-space: nowrap; }
.wordmark:hover { color: var(--graphite); }
.wordmark__sub { display: block; font-family: var(--font-mono); font-size: .6875rem; font-weight: 400; letter-spacing: .1em; color: var(--muted); margin-top: .25rem; }

/* CSS-drawn registration crosshair (no SVG) */
.reg-mark { position: relative; width: 26px; height: 26px; flex: none; border: 1.5px solid var(--graphite); border-radius: 50%; }
.reg-mark::before, .reg-mark::after { content: ""; position: absolute; background: var(--graphite); }
.reg-mark::before { left: -5px; right: -5px; top: 50%; height: 1.5px; transform: translateY(-50%); }
.reg-mark::after { top: -5px; bottom: -5px; left: 50%; width: 1.5px; transform: translateX(-50%); }
.reg-mark > span { position: absolute; inset: 6px; border-radius: 50%; background: var(--blue); }

@media (max-width: 479.98px) {
  .site-header__inner { gap: .6rem; }
  .wordmark { font-size: 1rem; letter-spacing: .02em; gap: .5rem; min-width: 0; }
  .wordmark .reg-mark { width: 22px; height: 22px; }
  .wordmark__sub { font-size: .625rem; letter-spacing: .06em; }
  .nav-toggle { padding: .4rem .6rem; }
}
.nav-toggle { display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: .4rem .8rem; background: transparent; border: 1.5px solid var(--graphite); border-radius: var(--radius); color: var(--graphite); font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: 1rem; cursor: pointer; }
.nav-toggle__bars { position: relative; width: 18px; height: 12px; }
.nav-toggle__bars::before, .nav-toggle__bars::after, .nav-toggle__bars span { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 250ms var(--ease), opacity 200ms; }
.nav-toggle__bars::before { top: 0; } .nav-toggle__bars span { top: 5px; } .nav-toggle__bars::after { bottom: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-5px) rotate(-45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span { opacity: 0; }

.site-nav { display: none; }
.site-nav.is-open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--graphite); max-height: calc(100dvh - 64px); overflow-y: auto; padding: .5rem var(--gutter) 1.5rem; box-shadow: 0 18px 30px -20px rgba(34, 38, 44, .35); }
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { margin: 0; border-bottom: 1px solid var(--rule); }
.nav-item__btn, .nav-item__link { display: flex; align-items: center; gap: .6rem; width: 100%; min-height: 52px; padding: .5rem 0; background: none; border: 0; color: var(--graphite); font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .05em; text-decoration: none; cursor: pointer; text-align: left; }
.nav-item__num { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; color: var(--blue); letter-spacing: .06em; }
.nav-item__btn::after { content: ""; width: 8px; height: 8px; margin-left: auto; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform 250ms var(--ease); }
.nav-item__btn[aria-expanded="true"]::after { transform: rotate(-135deg) translateY(-1px); }
.nav-item__label { position: relative; }
.is-current > .nav-item__btn .nav-item__label::after,
.is-current > .nav-item__link .nav-item__label::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; border-bottom: 2px dashed var(--blue); }
.nav-panel { display: none; padding: 0 0 1rem 1.6rem; }
.nav-panel.is-open { display: block; }
.nav-panel ul { list-style: none; margin: 0; padding: 0; }
.nav-panel li { margin: 0; }
.nav-panel a { display: block; padding: .45rem 0; color: var(--graphite); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.nav-panel a:hover { color: var(--blue); text-decoration: underline; }
.nav-panel a[aria-current="page"] { color: var(--blue); font-weight: 600; }
.nav-panel__title { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: .75rem 0 .25rem; }
.nav-panel__cols { display: grid; gap: .25rem 2rem; }

.header-search { display: flex; margin: 1rem 0 0; }
.header-search input { flex: 1; min-width: 0; min-height: 44px; padding: .45rem .75rem; font: inherit; font-size: 1rem; color: var(--graphite); background: var(--card); border: 1.5px solid var(--input-border); border-right: 0; border-radius: var(--radius) 0 0 var(--radius); }
.header-search input::placeholder { color: var(--muted); }
.header-search button { min-height: 44px; padding: 0 .9rem; border: 1.5px solid var(--graphite); background: var(--graphite); color: var(--paper); font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.header-search button:hover { background: var(--blue); border-color: var(--blue); }

@media (min-width: 1080px) {
  .nav-toggle { display: none; }
  .site-header__inner { min-height: 72px; }
  .site-nav, .site-nav.is-open { display: flex; align-items: center; gap: 1.25rem; position: static; padding: 0; border: 0; box-shadow: none; max-height: none; overflow: visible; background: none; }
  .nav-list { display: flex; gap: .15rem; }
  .nav-list > li { position: relative; border: 0; }
  .nav-item__btn, .nav-item__link { min-height: 44px; width: auto; padding: .35rem .6rem; font-size: 1.05rem; gap: .4rem; }
  .nav-item__btn::after { width: 6px; height: 6px; margin-left: .2rem; }
  .nav-item__btn:hover, .nav-item__link:hover { color: var(--blue); }
  .nav-panel { position: absolute; top: calc(100% + 13px); left: 0; z-index: var(--z-dropdown); min-width: 280px; padding: 1rem 1.25rem 1.1rem; background: var(--paper); border: 1px solid var(--graphite); border-radius: var(--radius); box-shadow: 0 22px 40px -24px rgba(34, 38, 44, .45); }
  .nav-panel--wide { min-width: 560px; }
  .nav-panel--wide .nav-panel__cols { grid-template-columns: 1fr 1fr; }
  .nav-list > li:last-child .nav-panel { left: auto; right: 0; }
  .header-search { margin: 0; width: 210px; }
  .header-search input { font-size: .95rem; }
}

/* ---------- 7. Page head, breadcrumbs, chips ---------- */
.page-head { padding: clamp(28px, 3vw, 48px) 0 clamp(36px, 4vw, 64px); border-bottom: 1px solid var(--graphite); }
.page-head__grid { display: grid; gap: 2rem; align-items: center; }
.page-head h1 { margin-bottom: .45em; }
.page-head .lede { margin-bottom: 0; }
@media (min-width: 900px) {
  .page-head__grid--fig { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 3.5rem; }
}
.crumbs { margin-bottom: 1.4rem; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; color: var(--muted); }
.crumbs li { margin: 0; display: inline-flex; align-items: center; gap: .5rem; }
.crumbs li + li::before { content: "/"; color: var(--rule-strong); }
.crumbs a { color: var(--graphite-2); }
.crumbs [aria-current="page"] { color: var(--muted); }
.chips { list-style: none; margin: 1.3rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.chip { margin: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .65rem; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--graphite); border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); line-height: 1.3; }
.chip--level { border-color: var(--blue); color: var(--blue); }
.chip--level::before { content: ""; width: 7px; height: 7px; border: 1.5px solid currentColor; border-radius: 50%; }
.chip--level[data-level="Easy"]::before { background: currentColor; }
.chip--level[data-level="Moderate"]::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }

/* ---------- 8. Sections with § numbers (signature) ---------- */
.section { padding-block: var(--section-y); }
.section + .section { border-top: 1px solid var(--rule); }
.section--tight { padding-block: clamp(40px, 3rem + 1vw, 64px); }
.sec-h { position: relative; padding-bottom: .55rem; margin-bottom: 1.3rem; }
.sec-h::before { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--rule-strong); transform-origin: left center; }
.sec-h::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 56px; height: 3px; background: var(--blue); transform-origin: left center; }
.sec-num { display: block; font-family: var(--font-mono); font-size: var(--fs-label); font-weight: 500; letter-spacing: .08em; color: var(--blue); margin-bottom: .45rem; text-transform: none; }
@media (min-width: 1360px) {
  .hang .sec-num { position: absolute; right: calc(100% + 1.75rem); top: .55em; margin: 0; white-space: nowrap; }
}
.prose > section { margin-bottom: clamp(40px, 3rem + 1vw, 72px); scroll-margin-top: 96px; }
.prose > section:last-child { margin-bottom: 0; }
.prose h3 { margin-top: 1.6em; }
.prose > section > h2 + h3, .prose > section > .sec-h + h3 { margin-top: .4em; }

/* ---------- 9. Figures with crop marks (signature) ---------- */
.fig { --crop-off: 12px; --crop-len: 10px; position: relative; margin: 0 0 1.5rem; padding: calc(var(--crop-off) + 4px); }
.fig__frame { position: relative; background: var(--fog); }
.fig__frame img { width: 100%; height: auto; aspect-ratio: var(--ar, 4 / 3); object-fit: cover; }
.fig--cyan .fig__frame { background: var(--blue); }
.fig--cyan .fig__frame img { filter: grayscale(1) contrast(1.08) brightness(1.06); mix-blend-mode: screen; }
.crop { position: absolute; width: 0; height: 0; transition: transform 500ms var(--ease), opacity 400ms var(--ease); }
.crop::before, .crop::after { content: ""; position: absolute; background: var(--graphite); }
.crop::before { width: var(--crop-len); height: 1.5px; }
.crop::after { width: 1.5px; height: var(--crop-len); }
.crop--tl { top: 0; left: 0; } .crop--tl::before { right: 4px; top: -.75px; } .crop--tl::after { bottom: 4px; left: -.75px; }
.crop--tr { top: 0; right: 0; } .crop--tr::before { left: 4px; top: -.75px; } .crop--tr::after { bottom: 4px; left: -.75px; }
.crop--bl { bottom: 0; left: 0; } .crop--bl::before { right: 4px; top: -.75px; } .crop--bl::after { top: 4px; left: -.75px; }
.crop--br { bottom: 0; right: 0; } .crop--br::before { left: 4px; top: -.75px; } .crop--br::after { top: 4px; left: -.75px; }
.fig figcaption { display: flex; flex-wrap: wrap; gap: .2rem .7rem; margin-top: .85rem; font-family: var(--font-mono); font-size: .78rem; letter-spacing: .04em; color: var(--graphite-2); text-transform: uppercase; line-height: 1.5; }
.fig__num { color: var(--blue); font-weight: 500; }
@media (min-width: 768px) { .fig { --crop-off: 18px; --crop-len: 14px; } }

/* ---------- 10. Hero (home) ---------- */
.hero { padding: clamp(32px, 4vw, 72px) 0 clamp(44px, 5vw, 88px); border-bottom: 1px solid var(--graphite); }
.hero__grid { display: grid; gap: 2rem; align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 1.5rem + 4vw, 4.25rem); max-width: 18ch; margin-bottom: .4em; }
.hero h1 em { font-style: normal; color: var(--blue); }
.hero .lede { margin-bottom: 1.6rem; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 3.5rem; } }

.search-form { display: flex; flex-wrap: wrap; gap: .6rem; max-width: 560px; }
.search-form label { flex-basis: 100%; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; color: var(--graphite-2); }
.search-form input { flex: 1 1 260px; min-width: 0; min-height: 52px; padding: .6rem .9rem; font: inherit; color: var(--graphite); background: var(--card); border: 1.5px solid var(--graphite); border-radius: var(--radius); }
.search-form input::placeholder { color: var(--muted); }
.search-form .btn { min-height: 52px; }

/* ---------- 11. Index lists (categories, guides) ---------- */
.cat-index { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--graphite); }
.cat-index li { margin: 0; border-bottom: 1px solid var(--rule-strong); }
.cat-index a { display: grid; grid-template-columns: 3.2rem 1fr auto; gap: .2rem 1rem; align-items: baseline; padding: 1.05rem .25rem; color: var(--graphite); text-decoration: none; transition: background-color 200ms var(--ease); }
.cat-index a:hover { background: var(--fog-2); }
.cat-index__num { font-family: var(--font-mono); font-size: .85rem; color: var(--blue); }
.cat-index__name { font-family: var(--font-head); font-weight: 600; font-size: 1.35rem; text-transform: uppercase; letter-spacing: .03em; line-height: 1.15; }
.cat-index__count { font-family: var(--font-mono); font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.cat-index__blurb { grid-column: 2 / -1; font-size: .98rem; color: var(--graphite-2); line-height: 1.5; }
@media (min-width: 900px) {
  .cat-index { grid-template-columns: 1fr 1fr; column-gap: 3rem; border-top: 0; }
  .cat-index li:nth-child(-n+2) { border-top: 1px solid var(--graphite); }
}

.guide-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--graphite); }
.guide-list > li { margin: 0; border-bottom: 1px solid var(--rule-strong); }
.guide-row { display: grid; grid-template-columns: 3rem 1fr; gap: .15rem 1rem; padding: 1.1rem .25rem; color: var(--graphite); text-decoration: none; transition: background-color 200ms var(--ease); }
.guide-row:hover { background: var(--fog-2); color: var(--graphite); }
.guide-row__num { font-family: var(--font-mono); font-size: .85rem; color: var(--blue); padding-top: .2rem; }
.guide-row__title { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; line-height: 1.2; letter-spacing: .01em; }
.guide-row:hover .guide-row__title { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
.guide-row__summary { grid-column: 2; margin: .2rem 0 0; font-size: .98rem; color: var(--graphite-2); line-height: 1.55; }
.guide-row__meta { grid-column: 2; margin-top: .45rem; font-family: var(--font-mono); font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.guide-list--compact .guide-row { padding: .8rem .25rem; }
.guide-list--compact .guide-row__title { font-size: 1.15rem; }
@media (min-width: 900px) { .guide-list--two { display: grid; grid-template-columns: 1fr 1fr; column-gap: 3rem; border-top: 0; } .guide-list--two > li:nth-child(-n+2) { border-top: 1px solid var(--graphite); } }

.link-list { list-style: none; padding: 0; margin: 0 0 1.2em; border-top: 1px solid var(--rule-strong); }
.link-list li { margin: 0; border-bottom: 1px solid var(--rule); }
.link-list a { display: block; padding: .7rem 1.6rem .7rem 0; position: relative; text-decoration: none; color: var(--graphite); }
.link-list a::after { content: "\203A"; position: absolute; right: .25rem; top: 50%; transform: translateY(-52%); font-family: var(--font-mono); color: var(--blue); }
.link-list a:hover { color: var(--blue); text-decoration: underline; }

/* ---------- 12. Panels, callouts, spec tables ---------- */
.panel { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: clamp(1.1rem, 1rem + 1vw, 1.75rem); }
.panel--fog { background: var(--fog-2); border-color: rgba(30, 79, 138, .35); }
.panel--spec { background: var(--card); border: 1px solid var(--graphite); }
.panel__label { display: block; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); margin-bottom: .6rem; }
.panel > :last-child { margin-bottom: 0; }

.callout { position: relative; margin: 1.3rem 0; padding: 1rem 1.15rem 1.05rem; border: 1.5px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); font-size: 1rem; line-height: 1.6; }
.callout > :last-child { margin-bottom: 0; }
.callout__label { display: inline-block; margin: 0 0 .55rem; padding: .18rem .5rem; font-family: var(--font-mono); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .08em; line-height: 1.4; border-radius: 2px; background: var(--graphite); color: #fff; }
.callout--safety { background: var(--orange-tint); border-color: var(--orange); }
.callout--safety .callout__label { background: var(--orange); }
.callout--tip { background: var(--fog-2); border-color: rgba(30, 79, 138, .5); }
.callout--tip .callout__label { background: var(--blue); }
.callout--note { background: var(--card); border-color: var(--rule-strong); }

table.spec { width: 100%; border-collapse: collapse; font-size: .98rem; line-height: 1.5; background: var(--card); border: 1px solid var(--graphite); }
table.spec caption { caption-side: top; text-align: left; padding: 0 0 .6rem; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
table.spec th, table.spec td { padding: .7rem .85rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
table.spec thead th { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .07em; color: var(--graphite-2); background: var(--fog-2); border-bottom: 1px solid var(--graphite); }
table.spec tbody th { font-weight: 600; }
table.spec tr:last-child > * { border-bottom: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 1.4em; -webkit-overflow-scrolling: touch; }
.table-scroll table.spec { margin: 0; min-width: 560px; }

.spec-dl { margin: 0 0 1.2em; border-top: 1px solid var(--graphite); }
.spec-dl > div { display: grid; gap: .2rem 1.5rem; padding: .85rem 0; border-bottom: 1px solid var(--rule-strong); }
.spec-dl dt { font-weight: 600; font-family: var(--font-body); }
.spec-dl dd { margin: 0; color: var(--graphite-2); }
@media (min-width: 700px) { .spec-dl > div { grid-template-columns: minmax(170px, 2fr) 5fr; } }

.checklist { list-style: none; padding: 0; }
.checklist li { position: relative; padding-left: 2rem; }
.checklist li::before { content: ""; position: absolute; left: 0; top: .32em; width: 1.05rem; height: 1.05rem; border: 1.5px solid var(--graphite); border-radius: 2px; background: var(--card); }
.checklist li::after { content: ""; position: absolute; left: .34rem; top: .5em; width: .38rem; height: .62rem; border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(40deg); }
.checklist--print li::after { display: none; }

.symptoms { list-style: none; padding: 0; display: grid; gap: .55rem; }
.symptoms li { margin: 0; padding: .7rem .9rem .7rem 2.4rem; position: relative; background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); line-height: 1.5; }
.symptoms li::before { content: ""; position: absolute; left: .95rem; top: 1.05rem; width: .7rem; height: .7rem; border: 1.5px solid var(--orange); border-radius: 50%; }
.symptoms li::after { content: ""; position: absolute; left: 1.24rem; top: 1.34rem; width: .12rem; height: .12rem; background: var(--orange); border-radius: 50%; }

/* ---------- 13. Accordions ---------- */
.acc { border-bottom: 1px solid var(--rule-strong); }
.acc:first-of-type, :not(.acc) + .acc { border-top: 1px solid var(--graphite); }
.acc > summary { list-style: none; display: flex; align-items: center; gap: 1rem; min-height: 52px; padding: .85rem .25rem; cursor: pointer; font-weight: 600; line-height: 1.4; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary::after { content: ""; flex: none; margin-left: auto; width: 14px; height: 14px; background: linear-gradient(var(--blue), var(--blue)) center / 14px 2px no-repeat, linear-gradient(var(--blue), var(--blue)) center / 2px 14px no-repeat; transition: transform 250ms var(--ease); }
.acc[open] > summary::after { transform: rotate(45deg); }
.acc > summary:hover { color: var(--blue); }
.acc__body { padding: 0 .25rem 1.1rem; color: var(--graphite-2); }
.acc__body > :last-child { margin-bottom: 0; }

/* ---------- 14. Guide layout: article + sidebar ---------- */
.article-layout { display: grid; gap: 3rem; padding-block: clamp(36px, 4vw, 64px) var(--section-y); }
@media (min-width: 1024px) { .article-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; } }
.article { min-width: 0; max-width: 760px; }
.article-intro { font-size: 1.125rem; line-height: 1.7; }
.article-intro p:first-child::first-line { font-weight: 600; }
.notice-line { margin: 1.5rem 0 2.5rem; padding: .8rem 1rem; font-size: .95rem; line-height: 1.55; border: 1px dashed var(--rule-strong); border-radius: var(--radius); color: var(--graphite-2); }
.sidebar { min-width: 0; }
.sidebar__inner { display: grid; gap: 1.75rem; }
@media (min-width: 1024px) { .sidebar__inner { position: sticky; top: 96px; } }
.side-block__title { font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 .6rem; padding-bottom: .5rem; border-bottom: 1px solid var(--graphite); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { margin: 0; counter-increment: toc; }
.toc a { display: grid; grid-template-columns: 2.6rem 1fr; padding: .4rem 0; font-size: .95rem; line-height: 1.4; color: var(--graphite-2); text-decoration: none; border-bottom: 1px solid var(--rule); }
.toc a::before { content: "\00A7\00A0" counter(toc, decimal-leading-zero); font-family: var(--font-mono); font-size: .75rem; color: var(--muted); padding-top: .15rem; }
.toc a:hover { color: var(--blue); }
.toc a[aria-current="true"] { color: var(--blue); font-weight: 600; }
.toc a[aria-current="true"]::before { color: var(--blue); }
.toc-mobile { margin: 0 0 2rem; border: 1px solid var(--graphite); border-radius: var(--radius); background: var(--card); }
.toc-mobile > summary { padding: .85rem 1rem; min-height: 48px; cursor: pointer; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; }
.toc-mobile .toc { padding: 0 1rem 1rem; }
@media (min-width: 1024px) { .toc-mobile { display: none; } }
@media (max-width: 1023.98px) { .sidebar .toc-block { display: none; } }

/* ---------- 15. Steps + tracker ---------- */
.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1.25rem; counter-reset: none; }
.step { margin: 0; background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); scroll-margin-top: 96px; transition: border-color 250ms var(--ease); }
.step.is-done { border-color: var(--blue); }
.step__head { display: grid; gap: .35rem; padding: 1rem 1.15rem .2rem; }
.step__num { font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .08em; color: var(--blue); }
.step__title, .prose .step__title { margin: 0; font-size: 1.35rem; }
.step__body { padding: .5rem 1.15rem .3rem; }
.step__body > :last-child { margin-bottom: .8rem; }
.step__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .7rem 1.15rem; border-top: 1px dashed var(--rule-strong); background: rgba(220, 230, 240, .35); }
.step__check { display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; cursor: pointer; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: 1rem; }
.step__check input { width: 22px; height: 22px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.step__test { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--graphite-2); }
.step__test::before { content: "\25B8  "; color: var(--blue); }

.tracker { padding: 1rem; border: 1px solid var(--graphite); border-radius: var(--radius); background: var(--card); }
.tracker__status { margin: 0 0 .6rem; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
.tracker__bar { display: flex; gap: 3px; margin: 0 0 .75rem; }
.tracker__seg { flex: 1; height: 8px; background: var(--fog); border-radius: 1px; overflow: hidden; position: relative; }
.tracker__seg::after { content: ""; position: absolute; inset: 0; background: var(--blue); transform: scaleX(0); transform-origin: left; transition: transform 400ms var(--ease); }
.tracker__seg.is-done::after { transform: scaleX(1); }
.tracker__note { margin: 0 0 .6rem; font-size: .88rem; line-height: 1.45; color: var(--graphite-2); }
.tracker__reset { background: none; border: 0; padding: .3rem 0; min-height: 36px; color: var(--blue); font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; text-decoration: underline; cursor: pointer; }

/* ---------- 16. OS tabs ---------- */
.tabs { margin: 1rem 0 1.2rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper); }
.tabs__list { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--rule-strong); }
.tabs__tab { flex: 0 1 auto; min-height: 44px; padding: .5rem .95rem; background: none; border: 0; border-right: 1px solid var(--rule); color: var(--graphite-2); font-family: var(--font-mono); font-size: .8rem; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; position: relative; }
.tabs__tab[aria-selected="true"] { color: var(--blue); background: var(--card); font-weight: 500; }
.tabs__tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--blue); }
.tabs__tab:hover { color: var(--blue); }
.tabs__panel { padding: 1rem 1rem .2rem; background: var(--card); }
.tabs__panel > :last-child { margin-bottom: .8rem; }
.tabs__panel[hidden] { display: none; }
.no-js-tab-label { font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; color: var(--blue); }
html:not(.js) .tabs__list { display: none; }
@media (min-width: 1024px) { .tracker--inline { display: none; } }
.js .no-js-tab-label { display: none; }

/* Copy buttons (inserted by JS after .path / .cmd) */
.copy-btn { display: inline-flex; align-items: center; vertical-align: .08em; margin-left: .3rem; padding: .05rem .4rem; min-height: 24px; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--blue); background: transparent; border: 1px solid rgba(30, 79, 138, .45); border-radius: 2px; cursor: pointer; }
.copy-btn:hover { background: var(--blue); color: #fff; }
.copy-btn.is-copied { background: var(--blue); color: #fff; }
@media (pointer: coarse) { .copy-btn { min-height: 32px; padding: .2rem .55rem; } }

/* ---------- 17. Ad slots (clearly labeled, distinct, reserved size) ---------- */
.ad-slot { position: relative; display: grid; place-items: center; margin: 2.5rem auto; width: 100%; max-width: 728px; min-height: 280px; padding: 1.75rem 1rem 1rem; border: 1px dashed var(--rule-strong); border-radius: var(--radius); background: repeating-linear-gradient(135deg, rgba(34, 38, 44, .035) 0 10px, transparent 10px 20px), var(--paper-band); color: var(--muted); }
.ad-slot__label { position: absolute; top: .5rem; left: .75rem; font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.ad-slot__note { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .04em; text-align: center; max-width: 34ch; line-height: 1.5; }
.ad-slot--side { min-height: 300px; max-width: 300px; margin: 0; }
@media (min-width: 768px) { .ad-slot--wide { min-height: 120px; } }

/* ---------- 18. Supplies (affiliate) ---------- */
.supplies { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .8rem; }
.supplies li { margin: 0; padding: .9rem 1rem; background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.supplies a { font-weight: 600; }
.supplies p { margin: .3rem 0 0; font-size: .95rem; color: var(--graphite-2); line-height: 1.5; }
.aff-tag { display: inline-block; margin-left: .4rem; padding: .05rem .4rem; font-family: var(--font-mono); font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--orange); color: var(--orange-dark); border-radius: 2px; vertical-align: .12em; }
.aff-disclosure { font-size: .92rem; line-height: 1.55; color: var(--graphite-2); padding: .75rem .9rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--paper-band); }

/* ---------- 19. Forms ---------- */
.form { display: grid; gap: 1.2rem; max-width: 640px; }
.field { display: grid; gap: .4rem; }
.field label, .field legend { font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; text-transform: uppercase; letter-spacing: .04em; }
.field .hint { font-size: .9rem; color: var(--graphite-2); line-height: 1.45; margin: 0; }
.field input[type="text"], .field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; font-size: 1rem; color: var(--graphite);
  background: var(--card); border: 1.5px solid var(--input-border); border-radius: var(--radius);
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
}
.field textarea { min-height: 160px; resize: vertical; line-height: 1.55; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(180, 72, 26, .9); }
.field [aria-invalid="true"] { border-color: var(--orange-dark); background: #FFF8F3; }
.field__error { margin: 0; font-size: .92rem; color: var(--orange-dark); font-weight: 600; line-height: 1.4; }
.field__error:empty { display: none; }
.field__error::before { content: "\26A0  "; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: .2rem .7rem; }
.field--check input { width: 22px; height: 22px; margin: .2rem 0 0; accent-color: var(--blue); }
.field--check label { font-family: var(--font-body); font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .98rem; line-height: 1.5; }
.field--check .field__error { grid-column: 2; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; padding: .85rem 1rem; border-radius: var(--radius); font-weight: 600; line-height: 1.5; }
.form-status:empty { display: none; }
.form-status.is-success { background: var(--fog-2); border: 1.5px solid var(--blue); color: var(--blue-dark); }
.form-status.is-error { background: var(--orange-tint); border: 1.5px solid var(--orange); color: var(--orange-dark); }
.btn.is-loading { position: relative; color: transparent; }
.btn.is-loading::after { content: "Sending\2026"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }
.fine-print { font-size: .88rem; line-height: 1.55; color: var(--graphite-2); }

/* ---------- 20. Fix Library filters ---------- */
.filters { display: grid; gap: 1.25rem; padding: 1.25rem; margin-bottom: 1.75rem; background: var(--card); border: 1px solid var(--graphite); border-radius: var(--radius); }
.filters__search input { width: 100%; min-height: 52px; }
.filters__groups { display: grid; gap: 1.1rem; }
@media (min-width: 900px) { .filters__groups { grid-template-columns: 1.3fr 1fr 1.4fr 1fr; gap: 1.5rem; } }
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters legend { padding: 0; margin-bottom: .5rem; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; color: var(--graphite-2); }
.filters select { width: 100%; min-height: 44px; padding: .4rem .6rem; font: inherit; font-size: .98rem; background: var(--paper); border: 1.5px solid var(--input-border); border-radius: var(--radius); color: var(--graphite); }
.chip-toggles { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-toggle { position: relative; }
.chip-toggle input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-toggle span { display: inline-flex; align-items: center; min-height: 40px; padding: .35rem .75rem; font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; border: 1.5px solid var(--input-border); border-radius: var(--radius); background: var(--paper); color: var(--graphite); }
.chip-toggle input:checked + span { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip-toggle input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }
.filters__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .9rem; border-top: 1px dashed var(--rule-strong); }
.filters__count { margin: 0; font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; font-size: 1.15rem; }
.empty-state { padding: 2rem 1.25rem; text-align: left; border: 1px dashed var(--graphite); border-radius: var(--radius); background: var(--card); }
.empty-state[hidden] { display: none; }
.guide-list > li[hidden] { display: none; }

/* ---------- 21. Symptom Finder ---------- */
.finder { border: 1px solid var(--graphite); border-radius: var(--radius); background: var(--card); padding: clamp(1.1rem, 1rem + 1.5vw, 2rem); }
.finder__progress { margin: 0 0 .9rem; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.finder__q { margin: 0 0 1.1rem; font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); text-transform: uppercase; }
.finder__q:focus { outline: none; }
.finder__options { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
@media (min-width: 720px) { .finder__options { grid-template-columns: 1fr 1fr; } }
.finder__options li { margin: 0; }
.finder__opt { display: flex; align-items: center; gap: .8rem; width: 100%; min-height: 56px; padding: .7rem 1rem; text-align: left; font: inherit; font-size: 1.02rem; line-height: 1.35; color: var(--graphite); background: var(--paper); border: 1.5px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer; transition: border-color 150ms var(--ease), background-color 150ms var(--ease); }
.finder__opt:hover { border-color: var(--blue); background: var(--fog-2); }
.finder__opt-key { flex: none; font-family: var(--font-mono); font-size: .75rem; color: var(--blue); width: 1.6rem; }
.finder__nav { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.finder__result .guide-list { margin-top: .75rem; }
.finder-note { display: flex; gap: .8rem; align-items: flex-start; margin: 0 0 1.5rem; padding: .9rem 1rem; border: 1.5px solid var(--blue); border-radius: var(--radius); background: var(--fog-2); font-size: .98rem; line-height: 1.55; }

/* ---------- 22. Split layouts used on home/about ---------- */
.split { display: grid; gap: 2.5rem; align-items: start; }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .split--wide-left { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split--wide-right { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split--center { align-items: center; }
}
.principles { list-style: none; margin: 0; padding: 0; counter-reset: pr; }
.principles li { counter-increment: pr; margin: 0; display: grid; grid-template-columns: 3rem 1fr; gap: .2rem 1rem; padding: 1.2rem 0; border-top: 1px solid var(--rule-strong); }
.principles li:last-child { border-bottom: 1px solid var(--rule-strong); }
.principles li::before { content: counter(pr, decimal-leading-zero); font-family: var(--font-mono); font-size: .85rem; color: var(--blue); padding-top: .3rem; }
.principles h3 { margin: 0 0 .3rem; text-transform: uppercase; font-size: 1.3rem; letter-spacing: .03em; }
.principles p { margin: 0; color: var(--graphite-2); }

.funding { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .funding { grid-template-columns: 1fr 1fr; gap: 2rem; } }
.never-list { list-style: none; padding: 0; margin: 0; }
.never-list li { position: relative; padding-left: 1.8rem; margin: 0 0 .5rem; }
.never-list li::before { content: ""; position: absolute; left: .1rem; top: .72em; width: 1rem; height: 1.5px; background: var(--orange); transform: rotate(45deg); }
.never-list li::after { content: ""; position: absolute; left: .1rem; top: .72em; width: 1rem; height: 1.5px; background: var(--orange); transform: rotate(-45deg); }

.teaser { display: grid; gap: 1rem; padding: 1.5rem; border: 1px solid var(--blue); border-radius: var(--radius); background: var(--fog-2); }
.teaser h3 { margin: 0; text-transform: uppercase; }
.teaser p { margin: 0; }

/* Blog cards */
.post-list { display: grid; gap: 2.5rem; }
@media (min-width: 900px) { .post-list { grid-template-columns: 1.4fr 1fr; } .post-list > :first-child { grid-row: span 2; } }
.post-card { display: block; color: var(--graphite); text-decoration: none; }
.post-card .fig { margin-bottom: .4rem; }
.post-card h2, .post-card h3 { margin: .2rem 0 .4rem; }
.post-card:hover h2, .post-card:hover h3 { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: .15em; }
.post-card p { color: var(--graphite-2); margin: 0 0 .5rem; }
.byline { font-family: var(--font-mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

/* Glossary */
.az-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0 0 2rem; padding: 0; list-style: none; }
.az-nav li { margin: 0; }
.az-nav a { display: inline-grid; place-items: center; width: 40px; height: 40px; font-family: var(--font-mono); font-size: .9rem; border: 1px solid var(--rule-strong); border-radius: var(--radius); text-decoration: none; color: var(--graphite); background: var(--card); }
.az-nav a:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.glossary-list { margin: 0; }
.glossary-list > div { padding: 1rem 0; border-bottom: 1px solid var(--rule-strong); scroll-margin-top: 96px; display: grid; gap: .25rem 2rem; }
.glossary-list > div:target { background: var(--fog-2); box-shadow: 0 0 0 8px var(--fog-2); }
.glossary-list dt { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; letter-spacing: .02em; }
.glossary-list dt .aka { display: block; font-family: var(--font-mono); font-size: .75rem; font-weight: 400; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: .15rem; }
.glossary-list dd { margin: 0; color: var(--graphite-2); }
.glossary-list dd > :last-child { margin-bottom: 0; }
@media (min-width: 800px) { .glossary-list > div { grid-template-columns: 240px 1fr; } }
.glossary-letter { font-family: var(--font-mono); font-size: 1rem; color: var(--blue); margin: 2rem 0 0; padding-bottom: .4rem; border-bottom: 1px solid var(--graphite); scroll-margin-top: 96px; }

/* Contact block */
.identity { font-style: normal; line-height: 1.6; }
.identity dt { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: .9rem; }
.identity dd { margin: .1rem 0 0; }

/* Pager */
.pager { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 700px) { .pager { grid-template-columns: 1fr 1fr; } }
.pager a { display: grid; gap: .25rem; padding: 1rem 1.15rem; border: 1px solid var(--graphite); border-radius: var(--radius); text-decoration: none; color: var(--graphite); background: var(--card); }
.pager a:hover { border-color: var(--blue); color: var(--blue); }
.pager__dir { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--blue); }
.pager__title { font-family: var(--font-head); font-weight: 600; font-size: 1.2rem; line-height: 1.2; }
.pager .pager__next { text-align: right; }
@media (min-width: 700px) { .pager .pager__next:only-child { grid-column: 2; } }

/* Utility row */
.actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; }
.stack > * + * { margin-top: 1rem; }
.center-narrow { max-width: 760px; }

/* ---------- 23. Footer ---------- */
.site-footer { background: var(--paper-band); border-top: 1px solid var(--graphite); padding: clamp(48px, 5vw, 80px) 0 0; font-size: .98rem; }
.footer-grid { display: grid; gap: 2.25rem; padding-bottom: 2.5rem; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 2.5rem; } }
.footer-brand p { color: var(--graphite-2); line-height: 1.6; }
.footer-col h2 { font-family: var(--font-mono); font-size: .75rem; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; color: var(--graphite-2); margin: 0 0 .8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--rule-strong); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0; }
.footer-col a { display: inline-block; padding: .3rem 0; color: var(--graphite); text-decoration: none; line-height: 1.4; }
.footer-col a:hover { color: var(--blue); text-decoration: underline; }
.footer-statement { margin: 0 0 2rem; padding: 1rem 1.15rem; border: 1px solid var(--graphite); border-radius: var(--radius); background: var(--card); font-size: .98rem; line-height: 1.6; }
.footer-bottom { display: grid; gap: .75rem; padding: 1.25rem 0 1.75rem; border-top: 1px solid var(--rule-strong); font-family: var(--font-mono); font-size: .75rem; letter-spacing: .03em; color: var(--graphite-2); line-height: 1.6; }
@media (min-width: 900px) { .footer-bottom { grid-template-columns: 1fr auto; align-items: start; } }
.footer-bottom__links { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.footer-bottom a, .footer-bottom button.linklike { color: var(--graphite); }
button.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.dns-link { font-weight: 500; }

/* ---------- 24. Cookie banner + preferences dialog ---------- */
.cookie-banner { position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: var(--z-banner); max-width: 760px; margin-inline: auto; padding: 1rem 1.15rem; background: var(--card); border: 1.5px solid var(--graphite); border-radius: var(--radius); box-shadow: 0 20px 40px -24px rgba(34, 38, 44, .55); font-size: .95rem; line-height: 1.55; }
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.cookie-banner p { margin: 0 0 .85rem; color: var(--graphite-2); }
.cookie-banner .actions { gap: .5rem; }
.cookie-banner .btn { min-height: 44px; padding: .5rem .95rem; font-size: 1rem; }
dialog.prefs { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 0; border: 1.5px solid var(--graphite); border-radius: var(--radius); background: var(--paper); color: var(--graphite); }
dialog.prefs::backdrop { background: rgba(34, 38, 44, .55); }
.prefs__inner { padding: 1.4rem 1.4rem 1.2rem; }
.prefs h2 { font-size: 1.5rem; margin: 0 0 .5rem; }
.pref-row { display: grid; grid-template-columns: 1fr auto; gap: .3rem 1rem; align-items: start; padding: .9rem 0; border-top: 1px solid var(--rule-strong); }
.pref-row p { margin: 0; grid-column: 1; font-size: .92rem; color: var(--graphite-2); line-height: 1.5; }
.pref-row h3 { margin: 0; font-size: 1.1rem; text-transform: uppercase; letter-spacing: .03em; }
.switch { position: relative; display: inline-flex; align-items: center; gap: .5rem; grid-row: 1 / span 2; grid-column: 2; font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; }
.switch input { position: absolute; opacity: 0; width: 52px; height: 30px; margin: 0; cursor: pointer; }
.switch__track { width: 52px; height: 30px; border-radius: 15px; background: var(--input-border); position: relative; transition: background-color 200ms var(--ease); }
.switch__track::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform 200ms var(--ease); }
.switch input:checked + .switch__track { background: var(--blue); }
.switch input:checked + .switch__track::after { transform: translateX(22px); }
.switch input:focus-visible + .switch__track { outline: 3px solid var(--orange); outline-offset: 2px; }
.switch input:disabled + .switch__track { background: var(--graphite-2); opacity: .7; }

/* Do Not Sell widget */
.dns-widget { padding: 1.2rem; border: 1.5px solid var(--graphite); border-radius: var(--radius); background: var(--card); }
.dns-widget .pref-row { border-top: 0; padding-top: 0; }
.dns-status { margin: .6rem 0 0; font-weight: 600; }

/* ---------- 25. Back to top ---------- */
.back-top { position: fixed; right: 16px; bottom: 16px; z-index: var(--z-backtop); display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .5rem .85rem; background: var(--graphite); color: var(--paper); border: 0; border-radius: var(--radius); font-family: var(--font-head); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .95rem; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 250ms var(--ease), transform 250ms var(--ease), visibility 250ms; }
.back-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.back-top:hover { background: var(--blue); }
body.has-banner .back-top { bottom: 190px; }
@media (min-width: 800px) { body.has-banner .back-top { bottom: 150px; } }

/* ---------- 26. 404 ---------- */
.big-code { font-family: var(--font-mono); font-size: clamp(4rem, 2rem + 8vw, 8rem); line-height: 1; color: var(--blue); margin: 0 0 1rem; letter-spacing: -.02em; }

/* ---------- 27. Motion (decorative only, content is never hidden) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal .sec-h::before, .js .reveal .sec-h::after { transform: scaleX(0); transition: transform 700ms var(--ease) 80ms; }
  .js .reveal.is-in .sec-h::before, .js .reveal.is-in .sec-h::after { transform: scaleX(1); }
  .js .reveal .sec-h::after { transition-delay: 300ms; }
  .js .fig.reveal .crop { opacity: 0; }
  .js .fig.reveal .crop--tl { transform: translate(-8px, -8px); }
  .js .fig.reveal .crop--tr { transform: translate(8px, -8px); }
  .js .fig.reveal .crop--bl { transform: translate(-8px, 8px); }
  .js .fig.reveal .crop--br { transform: translate(8px, 8px); }
  .js .fig.reveal.is-in .crop { opacity: 1; transform: none; }
  .js .grid-bg.reveal::before { transform: translateX(-50%) scaleY(0); transform-origin: top; transition: transform 1100ms var(--ease); }
  .js .grid-bg.reveal.is-in::before { transform: translateX(-50%) scaleY(1); }
  .js .fade-in { opacity: 0; transition: opacity 400ms var(--ease); }
  .js .fade-in.is-in { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 28. Print ---------- */
.print-only { display: none; }
@media print {
  @page { margin: .6in; }
  html, body { background: #fff !important; color: #000 !important; font-size: 11pt; }
  .site-header, .site-footer, .ad-slot, .cookie-banner, .back-top, .sidebar, .toc-mobile, .copy-btn, .tracker, .step__foot label, .actions .btn, .search-form, .skip-link, .pager, .no-print, dialog { display: none !important; }
  .print-only { display: block !important; }
  .print-url { font-family: var(--font-mono); font-size: 9pt; border-bottom: 1px solid #000; padding-bottom: 6pt; margin-bottom: 12pt; }
  .grid-bg::before { display: none; }
  .page-head, .hero { padding: 0 0 12pt; border-bottom: 1px solid #000; }
  .page-head__grid--fig { display: block; }
  .page-head .fig { display: none; }
  .article-layout { display: block; padding-block: 0; }
  .article { max-width: none; }
  a { color: #000; text-decoration: underline; }
  .step, .callout, .panel, table.spec, .symptoms li { break-inside: avoid; background: #fff !important; border-color: #000 !important; }
  .step__foot { background: #fff !important; }
  .tabs__panel[hidden] { display: block !important; }
  .tabs__list { display: none; }
  .tabs__panel::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 9pt; text-transform: uppercase; margin-bottom: 4pt; }
  .acc { border-color: #000 !important; }
  .acc > summary::after { display: none; }
  .acc .acc__body { display: block !important; }
  .checklist li::after { display: none; }
  .sec-h::before, .sec-h::after { transform: none !important; background: #000 !important; }
  h1, h2, h3 { break-after: avoid; }
  .fig--cyan .fig__frame { background: #fff; }
}
