/* ==========================================================================
   Plain Printer Guides: shared stylesheet
   Design direction: Linen & Sage (PRINTER-04). Calm, roomy, unhurried.
   - Body 19px / 1.8, never below 17px anywhere (labels included).
   - Single reading column (max 70ch), 112px section rhythm desktop / 64px mobile.
   - Shape rule: interactive controls are pills; cards and tiles are 20px;
     photographs are 24px; text fields are 14px.
   - Motion: gentle 250ms opacity fades only; none under prefers-reduced-motion.
   - Light theme only (the brief rules out dark mode).
   ========================================================================== */

/* ---------- Fonts (self-hosted, latin subset, SIL Open Font License) ---------- */
@font-face { font-family: "Public Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("../fonts/public-sans-var.woff2") format("woff2"); }
@font-face { font-family: "Public Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/public-sans-italic.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/spectral-500.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/spectral-600.woff2") format("woff2"); }
@font-face { font-family: "Spectral"; font-style: italic; font-weight: 500; font-display: swap; src: url("../fonts/spectral-500-italic.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* Brand palette (fixed by the brief) */
  --linen: #F6F2EB;        /* page background */
  --oat: #E9E0D2;          /* bands, borders */
  --sage: #5F7F6B;         /* fills, borders, large marks only (4.0:1 on linen: never body text) */
  --pine: #24453A;         /* buttons, headings, links (9.5:1 on linen) */
  --clay: #9C4F3B;         /* safety text (5.2:1 on linen) */
  --ink: #2A2F2C;          /* body text (12.2:1 on linen) */

  /* Derived neutrals and tints */
  --surface: #FFFDF9;      /* cards and tiles, a hair lighter than linen */
  --oat-soft: #F0E9DD;     /* safety callout ground: keeps Clay text at 4.8:1 */
  --sage-tint: #DDE5DD;    /* active nav pill, selected states (Pine on it: 8.2:1) */
  --ink-soft: #4B524E;     /* secondary text (7.2:1 on linen, 6.1:1 on oat) */
  --pine-deep: #1B362D;    /* button hover */
  --on-pine: #FFFDF9;      /* text on Deep Pine (10.6:1) */
  --rule: #D9CFBF;         /* hairlines on oat */

  /* Type */
  --font-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-head: "Spectral", Georgia, "Times New Roman", serif;
  --fs-body: 1.1875rem;    /* 19px */
  --fs-small: 1.0625rem;   /* 17px: the floor */
  --fs-lead: 1.375rem;     /* 22px */
  --fs-h1: clamp(2.25rem, 1.55rem + 2.6vw, 3.125rem);   /* 36 -> 50px */
  --fs-h2: clamp(1.875rem, 1.5rem + 1.4vw, 2.375rem);   /* 30 -> 38px */
  --fs-h3: clamp(1.4375rem, 1.3rem + 0.5vw, 1.625rem);  /* 23 -> 26px */

  /* Space and shape */
  --gutter: 16px;
  --rhythm: 4rem;          /* 64px mobile, 112px desktop (set below) */
  --radius-card: 20px;
  --radius-photo: 24px;
  --radius-field: 14px;
  --shadow: 0 1px 2px rgb(92 70 40 / 0.06), 0 10px 28px -14px rgb(92 70 40 / 0.22);
  --shadow-lift: 0 2px 4px rgb(92 70 40 / 0.07), 0 16px 36px -16px rgb(92 70 40 / 0.28);
  --fade: 250ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Layers */
  --z-sticky: 10;
  --z-dropdown: 20;
  --z-banner: 30;
  --z-dialog: 40;
}
@media (min-width: 768px) { :root { --gutter: 32px; } }
@media (min-width: 1024px) { :root { --rhythm: 7rem; --gutter: 48px; } }

/* Text-size control: A (100%) · A+ (115%) · A++ (130%). Every size is in rem, so the whole page scales. */
html { font-size: 100%; }
html[data-textsize="1"] { font-size: 115%; }
html[data-textsize="2"] { font-size: 130%; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body {
  margin: 0;
  background: var(--linen);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.8;
  font-kerning: normal;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 600; color: var(--pine); line-height: 1.2; text-wrap: balance; margin: 0 0 0.6em; }
h1 { font-size: var(--fs-h1); letter-spacing: -0.012em; line-height: 1.12; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.008em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: 1.25rem; }
p, ul, ol, dl, table, figure { margin: 0 0 1.15em; }
p, li { text-wrap: pretty; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.4em; }
li::marker { color: var(--pine); }
strong { font-weight: 650; }
small { font-size: var(--fs-small); }
hr { border: 0; border-top: 2px solid var(--oat); margin: 2.5rem 0; }

a { color: var(--pine); text-decoration: underline; text-decoration-color: var(--sage); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 3px; text-decoration-color: var(--pine); }
a.gloss { text-decoration-style: dotted; text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--pine); outline-offset: 3px; border-radius: 6px; }
.site-footer :focus-visible, .on-pine :focus-visible { outline-color: var(--on-pine); }

code { font-family: var(--font-body); font-size: 1em; }
code.path, code.cmd {
  display: inline; background: var(--sage-tint); color: var(--pine); font-weight: 600;
  padding: 0.1em 0.45em; border-radius: 8px; box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
code.cmd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.95em; }

.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: 1rem; top: -100px; z-index: var(--z-dialog);
  background: var(--pine); color: var(--on-pine); padding: 0.75rem 1.25rem; border-radius: 999px; font-weight: 650; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Layout ---------- */
.wrap { width: 100%; max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.reading { max-width: 70ch; }
.center { margin-inline: auto; }
.section { padding-block: var(--rhythm); }
.section--tight { padding-block: calc(var(--rhythm) * 0.6); }
.band { background: var(--oat); }
.band .tiles > li, .band .card { border-color: var(--rule); }
.stack > * + * { margin-top: 1.25rem; }
.section-head { max-width: 70ch; margin-bottom: 2.5rem; }
.section-head p { color: var(--ink-soft); font-size: var(--fs-lead); line-height: 1.6; margin: 0; }

/* Small-caps label (the brief's label style; held at the 17px floor) */
.label {
  display: inline-block; font-family: var(--font-body); font-size: var(--fs-small); font-weight: 600;
  font-variant-caps: small-caps; letter-spacing: 0.06em; color: var(--pine); line-height: 1.4;
}
.label--soft { color: var(--ink-soft); }

/* ---------- Header ---------- */
.site-header { background: var(--linen); border-bottom: 2px solid var(--oat); position: relative; z-index: var(--z-dropdown); }
.site-header .wrap { max-width: 1360px; }
.header-bar { display: flex; align-items: center; gap: 12px; min-height: 72px; }
@media (min-width: 1280px) { .header-bar { min-height: 88px; } }
.wordmark {
  font-family: var(--font-head); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--pine); white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px; margin-right: auto; padding-block: 8px; min-height: 48px;
}
.wordmark:hover { text-decoration: none; }
.wordmark__mark { width: 0.95em; height: 0.95em; border-radius: 50% 50% 50% 0; background: var(--sage); flex: none; transform: rotate(-45deg); }
@media (min-width: 1280px) { .wordmark { font-size: 24px; } }

.primary-nav { display: none; }
.primary-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 0.25rem; }
.primary-nav li + li { margin-top: 0; }
.nav-link, .nav-more {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 13px; border-radius: 999px; white-space: nowrap;
  font-size: 18px; font-weight: 550; color: var(--ink); text-decoration: none; background: none; border: 0; font-family: inherit; cursor: pointer;
  transition: background-color var(--fade);
}
.nav-link:hover, .nav-more:hover { background: var(--sage-tint); color: var(--pine); text-decoration: none; }
.nav-link[aria-current="page"], .nav-more.is-current { background: var(--sage-tint); color: var(--pine); font-weight: 650; }
.nav-more::after { content: "▾"; margin-left: 6px; font-size: 15px; }
.nav-more[aria-expanded="true"]::after { content: "▴"; }
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 20rem; background: var(--surface);
  border: 2px solid var(--oat); border-radius: var(--radius-card); box-shadow: var(--shadow-lift); padding: 0.75rem; z-index: var(--z-dropdown);
}
.dropdown[hidden] { display: none; }
.dropdown ul { display: block; }
.dropdown li + li { margin-top: 0.15rem; }
.dropdown a { display: flex; min-height: 48px; align-items: center; padding: 8px 16px; border-radius: 12px; font-size: 18px; color: var(--ink); text-decoration: none; }
.dropdown a:hover, .dropdown a[aria-current="page"] { background: var(--sage-tint); color: var(--pine); }

.header-tools { display: flex; align-items: center; gap: 12px; }
.textsize { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border: 2px solid var(--oat); border-radius: 999px; background: var(--surface); }
.textsize__label { font-size: 17px; color: var(--ink-soft); padding: 0 6px 0 10px; white-space: nowrap; }
@media (min-width: 1280px) {
  /* Stack the label above the buttons so the whole header stays on one line. */
  .header-tools--desktop .textsize { display: grid; grid-template-columns: repeat(5, auto); align-items: center; border: 0; background: none; padding: 0; gap: 0 2px; }
  .header-tools--desktop .textsize__label { grid-column: 1 / -1; padding: 0 0 0 12px; font-size: 17px; line-height: 1.2; }
}
.textsize button {
  min-width: 48px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: none; color: var(--pine);
  font-family: var(--font-head); font-weight: 600; cursor: pointer; line-height: 1; transition: background-color var(--fade);
}
.textsize button[data-size="0"] { font-size: 17px; }
.textsize button[data-size="1"] { font-size: 20px; }
.textsize button[data-size="2"] { font-size: 23px; }
.textsize button:hover { background: var(--sage-tint); }
.textsize button[aria-pressed="true"] { background: var(--pine); color: var(--on-pine); }
.textsize .sep { color: var(--sage); font-weight: 700; }

.tool-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 8px 18px; border-radius: 999px; white-space: nowrap;
  border: 2px solid var(--pine); background: none; color: var(--pine); font: 600 17px/1 var(--font-body); cursor: pointer;
  transition: background-color var(--fade);
}
.tool-btn:hover { background: var(--sage-tint); }
.tool-btn[aria-expanded="true"] { background: var(--pine); color: var(--on-pine); }
.menu-btn { display: inline-flex; }
.header-sub { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; padding-block: 0 0.75rem; flex-wrap: wrap; }
@media (min-width: 1280px) {
  .primary-nav { display: block; }
  .menu-btn { display: none; }
  .header-sub { display: none; }
}
.header-tools--desktop { display: none; }
@media (min-width: 1280px) { .header-tools--desktop { display: flex; } }

/* Search row (opens below the header) */
.search-row { border-top: 2px solid var(--oat); background: var(--surface); padding-block: 1.25rem; }
.search-row[hidden] { display: none; }
.search-form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; max-width: 52rem; }
.search-form label { flex-basis: 100%; font-weight: 600; }
.search-form input { flex: 1 1 16rem; }

/* Mobile menu panel */
.mobile-nav { border-top: 2px solid var(--oat); padding-block: 1rem 1.5rem; background: var(--linen); }
.mobile-nav[hidden] { display: none; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.mobile-nav li + li { margin-top: 0; }
.mobile-nav a { display: flex; align-items: center; min-height: 56px; padding: 0.5rem 1.25rem; border-radius: 16px; font-size: 1.1875rem; color: var(--ink); text-decoration: none; background: var(--surface); border: 2px solid var(--oat); }
.mobile-nav a[aria-current="page"] { background: var(--sage-tint); color: var(--pine); font-weight: 650; border-color: var(--sage-tint); }
.mobile-nav .mobile-nav__group { margin-top: 1.25rem; }
@media (min-width: 640px) { .mobile-nav ul { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .mobile-nav { display: none !important; } }

/* ---------- Buttons and form fields ---------- */
.btn, .btn-secondary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 56px; padding: 0.75rem 1.75rem;
  border-radius: 999px; font: 650 1.125rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color var(--fade), color var(--fade);
}
.btn { background: var(--pine); color: var(--on-pine); border: 2px solid var(--pine); }
.btn:hover { background: var(--pine-deep); border-color: var(--pine-deep); color: var(--on-pine); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--pine); border: 2px solid var(--pine); }
.btn-secondary:hover { background: var(--sage-tint); text-decoration: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.link-btn { background: none; border: 0; padding: 0.5rem 0.25rem; min-height: 48px; font: inherit; color: var(--pine); text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 0.2em; cursor: pointer; }
.on-pine .btn { background: var(--on-pine); color: var(--pine); border-color: var(--on-pine); }
.on-pine .btn:hover { background: var(--sage-tint); border-color: var(--sage-tint); color: var(--pine); }

.field { display: grid; gap: 0.45rem; margin-bottom: 1.5rem; }
.field label, .field legend { font-weight: 650; color: var(--ink); }
.field .hint { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  width: 100%; min-height: 56px; padding: 0.75rem 1rem; font: 400 1.1875rem/1.4 var(--font-body); color: var(--ink);
  background: var(--surface); border: 2px solid #8C978F; border-radius: var(--radius-field);
}
textarea { min-height: 10rem; resize: vertical; line-height: 1.6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--pine) 50%), linear-gradient(135deg, var(--pine) 50%, transparent 50%); background-position: calc(100% - 1.4rem) 50%, calc(100% - 1rem) 50%; background-size: 0.45rem 0.45rem; background-repeat: no-repeat; padding-right: 2.75rem; }
input::placeholder, textarea::placeholder { color: var(--ink-soft); opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--pine); outline-offset: 2px; border-color: var(--pine); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--clay); }
.field-error { color: var(--clay); font-weight: 600; margin: 0; font-size: var(--fs-small); }
.field-error[hidden] { display: none; }
.field-error::before { content: "⚠ "; }
.check { display: flex; gap: 0.85rem; align-items: flex-start; cursor: pointer; }
.check input, .checklist input, .tried input { width: 32px; height: 32px; flex: none; margin: 0.1rem 0 0; accent-color: var(--pine); cursor: pointer; }
.form-status { padding: 1rem 1.25rem; border-radius: var(--radius-card); background: var(--sage-tint); color: var(--pine); font-weight: 600; }
.form-status[hidden] { display: none; }
.search-big { min-height: 64px !important; border-radius: 999px !important; padding-inline: 1.5rem !important; font-size: 1.25rem !important; border-color: var(--pine) !important; }

/* ---------- Photos ---------- */
.photo { border-radius: var(--radius-photo); overflow: hidden; background: var(--oat); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo--wide { aspect-ratio: 21 / 9; }
.photo--hero { aspect-ratio: 4 / 3; }
@media (max-width: 767px) { .photo--wide { aspect-ratio: 16 / 9; } }

/* ---------- Step tiles (the signature pattern) ---------- */
.tiles { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1.25rem; counter-reset: tile; }
.tiles > li {
  counter-increment: tile; position: relative; margin: 0;
  background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); box-shadow: var(--shadow);
  padding: 1.5rem 1.5rem 1.5rem 6.25rem; min-height: 6.25rem;
}
.tiles > li::before {
  content: counter(tile); content: counter(tile) / "";
  position: absolute; left: 1.5rem; top: 1.5rem; width: 3.25rem; height: 3.25rem; border-radius: 50%;
  background: var(--pine); color: var(--on-pine); font: 600 1.625rem/3.25rem var(--font-head); text-align: center;
}
.tiles > li > :last-child { margin-bottom: 0; }
.tiles > li > h3, .tiles .tile-title { font-family: var(--font-head); font-size: 1.4375rem; font-weight: 600; color: var(--pine); margin: 0.35rem 0 0.4rem; line-height: 1.3; }
.tiles > li > p { margin-bottom: 0.6em; }
@media (max-width: 559px) {
  .tiles > li { padding: 1.25rem; }
  .tiles > li::before { position: static; display: block; margin-bottom: 0.75rem; width: 2.75rem; height: 2.75rem; line-height: 2.75rem; font-size: 1.375rem; }
}
/* Link tiles: the whole tile is the hit area */
.tiles--links > li { padding-top: 1.35rem; padding-bottom: 1.35rem; transition: box-shadow var(--fade), border-color var(--fade); }
.tiles--links > li:hover { border-color: var(--sage); box-shadow: var(--shadow-lift); }
.tiles--links a.tile-link { text-decoration: none; color: inherit; }
.tiles--links a.tile-link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.tiles--links a.tile-link:focus-visible { outline: none; }
.tiles--links li:has(a.tile-link:focus-visible) { outline: 3px solid var(--pine); outline-offset: 3px; }
.tiles--links .tile-title { text-decoration: underline; text-decoration-color: var(--sage); text-decoration-thickness: 1.5px; text-underline-offset: 0.2em; }
.tiles--links li:hover .tile-title { text-decoration-thickness: 3px; }
.tile-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; color: var(--ink-soft); font-size: var(--fs-small); margin: 0.25rem 0 0; }
.tile-meta span { white-space: nowrap; }
/* Guide-number tiles show the guide number instead of a counter */
.tiles--numbered > li::before { content: attr(data-num); content: attr(data-num) / ""; font-size: 1.25rem; }
/* Plain tiles (no number) for non-sequential lists */
.tiles--plain > li { padding-left: 1.5rem; }
.tiles--plain > li::before { display: none; }
.tiles--glyph > li::before { content: attr(data-glyph); content: attr(data-glyph) / ""; background: var(--sage-tint); color: var(--pine); font-family: var(--font-body); font-size: 1.5rem; }

/* Two-up tile grid (never more than three side by side) */
.tiles--grid { grid-template-columns: 1fr; }
@media (min-width: 900px) { .tiles--grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Cards and panels ---------- */
.card { background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.75rem; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin-top: 0; }
.card + .card { margin-top: 1.5rem; }
.card-grid { display: grid; gap: 1.25rem; margin: 1.5rem 0 2rem; grid-template-columns: 1fr; }
@media (min-width: 700px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1100px) { .card-grid--3 { grid-template-columns: repeat(3, 1fr); } }
a.card { display: grid; gap: 0.35rem; color: var(--ink); text-decoration: none; transition: box-shadow var(--fade), border-color var(--fade); }
a.card strong { font-family: var(--font-head); font-size: 1.375rem; color: var(--pine); font-weight: 600; text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 0.2em; }
a.card span { color: var(--ink-soft); }
a.card:hover { border-color: var(--sage); box-shadow: var(--shadow-lift); }
.panel { border-radius: var(--radius-card); padding: 1.75rem; background: var(--oat); }
.panel > :last-child { margin-bottom: 0; }
.panel--pine { background: var(--pine); color: var(--on-pine); }
.panel--pine h2, .panel--pine h3, .panel--pine a { color: var(--on-pine); }
.panel--pine a { text-decoration-color: var(--on-pine); }

/* ---------- Callouts (no side stripes: full ground + glyph) ---------- */
.callout { display: grid; grid-template-columns: auto 1fr; gap: 0.85rem; align-items: start; border-radius: 16px; padding: 1.1rem 1.35rem; margin: 1.5rem 0; }
.callout > :last-child { margin-bottom: 0; }
.callout p { margin: 0 0 0.5em; }
.callout p:last-child { margin-bottom: 0; }
.callout__glyph { font-size: 1.5rem; line-height: 1.5; }
.callout__body > :last-child { margin-bottom: 0; }
.callout--safety { background: var(--oat-soft); color: var(--clay); border: 2px solid #D8C3B5; }
.callout--safety strong, .callout--safety a { color: var(--clay); }
.callout--safety a { text-decoration-color: var(--clay); }
.callout--note { background: var(--sage-tint); color: var(--ink); }
.callout--note .callout__glyph, .callout--tip .callout__glyph { color: var(--pine); }
.callout--tip { background: var(--surface); border: 2px solid var(--oat); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 1.5rem 0 2rem; border: 2px solid var(--oat); border-radius: var(--radius-card); background: var(--surface); }
table { width: 100%; border-collapse: collapse; margin: 0; min-width: 34rem; }
caption { text-align: left; padding: 1rem 1.25rem 0; font-family: var(--font-head); font-weight: 600; color: var(--pine); font-size: 1.25rem; }
th, td { text-align: left; vertical-align: top; padding: 0.9rem 1.25rem; border-bottom: 2px solid var(--oat); }
thead th { background: var(--oat); color: var(--pine); font-weight: 650; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { font-weight: 650; color: var(--pine); }

/* ---------- Page header / breadcrumbs ---------- */
.breadcrumbs { padding-top: 1.5rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; font-size: var(--fs-small); color: var(--ink-soft); }
.breadcrumbs li { margin: 0; display: inline-flex; align-items: center; gap: 0.5rem; }
.breadcrumbs li + li::before { content: "›"; color: var(--sage); font-weight: 700; }
.breadcrumbs a { color: var(--ink-soft); display: inline-flex; min-height: 44px; align-items: center; }
.page-head { padding-block: 2rem 2.5rem; }
@media (min-width: 1024px) { .page-head { padding-block: 2.5rem 3.5rem; } }
.page-head h1 { margin: 0.35rem 0 0.75rem; }
.standfirst { font-size: var(--fs-lead); line-height: 1.6; color: var(--ink-soft); margin: 0; max-width: 62ch; }
.meta-row { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; margin-top: 1.5rem; padding: 0; list-style: none; }
.meta-row li { margin: 0; display: inline-flex; align-items: baseline; gap: 0.45rem; background: var(--surface); border: 2px solid var(--oat); border-radius: 999px; padding: 0.35rem 1rem; font-size: var(--fs-small); }
.meta-row .label { font-size: var(--fs-small); }
.covers { margin-top: 1rem; color: var(--ink-soft); font-size: var(--fs-small); }
.covers strong { color: var(--ink); }

/* ---------- Article layout (reading column + optional left rail) ---------- */
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
.article-main { min-width: 0; max-width: 70ch; }
.article-main > section { margin-bottom: 3.5rem; }
.article-main h2 { margin-top: 0; scroll-margin-top: 1.5rem; }
.prose h2 { margin-top: 3rem; scroll-margin-top: 1.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.rail { display: none; }
@media (min-width: 1200px) {
  .article-layout.has-rail { grid-template-columns: 17rem minmax(0, 70ch); gap: 4rem; justify-content: center; }
  .rail { display: block; }
  .toc-mobile { display: none; }
}
.rail-inner { position: sticky; top: 1.5rem; display: grid; gap: 1.5rem; }
.toc { background: var(--linen); border: 2px solid var(--oat); border-radius: var(--radius-card); padding: 1.25rem; position: relative; z-index: 1; }
.toc h2 { font-size: 1.25rem; margin: 0 0 0.75rem; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 0.4rem 0.75rem; border-radius: 10px; font-size: var(--fs-small); line-height: 1.45; color: var(--ink); text-decoration: none; min-height: 44px; display: flex; align-items: center; }
.toc a:hover { background: var(--sage-tint); color: var(--pine); }
.toc a.is-active { background: var(--sage-tint); color: var(--pine); font-weight: 650; }
.toc-mobile { border: 2px solid var(--oat); border-radius: var(--radius-card); background: var(--surface); margin-bottom: 2.5rem; }
.toc-mobile summary { min-height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1.25rem; font-weight: 650; color: var(--pine); cursor: pointer; list-style: none; }
.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary::after { content: "+"; font-size: 1.5rem; line-height: 1; }
.toc-mobile[open] summary::after { content: "−"; }
.toc-mobile ol { margin: 0; padding: 0 1.25rem 1.25rem 2.75rem; }
.toc-mobile li + li { margin-top: 0.3rem; }

/* ---------- Fix-breakdown cards on guides ---------- */
.breakdown { display: grid; gap: 1.5rem; grid-template-columns: 1fr; margin-bottom: 3.5rem; }
.breakdown .card h2 { font-size: 1.625rem; margin-bottom: 0.75rem; }
.breakdown ul { margin: 0; }
.causes { list-style: none; padding: 0; margin: 0; }
.causes li { margin: 0; padding: 0.85rem 0; border-top: 2px solid var(--oat); }
.causes li:first-child { border-top: 0; padding-top: 0; }
.causes strong { display: block; color: var(--pine); }

/* Step tracker */
.tracker { background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); padding: 1.25rem 1.5rem; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.tracker__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; }
.tracker__count { font-weight: 650; color: var(--pine); margin: 0; }
.tracker__bar { height: 14px; border-radius: 999px; background: var(--oat); overflow: hidden; }
.tracker__fill { height: 100%; width: 0; background: var(--sage); border-radius: 999px; transition: width 400ms ease; }
.tracker__note { font-size: var(--fs-small); color: var(--ink-soft); margin: 0; }

/* Guide steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.5rem; }
.step { margin: 0; background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.5rem; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 1.5rem; scroll-margin-top: 1.5rem; transition: border-color var(--fade); }
.step__num { width: 4rem; height: 4rem; border-radius: 50%; background: var(--pine); color: var(--on-pine); font: 600 2rem/4rem var(--font-head); text-align: center; }
.step__body { min-width: 0; }
.step__body > :last-child { margin-bottom: 0; }
.step__title { font-size: 1.5rem; margin: 0.6rem 0 0.75rem; }
.step__tip { background: var(--linen); border-radius: 12px; padding: 0.75rem 1rem; }
.step__test { display: inline-flex; align-items: center; gap: 0.6rem; font-weight: 650; color: var(--pine); background: var(--sage-tint); border-radius: 999px; padding: 0.45rem 1.1rem; margin: 0.25rem 0 1.25rem; }
.step__test::before { content: "⎙"; content: "⎙" / ""; font-size: 1.3rem; line-height: 1; }
.tried { display: flex; align-items: center; gap: 0.85rem; margin-top: 0.75rem; padding-top: 1.1rem; border-top: 2px solid var(--oat); font-weight: 650; color: var(--pine); cursor: pointer; min-height: 48px; }
.step.is-tried { border-color: var(--sage); }
.step.is-tried .step__num { background: var(--sage); }
@media (max-width: 559px) {
  .step { grid-template-columns: 1fr; padding: 1.25rem; }
  .step__num { width: 3rem; height: 3rem; font-size: 1.5rem; line-height: 3rem; }
}

/* OS tabs */
.os-tabs { margin: 1.25rem 0 1.5rem; }
.tablist { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1rem; }
.tablist button { min-height: 48px; padding: 0.5rem 1.2rem; border-radius: 999px; border: 2px solid var(--pine); background: var(--surface); color: var(--pine); font: 600 1.0625rem/1.2 var(--font-body); cursor: pointer; transition: background-color var(--fade); }
.tablist button:hover { background: var(--sage-tint); }
.tablist button[aria-selected="true"] { background: var(--pine); color: var(--on-pine); }
.os-tab { background: var(--linen); border: 2px solid var(--oat); border-radius: 16px; padding: 1.25rem 1.5rem; }
.os-tab > :last-child { margin-bottom: 0; }
.os-tab[hidden] { display: none; }
.os-tabs:not(.is-ready) .os-tab + .os-tab { margin-top: 1rem; }
.os-tabs:not(.is-ready) .os-tab::before { content: attr(data-label); display: block; font-weight: 650; color: var(--pine); margin-bottom: 0.5rem; }
.os-tab .tiles { margin: 0.5rem 0 0; }

/* Copy buttons */
.copy-btn { display: inline-flex; align-items: center; min-height: 36px; margin-left: 0.4rem; padding: 0.1rem 0.75rem; border-radius: 999px; border: 2px solid var(--sage); background: var(--surface); color: var(--pine); font: 600 1.0625rem/1.2 var(--font-body); cursor: pointer; vertical-align: baseline; }
.copy-btn:hover { background: var(--sage-tint); }

/* Accordions (native details) */
.accordion { display: grid; gap: 0.85rem; }
.accordion details { background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); }
.accordion summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; padding: 1rem 1.4rem; font-weight: 650; color: var(--pine); font-size: 1.1875rem; line-height: 1.45; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; flex: none; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--sage-tint); color: var(--pine); display: grid; place-items: center; font-size: 1.5rem; line-height: 1; }
.accordion details[open] summary::after { content: "−"; }
.accordion .answer { padding: 0 1.4rem 1.25rem; }
.accordion .answer > :last-child { margin-bottom: 0; }
.faq-group + .faq-group { margin-top: 3rem; }

/* Still not fixed panel */
.still { background: var(--pine); color: var(--on-pine); border-radius: var(--radius-card); padding: 2rem; }
.still h2 { color: var(--on-pine); }
.still a { color: var(--on-pine); text-decoration-color: var(--on-pine); }
.still li::marker { color: var(--on-pine); }
.still > :last-child, .still > div > :last-child { margin-bottom: 0; }

/* Supplies (affiliate) */
.supplies { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.supplies li { margin: 0; padding: 1rem 1.25rem; border-radius: 16px; background: var(--linen); border: 2px solid var(--oat); }
.disclosure { font-size: var(--fs-small); color: var(--ink-soft); background: var(--linen); border-radius: 12px; padding: 0.75rem 1rem; margin-bottom: 1rem; }

/* Related + disclaimer note */
.note-line { font-size: var(--fs-small); color: var(--ink-soft); border-top: 2px solid var(--oat); padding-top: 1.25rem; }

/* ---------- Ad slots: labeled, reserved size, visually distinct ---------- */
.ad-slot { margin: 3rem 0; border: 2px dashed #CBBFAD; border-radius: 16px; background: repeating-linear-gradient(135deg, #EFE9DF 0 14px, #ECE5DA 14px 28px); padding: 0.75rem 1rem 1rem; }
.ad-slot__label { display: block; font-size: var(--fs-small); font-weight: 600; font-variant-caps: small-caps; letter-spacing: 0.06em; color: var(--ink-soft); margin-bottom: 0.5rem; }
.ad-slot__unit { min-height: 250px; display: grid; place-items: center; text-align: center; color: var(--ink-soft); font-size: var(--fs-small); padding: 1rem; }
.ad-slot--rail .ad-slot__unit { min-height: 600px; }
.ad-slot--rail { margin: 0; }

/* ---------- Home ---------- */
.hero { padding-block: 2.5rem var(--rhythm); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .hero { padding-top: 4rem; } .hero-grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: 4rem; } }
.hero h1 { font-size: clamp(2.375rem, 1.7rem + 2.4vw, 3.125rem); margin-bottom: 1rem; max-width: 18ch; }
.hero .standfirst { margin-bottom: 2rem; }
.hero-search { display: grid; gap: 0.6rem; margin-bottom: 1.75rem; }
.hero-search label { font-weight: 650; font-size: 1.25rem; color: var(--pine); }
.hero-search__row { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-search__row input { flex: 1 1 15rem; }
.hero-search__row .btn { min-height: 64px; padding-inline: 2rem; }
.symptom-label { font-weight: 650; margin-bottom: 0.75rem; }
.symptoms { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.75rem; grid-template-columns: 1fr; }
@media (min-width: 440px) { .symptoms { grid-template-columns: 1fr 1fr; } }
.symptoms li { margin: 0; }
.symptoms a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 60px; height: 100%; padding: 0.6rem 1rem; border-radius: 999px; border: 2px solid var(--pine); background: var(--surface); color: var(--pine); font-weight: 650; font-size: 1.125rem; line-height: 1.3; text-decoration: none; transition: background-color var(--fade); }
.symptoms a:hover { background: var(--sage-tint); }

.cat-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .cat-grid { grid-template-columns: 1fr 1fr; } }
.cat-grid li { margin: 0; position: relative; display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 1.25rem; align-items: center; background: var(--surface); border: 2px solid var(--rule); border-radius: var(--radius-card); padding: 1.1rem; transition: box-shadow var(--fade), border-color var(--fade); }
.cat-grid li:hover { border-color: var(--sage); box-shadow: var(--shadow-lift); }
.cat-grid img { width: 5.5rem; height: 5.5rem; border-radius: 50%; object-fit: cover; }
.cat-grid h3 { font-size: 1.375rem; margin: 0 0 0.2rem; }
.cat-grid a { color: var(--pine); text-decoration: underline; text-decoration-color: var(--sage); text-underline-offset: 0.2em; }
.cat-grid a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius-card); }
.cat-grid li:has(a:focus-visible) { outline: 3px solid var(--pine); outline-offset: 3px; }
.cat-grid a:focus-visible { outline: none; }
.cat-grid p { margin: 0; color: var(--ink-soft); font-size: var(--fs-small); line-height: 1.55; }

.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .split { grid-template-columns: 1fr 1fr; gap: 4.5rem; } .split--flip > :first-child { order: 2; } }
.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; counter-reset: p; }
@media (min-width: 1024px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.principles li { counter-increment: p; margin: 0; padding: 1.75rem; border-radius: var(--radius-card); background: var(--surface); border: 2px solid var(--rule); }
.principles li::before { content: counter(p); content: counter(p) / ""; display: block; font: 600 3rem/1 var(--font-head); color: var(--sage); margin-bottom: 0.75rem; }
.principles h3 { margin-bottom: 0.4rem; }
.principles p { margin: 0; }
.never-list { columns: 1; }
@media (min-width: 700px) { .never-list { columns: 2; column-gap: 2.5rem; } }
.never-list li { break-inside: avoid; }
.promise { font-family: var(--font-head); font-size: 1.5rem; line-height: 1.45; color: var(--pine); font-weight: 500; }

.newsletter { background: var(--pine); color: var(--on-pine); border-radius: var(--radius-card); padding: 2rem; }
@media (min-width: 1024px) { .newsletter { padding: 3rem; } }
.newsletter h2, .newsletter .field label { color: var(--on-pine); }
.newsletter .hint, .newsletter .fine { color: #E3EBE4; }
.newsletter a { color: var(--on-pine); text-decoration-color: var(--on-pine); }
.newsletter input { border-color: var(--on-pine); }
.newsletter .field-error { color: #FFE2D6; }
.newsletter .form-status { background: var(--on-pine); }
.fine { font-size: var(--fs-small); line-height: 1.6; }

/* ---------- Fix library ---------- */
.filters { display: grid; gap: 1rem; background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); padding: 1.5rem; margin-bottom: 1.5rem; }
@media (min-width: 768px) { .filters { grid-template-columns: 1fr 1fr; } .filters .field--search { grid-column: 1 / -1; } }
.filters .field { margin: 0; }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.75rem; margin: 0 0 1rem; }
.results-count { font-weight: 650; color: var(--pine); margin: 0; }
.empty-state { text-align: left; padding: 2rem; border: 2px dashed var(--sage); border-radius: var(--radius-card); background: var(--surface); }
.empty-state[hidden] { display: none; }
.lib-item[hidden] { display: none; }

/* ---------- Symptom finder ---------- */
.finder { background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); box-shadow: var(--shadow); padding: 1.75rem; }
@media (min-width: 768px) { .finder { padding: 2.5rem; } }
.finder__progress { margin: 0 0 0.5rem; color: var(--ink-soft); font-size: var(--fs-small); }
.finder__q { font-size: var(--fs-h2); margin-bottom: 1.25rem; }
.finder__q:focus { outline: none; }
.finder__options { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.75rem; }
.finder__options li { margin: 0; }
.finder__options button { width: 100%; text-align: left; min-height: 64px; padding: 0.85rem 1.35rem; border-radius: 18px; border: 2px solid var(--pine); background: var(--linen); color: var(--ink); font: 550 1.1875rem/1.45 var(--font-body); cursor: pointer; transition: background-color var(--fade); }
.finder__options button:hover { background: var(--sage-tint); }
.finder__options button strong { color: var(--pine); }
.finder-tree ul { margin-bottom: 0.5rem; }
.fade-in { animation: fadeIn 250ms ease both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Glossary ---------- */
.az { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 0 0 2rem; }
.az li { margin: 0; }
.az a { display: grid; place-items: center; min-width: 48px; min-height: 48px; border-radius: 12px; background: var(--surface); border: 2px solid var(--oat); font-weight: 650; text-decoration: none; }
.az a:hover { background: var(--sage-tint); }
.gloss-letter { font-size: 2rem; margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--oat); }
.gloss-list { margin: 0; }
.gloss-item { padding: 1.25rem 1.5rem; background: var(--surface); border: 2px solid var(--oat); border-radius: var(--radius-card); margin-bottom: 1rem; scroll-margin-top: 1.5rem; }
.gloss-item dt { font-family: var(--font-head); font-weight: 600; font-size: 1.375rem; color: var(--pine); margin-bottom: 0.35rem; }
.gloss-item dd { margin: 0; }
.gloss-item dd > :last-child { margin-bottom: 0; }
.gloss-item:target { border-color: var(--sage); background: var(--sage-tint); }
.see-also { font-size: var(--fs-small); color: var(--ink-soft); margin-top: 0.5rem; }

/* ---------- Checklist and worksheet (printables) ---------- */
.checklist { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; gap: 0.6rem; }
.checklist li { margin: 0; }
.checklist label { display: flex; gap: 0.9rem; align-items: flex-start; padding: 0.85rem 1.1rem; border-radius: 14px; background: var(--surface); border: 2px solid var(--oat); cursor: pointer; }
.worksheet { margin: 1rem 0 2rem; }
.worksheet dt { font-weight: 650; color: var(--pine); margin-top: 1rem; }
.worksheet dd { margin: 0.4rem 0 0; min-height: 3rem; border-bottom: 2px solid var(--sage); background: var(--surface); border-radius: 10px 10px 0 0; }
.worksheet dd.tall { min-height: 8rem; background-image: repeating-linear-gradient(to bottom, transparent 0 2.4rem, var(--oat) 2.4rem calc(2.4rem + 2px)); }
.print-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1.5rem 0 2.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--pine); color: var(--on-pine); margin-top: var(--rhythm); padding-block: 4rem 2.5rem; font-size: var(--fs-small); line-height: 1.7; }
.site-footer a { color: var(--on-pine); text-decoration-color: rgb(255 253 249 / 0.55); }
.site-footer a:hover { text-decoration-color: var(--on-pine); }
.footer-top { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .footer-top { grid-template-columns: 1.15fr 2fr; gap: 4rem; } }
.footer-brand .wordmark { color: var(--on-pine); font-size: 1.625rem; margin: 0 0 1rem; }
.footer-brand .wordmark__mark { background: var(--sage-tint); }
.independence { font-size: 1.1875rem; line-height: 1.7; margin-bottom: 1.25rem; }
.footer-cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
.footer-cols h2 { font-family: var(--font-body); font-size: var(--fs-small); font-weight: 650; font-variant-caps: small-caps; letter-spacing: 0.06em; color: #E3EBE4; margin-bottom: 0.75rem; }
.footer-cols ul { list-style: none; padding: 0; margin: 0; }
.footer-cols li { margin: 0; }
.footer-cols a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-bottom { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgb(255 253 249 / 0.25); display: grid; gap: 1rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .link-btn { color: var(--on-pine); text-decoration-color: rgb(255 253 249 / 0.55); padding-left: 0; font-size: var(--fs-small); }
.footer-legal { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.footer-legal li { margin: 0; }
.footer-legal a { display: inline-flex; align-items: center; min-height: 44px; }
.footer-address { font-style: normal; }

/* ---------- Cookie banner and dialog ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-banner); padding: 1rem var(--gutter); pointer-events: none; }
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { pointer-events: auto; max-width: 62rem; margin: 0 auto; background: var(--surface); border: 2px solid var(--pine); border-radius: var(--radius-card); box-shadow: var(--shadow-lift); padding: 1.25rem 1.5rem; display: grid; gap: 1rem; }
@media (min-width: 900px) { .cookie-banner__inner { grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem; } }
.cookie-banner h2 { font-size: 1.375rem; margin: 0 0 0.25rem; }
.cookie-banner p { margin: 0; font-size: var(--fs-small); line-height: 1.6; }
.cookie-banner .btn, .cookie-banner .btn-secondary { min-height: 52px; padding-inline: 1.35rem; font-size: 1.0625rem; }
dialog.prefs { width: min(40rem, calc(100% - 2rem)); border: 2px solid var(--pine); border-radius: var(--radius-card); padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lift); }
dialog.prefs::backdrop { background: rgb(42 47 44 / 0.45); }
.prefs__inner { padding: 1.75rem; }
.prefs fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; display: grid; gap: 0.85rem; }
.prefs .check { padding: 1rem; border: 2px solid var(--oat); border-radius: 14px; background: var(--linen); }
.prefs .check span { display: grid; gap: 0.15rem; }
.prefs .check small { color: var(--ink-soft); }

/* Back to top */
.to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: var(--z-sticky); opacity: 0; pointer-events: none; transition: opacity var(--fade); box-shadow: var(--shadow-lift); }
.to-top.is-visible { opacity: 1; pointer-events: auto; }
body.has-banner .to-top { bottom: 13rem; }

/* 404 */
.notfound-num { font: 600 clamp(4rem, 3rem + 5vw, 6rem)/1 var(--font-head); color: var(--sage); margin: 0 0 0.5rem; }

/* Print URL (shown only on paper) */
.print-url { display: none; }

/* ---------- Motion safety ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Print: guides and checklists ---------- */
@media print {
  @page { margin: 0.6in; }
  html, html[data-textsize] { font-size: 11pt; }
  body { background: #fff; color: #000; line-height: 1.5; }
  .site-header, .site-footer, .ad-slot, .cookie-banner, .to-top, .rail, .toc-mobile, .breadcrumbs, .tracker,
  .tried, .copy-btn, .tablist, .print-cta, .no-print, dialog, .skip-link, .related, .newsletter { display: none !important; }
  .print-url { display: block; font-size: 10pt; border-bottom: 1px solid #000; padding-bottom: 6pt; margin-bottom: 12pt; }
  .wrap { max-width: none; padding: 0; }
  .article-layout { display: block; }
  .article-main { max-width: none; }
  h1, h2, h3 { color: #000; break-after: avoid; }
  a { color: #000; text-decoration: underline; }
  .step, .tiles > li, .card, .callout, .os-tab, .gloss-item, .checklist label, .still { box-shadow: none; background: #fff; border: 1px solid #000; break-inside: avoid; color: #000; }
  .still h2, .still a { color: #000; }
  .step__num, .tiles > li::before { background: #fff !important; color: #000 !important; border: 2px solid #000; }
  .os-tab[hidden] { display: block !important; }
  .os-tab::before { content: attr(data-label); display: block; font-weight: 700; margin-bottom: 4pt; }
  .photo, .hero-photo, figure.photo { display: none; }
  .checklist input { appearance: none; -webkit-appearance: none; width: 14pt; height: 14pt; border: 1.5pt solid #000; border-radius: 2pt; }
  .worksheet dd { border-bottom: 1px solid #000; background: none; }
  .accordion details > .answer { display: block; }
  .page-head { padding: 0 0 12pt; }
  .section { padding-block: 12pt; }
}

/* ---------- Mobile header tools row: keep text size + search on one line down to 360px ---------- */
@media (max-width: 1279px) {
  .header-sub { flex-wrap: nowrap; }
  .header-sub .textsize { gap: 0; }
  .header-sub .textsize button { min-width: 44px; padding: 0 6px; }
  .header-sub .tool-btn { padding: 8px 14px; }
}
@media (max-width: 400px) {
  /* The group keeps its accessible name ("Text size"); only the visible word is dropped on very narrow screens. */
  .header-sub .textsize__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .wordmark { font-size: 21px; }
}
@media (max-width: 559px) {
  .step__body .os-tab { padding: 1rem 0.9rem; }
  .step__body ol, .step__body ul { padding-left: 1.2em; }
  .card, .still, .panel, .finder, .filters { padding: 1.25rem; }
  .callout { padding: 1rem; gap: 0.6rem; }
}
.to-top__short { display: none; }
@media (max-width: 767px) {
  .to-top { min-height: 48px; padding: 0.5rem 1rem; right: 0.75rem; bottom: 0.75rem; }
  .to-top__long { display: none; }
  .to-top__short { display: inline; }
}
