/* =====================================================================
   PvZH Vault guide pages
   One stylesheet for every guide, tier list, deck page and card page.
   Tokens come from the home app (home.css) so guides read as the same site.
   Applied by tools/site_chrome.py; generated pages link it directly.
   ===================================================================== */

@font-face {
  font-family: "Cafeteria";
  src: url("/fonts/Cafeteria-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Reading fonts (self-hosted, OFL). DM Sans for interface and headings, Lora for article prose. */
@font-face {
  font-family: "DM Sans";
  src: url("/fonts/DMSans-var.woff") format("woff");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-var.woff") format("woff");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Lora";
  src: url("/fonts/Lora-Italic-var.woff") format("woff");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #12181b;
  --surface: #1b2226;
  --surface-2: #20282d;
  --surface-3: #283238;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.15);
  --text: #ffffff;
  --body: #d3dadf;
  --muted: #9ba6ae;
  --accent: #34c3e3;
  --accent-solid: #00b4d8;
  --gold: #ffd15c;
  --plant: #8fd96f;
  --zombie: #c3a2ff;
  --plant-stage: #161d18;
  --zombie-stage: #1a1620;
  --stage: #171d20;
  --grade-s: #ffd15c;
  --grade-a: #8fd96f;
  --grade-b: #5ccbe8;
  --grade-c: #c3a2ff;
  --grade-d: #ff9d76;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --read: "Lora", Georgia, "Times New Roman", serif;
  --brand: "Cafeteria", "Arial Rounded MT Bold", var(--sans);
  --wrap: 1180px;
  --r: 10px;
  --r-sm: 7px;

  /* Aliases used by older page-specific CSS (template A and guide-style pages). */
  --panel: var(--surface);
  --ink: var(--text);
  --rule: var(--line);
  --blue: var(--accent);
  --max: var(--wrap);
  --bg-color: var(--bg);
  --bg-deep: var(--bg);
  --card-bg: var(--surface);
  --card-bg-2: var(--surface);
  --border: var(--line);
  --shadow: none;
  --text-primary: var(--text);
  --text-secondary: var(--muted);
  --sun: var(--gold);
  --sun-soft: rgba(255, 209, 92, 0.12);
  --sun-glow: transparent;
  --plant-soft: rgba(143, 217, 111, 0.12);
  --zombie-soft: rgba(195, 162, 255, 0.12);
  --font-display: var(--sans);
  --font-sans: var(--sans);
  --transition: 0.15s ease;
  --max-width: var(--wrap);
  --radius-sm: var(--r-sm);
  --radius-md: var(--r);
  --radius-lg: var(--r);
  --tier-s: var(--grade-s);
  --tier-a: var(--grade-a);
  --tier-b: var(--grade-b);
  --tier-c: var(--grade-c);
  --tier-d: var(--grade-d);
}

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

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font: 400 17px/1.65 var(--sans);
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }
h1, h2, h3, h4, h5 { color: var(--text); margin: 0; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
strong { color: var(--text); font-weight: 650; }
a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: rgba(52, 195, 227, 0.35); color: #fff; }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
code { font-size: 0.9em; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--accent-solid); color: #04161c; padding: 8px 12px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none; }
.skip:focus { top: 10px; }
.sr-only, .pvz-sr { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; white-space: nowrap !important; }

/* Retired decorations: kept in the DOM for old scripts, never shown. */
.progress-track, .progress-bar, .lawn-stripes, .sun-glow, .glow-orb, .back-to-top,
.hero-pill-row, .method-icon, .plant-glow, .zombie-glow { display: none !important; }
.reveal, .reveal.is-visible { opacity: 1 !important; transform: none !important; transition: none !important; }

.vg-wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---------- Site header ---------- */

.vg-top { border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 20; }
.vg-top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; min-height: 60px; }
.vg-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 23px/1 var(--brand); letter-spacing: 0.01em; white-space: nowrap; }
.vg-brand img { width: 26px; height: 26px; }
.vg-brand:hover { color: var(--text); }
.vg-nav { display: flex; align-items: center; gap: 2px; align-self: stretch; }
.vg-nav a { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 100%; min-height: 60px; color: var(--muted); text-decoration: none;
  font: 550 15px/1 var(--sans); padding: 0 12px; white-space: nowrap; transition: color .12s ease; }
.vg-nav a:hover { color: var(--text); }
.vg-nav a[aria-current="page"] { color: var(--text); }
.vg-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent-solid); }
.vg-nav-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 8px; }
.vg-nav .vg-nav-cta, .vg-cta-m { color: var(--accent); font-weight: 650; }
.vg-nav .vg-nav-cta:hover, .vg-cta-m:hover { color: #8fe3f5; }
.vg-nav-cta svg, .vg-cta-m svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.vg-cta-m { display: none; }
@media (prefers-reduced-motion: reduce) { .vg-nav a { transition: none; } }

/* ---------- Page heading (new pages: .vg-head, template A: .masthead) ---------- */

.vg-head, .masthead { border-bottom: 1px solid var(--line); }
.vg-head-in, .masthead-inner { max-width: var(--wrap); margin: 0 auto; padding: 26px 24px 32px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; font-size: 13.5px; color: var(--muted); margin: 0 0 22px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--text); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--body); }
.breadcrumbs span[aria-hidden] { opacity: 0.5; }

.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center; }
.hero-row:not(:has(.hero-art)) { grid-template-columns: minmax(0, 1fr); }
.hero-art { width: 132px; height: 132px; object-fit: contain; display: block; }

.eyebrow, .vg-kicker { color: var(--muted); font-size: 15px; font-weight: 600; margin: 0 0 10px; }

.vg-head h1, .masthead h1 {
  font: 700 clamp(34px, 4.6vw, 54px)/1.06 var(--brand);
  letter-spacing: 0.005em;
  color: var(--text);
  max-width: 22ch;
  margin: 0;
  text-wrap: balance;
}
.vg-lede, .hero-intro {
  font-size: 18.5px; line-height: 1.6; color: var(--body); max-width: 66ch; margin: 16px 0 0;
}
.vg-byline, .byline { display: flex; flex-wrap: wrap; gap: 4px 20px; color: var(--muted); font-size: 14px; margin: 18px 0 0; }
.vg-byline a, .byline a { color: var(--muted); }
.vg-facts { display: flex; flex-wrap: wrap; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.vg-facts > div { padding: 14px 28px 0 0; margin-right: 28px; }
.vg-facts > div + div { border-left: 1px solid var(--line); padding-left: 28px; margin-left: -28px; }
.vg-facts dt { font-size: 13.5px; color: var(--muted); margin: 0; }
.vg-facts dt::first-letter { text-transform: uppercase; }
.vg-facts dd { margin: 2px 0 0; color: var(--text); font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Tier list switcher (hero / card / deck) */
.tier-switch { display: flex; gap: 2px; margin: -6px 0 22px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tier-switch a { padding: 8px 14px 10px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; background: none; border-radius: 0; }
.tier-switch a:hover { color: var(--text); background: none; }
.tier-switch a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent-solid); background: none; }

.archive-banner { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r); padding: 12px 16px; margin: 0 0 22px; font-size: 15px; color: var(--body); }
.archive-banner a { font-weight: 650; }

/* ---------- Two-column layout ---------- */

.layout, .guide-layout {
  max-width: var(--wrap); margin: 0 auto; padding: 40px 24px 72px;
  display: grid; grid-template-columns: minmax(0, 1fr) 232px; gap: 64px; align-items: start;
}
.content, .guide-article, .guide-content { grid-column: 1; grid-row: 1 / span 3; min-width: 0; }
.toc, .guide-sidebar { grid-column: 2; grid-row: 1; position: sticky; top: 20px; align-self: start; font-size: 14px; max-height: calc(100vh - 40px); overflow-y: auto; scrollbar-width: thin; }
.guide-sidebar { display: grid; gap: 22px; }

.toc strong, .toc-label { display: block; font-size: 14px; font-weight: 650; color: var(--text); margin: 0 0 8px; text-transform: none; letter-spacing: 0; }
.toc a, .toc-nav a { display: block; color: var(--muted); text-decoration: none; padding: 5px 0 5px 12px; border-left: 2px solid var(--line); line-height: 1.35; }
.toc a:hover, .toc-nav a:hover { color: var(--text); border-left-color: var(--line-2); }
.toc a.is-current, .toc-nav a.is-current { color: var(--text); border-left-color: var(--accent-solid); font-weight: 600; }
.toc-card { background: none; border: 0; padding: 0; }
.toc-nav { display: block; }
.jump-group-label { font-size: 13px; font-weight: 650; color: var(--body); margin: 14px 0 4px; }
.jump-group-label:first-child { margin-top: 0; }
.jump-rank { display: inline-block; min-width: 30px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* ---------- Article typography ---------- */

.content > section, .guide-article > section, .guide-article > .content-card, .guide-content > section, .guide-section {
  margin: 0 0 60px; scroll-margin-top: 20px;
}
.content-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.content h2, .guide-article h2, .content-card h2, .guide-content h2 {
  font: 700 clamp(23px, 2.4vw, 28px)/1.25 var(--sans); color: var(--text); margin: 0 0 16px; letter-spacing: -0.015em;
}
.content-card h2::after, .guide-article h2::after { content: none !important; display: none !important; }
.content h3, .guide-article h3 { font-size: 20px; margin: 28px 0 10px; }
.content h4, .guide-article h4 { font-size: 16px; margin: 0 0 6px; }
.content p, .guide-article p, .content li, .guide-article li { max-width: 74ch; }
.content ul, .content ol, .guide-article ul, .guide-article ol { padding-left: 22px; margin: 0 0 16px; }
.content li, .guide-article li { margin: 5px 0; }
.content-card p strong, .content-card p a { color: inherit; }
.content-card p a { color: var(--accent); }
.content-card p a:hover { color: var(--text); }

.section-intro, .section-note, .section-header p { color: var(--muted); font-size: 15.5px; margin: -4px 0 18px; max-width: 74ch; }
.section-header { margin-bottom: 16px; }
.section-header h2 { margin-bottom: 8px; }
.muted, .small { color: var(--muted); }
.small { font-size: 13.5px; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }

.answer { font-size: 18px; line-height: 1.6; color: var(--body); }
.answer-box, .pair-note {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px 20px; margin: 0 0 20px;
}
.answer-title { display: block; color: var(--gold); font-size: 14px; font-weight: 700; margin: 0 0 6px; text-transform: none; letter-spacing: 0; }
.answer-box p { font-size: 17px; }
.note { font-size: 14.5px; color: var(--muted); border-left: 2px solid var(--line-2); padding: 2px 0 2px 14px; margin: 16px 0; }

/* Quick picks (best / budget / newest) */
.quick-picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 0 0 18px; overflow: hidden; }
.quick-pick { padding: 16px 18px; border-left: 1px solid var(--line); min-width: 0; }
.quick-pick:first-child { border-left: 0; }
.quick-pick small { display: block; color: var(--muted); font-size: 13px; margin: 0 0 4px; }
.quick-pick a { display: block; font-size: 19px; font-weight: 700; color: var(--text); text-decoration: none; line-height: 1.3; }
.quick-pick a:hover { color: var(--accent); }
.quick-pick p { font-size: 13.5px; color: var(--muted); margin: 6px 0 0; }

/* ---------- Tables ---------- */

.table-wrap, .rank-table-wrap, .table-wrapper { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); margin: 0 0 16px; -webkit-overflow-scrolling: touch; }
.table-wrap table, .rank-table-wrap table, .table-wrapper table, .content table, .guide-article table { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
table caption { text-align: left; padding: 12px 14px 10px; color: var(--muted); font-size: 13.5px; caption-side: top; }
table th, table td { padding: 10px 14px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
table thead th { background: var(--surface-2); color: var(--muted); font-size: 13px; font-weight: 650; text-transform: none; letter-spacing: 0; white-space: nowrap; border-top: 0; }
table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
table tbody th { color: var(--text); font-weight: 600; }
table td a, table th a { font-weight: 600; text-decoration: none; }
table td a:hover, table th a:hover { text-decoration: underline; }
tr.is-now td, tr.is-now th { background: rgba(255, 209, 92, 0.08); }
.rank-table { min-width: 680px; }
.rank-table th, .rank-table td { white-space: nowrap; }
.compact-table { min-width: 0 !important; }
.rank-table .t-rank, .t-rank { color: var(--muted); font-family: var(--sans); font-weight: 600; }
.rank-table tbody tr:first-child .t-rank { color: var(--gold); }
.t-score { color: var(--text); font-weight: 700; }
.t-hero a, .t-deck a { color: var(--text); }
.t-num, .t-author, .t-date, .t-cost { color: var(--muted); }
.t-grade-s { color: var(--grade-s); font-weight: 700; }
.t-grade-a { color: var(--grade-a); font-weight: 700; }
.t-grade-b { color: var(--grade-b); font-weight: 700; }
.t-grade-c { color: var(--grade-c); font-weight: 700; }
.t-grade-d { color: var(--grade-d); font-weight: 700; }

/* ---------- Grades, badges, chips ---------- */

.tier-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 26px; padding: 0 7px;
  border-radius: 6px; font: 700 14px/1 var(--sans); color: #12181b; background: var(--muted); border: 0;
}
.tier-badge-s { background: var(--grade-s); }
.tier-badge-a { background: var(--grade-a); }
.tier-badge-b { background: var(--grade-b); }
.tier-badge-c { background: var(--grade-c); }
.tier-badge-d { background: var(--grade-d); }

.stat-badge, .data-chip {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--body);
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 3px 9px; line-height: 1.5;
}
.data-chip strong { font-weight: 650; }
.score-badge { color: var(--text); font-weight: 650; }
.score-badge.grade-s { color: var(--grade-s); border-color: rgba(255, 209, 92, 0.35); background: var(--surface); }
.score-badge.grade-a { color: var(--grade-a); border-color: rgba(143, 217, 111, 0.3); background: var(--surface); }
.score-badge.grade-b { color: var(--grade-b); border-color: rgba(92, 203, 232, 0.3); background: var(--surface); }
.card-count:empty { display: none; }
.chip-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.sig-chip { border-color: rgba(255, 209, 92, 0.25); }
.sp-sig { color: var(--gold); font-size: 12px; font-weight: 700; margin-left: 6px; }
.pill-label { display: inline-block; font-size: 13.5px; margin: 0 0 10px; color: var(--gold); font-weight: 650; }

.move { display: inline-block; font-size: 12.5px; font-weight: 700; }
.move-up { color: var(--grade-a); }
.move-down { color: var(--grade-d); }
.move-same { color: var(--muted); font-weight: 500; }

/* ---------- Buttons & controls ---------- */

.button, .copy-btn, .deck-link, .text-cta, .filter-btn, .ff-btn, .chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 600 14px/1.2 var(--sans); padding: 9px 14px; border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line-2);
  text-decoration: none; cursor: pointer; white-space: nowrap; transition: background 0.12s ease, border-color 0.12s ease;
}
.button:hover, .copy-btn:hover, .deck-link:hover, .filter-btn:hover, .ff-btn:hover, .chip:hover { background: var(--surface-3); color: var(--text); border-color: var(--line-2); }
.button:not(.secondary), a.copy-btn[data-builder], .deck-link.is-primary {
  background: var(--accent-solid); color: #04161c; border-color: var(--accent-solid);
}
.button:not(.secondary):hover, a.copy-btn[data-builder]:hover { background: #38c9e8; color: #04161c; border-color: #38c9e8; }
.copy-btn.copied, .copy-btn.success { border-color: var(--grade-a); color: var(--grade-a); }
.text-cta { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }
.text-cta:hover { background: none; color: var(--text); }

.filter-btn.is-active, .ff-btn.is-active, .chip.is-active, .chip-plants.is-active, .chip-zombies.is-active {
  background: var(--text); color: #12181b; border-color: var(--text);
}

.deck-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 16px 0 0; }
.deck-actions .source, .source { font-size: 13.5px; margin-left: auto; }
.copy-status { min-height: 20px; font-size: 13.5px; color: var(--grade-a); }

input[type="search"], #deckSearch, .hero-search, .ev-search {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 10px 13px; color: var(--text); font-size: 15px;
}
input[type="search"]::placeholder { color: var(--muted); }
input[type="search"]:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }

.deck-toolbar, .filter-shell { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 0 0 20px; }
.filter-chips, .filter-buttons, .faction-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.search-wrap { flex: 1 1 240px; }
.filter-empty, .empty-state { color: var(--muted); padding: 16px 0; }

/* ---------- Decklists ---------- */

/* Template A: <ul class="card-grid"> with names and costs */
.card-grid {
  list-style: none; margin: 18px 0 14px; padding: 16px 14px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 16px 10px;
  background: var(--stage); border: 1px solid var(--line); border-radius: var(--r);
}
.card-grid li { min-width: 0; text-align: center; margin: 0; max-width: none; }
.card-art { position: relative; display: flex; align-items: center; justify-content: center; }
.card-art img { width: 100%; max-width: 104px; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.card-art .qty, .card-quantity, .card-qty {
  position: absolute; right: 4px; bottom: 2px; background: #0e1315; color: var(--text); border: 1px solid var(--line-2);
  border-radius: 5px; padding: 0 5px; font-size: 12px; font-weight: 700; line-height: 1.5;
}
.card-name { display: block; font-size: 12.5px; line-height: 1.3; color: var(--body); margin-top: 6px; overflow-wrap: anywhere; }
.card-cost { display: block; font-size: 11.5px; color: var(--muted); }
.broken-art { height: 112px; display: grid; place-items: center; border: 1px dashed var(--line-2); border-radius: 6px; padding: 6px; color: var(--muted); font-size: 11.5px; }

/* guide-style: .visual-deck-grid with .visual-card-item */
.deck-image-container { margin: 16px 0 12px; }
.visual-deck-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 8px;
  padding: 14px; background: var(--stage); border: 1px solid var(--line); border-radius: var(--r);
}
.faction-plants .visual-deck-grid, [data-side="plant"] .visual-deck-grid { background: var(--plant-stage); }
.faction-zombies .visual-deck-grid, [data-side="zombie"] .visual-deck-grid { background: var(--zombie-stage); }
.visual-card-item { min-width: 0; }
.card-image-wrapper { position: relative; display: block; }
.card-image-wrapper img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }
.card-image-wrapper:focus-visible { outline-offset: 1px; }

/* ---------- Deck entries ---------- */

.deck-list { list-style: none; margin: 0; padding: 0; }
.deck-list > li { border-top: 1px solid var(--line); padding: 32px 0 36px; margin: 0; max-width: none; scroll-margin-top: 16px; }
.deck-list > li:first-child { border-top: 0; padding-top: 4px; }
.deck-list > li.is-hidden, .deck-card.is-hidden, .hero-detail-card.is-hidden { display: none; }

/* Template A article */
.deck-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 0 0 10px; }
.deck-top h3 { font-size: 24px; margin: 2px 0 0; }
.deck-type { color: var(--muted); font-size: 14px; font-weight: 600; margin: 0; }
.deck-score { text-align: right; flex-shrink: 0; }
.deck-score strong { display: block; font-size: 28px; line-height: 1.1; color: var(--gold); font-variant-numeric: tabular-nums; }
.deck-score span { font-size: 12.5px; color: var(--muted); }
.deck-meta { display: flex; flex-wrap: wrap; gap: 4px 18px; color: var(--muted); font-size: 14px; margin: 8px 0 14px; }
.deck-copy { color: var(--body); max-width: 74ch; }
.deck-advice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 18px 0 6px; }
.deck-advice h4 { font-size: 15px; margin: 0 0 4px; }
.deck-advice p { font-size: 15px; color: var(--muted); margin: 0; }
.full-list { margin-top: 12px; font-size: 14px; color: var(--muted); }
.full-list summary, details > summary { cursor: pointer; }
pre { white-space: pre-wrap; font: 14px/1.6 var(--sans); padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--body); }

/* guide-style deck card */
.deck-card { background: none; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; box-shadow: none; }
.deck-card:hover { transform: none; box-shadow: none; }
.deck-main-layout { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 24px; align-items: start; }
.deck-hero-wrapper { padding: 0; background: none; border: 0; }
.deck-hero-avatar { width: 96px; height: 96px; object-fit: contain; filter: none; transform: none !important; }
.deck-details-content { min-width: 0; }
.deck-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 0 0 6px; font-size: 14px; }
.rank-badge { color: var(--gold); font-weight: 700; font-size: 15px; background: none; border: 0; padding: 0; min-width: 0; height: auto; box-shadow: none; }
.faction-tag { font-weight: 600; font-size: 13.5px; background: none; border: 0; padding: 0; }
.faction-tag-plants { color: var(--plant); }
.faction-tag-zombies { color: var(--zombie); }
.deck-label { color: var(--muted); font-size: 13.5px; font-weight: 600; background: none; border: 0; padding: 0; }
.deck-label-best { color: var(--gold); }
.deck-card h3 { font-size: 24px; margin: 0 0 10px; }
.deck-stat-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.deck-summary { color: var(--body); margin: 12px 0 0; max-width: 74ch; }
.deck-alts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.deck-alts a, .deck-alts div { display: block; padding: 11px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--muted); font-size: 14.5px; text-decoration: none; }
.deck-alts a:hover { border-color: var(--line-2); }
.deck-alts strong { color: var(--text); }

/* ---------- How to play ---------- */

.howto { margin: 18px 0 0; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.howto > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 16px; font-weight: 650; color: var(--text); }
.howto > summary::-webkit-details-marker { display: none; }
.howto > summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
.howto[open] > summary::after { content: "–"; }
.howto[open] > summary { border-bottom: 1px solid var(--line); }
.howto-body { padding: 16px; }
.howto-body > p { color: var(--body); margin: 0 0 14px; }
.howto-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; }
.howto-grid h5 { font-size: 14.5px; margin: 0 0 4px; color: var(--text); }
.howto-grid p { font-size: 14.5px; color: var(--muted); margin: 0; }
.howto-tips { margin: 16px 0 0; padding: 14px 0 0 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14.5px; }
.howto-tips li { margin: 6px 0; }
.curve-bars { display: flex; align-items: flex-end; gap: 6px; height: 76px; margin: 4px 0 0; max-width: 260px; }
.curve-bars span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; font-size: 11.5px; color: var(--muted); height: 100%; }
.curve-bars i { display: block; width: 100%; background: var(--accent-solid); border-radius: 3px 3px 0 0; min-height: 2px; }
.curve-bars b { font-size: 11.5px; color: var(--text); font-weight: 650; }

/* ---------- FAQ ---------- */

.faq details, .faq-item { border-top: 1px solid var(--line); padding: 0; background: none; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; }
.faq details:last-of-type, .faq-grid .faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-grid { display: block; }
.faq summary, .faq-item summary { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; font-size: 17px; font-weight: 600; color: var(--text); line-height: 1.45; }
.faq summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.faq summary::after, .faq-item summary::after { content: "+"; color: var(--muted); font-size: 20px; line-height: 1.2; flex-shrink: 0; transform: none; }
.faq details[open] summary::after, .faq-item[open] summary::after { content: "–"; }
.faq details p, .faq-item p { color: var(--body); font-size: 16px; margin: 0 0 18px; }
.faq-item:hover { background: none; border-color: var(--line); }

/* ---------- Related guides ---------- */

.related { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.related a { display: block; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15.5px; text-decoration: none; }
.related a:hover { text-decoration: underline; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 15px; margin-top: 10px; }
.related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.related-card { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); text-decoration: none; color: var(--body); }
.related-card:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--body); }
.related-card span { display: block; font-size: 13px; color: var(--muted); }
.related-card strong { display: block; color: var(--text); font-size: 16px; margin: 2px 0 4px; line-height: 1.3; }
.related-card small { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* ---------- Panels: method, leaders, hero stats ---------- */

.method-grid, .leader-grid, .mulligan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.method-card, .method-box, .leader-card, .mulligan-box {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: none;
}
.method-box:hover { transform: none; border-color: var(--line); }
.method-card strong, .method-box h3 { display: block; color: var(--text); font-size: 16px; margin: 0 0 4px; font-family: var(--sans); }
.method-card p, .method-box p { font-size: 14.5px; color: var(--muted); margin: 0; }
.leader-card span { display: block; font-size: 13px; color: var(--muted); }
.leader-card strong { display: block; font-size: 17px; margin: 3px 0 2px; }
.leader-card small { display: block; font-size: 13.5px; color: var(--muted); }

/* ---------- Tier board ---------- */

.tier-board { display: grid; gap: 8px; margin-top: 14px; }
.tier-row { display: grid; grid-template-columns: 58px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.tier-letter { display: flex; align-items: center; justify-content: center; font: 700 30px/1 var(--brand); color: #12181b; }
.tier-s .tier-letter { background: var(--grade-s); }
.tier-a .tier-letter { background: var(--grade-a); }
.tier-b .tier-letter { background: var(--grade-b); }
.tier-c .tier-letter { background: var(--grade-c); }
.tier-d .tier-letter { background: var(--grade-d); }
.tier-row-body { padding: 12px 14px; min-width: 0; }
.tier-row-label { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin: 0 0 8px; }
.tier-row-label strong { font-size: 15px; }
.tier-row-label span { font-size: 13.5px; color: var(--muted); }
.tier-chip-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.tier-hero-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); text-decoration: none; font-size: 14px; font-weight: 600; }
.tier-hero-chip:hover { border-color: var(--line-2); color: var(--text); }
.tier-hero-chip img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.tier-hero-chip small { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }

.split-rankings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mini-rank-card { min-width: 0; background: none; border: 0; padding: 0; }
.mini-rank-card h3, .mini-rank-card h4 { font-size: 16px; margin: 0 0 8px; }

/* Grid children that hold wide tables must be allowed to shrink. */
.split-grid > *, .compare-grid > *, .class-champions > *, .split-panel, .compare-card, .leader-grid > *, .method-grid > * { min-width: 0; }

/* ---------- Hero breakdowns (hero tier list) ---------- */

.hero-detail-list { display: block; }
.hero-detail-card { border-top: 1px solid var(--line); padding: 32px 0 36px; background: none; border-radius: 0; scroll-margin-top: 16px; }
.hero-detail-head { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: center; margin: 0 0 14px; }
.hero-portrait-wrap img { width: 64px; height: 64px; object-fit: contain; display: block; }
.hero-kicker { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.hero-detail-title h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 24px; margin: 2px 0 2px; }
.hero-rankline { color: var(--muted); font-size: 14px; margin: 0; }
.hero-score-orb { text-align: right; border: 0; background: none; padding: 0; width: auto; height: auto; }
.hero-score-orb strong { display: block; color: var(--gold); font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero-score-orb span { font-size: 12.5px; color: var(--muted); }
.hero-analysis { max-width: 74ch; }
.hero-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 16px 0; }
.hero-stat-grid > div { background: var(--surface); padding: 10px 12px; }
.hero-stat-grid span { display: block; font-size: 12.5px; color: var(--muted); }
.hero-stat-grid strong { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.hero-data-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 28px; margin: 0 0 16px; }
.hero-data-columns h4 { font-size: 14.5px; margin: 0 0 8px; }
.hero-top-decks { margin: 0 0 4px; }
.hero-footnote-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin: 16px 0 0; font-size: 15px; }
.hero-footnote-row p { margin: 0; }

/* ---------- Hero picker ---------- */

.picker-groups { display: grid; gap: 10px; margin: 14px 0 16px; }
.picker-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.picker-group > span { min-width: 86px; font-weight: 600; color: var(--muted); font-size: 14.5px; }
.picker-results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.picker-result { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--body); text-decoration: none; }
.picker-result:hover { border-color: var(--line-2); color: var(--body); }
.picker-result img { width: 48px; height: 48px; object-fit: contain; }
.picker-result strong { display: block; font-size: 15.5px; }
.picker-result small { display: block; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.picker-empty { color: var(--muted); }

/* ---------- Event card spotlight & strip ---------- */

.event-spot { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 18px; align-items: center; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.event-spot img { width: 88px; height: 110px; object-fit: contain; }
.event-spot h3 { font: 700 24px/1.15 var(--brand); margin: 2px 0 6px; letter-spacing: 0.005em; }
.event-spot p { margin: 4px 0; color: var(--body); font-size: 15px; }
.event-spot .ev-when { color: var(--gold); font-weight: 650; font-size: 14px; }
.event-spot .ev-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-weight: 600; font-size: 15px; }
.event-next { margin: 10px 0 0; font-size: 15px; color: var(--muted); }

.vault-event-strip { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; padding: 8px 44px 8px 14px; background: var(--surface); border-bottom: 1px solid var(--line); color: var(--body); font: 500 14.5px/1.4 var(--sans); position: relative; z-index: 30; }
.vault-event-strip strong { color: var(--text); }
.vault-event-strip img { width: 24px; height: 30px; object-fit: contain; }
.vault-event-strip a { color: var(--accent); font-weight: 650; }
.vault-event-strip button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: 20px; cursor: pointer; padding: 4px 8px; }

/* ---------- Single deck pages (/decks/*) ---------- */

.guide-sidebar .deck-image-container { margin: 10px 0 0; }
.guide-sidebar .visual-deck-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.guide-sidebar .copy-btn { width: 100%; }
.mulligan-box h3 { font-family: var(--sans); font-size: 16px; }

/* ---------- Site footer ---------- */

.vg-foot { border-top: 1px solid var(--line); margin-top: 24px; padding: 40px 0 36px; font-size: 14.5px; }
.vg-foot-cols { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; }
.vg-foot h2 { font: 650 14.5px/1.3 var(--sans); color: var(--text); margin: 0 0 10px; letter-spacing: 0; }
.vg-foot ul { list-style: none; margin: 0; padding: 0; }
.vg-foot li { margin: 0 0 7px; }
.vg-foot a { color: var(--muted); text-decoration: none; }
.vg-foot a:hover { color: var(--text); text-decoration: underline; }
.vg-foot-note { margin: 32px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13.5px; }

/* Old template A footer, if a page still has one */
.footer { max-width: var(--wrap); margin: 0 auto; padding: 22px 24px 32px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.footer a { margin-left: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 1060px) {
  .layout, .guide-layout { grid-template-columns: minmax(0, 1fr) 200px; gap: 40px; }
  .vg-foot-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .related-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .layout, .guide-layout { display: block; padding-top: 24px; }
  .toc, .guide-sidebar { position: static; max-height: none; overflow: visible; margin: 0 0 32px; }
  .toc { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
  .toc strong { flex: 1 1 100%; margin-bottom: 4px; }
  .toc a { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 13.5px; }
  .guide-sidebar .toc-card:first-child { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
  .guide-sidebar .toc-nav { display: flex; flex-wrap: wrap; gap: 6px; }
  .guide-sidebar .toc-nav a { border: 1px solid var(--line); border-radius: 6px; padding: 4px 10px; font-size: 13.5px; }
  .guide-sidebar .jump-card { display: none; }
  .split-rankings { grid-template-columns: 1fr; }
  .method-grid, .leader-grid, .mulligan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .picker-results { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { font-size: 16.5px; }
  .vg-wrap, .vg-head-in, .masthead-inner { padding-left: 18px; padding-right: 18px; }
  .layout, .guide-layout { padding-left: 18px; padding-right: 18px; }
  .vg-top-in { flex-wrap: wrap; padding-top: 10px; padding-bottom: 0; min-height: 0; row-gap: 4px; }
  .vg-nav { width: 100%; overflow-x: auto; margin: 0 -10px; scrollbar-width: none; align-self: auto; }
  .vg-nav::-webkit-scrollbar { display: none; }
  .vg-nav a { min-height: 42px; padding: 0 10px; font-size: 14.5px; }
  .vg-nav a[aria-current="page"]::after { left: 10px; right: 10px; bottom: 0; }
  .vg-nav .vg-nav-cta, .vg-nav-sep { display: none; }
  .vg-cta-m { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 14.5px; text-decoration: none; padding: 6px 0; }
  .vg-brand { font-size: 21px; }
  /* Event strip: picture on the left, text and link stacked beside it, close button on the right */
  .vault-event-strip { display: grid; grid-template-columns: 26px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; justify-content: start;
    align-items: center; text-align: left; padding: 8px 40px 8px 18px; font-size: 13.5px; }
  .vault-event-strip img { grid-row: span 2; width: 26px; height: 32px; }
  .vault-event-strip a { justify-self: start; font-size: 13.5px; }
  .hero-row { gap: 14px; }
  .hero-art { width: 76px; height: 76px; }
  .vg-lede, .hero-intro { font-size: 17px; }
  .vg-facts > div, .vg-facts > div + div { border-left: 0; padding: 12px 20px 0 0; margin: 0; }
  .quick-picks { grid-template-columns: 1fr; }
  .quick-pick { border-left: 0; border-top: 1px solid var(--line); }
  .quick-pick:first-child { border-top: 0; }
  .deck-advice, .howto-grid, .deck-alts, .hero-data-columns, .related { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .method-grid, .leader-grid, .mulligan-grid { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; padding: 12px 10px; }
  .card-art { min-height: 0; }
  .card-name { font-size: 11px; }
  .visual-deck-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 6px; padding: 10px; }
  .deck-main-layout { grid-template-columns: 1fr; gap: 10px; }
  .deck-hero-wrapper { display: none; }
  .deck-top h3, .deck-card h3, .hero-detail-title h3 { font-size: 21px; }
  .deck-score strong, .hero-score-orb strong { font-size: 24px; }
  .hero-detail-head { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
  .hero-portrait-wrap img { width: 48px; height: 48px; }
  .deck-actions .source { margin-left: 0; }
  .event-spot { grid-template-columns: 64px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .event-spot img { width: 64px; height: 80px; }
  .tier-row { grid-template-columns: 44px minmax(0, 1fr); }
  .tier-letter { font-size: 24px; }
  .vg-foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; }
  .guide-sidebar .visual-deck-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media print {
  .vg-top, .vg-foot, .toc, .guide-sidebar, .vault-event-strip, .deck-actions { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Card pages (/cards/<slug>) ---------- */

.card-page .hero-art.card-hero-art { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.45)); }
.card-page .vg-lede { font-size: 19px; color: var(--text); border-left: 3px solid var(--line-2); padding-left: 14px; }
.card-page .leader-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
/* Class tier grades in the same colors as deck grades and the in-app tier list. */
.cg { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12); background: rgba(14, 18, 21, 0.72); font-weight: 800; font-size: 14px; line-height: 1; }
.cg-s { color: #00E5FF; } .cg-a { color: #4CAF50; } .cg-b { color: #8BC34A; } .cg-c { color: #ffb300; } .cg-d { color: #ff8800; } .cg-f { color: #ff4b4b; }

.cp-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); max-width: 640px; }
.cp-list li {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 8px 2px; border-bottom: 1px solid var(--line); margin: 0; max-width: none;
}
.cp-list img { width: 44px; height: 44px; object-fit: contain; }
.cp-list strong { display: block; font-size: 15.5px; }
.cp-list strong a { color: var(--text); text-decoration: none; }
.cp-list strong a:hover { color: var(--accent); text-decoration: underline; }
.cp-list small { display: block; font-size: 13px; color: var(--muted); }
.cp-list b { font-size: 15px; color: var(--text); font-variant-numeric: tabular-nums; }

.card-page .deck-list > li { padding-top: 24px; }
.card-page .deck-card h3 { margin: 4px 0 8px; }
.card-page .deck-topline a { color: inherit; }

@media (max-width: 760px) {
  .card-page .hero-art.card-hero-art { width: 96px; height: 96px; }
  .card-page .vg-lede { font-size: 17px; }
}

/* =====================================================================
   Reading layer
   Long-form guides read like articles: Lora for the prose, DM Sans for
   everything you scan (tables, decklists, labels). Components below are
   used by the rewritten guides and by tools/site_chrome.py.
   ===================================================================== */

:where(.content, .guide-article, .guide-content) :where(p, ul:not([class]) > li, ol:not([class]) > li) {
  font-family: var(--read);
  font-size: 18px;
  line-height: 1.75;
  color: #dbe1e5;
}
:where(.content, .guide-article, .guide-content) :where(
  .quick-pick, .quick-picks, .deck-advice, .deck-meta, .related-card, .method-card, .method-box, .howto, .leader-card,
  .picker-result, .tier-row, .event-spot, .hero-stat-grid, .mini-rank-card, .quick-answer, .pack-rank-card, .metric,
  .spark-card, table, .calc, .card-db-card, .compare-card, .class-card, .keep-reading, .faq-item, .faq details,
  .answer-box, .callout-mini, .card-strip, .post-about, .pick-tool, .deck-card, .deck-list, .cp-list, figure, .note,
  .data-note, .small, .muted, .section-note, .vg-foot
) :where(p, li) {
  font-family: var(--sans);
  line-height: 1.6;
}
:where(.content, .guide-article, .guide-content) :where(.note, .data-note, .small, .section-note) { font-family: var(--sans); }
.faq-item p, .faq details p { font-family: var(--read); font-size: 17px; line-height: 1.7; }
.content em, .guide-article em { font-style: italic; }
.content p strong, .guide-article p strong { font-weight: 650; color: var(--text); }

/* Headings: clear scale, room above, tight below. */
.content h2, .guide-article h2 { font: 700 clamp(24px, 2.6vw, 30px)/1.22 var(--sans); letter-spacing: -0.02em; margin: 0 0 14px; text-wrap: balance; }
.content h3, .guide-article h3 { font: 700 21px/1.3 var(--sans); letter-spacing: -0.01em; margin: 34px 0 10px; }
.content > section, .guide-article > section, .guide-article > .content-card { margin-bottom: 64px; }

/* Byline extras */
.read-time::before { content: none; }
.vg-byline .read-time, .byline .read-time { color: var(--muted); }

/* Opening paragraph of a post */
.post-lede { font-size: 20px !important; line-height: 1.7 !important; color: var(--text) !important; }

/* "The short version": a compact answer block near the top. */
.tldr { margin: 26px 0 34px; padding: 18px 22px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--gold); border-radius: var(--r); }
.tldr h2, .tldr .tldr-title { font: 700 15px/1.3 var(--sans) !important; color: var(--gold); margin: 0 0 8px !important; letter-spacing: 0; }
.tldr ul { margin: 0; padding-left: 20px; }
.tldr li { font: 400 16.5px/1.6 var(--sans) !important; margin: 6px 0; color: var(--body); }
.tldr li strong { color: var(--text); }

/* Card art strip: a row of real card images with a caption. */
.card-strip { margin: 22px 0 26px; padding: 0; }
.card-strip .strip { display: flex; gap: 12px; overflow-x: auto; padding: 14px; background: var(--stage); border: 1px solid var(--line); border-radius: var(--r); scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.card-strip a, .card-strip .strip > span { flex: 0 0 auto; width: 92px; text-align: center; color: var(--body); text-decoration: none; font: 500 12.5px/1.3 var(--sans); }
.card-strip img { display: block; width: 92px; height: 92px; object-fit: contain; margin: 0 auto 6px; transition: transform .15s ease; }
.card-strip a:hover img { transform: translateY(-2px); }
.card-strip a:hover { color: var(--text); }
.card-strip figcaption { margin: 8px 2px 0; font: 400 14px/1.5 var(--sans); color: var(--muted); }

/* Callouts: one tip or warning, never a wall of them. */
.callout { margin: 22px 0; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.callout p { font-family: var(--sans) !important; font-size: 16px !important; line-height: 1.6 !important; margin: 0; }
.callout p + p { margin-top: 8px; }
.callout-tip { border-left: 3px solid var(--plant); }
.callout-warn { border-left: 3px solid var(--grade-d); }

/* Big-number row, used sparingly */
.num-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1px; margin: 20px 0 24px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.num-row > div { background: var(--surface); padding: 12px 14px; }
.num-row b { display: block; font: 700 24px/1.15 var(--sans); color: var(--text); font-variant-numeric: tabular-nums; }
.num-row span { display: block; font: 400 13.5px/1.4 var(--sans); color: var(--muted); margin-top: 2px; }

/* Ranked pick: image + text, used for "the packs" / "the crafts" */
.pick { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: start; padding: 22px 0; border-top: 1px solid var(--line); }
.pick:last-of-type { border-bottom: 1px solid var(--line); }
.pick > img, .pick > a > img { width: 76px; height: 76px; object-fit: contain; }
.pick h3 { margin: 0 0 6px !important; font-size: 20px !important; }
.pick h3 small { font: 600 14px var(--sans); color: var(--muted); margin-left: 8px; }
.pick p { margin: 0 0 8px; }

/* Interactive tools inside posts */
.pick-tool { margin: 24px 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r); }
.pick-tool h3 { margin: 0 0 4px !important; font-size: 18px !important; }
.pick-tool > p { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.pick-tool .fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.pick-tool label { display: block; font: 600 13.5px/1.3 var(--sans); color: var(--muted); margin: 0 0 6px; }
.pick-tool select, .pick-tool input { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 12px; color: var(--text); font: 500 15.5px var(--sans); }
.pick-tool select:focus, .pick-tool input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.pick-tool .seg { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; }
.pick-tool .seg button { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; padding: 6px 12px; font: 600 13.5px var(--sans); color: var(--body); cursor: pointer; }
.pick-tool .seg button[aria-pressed="true"] { background: var(--text); color: #12181b; border-color: var(--text); }
.pick-tool .out { margin: 16px 0 0; padding: 14px 16px; border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line); font: 400 16px/1.6 var(--sans); color: var(--body); min-height: 54px; }
.pick-tool .out strong { color: var(--text); }
.pick-tool .out .big { display: block; font: 700 30px/1.1 var(--sans); color: var(--gold); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.pick-tool .meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin: 10px 0 2px; }
.pick-tool .meter i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .25s ease; }
@media (prefers-reduced-motion: reduce) { .pick-tool .meter i, .card-strip img { transition: none; } }

/* Formula lines stay readable without a code-block look */
.formula { display: block; margin: 12px 0; padding: 10px 14px; background: var(--surface); border-radius: var(--r-sm); border: 1px solid var(--line); font: 500 15px/1.5 var(--sans); color: var(--text); overflow-x: auto; white-space: nowrap; }

/* About this guide (trust box at the end of a post) */
.post-about { margin: 8px 0 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.post-about h2 { font-size: 17px !important; margin: 0 0 6px !important; }
.post-about p { font-size: 15.5px; color: var(--muted); margin: 0 0 6px; }

/* Keep reading: image cards at the end of every guide (added by site_chrome.py) */
.keep-reading { max-width: var(--wrap); margin: 0 auto; padding: 8px 24px 56px; }
.keep-reading h2 { font: 700 24px/1.25 var(--sans); color: var(--text); margin: 0 0 16px; letter-spacing: -0.015em; }
.keep-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.keep-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); text-decoration: none; color: var(--body); transition: border-color .12s ease, transform .12s ease; }
.keep-card:hover { border-color: var(--line-2); transform: translateY(-2px); color: var(--body); }
.keep-card .kc-art { display: flex; align-items: center; justify-content: center; height: 118px; background: radial-gradient(circle at 50% 70%, #22303a 0%, var(--stage) 70%); }
.keep-card .kc-art img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,0,0,.45)); }
.keep-card .kc-body { padding: 12px 14px 14px; }
.keep-card strong { display: block; color: var(--text); font: 700 16px/1.3 var(--sans); margin: 0 0 4px; }
.keep-card small { display: block; font: 400 13.5px/1.45 var(--sans); color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .keep-card, .keep-card:hover { transition: none; transform: none; } }

@media (max-width: 1060px) { .keep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  :where(.content, .guide-article, .guide-content) :where(p, ul:not([class]) > li, ol:not([class]) > li) { font-size: 17px; line-height: 1.72; }
  .post-lede { font-size: 18.5px !important; }
  .content h2, .guide-article h2 { font-size: 24px; }
  .tldr { padding: 14px 16px; }
  .pick { grid-template-columns: 56px minmax(0, 1fr); gap: 14px; }
  .pick > img, .pick > a > img { width: 56px; height: 56px; }
  .card-strip a, .card-strip .strip > span { width: 74px; }
  .card-strip img { width: 74px; height: 74px; }
  .keep-reading { padding-left: 18px; padding-right: 18px; }
  .keep-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .keep-card .kc-art { height: 92px; }
  .keep-card .kc-art img { width: 72px; height: 72px; }
}
.post-lede + h2, .post-lede + .tldr + h2 { margin-top: 30px !important; }
