/* ==========================================================================
   Ink & Paper Fixes: shared stylesheet
   Design direction: Riso Print Studio (PRINTER-03)
   Two spot-color overprints on Stock White, halftone dots, slight misregistration.
   Mobile-first. Shape rule: interactive controls are pills, containers are square.
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  color-scheme: light;

  /* Spot inks (from the brief) */
  --blue: #2F5BA8;          /* Riso Blue: white text 6.6:1 */
  --red: #C7323C;           /* Riso Red: white text 5.3:1 */
  --sun: #FFB81C;           /* Sunflower: fill only, never text */
  --mint: #8FD1B4;          /* Mint: fill only, never text */
  --ink: #1F1D2B;           /* Riso Ink: 15.6:1 on stock */
  --stock: #FBF8F1;         /* Stock White */

  /* Screen tints (halftone percentages of the spot inks) */
  --sun-tint: #FFF2CF;
  --blue-tint: #DCE4F3;
  --red-tint: #F7DADC;
  --mint-tint: #DCF1E7;
  --ink-soft: #46425A;      /* secondary text, 9:1 on stock */
  --rule: #1F1D2B;
  --ad-bg: #EEEBE3;

  /* Type */
  --font-display: "Archivo Black", "Arial Black", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Karla", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "Space Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
  --fs-body: 1.0625rem;     /* 17px */
  --fs-small: 0.9375rem;
  --fs-label: 0.8125rem;    /* 13px */
  --fs-h1: clamp(2.25rem, 1.35rem + 3.4vw, 3.625rem);   /* up to 58px */
  --fs-h2: clamp(1.75rem, 1.3rem + 1.7vw, 2.5rem);
  --fs-h3: clamp(1.2rem, 1.1rem + 0.4vw, 1.375rem);

  /* Layout */
  --container: 1240px;
  --gutter: 16px;
  --rhythm: 64px;           /* 96px at desktop */
  --misreg: 3px;            /* print misregistration */

  /* Motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 400ms;

  /* Z-index scale */
  --z-sticky: 100;
  --z-dropdown: 200;
  --z-banner: 300;
  --z-modal: 400;
  --z-toast: 500;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --rhythm: 96px; --gutter: 40px; } }

/* ---------- 2. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--stock);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--ink); text-decoration-color: var(--red); }
p, ul, ol, dl, table, figure, blockquote { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.35em; }
li + li { margin-top: 0.35em; }
strong { font-weight: 700; }
hr { border: 0; border-top: 2px solid var(--ink); margin: 2rem 0; }
button, input, select, textarea { font: inherit; color: inherit; }
code, kbd { font-family: var(--font-mono); font-size: 0.86em; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--sun); }
::selection { background: var(--sun); color: var(--ink); }

/* Headings: every H1 and H2 carries a misregistered Riso Red layer (decorative shadow; the text stays solid ink) */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 400; line-height: 1.05; margin: 0 0 0.5em; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-h1); line-height: 1; text-shadow: var(--misreg) var(--misreg) 0 rgba(199, 50, 60, 0.9); }
h2 { font-size: var(--fs-h2); text-shadow: 2px 2px 0 rgba(199, 50, 60, 0.85); margin-top: 0; }
h3 { font-size: var(--fs-h3); line-height: 1.15; }
h4 { font-size: 1.05rem; }
p, li { text-wrap: pretty; }

.sr-only { 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: -100px; z-index: var(--z-toast); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-weight: 700; text-decoration: none; }
.skip-link:focus { top: 12px; color: #fff; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.narrow { max-width: 760px; }

/* Labels and guide numbers */
.label, .kicker {
  font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; line-height: 1.4;
}
.kicker { display: inline-block; background: var(--ink); color: #fff; padding: 6px 12px; margin-bottom: 18px; box-shadow: var(--misreg) var(--misreg) 0 var(--red); }

/* ---------- 3. Riso stripe + header ---------- */
.riso-stripe { height: 6px; display: grid; grid-template-columns: 1fr 1fr 1fr; }
.riso-stripe span:nth-child(1) { background: var(--blue); }
.riso-stripe span:nth-child(2) { background: var(--red); }
.riso-stripe span:nth-child(3) { background: var(--sun); }

.site-header { position: sticky; top: 0; z-index: var(--z-sticky); background: var(--stock); border-bottom: 2px solid var(--ink); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.wordmark {
  font-family: var(--font-display); font-size: 1.25rem; line-height: 1; color: var(--ink); text-decoration: none; white-space: nowrap;
  text-shadow: 2px 2px 0 rgba(199, 50, 60, 0.85); margin-right: auto;
}
.wordmark .amp { color: var(--blue); text-shadow: 2px 2px 0 var(--sun); }
.wordmark:hover { color: var(--ink); }

.menu-toggle {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 16px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--stock); font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer;
}
.menu-toggle .bars { width: 18px; height: 12px; position: relative; display: inline-block; }
.menu-toggle .bars::before, .menu-toggle .bars::after, .menu-toggle .bars span { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink); transition: transform 200ms var(--ease-out), opacity 200ms; }
.menu-toggle .bars::before { top: 0; }
.menu-toggle .bars span { top: 5px; }
.menu-toggle .bars::after { bottom: 0; }
.menu-toggle[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bars span { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }

/* Mobile navigation drawer */
.site-nav { display: none; }
.site-nav.is-open {
  display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--stock); border-bottom: 2px solid var(--ink);
  max-height: calc(100dvh - 72px); overflow-y: auto; padding: 8px var(--gutter) 24px;
}
.nav-list { list-style: none; margin: 0; padding: 0; }
.nav-list > li { margin: 0; border-bottom: 2px dotted rgba(31, 29, 43, 0.25); }
.nav-link, .nav-btn {
  display: flex; width: 100%; align-items: center; justify-content: space-between; min-height: 48px; padding: 8px 4px;
  font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); text-decoration: none;
  background: none; border: 0; cursor: pointer; text-align: left; position: relative;
}
.nav-btn .chev { display: inline-block; transition: transform 200ms var(--ease-out); }
.nav-btn[aria-expanded="true"] .chev { transform: rotate(180deg); }
.nav-link[aria-current="page"], .nav-btn.is-active { font-weight: 700; }
.dropdown { display: none; padding: 4px 0 14px 12px; }
.dropdown.is-open { display: block; }
.dropdown ul { list-style: none; margin: 0; padding: 0; }
.dropdown li { margin: 0; }
.dropdown a { display: block; padding: 8px 6px; color: var(--ink); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--sun-tint); }
.dropdown .dd-title { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin: 10px 6px 4px; }
.mobile-search { margin-top: 16px; }

.header-search { display: none; }
.search-pill { display: flex; align-items: stretch; border: 2px solid var(--ink); border-radius: 999px; background: #fff; overflow: hidden; }
.search-pill input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 4px 8px 16px; font-size: 1rem; }
.search-pill input:focus { outline: none; }
.search-pill:focus-within { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--sun); }
.search-pill button { border: 0; background: var(--blue); color: #fff; padding: 0 16px; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; cursor: pointer; }
.search-pill button:hover { background: var(--ink); }

@media (min-width: 1200px) {
  .menu-toggle, .mobile-search { display: none; }
  .header-inner { min-height: 72px; gap: 20px; }
  .wordmark { font-size: 1.375rem; margin-right: 8px; }
  .site-nav, .site-nav.is-open { display: block; position: static; border: 0; padding: 0; max-height: none; overflow: visible; background: none; margin-right: auto; }
  .nav-list { display: flex; gap: 2px; }
  .nav-list > li { border: 0; position: relative; }
  .nav-link, .nav-btn { min-height: 44px; padding: 8px 10px; font-size: var(--fs-label); width: auto; gap: 6px; }
  .nav-link:hover, .nav-btn:hover { background: var(--sun-tint); }
  /* Active link: a Riso Red underline block printed 3px out of register */
  .nav-link[aria-current="page"]::after, .nav-btn.is-active::after {
    content: ""; position: absolute; left: 10px; right: 10px; bottom: 6px; height: 4px; background: var(--red); transform: translate(var(--misreg), var(--misreg));
  }
  .nav-link[aria-current="page"], .nav-btn.is-active { font-weight: 400; }
  .dropdown {
    position: absolute; top: calc(100% + 10px); left: 0; z-index: var(--z-dropdown); min-width: 280px; padding: 12px; background: var(--stock);
    border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--blue);
  }
  .dropdown--wide { min-width: 560px; }
  .dropdown--wide ul { columns: 2; column-gap: 12px; }
  .dropdown--wide li { break-inside: avoid; }
  .header-search { display: block; width: 210px; }
  .header-search input { font-size: 0.9375rem; }
}

/* ---------- 4. Bands, rhythm and halftone ---------- */
main { display: block; }
.band { padding-block: var(--rhythm); --surface: var(--stock); background: var(--stock); position: relative; }
.band--sun { background: var(--sun-tint); --surface: var(--sun-tint); }
.band--tight { padding-block: calc(var(--rhythm) * 0.6); }
.band--flush-top { padding-top: 0; }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p { font-size: 1.125rem; color: var(--ink-soft); margin-bottom: 0; }

/* Halftone divider: two dot screens overprinted slightly out of register (CSS radial-gradient only) */
.halftone-band {
  height: 40px; position: relative; overflow: hidden;
  background-image:
    radial-gradient(circle, var(--blue) 2.4px, transparent 2.9px),
    radial-gradient(circle, var(--red) 2.4px, transparent 2.9px);
  background-size: 12px 12px, 12px 12px;
  background-position: 0 0, 5px 4px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
  opacity: 0.9;
}
.halftone-band--sun { background-image: radial-gradient(circle, var(--sun) 2.6px, transparent 3.1px), radial-gradient(circle, var(--blue) 1.6px, transparent 2.1px); }
.halftone-band--thin { height: 24px; }
.prose .halftone-band { margin: 2.5rem 0; }

/* ---------- 5. Buttons and chips ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 26px;
  border: 2px solid var(--ink); border-radius: 999px; background: var(--blue); color: #fff; font-family: var(--font-body); font-weight: 700; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap; box-shadow: 4px 4px 0 var(--red);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms;
}
.btn:hover { color: #fff; background: #24498A; transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--red); }
.btn:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--red); }
.btn--paper { background: var(--stock); color: var(--ink); box-shadow: 4px 4px 0 var(--blue); }
.btn--paper:hover { background: #fff; color: var(--ink); box-shadow: 5px 5px 0 var(--blue); }
.btn--paper:active { box-shadow: 0 0 0 var(--blue); }
.btn--small { min-height: 40px; padding: 8px 18px; font-size: 0.9375rem; box-shadow: 3px 3px 0 var(--red); }
.btn-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 2px solid var(--ink); border-radius: 999px; background: var(--stock);
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; line-height: 1.5; color: var(--ink); text-decoration: none;
}
.chip--sun { background: var(--sun); }
.chip--mint { background: var(--mint); }
.chip--blue { background: var(--blue-tint); }
.chip--red { background: var(--red-tint); }
a.chip:hover { background: var(--sun); color: var(--ink); }

/* ---------- 6. Cards (2px ink outline + misregistered colored outline 4px behind) ---------- */
.card, .fix-card, .tile, .step-card, .panel {
  --misreg-color: var(--red);
  position: relative; background: #fff; border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 0 var(--surface, var(--stock)), 4px 4px 0 2px var(--misreg-color);
  transition: box-shadow var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
a.card, a.tile, .guide-card { color: var(--ink); text-decoration: none; }
a.card:hover, a.tile:hover, .guide-card:hover {
  box-shadow: 6px 6px 0 0 var(--surface, var(--stock)), 6px 6px 0 2px var(--misreg-color); /* overprint shift: 2px further out of register */
}
.card { padding: 22px 24px; display: block; }
.card strong { display: block; font-family: var(--font-display); font-weight: 400; font-size: 1.125rem; line-height: 1.2; margin-bottom: 6px; }
.card span { display: block; color: var(--ink-soft); font-size: 0.9875rem; line-height: 1.55; }
.card-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 1.5rem 0 2rem; }
.card--blue { --misreg-color: var(--blue); }
.card--sun { --misreg-color: var(--sun); }

/* ---------- 7. Duotone photos (decorative) and natural photos (instructional) ---------- */
.duo { position: relative; isolation: isolate; overflow: hidden; margin: 0; background: #fff; aspect-ratio: var(--ar, 4 / 3); border: 2px solid var(--ink); }
.duo-layer { position: absolute; inset: 0; isolation: isolate; }
.duo-layer img { width: 100%; height: 100%; object-fit: cover; }
.duo-layer::after { content: ""; position: absolute; inset: 0; mix-blend-mode: screen; pointer-events: none; }
.duo-layer--red { transform: translate(5px, 4px) scale(1.02); transition: transform 600ms var(--ease-out); }
/* Red plate: a light curve so red prints the midtones as a pink screen */
.duo-layer--red img { filter: grayscale(1) contrast(0.95) brightness(1.4); }
.duo-layer--red::after { background: var(--red); }
/* Blue plate: a steeper curve so blue carries the shadows and detail */
.duo-layer--blue { mix-blend-mode: multiply; }
.duo-layer--blue img { filter: grayscale(1) contrast(1.35) brightness(1.18); }
.duo-layer--blue::after { background: var(--blue); }
.duo::after { /* halftone-dot overlay */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background-image: radial-gradient(circle, rgba(251, 248, 241, 0.42) 0.8px, transparent 1.3px);
  background-size: 4px 4px;
}
.duo:hover .duo-layer--red, .hero-art:hover .duo-layer--red { transform: translate(7px, 6px) scale(1.02); }

.photo { margin: 0; position: relative; background: #fff; border: 2px solid var(--ink); box-shadow: 4px 4px 0 0 var(--surface, var(--stock)), 4px 4px 0 2px var(--blue); }
.photo img { width: 100%; aspect-ratio: var(--ar, 3 / 2); object-fit: cover; }
.photo figcaption { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 8px 12px; border-top: 2px solid var(--ink); background: var(--stock); }

/* Offset spot-color block behind content */
.offset-wrap { position: relative; }
.offset-wrap::before { content: ""; position: absolute; inset: 0; transform: translate(24px, 24px); background: var(--offset, var(--sun)); z-index: -1; }
.offset-wrap--mint { --offset: var(--mint); }
.offset-wrap--blue { --offset: var(--blue-tint); }
.offset-wrap--red { --offset: var(--red-tint); }

/* ---------- 8. Hero ---------- */
.hero { padding-top: 40px; padding-bottom: calc(var(--rhythm) * 0.9); overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; position: relative; z-index: 0; }
.hero-title { font-size: clamp(2.3rem, 0.9rem + 6vw, 4rem); line-height: 0.98; letter-spacing: -0.02em; margin-bottom: 22px; text-shadow: 5px 5px 0 rgba(199, 50, 60, 0.9); }
.hero-title .line { display: block; }
.hero-title .line--blue { color: var(--blue); text-shadow: 5px 5px 0 rgba(255, 184, 28, 0.95); }
.standfirst { font-size: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem); line-height: 1.55; max-width: 34em; color: var(--ink); margin-bottom: 28px; }
.big-search { max-width: 640px; }
.big-search label { display: block; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 10px; }
.big-search .search-pill { border-width: 3px; box-shadow: 6px 6px 0 var(--blue); }
.big-search .search-pill input { padding: 16px 8px 16px 22px; font-size: 1.125rem; }
.big-search .search-pill button { padding: 0 24px; font-size: 0.875rem; background: var(--red); }
.big-search .search-pill button:hover { background: var(--ink); }
.search-hints { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; font-size: 0.9375rem; }
.search-hints span { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.hero-art { position: relative; margin: 0 24px 24px 0; }
.hero-art::before { content: ""; position: absolute; inset: 0; transform: translate(24px, 24px); background: var(--sun); border: 2px solid var(--ink); }
.hero-art .duo { --ar: 5 / 4; }
@media (min-width: 900px) {
  .hero { padding-top: 64px; }
  .hero-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 56px; }
  .hero-title { font-size: min(4.5rem, 5.3vw); } /* two lines on desktop: "Printer acting up?" fits the copy column */
  .hero-art .duo { --ar: 4 / 5; }
}

/* Page hero (interior pages) */
.page-hero { padding-top: 32px; padding-bottom: 56px; }
.page-hero-grid { display: grid; gap: 40px; align-items: center; }
.page-hero h1 { margin-bottom: 18px; max-width: 18em; }
.page-hero .standfirst { margin-bottom: 0; }
.page-hero-media { margin: 0 24px 24px 0; position: relative; }
.page-hero-media.offset-wrap::before { border: 2px solid var(--ink); }
@media (min-width: 900px) {
  .page-hero { padding-top: 48px; padding-bottom: 72px; }
  .page-hero-grid.has-media { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
}

/* Breadcrumbs */
.breadcrumb { padding-top: 20px; }
.breadcrumb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 0; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; color: var(--red); font-weight: 700; }
.breadcrumb a { color: var(--ink); }
.breadcrumb [aria-current] { color: var(--ink-soft); }

/* ---------- 9. Home sections ---------- */
/* Category tiles: alternating spot fills with Riso Ink text */
.tile-grid { display: grid; gap: 28px 24px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 22px 22px 20px; min-height: 196px; --misreg-color: var(--ink); }
.tile--sun { background: var(--sun); }
.tile--mint { background: var(--mint); }
.tile--blueTint { background: var(--blue-tint); }
.tile--redTint { background: var(--red-tint); }
.tile-num { font-family: var(--font-mono); font-size: var(--fs-label); letter-spacing: 0.06em; }
.tile-name { font-family: var(--font-display); font-size: 1.3rem; line-height: 1.1; }
.tile-text { font-size: 0.975rem; line-height: 1.5; }
.tile-count { margin-top: auto; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; display: flex; justify-content: space-between; }
@media (min-width: 1100px) {
  .tile-grid { grid-template-columns: repeat(5, 1fr); }
  .tile-grid .tile:nth-child(5n + 2), .tile-grid .tile:nth-child(5n + 4) { transform: translateY(16px); } /* zine offset: cards break the grid by 16px */
  .tile-grid { padding-bottom: 16px; }
}

/* Common problems list (numbered zine list) */
.problem-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 2px solid var(--ink); }
.problem-list li { margin: 0; border-bottom: 2px solid var(--ink); }
.problem-list a { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 16px 4px; color: var(--ink); text-decoration: none; transition: background-color 200ms; }
.problem-list a:hover { background: var(--sun); }
.problem-list .pnum { font-family: var(--font-display); font-size: 1.75rem; color: var(--blue); text-shadow: 2px 2px 0 rgba(199, 50, 60, 0.6); line-height: 1; }
.problem-list .ptitle { font-weight: 700; font-size: 1.0625rem; line-height: 1.35; }
.problem-list .pcat { display: none; }
@media (min-width: 768px) {
  .problem-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
  .problem-list .pcat { display: inline-flex; }
}

/* Split section (text + media) */
.split { display: grid; gap: 48px; align-items: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 72px; }
  .split--reverse > :first-child { order: 2; }
}

/* How-it-works trio: numbered, staggered zine blocks (a real 3-part promise) */
.promise-grid { display: grid; gap: 28px; counter-reset: promise; }
.promise { padding: 28px 26px; border: 2px solid var(--ink); background: #fff; position: relative; }
.promise:nth-child(1) { background: var(--mint); }
.promise:nth-child(2) { background: #fff; }
.promise:nth-child(3) { background: var(--sun); }
.promise h3 { font-size: 1.5rem; margin-bottom: 10px; }
.promise p { margin-bottom: 0; }
.promise .big-num { font-family: var(--font-display); font-size: 4.5rem; line-height: 0.9; color: var(--blue); text-shadow: 4px 4px 0 rgba(199, 50, 60, 0.75); display: block; margin-bottom: 12px; }
@media (min-width: 900px) {
  .promise-grid { grid-template-columns: 1.15fr 1fr 1fr; align-items: start; }
  .promise:nth-child(2) { margin-top: 48px; }
  .promise:nth-child(3) { margin-top: 16px; }
}

/* Finder teaser */
.finder-teaser { display: grid; gap: 32px; padding: 32px 24px; border: 3px solid var(--ink); background: var(--blue); color: #fff; position: relative; box-shadow: 10px 10px 0 var(--sun); }
.finder-teaser h2 { color: #fff; text-shadow: 3px 3px 0 rgba(199, 50, 60, 1); }
.finder-teaser p { color: #fff; }
.finder-teaser .btn { background: var(--stock); color: var(--ink); box-shadow: 4px 4px 0 var(--red); }
.finder-teaser .btn:hover { background: #fff; color: var(--ink); }
.finder-opts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.finder-opts li { margin: 0; }
.finder-opts a { display: inline-block; padding: 10px 16px; border: 2px solid #fff; border-radius: 999px; color: #fff; text-decoration: none; font-weight: 700; }
.finder-opts a:hover { background: var(--stock); color: var(--ink); }
@media (min-width: 900px) { .finder-teaser { grid-template-columns: 1.2fr 1fr; padding: 48px; align-items: center; } }

/* Funding ledger */
.ledger { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 14px; }
.ledger li { margin: 0; display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; }
.ledger .mark { width: 28px; height: 28px; border: 2px solid var(--ink); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; line-height: 1; background: var(--mint); }
.ledger--never .mark { background: var(--red); color: #fff; }

/* Scam note strip (calm, not an alert) */
.scam-note { display: grid; gap: 24px; padding: 28px; background: var(--red-tint); border: 2px solid var(--ink); }
.scam-note h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
@media (min-width: 900px) { .scam-note { grid-template-columns: 1fr 2fr; padding: 40px; align-items: center; } }

/* ---------- 10. Prose (long-form pages) ---------- */
.prose { max-width: 72ch; }
.prose > h2 { margin-top: 2.4rem; padding-top: 0.6rem; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.8rem; }
.prose ul li::marker { color: var(--red); }
.prose ol li::marker { color: var(--blue); font-weight: 700; }
.prose blockquote { margin: 1.5rem 0; padding: 18px 22px; background: var(--sun-tint); border: 2px solid var(--ink); }
.prose dl:not(.worksheet) dt { font-weight: 700; }
.prose dl:not(.worksheet) dd { margin: 0 0 0.8em; }

.page-layout { display: grid; gap: 40px; }
@media (min-width: 1024px) {
  .page-layout.has-toc { grid-template-columns: minmax(0, 1fr) 280px; gap: 64px; align-items: stretch; }
  .page-layout.has-toc .page-side { order: 2; }
}

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; border: 2px solid var(--ink); background: #fff; box-shadow: 4px 4px 0 0 var(--surface, var(--stock)), 4px 4px 0 2px var(--blue); }
.table-wrap table { width: 100%; border-collapse: collapse; margin: 0; font-size: 0.975rem; line-height: 1.5; min-width: 560px; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid rgba(31, 29, 43, 0.2); }
.table-wrap thead th { background: var(--sun); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; border-bottom: 2px solid var(--ink); }
.table-wrap tbody tr:last-child td, .table-wrap tbody tr:last-child th { border-bottom: 0; }
.table-wrap tbody th { font-weight: 700; }

/* Callouts */
.callout { margin: 1.5rem 0; padding: 18px 22px; border: 2px solid var(--ink); position: relative; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.callout--safety { background: var(--red); color: #fff; box-shadow: 5px 5px 0 var(--sun); }
.callout--safety a { color: #fff; }
.callout--safety a:hover { color: #fff; text-decoration-color: var(--sun); }
.callout--note { background: var(--mint-tint); box-shadow: 5px 5px 0 var(--mint); }
.callout--tip { background: var(--sun-tint); box-shadow: 5px 5px 0 var(--sun); }
.callout .label { display: block; margin-bottom: 6px; }

/* Copy-to-clipboard paths and commands */
code.path, code.cmd {
  display: inline; padding: 2px 6px; background: var(--blue-tint); border: 1px solid rgba(31, 29, 43, 0.35); border-radius: 4px; color: var(--ink);
  font-size: 0.84em; line-height: 1.9; word-break: break-word; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
code.cmd { background: var(--sun-tint); }
.copy-btn {
  display: inline-flex; align-items: center; vertical-align: baseline; margin-left: 6px; padding: 1px 10px; min-height: 28px; border: 2px solid var(--ink); border-radius: 999px;
  background: var(--stock); font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; cursor: pointer; line-height: 1.6;
}
.copy-btn:hover { background: var(--sun); }
.copy-btn.is-copied { background: var(--mint); }

/* Checklists and worksheets (printable) */
.checklist { list-style: none; padding: 0; margin: 1rem 0 2rem; }
.checklist li { margin: 0; border-bottom: 2px dotted rgba(31, 29, 43, 0.3); }
.checklist label { display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start; padding: 12px 4px; cursor: pointer; }
.checklist input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--blue); }
.checklist input:checked + * , .checklist label:has(input:checked) { color: var(--ink-soft); }
.worksheet { display: grid; gap: 0; margin: 1.5rem 0 2rem; border: 2px solid var(--ink); background: #fff; }
.worksheet dt { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; padding: 12px 16px 0; }
.worksheet dd { margin: 0; min-height: 52px; border-bottom: 2px solid var(--ink); background-image: linear-gradient(transparent calc(100% - 1px), rgba(31, 29, 43, 0.25) 0); background-size: 100% 26px; }
.worksheet dd:last-child { border-bottom: 0; }
.worksheet dd.tall { min-height: 130px; }

/* Riso-numbered list */
.numbered { list-style: none; padding: 0; counter-reset: n; margin: 1.5rem 0 2rem; }
.numbered > li { counter-increment: n; position: relative; padding: 4px 0 18px 64px; margin: 0; min-height: 52px; }
.numbered > li::before {
  content: counter(n); position: absolute; left: 0; top: 0; width: 46px; height: 46px; display: grid; place-items: center;
  font-family: var(--font-display); font-size: 1.4rem; color: #fff; background: var(--blue); border: 2px solid var(--ink); border-radius: 50%; box-shadow: 3px 3px 0 var(--red);
}

/* Accordions (native details) */
.accordion { display: grid; gap: 14px; margin: 1.5rem 0; }
.accordion details { border: 2px solid var(--ink); background: #fff; }
.accordion summary {
  list-style: none; cursor: pointer; padding: 16px 56px 16px 20px; font-weight: 700; font-size: 1.0625rem; line-height: 1.4; position: relative;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+"; position: absolute; right: 16px; top: 50%; width: 30px; height: 30px; margin-top: -15px; display: grid; place-items: center;
  border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-mono); font-size: 1.1rem; background: var(--sun); transition: transform 250ms var(--ease-out);
}
.accordion details[open] summary::after { content: "\2212"; background: var(--mint); }
.accordion summary:hover { background: var(--sun-tint); }
.accordion .acc-body { padding: 0 20px 18px; }
.accordion .acc-body p:last-child { margin-bottom: 0; }
.faq-group + .faq-group { margin-top: 3rem; }

/* OS tabs */
.os-tabs { margin: 1.25rem 0 1.5rem; border: 2px solid var(--ink); background: #fff; }
.tablist { display: flex; flex-wrap: wrap; gap: 0; border-bottom: 2px solid var(--ink); background: var(--stock); }
.tab {
  appearance: none; border: 0; border-right: 2px solid var(--ink); background: transparent; padding: 10px 16px; min-height: 44px; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; position: relative;
}
.tab:hover { background: var(--sun-tint); }
.tab[aria-selected="true"] { background: var(--sun); font-weight: 700; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 5px; height: 3px; background: var(--red); transform: translate(2px, 2px); }
.os-tab { padding: 16px 20px 6px; }
.os-tab[hidden] { display: none; }
.os-tab ol, .os-tab ul { padding-left: 1.3em; }
.no-js .os-tab::before, .os-tabs:not(.is-ready) .os-tab::before { content: attr(data-label); display: block; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; font-weight: 700; }

/* ---------- 11. Table of contents (sticky + scroll-spy) ---------- */
.toc { border: 2px solid var(--ink); background: #fff; margin-bottom: 28px; }
.toc summary { list-style: none; cursor: pointer; padding: 12px 16px; font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; display: flex; justify-content: space-between; align-items: center; background: var(--sun); }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-size: 1.1rem; }
.toc[open] summary::after { content: "\2212"; }
.toc ol { list-style: none; margin: 0; padding: 8px 0; counter-reset: toc; }
.toc li { margin: 0; }
.toc a { display: block; padding: 7px 16px 7px 18px; color: var(--ink); text-decoration: none; font-size: 0.9375rem; line-height: 1.35; border-left: 4px solid transparent; }
.toc a:hover { background: var(--sun-tint); }
.toc a.is-active { border-left-color: var(--red); background: var(--blue-tint); font-weight: 700; }
@media (min-width: 1024px) {
  .page-side .sticky-stack { position: sticky; top: 96px; }
  .toc summary { cursor: default; }
}

/* ---------- 12. Fix guide ---------- */
.guide-hero { padding-top: 28px; padding-bottom: 56px; }
.guide-hero-grid { display: grid; gap: 36px; align-items: end; }
.guide-num {
  font-family: var(--font-display); font-size: clamp(5rem, 3.5rem + 7vw, 9.5rem); line-height: 0.8; color: var(--blue); letter-spacing: -0.03em;
  text-shadow: 6px 6px 0 rgba(199, 50, 60, 0.85); display: flex; align-items: flex-end; gap: 14px; margin-bottom: 16px;
}
.guide-num small { font-family: var(--font-mono); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink); text-shadow: none; line-height: 1.3; padding-bottom: 8px; }
.guide-hero h1 { max-width: 16em; }
.meta-strip { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; padding: 0; list-style: none; }
.meta-strip li { margin: 0; }
.covers { margin-top: 18px; font-size: 0.975rem; color: var(--ink-soft); }
.covers strong { color: var(--ink); }
@media (min-width: 900px) { .guide-hero-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; } }

.guide-layout { display: grid; gap: 40px; padding-bottom: var(--rhythm); }
@media (min-width: 1024px) {
  .guide-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 64px; align-items: stretch; }
  .guide-layout .page-side { order: 2; }
}
.guide-body > section { margin-bottom: 56px; scroll-margin-top: 96px; }
.guide-body > section > h2 { margin-bottom: 20px; }
.guide-intro { font-size: 1.125rem; }

.fix-card { padding: 26px 26px 22px; }
.fix-card h2 { font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); }
.fix-card--seeing { --misreg-color: var(--blue); }
.fix-card--seeing ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.fix-card--seeing li { margin: 0; padding: 10px 14px 10px 44px; background: var(--sun-tint); position: relative; }
.fix-card--seeing li::before { content: "\25CF"; position: absolute; left: 16px; top: 9px; color: var(--red); font-size: 1rem; }
.cause-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.cause-list li { margin: 0; display: grid; grid-template-columns: 40px 1fr; gap: 14px; }
.cause-list .cnum { width: 36px; height: 36px; display: grid; place-items: center; background: var(--mint); border: 2px solid var(--ink); font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700; }
.cause-list strong { display: block; }
@media (min-width: 768px) { .cause-list { grid-template-columns: 1fr 1fr; gap: 18px 28px; } }

/* Step tracker */
.tracker { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; justify-content: space-between; padding: 14px 18px; margin-bottom: 28px; border: 2px solid var(--ink); background: var(--sun); }
.tracker-status { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.tracker-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.tracker-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.tracker-dots span.on { background: var(--blue); }
.tracker .reset-btn { min-height: 36px; padding: 4px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--stock); font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; cursor: pointer; }
.tracker .reset-btn:hover { background: #fff; }
.tracker-note { flex-basis: 100%; margin: 0; font-size: 0.875rem; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 36px; counter-reset: step; }
.step-card { --misreg-color: var(--red); padding: 24px 22px 22px; margin: 0; scroll-margin-top: 96px; }
.step-card.is-tried { background: var(--mint-tint); --misreg-color: var(--mint); }
.step-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; margin-bottom: 14px; }
.step-num { font-family: var(--font-display); font-size: 3.25rem; line-height: 0.85; color: var(--blue); text-shadow: 3px 3px 0 rgba(199, 50, 60, 0.8); min-width: 1.4em; }
.step-head h3 { margin: 6px 0 0; font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem); }
.step-level { display: block; font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 4px; }
.step-body > :last-child { margin-bottom: 0; }
.step-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 16px; border-top: 2px dotted rgba(31, 29, 43, 0.35); }
.test-cue { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.975rem; }
.test-cue::before { content: "\2399"; display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--sun); border: 2px solid var(--ink); font-size: 1rem; }
.tried-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 16px; border: 2px solid var(--ink); border-radius: 999px; background: var(--stock);
  font-weight: 700; font-size: 0.9375rem; cursor: pointer; box-shadow: 3px 3px 0 var(--blue); transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.tried-btn:hover { background: #fff; }
.tried-btn:active { transform: translate(3px, 3px); box-shadow: 0 0 0 var(--blue); }
.tried-btn .box { width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 4px; display: grid; place-items: center; font-size: 0.8rem; line-height: 1; background: #fff; }
.tried-btn[aria-pressed="true"] { background: var(--blue); color: #fff; box-shadow: 3px 3px 0 var(--red); }
.tried-btn[aria-pressed="true"] .box { background: var(--mint); color: var(--ink); }
.tried-btn[aria-pressed="true"] .box::after { content: "\2713"; }
.no-js .tried-btn, .no-js .tracker { display: none; }

.step-tip { margin: 16px 0 0; padding: 12px 16px; background: var(--sun-tint); border: 2px dashed var(--ink); font-size: 0.975rem; }

/* Prevention */
.prevent-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.prevent-list li { margin: 0; padding: 12px 16px 12px 50px; position: relative; background: #fff; border: 2px solid var(--ink); }
.prevent-list li::before { content: "\2713"; position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; display: grid; place-items: center; background: var(--mint); border: 2px solid var(--ink); border-radius: 50%; font-size: 0.8rem; font-weight: 700; }
@media (min-width: 768px) { .prevent-list { grid-template-columns: 1fr 1fr; } }

/* Still not fixed panel */
.still-panel { padding: 28px 26px; background: var(--blue); color: #fff; border: 2px solid var(--ink); box-shadow: 8px 8px 0 var(--sun); }
.still-panel h2 { color: #fff; text-shadow: 3px 3px 0 rgba(199, 50, 60, 1); }
.still-panel a { color: #fff; text-decoration-color: var(--sun); }
.still-panel a:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }
.still-panel ul li::marker { color: var(--sun); }
.still-panel .fine { margin-top: 18px; padding-top: 16px; border-top: 2px dotted rgba(255, 255, 255, 0.55); font-size: 0.9375rem; }

.vary-note { padding: 16px 20px; background: var(--mint-tint); border: 2px solid var(--ink); font-size: 0.975rem; }
.vary-note p:last-child { margin: 0; }

/* Affiliate accessories (disclosed at point of link) */
.accessories { padding: 24px; border: 2px dashed var(--ink); background: #fff; }
.accessories h2 { font-size: 1.5rem; }
.disclosure { display: block; font-size: 0.875rem; background: var(--sun-tint); padding: 8px 12px; border: 1px solid var(--ink); margin-bottom: 16px; }
.acc-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.acc-list li { margin: 0; padding-bottom: 14px; border-bottom: 2px dotted rgba(31, 29, 43, 0.3); }
.acc-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.acc-list .acc-meta { display: block; font-size: 0.875rem; color: var(--ink-soft); }
.aff-tag { font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--sun); border: 1px solid var(--ink); padding: 1px 6px; margin-left: 6px; white-space: nowrap; }

/* Related guides */
.guide-cards { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.guide-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: #fff; border: 2px solid var(--ink); --misreg-color: var(--blue); }
.guide-card .gnum { font-family: var(--font-display); font-size: 2.6rem; line-height: 0.9; color: var(--blue); text-shadow: 3px 3px 0 rgba(199, 50, 60, 0.7); }
.guide-card .gtitle { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.2; }
.guide-card .gsum { font-size: 0.95rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }
.guide-card .gmeta { margin-top: auto; padding-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- 13. Ad slots (labeled, reserved height, visually distinct) ---------- */
.ad-slot { margin: 40px 0; padding: 10px; background: var(--ad-bg); border: 1px solid #B9B4A6; }
.ad-slot .ad-label { display: block; font-family: var(--font-mono); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.08em; color: #4A4659; margin-bottom: 8px; text-align: center; }
.ad-slot .ad-box { min-height: 250px; display: grid; place-items: center; background-image: repeating-linear-gradient(45deg, rgba(31, 29, 43, 0.05) 0 8px, transparent 8px 16px); }
.ad-slot--side .ad-box { min-height: 250px; }
.ad-slot--wide .ad-box { min-height: 120px; }
@media (min-width: 768px) { .ad-slot--wide .ad-box { min-height: 100px; } }

/* ---------- 14. Library, finder, glossary ---------- */
.filters { display: grid; gap: 16px; padding: 22px; border: 2px solid var(--ink); background: #fff; box-shadow: 6px 6px 0 0 var(--surface, var(--stock)), 6px 6px 0 2px var(--blue); margin-bottom: 32px; }
.filters .search-pill { border-width: 2px; }
.filter-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.field label, .field .field-label { display: block; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; font-weight: 700; }
.field select, .field input[type="text"], .field input[type="email"], .field input[type="search"], .field textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 2px solid var(--ink); border-radius: 999px; background: #fff; font-size: 1rem;
}
.field select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 40px; }
.field textarea { border-radius: 16px; min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 7px var(--sun); }
.result-bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 20px; }
.result-count { font-family: var(--font-mono); font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; margin: 0; }
.clear-btn { background: none; border: 0; padding: 6px 0; color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; cursor: pointer; font-weight: 700; }
.library-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.library-list > li { margin: 0; display: flex; }
.library-list > li > .guide-card { width: 100%; }
.library-list > li[hidden] { display: none; }
.empty-state { display: none; padding: 28px; border: 2px dashed var(--ink); background: var(--sun-tint); }
.empty-state.is-visible { display: block; }

/* Symptom Finder */
.finder { display: grid; gap: 32px; }
.finder-card { padding: 28px 24px; background: #fff; border: 3px solid var(--ink); box-shadow: 8px 8px 0 0 var(--surface, var(--stock)), 8px 8px 0 3px var(--red); }
.finder-progress { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }
.finder-q { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem); text-shadow: 2px 2px 0 rgba(199, 50, 60, 0.85); }
.finder-help { color: var(--ink-soft); }
.finder-options { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.finder-options li { margin: 0; }
.finder-option {
  width: 100%; min-height: 64px; text-align: left; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 18px; background: var(--stock); cursor: pointer;
  font-weight: 700; font-size: 1.0625rem; line-height: 1.35; box-shadow: 4px 4px 0 var(--blue); transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms;
}
.finder-option:hover { background: var(--sun); }
.finder-option:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--blue); }
.finder-nav { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.finder-result-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 22px; }
.finder-result-list li { margin: 0; }
.finder-result-list .guide-card { flex-direction: column; }
.finder-result-list .best { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--sun); border: 2px solid var(--ink); padding: 2px 10px; align-self: flex-start; }
.privacy-pledge { padding: 18px 22px; background: var(--mint-tint); border: 2px solid var(--ink); }
.privacy-pledge p:last-child { margin: 0; }

/* Glossary */
.az { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 24px; }
.az li { margin: 0; }
.az a, .az span { display: grid; place-items: center; width: 38px; height: 38px; border: 2px solid var(--ink); border-radius: 50%; font-family: var(--font-mono); font-weight: 700; text-decoration: none; color: var(--ink); background: #fff; }
.az a:hover { background: var(--sun); }
.az span { opacity: 0.35; border-style: dashed; }
.gloss-letter { font-size: 2.5rem; color: var(--blue); margin: 2.5rem 0 1rem; text-shadow: 3px 3px 0 rgba(199, 50, 60, 0.8); scroll-margin-top: 96px; }
.gloss-list { margin: 0; }
.gloss-item { padding: 18px 0; border-bottom: 2px dotted rgba(31, 29, 43, 0.3); scroll-margin-top: 96px; }
.gloss-item:target { background: var(--sun-tint); outline: 2px solid var(--ink); outline-offset: 6px; }
.gloss-item dt { font-family: var(--font-display); font-size: 1.25rem; line-height: 1.2; margin-bottom: 6px; }
.gloss-item dd { margin: 0; }
.gloss-item dd p { margin-bottom: 0.5em; }
.gloss-see { font-size: 0.9rem; color: var(--ink-soft); }
a.gloss { text-decoration-style: dotted; }

/* ---------- 15. Forms ---------- */
.form { display: grid; gap: 20px; max-width: 640px; }
.form .field-hint { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-top: 6px; }
.field-error { display: block; margin-top: 6px; color: var(--red); font-weight: 700; font-size: 0.9375rem; }
.field-error:empty { display: none; }
.field [aria-invalid="true"] { border-color: var(--red); box-shadow: 3px 3px 0 var(--red); }
.check-field { display: grid; grid-template-columns: 26px 1fr; gap: 12px; align-items: start; }
.check-field input { width: 22px; height: 22px; margin: 3px 0 0; accent-color: var(--blue); }
.form-status { padding: 16px 20px; border: 2px solid var(--ink); background: var(--mint); font-weight: 700; }
.form-status[hidden] { display: none; }
.form-note { font-size: 0.9375rem; padding: 14px 18px; background: var(--sun-tint); border: 2px solid var(--ink); }
.newsletter-box { padding: 30px 26px; background: #fff; border: 3px solid var(--ink); box-shadow: 8px 8px 0 0 var(--surface, var(--stock)), 8px 8px 0 3px var(--blue); }
.newsletter-box .form { max-width: none; }
.inline-fields { display: grid; gap: 14px; }
@media (min-width: 640px) { .inline-fields { grid-template-columns: 1fr auto; align-items: end; } }

/* ---------- 16. Footer ---------- */
.site-footer { background: var(--blue); color: #fff; padding: 64px 0 32px; margin-top: 0; }
.site-footer a { color: #fff; text-decoration-color: rgba(255, 255, 255, 0.55); }
.site-footer a:hover { color: #fff; text-decoration-color: var(--sun); }
.footer-grid { display: grid; gap: 40px; }
.footer-brand .wordmark { color: #fff; font-size: 1.6rem; text-shadow: 3px 3px 0 rgba(199, 50, 60, 1); display: inline-block; margin-bottom: 14px; }
.footer-brand .wordmark .amp { color: var(--sun); text-shadow: 3px 3px 0 var(--red); }
.independence { padding: 16px 18px; background: var(--stock); color: var(--ink); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--sun); font-size: 0.9375rem; line-height: 1.55; margin: 18px 0; }
.independence strong { display: block; font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 6px; }
.footer-col h2 { font-family: var(--font-mono); font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.08em; text-shadow: none; margin-bottom: 12px; color: var(--sun-tint); }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin: 0 0 6px; font-size: 0.9375rem; line-height: 1.45; }
.footer-address { font-style: normal; font-size: 0.9375rem; line-height: 1.6; }
.cookie-link { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.55); cursor: pointer; font-size: 0.9375rem; }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 2px solid rgba(255, 255, 255, 0.5); font-size: 0.875rem; line-height: 1.6; display: grid; gap: 10px; }
.footer-bottom p { margin: 0; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr; gap: 36px; } }

/* ---------- 17. Cookie banner + preferences dialog ---------- */
/* Non-blocking bottom bar: the page stays fully usable while it is shown */
.cookie-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: var(--z-banner); max-width: 1180px; margin-inline: auto;
  background: var(--stock); border: 3px solid var(--ink); box-shadow: 6px 6px 0 var(--blue); padding: 16px 18px;
  display: grid; gap: 4px 28px;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner h2 { font-size: 1.125rem; text-shadow: 2px 2px 0 rgba(199, 50, 60, 0.8); margin-bottom: 4px; }
.cookie-banner p { font-size: 0.9rem; line-height: 1.5; margin-bottom: 12px; }
.cookie-actions { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.cookie-actions .btn { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; box-shadow: 3px 3px 0 var(--red); }
.cookie-actions .btn--paper { box-shadow: 3px 3px 0 var(--blue); }
@media (min-width: 1000px) {
  .cookie-banner { grid-template-columns: 1fr auto; align-items: center; padding: 14px 22px; }
  .cookie-banner h2 { grid-column: 1; }
  .cookie-banner p { grid-column: 1; margin-bottom: 0; }
  .cookie-actions { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; }
}
.pref-dialog { border: 3px solid var(--ink); padding: 0; max-width: min(560px, calc(100vw - 24px)); width: 100%; background: var(--stock); color: var(--ink); box-shadow: 10px 10px 0 var(--red); }
.pref-dialog::backdrop { background: rgba(31, 29, 43, 0.55); }
.pref-inner { padding: 24px; }
.pref-inner h2 { font-size: 1.5rem; }
.pref-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: start; padding: 14px 0; border-bottom: 2px dotted rgba(31, 29, 43, 0.3); }
.pref-row p { margin: 4px 0 0; font-size: 0.9375rem; line-height: 1.5; color: var(--ink-soft); }
.switch { position: relative; width: 56px; height: 32px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch .track { position: absolute; inset: 0; border: 2px solid var(--ink); border-radius: 999px; background: #fff; transition: background-color 200ms; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--ink); transition: transform 200ms var(--ease-out); }
.switch input:checked + .track { background: var(--blue); }
.switch input:checked + .track::after { transform: translateX(24px); background: #fff; }
.switch input:focus-visible + .track { outline: 3px solid var(--ink); outline-offset: 3px; box-shadow: 0 0 0 7px var(--sun); }
.switch input:disabled + .track { background: var(--mint); opacity: 0.8; }
.switch input:disabled { cursor: not-allowed; }
.pref-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

.dns-control { padding: 20px; border: 2px solid var(--ink); background: #fff; margin: 1.5rem 0; }
.dns-status { margin: 12px 0 0; font-weight: 700; }
.dns-status:empty { display: none; }

/* ---------- 18. Back to top + misc ---------- */
.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: var(--z-sticky); width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--ink);
  background: var(--sun); color: var(--ink); font-size: 1.4rem; font-weight: 700; cursor: pointer; box-shadow: 3px 3px 0 var(--blue);
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: opacity 250ms, transform 250ms var(--ease-out), visibility 250ms;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: #fff; }
.print-url { display: none; }
.updated-line { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-soft); margin-top: 14px; }
.lede-list { columns: 1; }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1rem; }
.pill-list li { margin: 0; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.byline { font-size: 0.9375rem; color: var(--ink-soft); margin-top: 14px; }
.sponsor-label { display: inline-block; font-family: var(--font-mono); text-transform: uppercase; background: var(--sun); border: 2px solid var(--ink); padding: 4px 12px; font-size: 0.75rem; }
.post-list { display: grid; gap: 36px; }
.post-card { display: grid; gap: 22px; padding: 0; text-decoration: none; color: var(--ink); }
.post-card .duo { --ar: 16 / 10; }
.post-card h2, .post-card h3 { margin-bottom: 8px; }
.post-card:hover h2, .post-card:hover h3 { text-decoration: underline; text-decoration-color: var(--red); text-decoration-thickness: 3px; text-underline-offset: 5px; }
@media (min-width: 900px) { .post-card { grid-template-columns: 5fr 7fr; gap: 40px; align-items: center; } }
.notfound-num { font-family: var(--font-display); font-size: clamp(6rem, 4rem + 10vw, 12rem); line-height: 0.8; color: var(--blue); text-shadow: 8px 8px 0 rgba(199, 50, 60, 0.85); margin-bottom: 20px; letter-spacing: -0.04em; }

/* ---------- 19. Motion (purposeful, and off under reduced motion) ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.js [data-reveal].is-in { animation: fade-up var(--dur) var(--ease-out) both; }
.js .halftone-band.is-in { animation: fade-in 700ms var(--ease-out) both; }
.js .hero-title .line { animation: fade-up 520ms var(--ease-out) both; }
.js .hero-title .line + .line { animation-delay: 90ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .duo:hover .duo-layer--red, .hero-art:hover .duo-layer--red { transform: translate(5px, 4px) scale(1.02); }
}

/* ---------- 20. Print (guides and checklists) ---------- */
@media print {
  @page { margin: 16mm 14mm; }
  :root { --surface: #fff; }
  body { background: #fff; color: #000; font-size: 11.5pt; line-height: 1.5; }
  .riso-stripe, .site-header, .site-footer, .ad-slot, .cookie-banner, .pref-dialog, .to-top, .skip-link, .page-side, .tracker, .tried-btn, .copy-btn,
  .breadcrumb, .halftone-band, .accessories, .related-section, .hero-art, .page-hero-media, .guide-hero-media, .no-print, .finder-teaser, .btn, .search-pill, .tablist { display: none !important; }
  .print-url { display: block; font-family: var(--font-mono); font-size: 9pt; margin: 0 0 12pt; padding-bottom: 6pt; border-bottom: 1pt solid #000; }
  h1, h2 { text-shadow: none; color: #000; }
  h1 { font-size: 22pt; } h2 { font-size: 15pt; } h3 { font-size: 12.5pt; }
  a { color: #000; text-decoration: underline; }
  .band, .guide-hero, .page-hero { padding: 0 !important; background: #fff !important; }
  .container { max-width: none; padding: 0; }
  .guide-layout, .page-layout { display: block; padding: 0; }
  .card, .fix-card, .step-card, .panel, .photo, .table-wrap, .callout, .still-panel, .finder-card, .newsletter-box { box-shadow: none !important; }
  .step-card, .fix-card, .callout, .accordion details, .checklist li, .worksheet dt, .worksheet dd, .prevent-list li { break-inside: avoid; page-break-inside: avoid; }
  .guide-num { font-size: 40pt; color: #000; text-shadow: none; }
  .step-num { color: #000; text-shadow: none; font-size: 26pt; }
  .callout--safety { background: #fff; color: #000; border: 2.5pt solid #000; }
  .callout--safety a { color: #000; }
  .still-panel { background: #fff; color: #000; }
  .still-panel h2, .still-panel a { color: #000; text-shadow: none; }
  .os-tab[hidden] { display: block !important; }
  .os-tab::before { content: attr(data-label) !important; display: block !important; font-weight: 700; margin: 6pt 0 4pt; text-transform: uppercase; font-size: 9pt; }
  .accordion details { border: 1pt solid #000; }
  .accordion details:not([open]) > .acc-body { display: block; }
  .accordion summary::after { display: none; }
  .checklist input { -webkit-appearance: none; appearance: none; width: 12pt; height: 12pt; border: 1.5pt solid #000; }
  .worksheet { border: 1.5pt solid #000; }
  .worksheet dd { border-bottom: 1.5pt solid #000; }
  .numbered > li::before { background: #fff; color: #000; box-shadow: none; }
  .tile, .guide-card { background: #fff !important; box-shadow: none !important; }
  code.path, code.cmd { background: #fff; border: 1pt solid #000; }
}

/* Checkbox labels read as sentences, not as field labels */
.field .check-field label { font-family: var(--font-body); font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 400; margin: 0; line-height: 1.5; }

/* Headings and status messages that receive focus from script (for screen readers) need no ring */
.finder-q:focus, .form-status:focus, main:focus { outline: none; box-shadow: none; }
@media (max-width: 899px) { .page-hero-media, .guide-hero-media, .hero-art { max-width: 560px; } }
