/* taste-skill pass · display: Source Serif 4 · body: IBM Plex Sans · mono: IBM Plex Mono
 · accent: burgundy 22° ~2.4% · em-dash: zero · viewport: 100dvh · slop: pass */

/* =====================================================================
   AN AVERAGE CAMPAIGN GAZETTEER
   Warm parchment + burgundy editorial almanac. OKLCH tokens.
   Fonts loaded via HTML <link> in build/layout.js.
   ===================================================================== */

:root {
  /* Paper / Ink - warm parchment light theme */
  --paper-0: oklch(96% 0.018 78);      /* page ground (warm cream) */
  --paper-1: oklch(93% 0.020 78);      /* default surface */
  --paper-2: oklch(89% 0.022 76);      /* elevated panel */
  --paper-3: oklch(84% 0.024 74);      /* hovered surface */
  --rule:    oklch(72% 0.022 70);      /* hairline */
  --rule-2:  oklch(58% 0.026 68);      /* visible rule */

  --ink-3:   oklch(40% 0.022 60);      /* most muted ink */
  --ink-2:   oklch(32% 0.028 56);      /* muted body */
  --ink-1:   oklch(24% 0.032 50);      /* secondary */
  --ink-0:   oklch(14% 0.030 45);      /* primary ink (deep brown-black) */

  --burgundy:  oklch(38% 0.140 22);    /* the one accent (deep wine) */
  --burgundy-d:oklch(28% 0.140 22);    /* button on-burgundy */
  --burgundy-w:oklch(52% 0.130 24);    /* hairline accent */

  --ok:      oklch(58% 0.115 162);     /* status: active */
  --warn:    oklch(58% 0.130 30);      /* status: expired */

  /* Spacing - 4pt base, nine steps, named by role */
  --s-3xs: 0.125rem;
  --s-2xs: 0.25rem;
  --s-xs:  0.5rem;
  --s-sm:  0.75rem;
  --s-md:  1rem;
  --s-lg:  1.5rem;
  --s-xl:  2.5rem;
  --s-2xl: 4rem;
  --s-3xl: 6rem;
  --s-4xl: 9rem;

  /* Type roles */
  --t-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", "PingFang SC", "Microsoft YaHei", serif;
  --t-body:    "IBM Plex Sans", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --t-mono:    "IBM Plex Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  /* Layout */
  --gutter: clamp(1.25rem, 3vw, 2.25rem);
  --measure: 65ch;
  --col: 1200px;

  /* Motion */
  --ease: cubic-bezier(.2, .6, 0, 1);
  --ease-firm: cubic-bezier(.4, 0, .2, 1);
  --dur-1: 90ms;
  --dur-2: 160ms;
  --dur-3: 280ms;
}

/* =====================  Reset  ===================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--t-body);
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink-1);
  background: var(--paper-0);
  font-feature-settings: "ss01", "ss03", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
body.nav-open { overflow: hidden; }
main { flex: 1; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a {
  color: var(--ink-0);
  text-decoration: none;
  text-underline-offset: 0.16em;
}
a:hover { color: var(--burgundy); }

/* Focus - single, consistent, amber, never on hover */
:focus-visible {
  outline: 2px solid var(--burgundy);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Headings */
h1, h2, h3, h4, h5 {
  font-family: var(--t-display);
  font-weight: 700;
  color: var(--ink-0);
  letter-spacing: -0.014em;
  line-height: 1.08;
  margin: 0 0 var(--s-md);
  text-wrap: balance;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.4rem, 5.4vw, 4.8rem); font-weight: 800; line-height: 1.04; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.6rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.18rem; }
h4 { font-size: 1rem; }
p  { margin: 0 0 var(--s-md); color: var(--ink-1); text-wrap: pretty; }
small { font-size: 0.82rem; color: var(--ink-2); }
strong { color: var(--ink-0); font-weight: 600; }

/* Mono / data */
code, .mono, .data { font-family: var(--t-mono); font-feature-settings: "tnum"; }
.tnum { font-variant-numeric: tabular-nums; }

/* Smart punctuation helpers - applied via templates as needed */
.dash::before { content: "-"; }

/* Container */
.col { max-width: var(--col); margin: 0 auto; padding: 0 var(--gutter); }
.col-narrow { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); }

/* =====================  Eyebrows / kicker  ===================== */
.eyebrow {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow-amber { color: var(--burgundy); }

/* =====================  Nav · N3  ===================== */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper-0);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-lg);
  min-height: 72px;
  padding-top: var(--s-md);
  padding-bottom: var(--s-md);
}
.brand {
  display: inline-flex; align-items: baseline; gap: var(--s-sm);
  font-family: var(--t-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.014em;
  color: var(--ink-0);
}
.brand:hover { color: var(--burgundy); }
.brand-mark { width: 22px; height: 22px; flex-shrink: 0; align-self: center; }
.brand-sub {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.primary-nav { display: flex; gap: var(--s-lg); align-items: center; }
.primary-nav a {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink-2);
  position: relative;
  padding: 4px 0;
  transition: color var(--dur-2) var(--ease);
}
.primary-nav a:hover { color: var(--ink-0); }
.primary-nav a.is-active { color: var(--ink-0); }
.primary-nav a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -8px;
  height: 1px;
  background: var(--burgundy);
}
.nav-tail { display: flex; align-items: center; gap: var(--s-md); }
.search-pill {
  display: inline-flex; align-items: center; gap: var(--s-xs);
  font-family: var(--t-mono);
  font-size: 0.78rem;
  color: var(--ink-3);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.search-pill:hover { color: var(--ink-1); border-color: var(--rule-2); }
.search-pill kbd {
  font-family: inherit;
  font-size: 0.7rem;
  padding: 1px 5px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
}
/* Hamburger / mobile nav toggle - hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-1);
  align-items: center; justify-content: center;
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
}
.nav-toggle:hover { color: var(--burgundy); border-color: var(--rule-2); }
.nav-toggle[aria-expanded="true"] { color: var(--burgundy); border-color: var(--burgundy); }
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block;
  width: 20px; height: 1.5px;
  background: currentColor;
  position: relative;
  transition: transform var(--dur-2) var(--ease), opacity var(--dur-2) var(--ease);
}
.nav-toggle-bars::before,
.nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after  { top:  6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(0); opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after  { transform: translateY(-6px) rotate(-90deg); }

/* Mobile off-canvas drawer */
.mobile-nav {
  position: fixed;
  inset: 72px 0 0 0;
  z-index: 50;
  background: var(--paper-1);
  border-top: 1px solid var(--rule);
  overflow-y: auto;
  padding: var(--s-md) 0 var(--s-2xl);
  animation: mobile-nav-in var(--dur-3) var(--ease);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav-inner {
  display: flex; flex-direction: column;
  gap: 0;
}
.mobile-nav-inner a {
  display: block;
  font-family: var(--t-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--ink-0);
  padding: var(--s-md) 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-nav-inner a.is-active { color: var(--burgundy); }
.mobile-nav-inner a:hover { color: var(--burgundy); }
@keyframes mobile-nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .primary-nav { display: none; }
  .nav-toggle  { display: inline-flex; }
}

/* =====================  HOME - Stat-Led hero  ===================== */
.gz-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  padding: var(--s-3xl) 0 var(--s-2xl);
  min-height: clamp(560px, 70dvh, 760px);
  display: flex;
  align-items: center;
}

/* Background image layer + scrim — taste-skill §4.8 "Hero needs a real visual" */
.gz-hero-img {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.gz-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
  filter: saturate(0.95) brightness(0.78) contrast(1.02);
}
.gz-hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      oklch(11% 0.012 75 / 0.55) 0%,
      oklch(11% 0.012 75 / 0.35) 30%,
      oklch(11% 0.012 75 / 0.55) 70%,
      oklch(11% 0.012 75 / 0.92) 100%),
    radial-gradient(ellipse 60% 80% at 22% 50%,
      oklch(11% 0.012 75 / 0.55) 0%,
      transparent 70%);
}

.gz-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* hero title + lede */
.gz-headline {
  font-family: var(--t-display);
  font-weight: 800;
  font-size: clamp(2.8rem, 6.6vw, 6rem);
  line-height: 0.96;
  letter-spacing: -0.028em;
  color: var(--ink-0);
  max-width: 14ch;
  text-shadow: 0 2px 24px oklch(11% 0.012 75 / 0.55);
  margin: 0;
  text-wrap: balance;
}
.gz-headline em {
  font-style: italic;
  color: var(--burgundy);
  font-weight: 700;
}
.gz-lede {
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--ink-0);
  margin-top: var(--s-md);
  text-shadow: 0 1px 8px oklch(11% 0.012 75 / 0.7);
}

.gz-hero-ctas {
  margin-top: var(--s-xl);
  display: flex; gap: var(--s-md) var(--s-lg); flex-wrap: wrap; align-items: center;
}
.gz-hero-footlinks {
  margin: 0;
  font-family: var(--t-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  display: inline-flex; align-items: baseline; gap: var(--s-xs);
  flex-wrap: wrap;
}
.gz-hero-footlinks a {
  color: var(--ink-1);
  border-bottom: 1px dotted var(--rule-2);
  padding-bottom: 1px;
}
.gz-hero-footlinks a:hover { color: var(--burgundy); border-bottom-color: var(--burgundy); }
.gz-hero-footlinks span { color: var(--ink-3); }

/* Ledger now in its own section below the hero */
.gz-ledger-section {
  background: var(--paper-0);
  border-bottom: 1px solid var(--rule);
  padding: var(--s-xl) 0 var(--s-2xl);
}
.gz-ledger {
  margin: 0;
  border-top: 1px solid var(--rule-2);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 880px) {
  .gz-hero { min-height: clamp(480px, 60dvh, 640px); }
  .gz-hero-img img { object-position: center 40%; }
  .gz-hero-scrim {
    background:
      linear-gradient(180deg,
        oklch(11% 0.012 75 / 0.65) 0%,
        oklch(11% 0.012 75 / 0.55) 50%,
        oklch(11% 0.012 75 / 0.95) 100%);
  }
  .gz-ledger { grid-template-columns: repeat(2, 1fr); }
  .gz-ledger-col:nth-child(2) { border-right: 0; }
  .gz-ledger-col:nth-child(1), .gz-ledger-col:nth-child(2) {
    border-bottom: 1px solid var(--rule);
    padding-bottom: var(--s-md);
    margin-bottom: var(--s-md);
  }
}

@media (prefers-reduced-motion: reduce) {
  /* honor reduced motion for any future hero animation */
  .gz-hero-img img { transition: none; }
}

/* Global reducer: every transition / animation drops to ~0 when reduced motion is requested.
   Aligns with the project's motion-conscious commitment (PRODUCT.md). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.gz-masthead {
  border-left: 1px solid var(--rule-2);
  padding-left: var(--s-md);
  font-family: var(--t-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; flex-direction: column; gap: var(--s-xs);
}
.gz-masthead-line { color: var(--ink-3); }
.gz-masthead-line strong { color: var(--ink-0); font-weight: 600; font-family: var(--t-mono); }

/* Stat ledger column shared styles */
.gz-ledger-col {
  padding: var(--s-lg) var(--s-md) var(--s-md) 0;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: var(--s-xs);
}
.gz-ledger-col:last-child { border-right: 0; }
.gz-ledger-num {
  font-family: var(--t-display);
  font-size: clamp(3.2rem, 6vw, 5.6rem);
  font-weight: 700;
  line-height: 0.9;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: -0.04em;
}
.gz-ledger-label {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.gz-ledger-roll {
  margin-top: var(--s-sm);
  display: flex; flex-direction: column;
  font-family: var(--t-body);
  font-size: 0.86rem;
  color: var(--ink-1);
  gap: 2px;
  border-top: 1px solid var(--rule);
  padding-top: var(--s-sm);
}
.gz-ledger-roll a { color: var(--ink-1); }
.gz-ledger-roll a:hover { color: var(--burgundy); }

.btn {
  display: inline-flex; align-items: center; gap: var(--s-xs);
  font-family: var(--t-body);
  font-size: 0.94rem;
  font-weight: 500;
  height: 44px;
  padding: 0 var(--s-md);
  border-radius: 2px;
  border: 1px solid var(--rule-2);
  color: var(--ink-0);
  transition: color var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease), background var(--dur-2) var(--ease);
}
.btn:hover { border-color: var(--ink-2); color: var(--ink-0); background: var(--paper-2); }
.btn-primary {
  background: var(--burgundy);
  color: oklch(15% 0.04 60);
  border-color: var(--burgundy);
  font-weight: 600;
}
.btn-primary:hover { background: var(--burgundy-d); border-color: var(--burgundy-d); color: oklch(15% 0.04 60); }
.btn-ghost { background: transparent; }
.btn-text {
  height: auto; padding: 4px 0; border: 0;
  color: var(--ink-0);
  border-bottom: 1px solid var(--rule-2);
  border-radius: 0;
  font-weight: 500;
}
.btn-text:hover { border-bottom-color: var(--burgundy); color: var(--burgundy); background: transparent; }

@media (max-width: 880px) {
  .gz-hero-grid { grid-template-columns: 1fr; gap: var(--s-lg); }
  .gz-masthead { border-left: 0; border-bottom: 1px solid var(--rule); padding-left: 0; padding-bottom: var(--s-sm); }
  .gz-ledger { grid-template-columns: repeat(2, 1fr); }
  .gz-ledger-col:nth-child(2) { border-right: 0; }
  .gz-ledger-col:nth-child(1), .gz-ledger-col:nth-child(2) { border-bottom: 1px solid var(--rule); padding-bottom: var(--s-md); margin-bottom: var(--s-md); }
}

/* =====================  Codes strip (telegram bar)  ===================== */
.codes-strip {
  border-bottom: 1px solid var(--rule);
  padding: var(--s-md) 0;
  background: var(--paper-1);
}
.codes-strip-inner {
  display: flex; gap: var(--s-md); align-items: baseline; flex-wrap: wrap;
}
.codes-strip-lbl {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.codes-strip-row {
  font-family: var(--t-mono);
  font-size: 0.86rem;
  color: var(--ink-1);
  display: flex; flex-wrap: wrap; gap: var(--s-sm) var(--s-md); align-items: baseline;
}
.codes-strip-row a { color: var(--ink-0); border-bottom: 1px dotted var(--rule-2); padding-bottom: 1px; }
.codes-strip-row a:hover { border-bottom-color: var(--burgundy); color: var(--burgundy); }
.codes-strip-more {
  color: var(--ink-2) !important;
  font-family: var(--t-mono);
  border-bottom: 0 !important;
  padding: 0 0 0 var(--s-2xs);
}
.codes-strip-more:hover { color: var(--burgundy) !important; }
.codes-strip-row .sep { color: var(--ink-3); }

/* =====================  Section heading patterns  ===================== */
.section { padding: var(--s-3xl) 0; border-bottom: 1px solid var(--rule); }
.section-tight { padding: var(--s-2xl) 0; border-bottom: 1px solid var(--rule); }
.section-flush { padding: var(--s-2xl) 0; }

/* Hanging section heading - used on home dispatches */
.sec-hang {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: var(--s-2xl);
  margin-bottom: var(--s-xl);
  align-items: start;
}
.sec-hang-rail {
  font-family: var(--t-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-top: 2px solid var(--ink-0);
  padding-top: var(--s-sm);
}
.sec-hang h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  margin: 0;
}
.sec-hang-note {
  color: var(--ink-2);
  font-size: 0.96rem;
  margin: var(--s-sm) 0 0;
  max-width: 60ch;
}
@media (max-width: 800px) {
  .sec-hang { grid-template-columns: 1fr; gap: var(--s-sm); }
  .sec-hang-rail { padding-top: var(--s-xs); }
}

/* Centered numbered section (for catalog index headings, etc.) */
.sec-num {
  display: flex; flex-direction: column; gap: var(--s-2xs);
  margin-bottom: var(--s-xl);
}
.sec-num-no {
  font-family: var(--t-mono); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-3);
}
.sec-num h1, .sec-num h2 { margin: 0; }
.sec-num p { color: var(--ink-2); margin: var(--s-xs) 0 0; max-width: 60ch; }

/* =====================  HOME - Dispatches (news on home)  ===================== */
.dispatches {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-xl);
}
.dispatch {
  display: flex; flex-direction: column; gap: var(--s-sm);
  padding-top: var(--s-xs);
  border-top: 1px solid var(--rule);
}
.dispatch-first {
  border-top: 2px solid var(--ink-0);
}
.dispatch-meta {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; gap: var(--s-sm); align-items: center;
}
.dispatch-meta .tag { color: var(--burgundy); }
.dispatch h3 {
  font-family: var(--t-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.12;
}
.dispatch-first h3 { font-size: 2rem; line-height: 1.05; }
.dispatch h3 a { color: var(--ink-0); }
.dispatch h3 a:hover { color: var(--burgundy); }
.dispatch p { color: var(--ink-2); margin: 0; font-size: 0.94rem; }
.dispatch-bullets {
  list-style: none; padding: 0; margin: 0;
  font-family: var(--t-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  display: flex; flex-direction: column; gap: 4px;
}
.dispatch-bullets li::before { content: "› "; color: var(--ink-3); }
@media (max-width: 1000px) { .dispatches { grid-template-columns: 1fr 1fr; } .dispatch-first { grid-column: 1 / -1; } }
@media (max-width: 680px)  { .dispatches { grid-template-columns: 1fr; } .dispatch-first { border-top: 1px solid var(--rule); } .dispatch-first h3 { font-size: 1.5rem; line-height: 1.12; } }

/* =====================  HOME - Tier list rail  ===================== */
.tier-rail-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s-md);
}
.tier-row {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: var(--s-md);
  align-items: start;
  padding: var(--s-md) 0;
  border-top: 1px solid var(--rule);
}
.tier-row:first-child { border-top: 1px solid var(--rule-2); }
.tier-row:last-child { border-bottom: 1px solid var(--rule); }
.tier-letter {
  font-family: var(--t-display);
  font-weight: 900;
  font-size: 3.2rem;
  line-height: 0.9;
  color: var(--ink-2);
  letter-spacing: -0.04em;
}
.tier-row.t-sp .tier-letter,
.tier-row.t-sp .tier-count { color: var(--burgundy); }
.tier-count {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 4px;
}
.tier-items {
  display: flex; flex-wrap: wrap; gap: 0 var(--s-md);
  font-family: var(--t-body);
  font-size: 0.96rem;
  color: var(--ink-1);
}
.tier-items a {
  color: var(--ink-1);
  padding: 4px 0;
  position: relative;
  white-space: nowrap;
  transition: color var(--dur-1) var(--ease);
}
.tier-items a:not(:last-child)::after {
  content: " · ";
  color: var(--ink-3);
  margin-left: var(--s-md);
  pointer-events: none;
}
.tier-items a:hover { color: var(--burgundy); }

/* =====================  HOME - Gazetteer bento  ===================== */
.gazetteer {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(140px, auto);
  gap: var(--s-sm);
}
.gz-tile {
  position: relative;
  background: var(--paper-1);
  border: 1px solid var(--rule);
  padding: var(--s-md);
  display: flex; flex-direction: column; justify-content: space-between;
  transition: background var(--dur-2) var(--ease), border-color var(--dur-2) var(--ease);
  text-decoration: none;
}
.gz-tile:hover { background: var(--paper-2); border-color: var(--rule-2); }
.gz-tile-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.gz-tile-num {
  font-family: var(--t-display);
  font-weight: 700;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--ink-0);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin: var(--s-xs) 0;
}
.gz-tile-num small { font-size: 1.4rem; color: var(--ink-2); margin-left: 2px; }
.gz-tile-name {
  font-family: var(--t-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink-0);
}
.gz-tile-desc { color: var(--ink-2); font-size: 0.88rem; margin-top: var(--s-xs); }
.gz-tile-cta {
  margin-top: var(--s-sm);
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.gz-tile:hover .gz-tile-cta { color: var(--burgundy); }

/* Bento spans */
.gz-fruits     { grid-column: span 3; grid-row: span 2; }
.gz-swords     { grid-column: span 3; }
.gz-races      { grid-column: span 2; }
.gz-bosses     { grid-column: span 1; }
.gz-builds     { grid-column: span 2; grid-row: span 2; }
.gz-guides     { grid-column: span 2; }
.gz-accessories{ grid-column: span 2; }
.gz-clans      { grid-column: span 2; }
.gz-tools      { grid-column: span 2; }

@media (max-width: 980px) {
  .gazetteer { grid-template-columns: repeat(4, 1fr); }
  .gz-fruits, .gz-swords { grid-column: span 4; }
  .gz-races, .gz-bosses, .gz-accessories, .gz-clans, .gz-builds, .gz-guides, .gz-tools { grid-column: span 2; }
  .gz-builds { grid-row: span 1; }
  .gz-fruits { grid-row: span 1; }
}
@media (max-width: 560px) {
  /* Bento is a hub, not a comparison grid; single column on mobile */
  .gazetteer { grid-template-columns: 1fr; }
  .gz-fruits, .gz-swords, .gz-races, .gz-bosses, .gz-accessories, .gz-clans, .gz-builds, .gz-guides, .gz-tools {
    grid-column: span 1; grid-row: span 1;
  }
}

/* =====================  HOME - Field notes (steps)  ===================== */
.field-notes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.field-note {
  padding: var(--s-lg) var(--s-md) var(--s-lg) 0;
  border-right: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: var(--s-sm);
  position: relative;
}
.field-note:last-child { border-right: 0; padding-right: 0; }
.field-note-no {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
}
.field-note h3 {
  font-family: var(--t-display);
  font-size: 1.32rem;
  margin: 0;
}
.field-note p { color: var(--ink-2); font-size: 0.92rem; margin: 0; }
.field-note a { font-family: var(--t-mono); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-1); margin-top: var(--s-xs); }
.field-note a:hover { color: var(--burgundy); }
@media (max-width: 880px) {
  .field-notes { grid-template-columns: 1fr 1fr; }
  .field-note { border-right: 0; border-bottom: 1px solid var(--rule); padding: var(--s-md) 0; }
  .field-note:nth-child(odd) { border-right: 1px solid var(--rule); padding-right: var(--s-md); }
}
@media (max-width: 560px) {
  .field-notes { grid-template-columns: 1fr; }
  .field-note { border-right: 0 !important; padding-right: 0 !important; }
}

/* =====================  Codes page - telegraphic list  ===================== */
.codes-list {
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
}
.code-row {
  display: grid;
  grid-template-columns: 200px 1fr auto;
  gap: var(--s-md);
  align-items: baseline;
  padding: var(--s-md) 0;
  border-bottom: 1px solid var(--rule);
}
.code-row:last-child { border-bottom: 0; }
.code-row .code-name {
  font-family: var(--t-mono);
  font-size: 1.06rem;
  font-weight: 500;
  color: var(--ink-0);
  letter-spacing: 0;
  word-break: break-all;
}
.code-row .code-desc { color: var(--ink-2); font-size: 0.9rem; }
.code-row .code-act { display: flex; align-items: center; gap: var(--s-sm); justify-self: end; }
.code-row .code-date {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.code-row.expired .code-name { color: var(--ink-3); }
.code-row.expired .code-desc { color: var(--ink-3); }
.code-status {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.code-status.ok { color: var(--ok); }
.code-status.expired { color: var(--warn); }
.btn-copy {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-1);
  padding: 6px 10px;
  border: 1px solid var(--rule-2);
  border-radius: 2px;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.btn-copy:hover { color: var(--ink-0); border-color: var(--burgundy); background: var(--paper-2); }
@media (max-width: 800px) {
  .code-row { grid-template-columns: 1fr; gap: var(--s-xs); }
  .code-row .code-act { grid-column: 1; justify-self: start; }
  .code-row .code-date { order: -1; }
}

.redeem-note {
  margin-top: var(--s-2xl);
  border-left: 2px solid var(--burgundy);
  padding: var(--s-md) var(--s-lg);
  background: var(--paper-1);
}
.redeem-note h3 { margin: 0 0 var(--s-xs); font-size: 1.1rem; }
.redeem-note ol { margin: 0; padding-left: 1.2rem; color: var(--ink-2); }
.redeem-note ol li { padding: 2px 0; }

/* =====================  Catalog - tabular index  ===================== */
.catalog-filter {
  display: flex; flex-wrap: wrap; gap: var(--s-xs);
  margin-bottom: var(--s-md);
  align-items: center;
}
.catalog-filter-lbl {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-right: var(--s-sm);
}
.chip {
  font-family: var(--t-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 5px 10px;
  border: 1px solid var(--rule);
  border-radius: 2px;
  color: var(--ink-2);
  background: transparent;
  transition: color var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
}
.chip:hover { color: var(--ink-0); border-color: var(--rule-2); }
.chip.is-active { color: var(--paper-0); background: var(--ink-0); border-color: var(--ink-0); }
.chip-reset {
  border-color: var(--burgundy);
  color: var(--burgundy);
}
.chip-reset[hidden] { display: none; }
.chip-reset:hover { background: var(--burgundy); color: oklch(15% 0.04 60); border-color: var(--burgundy); }
.catalog-count {
  margin-left: auto;
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.catalog-empty {
  padding: var(--s-2xl) 0;
  border-top: 1px solid var(--rule);
  text-align: center;
  color: var(--ink-2);
}
.catalog-empty p { margin: 0 0 var(--s-md); }
.catalog-empty[hidden] { display: none; }

.catalog-table {
  width: 100%;
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
  border-collapse: collapse;
}
.catalog-table thead th {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  text-align: left;
  font-weight: 500;
  padding: var(--s-sm) var(--s-md);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-0);
  position: sticky; top: 0;
}
/* Catalog table — zebra stripe per taste-skill 4.9 (no per-row borders on long lists) */
.catalog-table tbody td {
  padding: var(--s-sm) var(--s-md);
  vertical-align: middle;
  font-size: 0.94rem;
  color: var(--ink-1);
}
.catalog-table tbody tr {
  transition: background var(--dur-1) var(--ease);
  border-bottom: 0;
}
.catalog-table tbody tr:nth-child(even) td { background: oklch(15% 0.014 72); }
.catalog-table tbody tr:hover td { background: var(--paper-2); }
.catalog-table tbody tr:hover td a { color: var(--burgundy); }

/* Empty-rail sec-hang variant — collapses the 180px rail column */
.sec-hang-norail { grid-template-columns: 1fr; }
.cat-thumb { width: 56px; height: 56px; padding: 0; }
.cat-thumb .frame {
  width: 56px; height: 56px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: grid; place-items: center;
}
.cat-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) brightness(0.95) contrast(1.05);
}
.cat-name {
  font-family: var(--t-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-0);
}
.cat-name small {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 2px;
}

/* Tier rail badges */
.t-rail {
  display: inline-flex;
  font-family: var(--t-display);
  font-weight: 900;
  font-size: 0.96rem;
  letter-spacing: -0.02em;
  color: var(--ink-1);
  min-width: 28px;
  font-variant-numeric: tabular-nums;
}
.t-rail.t-sp { color: var(--burgundy); }
.t-rail.t-s  { color: var(--ink-0); }
.t-rail.t-a  { color: var(--ink-1); }
.t-rail.t-b  { color: var(--ink-1); }
.t-rail.t-c  { color: var(--ink-2); }
.t-rail.t-d  { color: var(--ink-3); }
.t-rail.t-f  { color: var(--ink-3); opacity: 0.85; }

.r-tag {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.r-tag.r-mythical  { color: var(--burgundy); }
.r-tag.r-legendary { color: var(--ink-0); }
.r-tag.r-rare      { color: var(--ink-1); }
.r-tag.r-secret    { color: var(--burgundy); font-style: italic; }

@media (max-width: 800px) {
  .catalog-table thead { display: none; }
  .catalog-table tbody tr { display: grid; grid-template-columns: 56px 1fr; gap: var(--s-xs); padding: var(--s-sm) 0; border-bottom: 1px solid var(--rule); }
  .catalog-table tbody td { border-bottom: 0; padding: 0; }
  .cat-thumb { grid-row: span 3; }
  .catalog-table tbody .cat-extra { grid-column: 2; font-size: 0.82rem; color: var(--ink-3); }
}

/* =====================  Tier-list page - full bleed rail  ===================== */
.tl-rail-page {
  border-top: 2px solid var(--ink-0);
}
.tl-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: var(--s-lg);
  align-items: start;
  padding: var(--s-lg) 0;
  border-bottom: 1px solid var(--rule);
}
.tl-row-head {
  display: flex; flex-direction: column; gap: var(--s-2xs);
  position: sticky; top: var(--s-md);
}
.tl-row-letter {
  font-family: var(--t-display);
  font-weight: 900;
  font-size: clamp(4rem, 8vw, 6.4rem);
  line-height: 0.85;
  color: var(--ink-2);
  letter-spacing: -0.06em;
}
.tl-row.t-sp .tl-row-letter { color: var(--burgundy); }
.tl-row-count {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.tl-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--s-xs);
}
.tl-item {
  display: flex; align-items: center; gap: var(--s-xs);
  padding: var(--s-xs);
  border: 1px solid var(--rule);
  background: var(--paper-1);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.tl-item:hover { background: var(--paper-2); border-color: var(--rule-2); }
.tl-item .frame {
  width: 40px; height: 40px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  overflow: hidden;
  flex-shrink: 0;
}
.tl-item img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85) brightness(0.95) contrast(1.05);
}
.tl-item-name {
  font-family: var(--t-body);
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--ink-1);
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}
.tl-item-name small {
  display: block;
  font-family: var(--t-mono);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 2px;
}
.tl-item:hover .tl-item-name { color: var(--burgundy); }
@media (max-width: 800px) {
  .tl-row { grid-template-columns: 80px 1fr; gap: var(--s-md); }
  .tl-row-letter { font-size: 3rem; }
}

/* =====================  Detail page - editorial spread  ===================== */
.spread { padding-top: var(--s-2xl); padding-bottom: var(--s-3xl); }
.spread-head {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: var(--s-2xl);
  align-items: end;
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--s-lg);
  margin-bottom: var(--s-xl);
}
.spread-eyebrow {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-xs);
}
.spread-eyebrow .sep { color: var(--ink-3); margin: 0 6px; }
.spread-title {
  font-family: var(--t-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.024em;
  color: var(--ink-0);
  margin: 0;
}
.spread-lede {
  margin: var(--s-md) 0 0;
  max-width: 56ch;
  font-size: 1.1rem;
  color: var(--ink-1);
}
.spread-lede::first-letter {
  font-family: var(--t-display);
  font-weight: 900;
  font-size: 3rem;
  float: left;
  line-height: 0.85;
  padding: 0.06em var(--s-xs) 0 0;
  color: var(--burgundy);
}
.spread-illus {
  width: 240px; height: 240px;
  background: var(--paper-1);
  border: 1px solid var(--rule);
  overflow: hidden;
  align-self: end;
}
.spread-illus img {
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.8) brightness(0.95) contrast(1.05);
}

.spread-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--s-2xl);
  align-items: start;
}
.spread-meta {
  display: flex; flex-direction: column;
}
.spread-meta dl {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-xs) var(--s-sm);
  margin: 0 0 var(--s-lg);
  padding-bottom: var(--s-md);
  border-bottom: 1px solid var(--rule);
}
.spread-meta dt {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.spread-meta dd {
  margin: 0;
  font-family: var(--t-body);
  font-size: 0.96rem;
  color: var(--ink-0);
  font-weight: 500;
}
.spread-meta dd.amber { color: var(--burgundy); }
.spread-main h2 {
  font-family: var(--t-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 var(--s-md);
  letter-spacing: -0.012em;
  border-top: 1px solid var(--rule-2);
  padding-top: var(--s-sm);
}
.spread-main h2:first-of-type { border-top: 0; padding-top: 0; }
.skills-list { display: grid; grid-template-columns: 1fr; gap: 0; margin-bottom: var(--s-xl); }
.skill-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: var(--s-md);
  padding: var(--s-md) 0;
  border-top: 1px solid var(--rule);
}
.skill-row:first-child { border-top: 1px solid var(--rule-2); }
.skill-row:last-child { border-bottom: 1px solid var(--rule); }
.skill-row h4 { margin: 0 0 var(--s-2xs); font-size: 1.04rem; font-family: var(--t-display); font-weight: 700; }
.skill-row p { margin: 0; color: var(--ink-2); font-size: 0.92rem; }
.skill-cd {
  font-family: var(--t-mono);
  font-size: 0.78rem;
  color: var(--burgundy);
  letter-spacing: 0.08em;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.skill-cd small {
  display: block;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

ul.bullets, ol.bullets {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: var(--s-xs);
}
ul.bullets li, ol.bullets li {
  padding: var(--s-xs) 0;
  border-bottom: 1px dashed var(--rule);
  color: var(--ink-1);
  font-size: 0.94rem;
}
ul.bullets li::before {
  content: "›";
  color: var(--burgundy);
  margin-right: var(--s-xs);
}

.data-table {
  width: 100%;
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
  border-collapse: collapse;
  margin-top: var(--s-xs);
}
.data-table th, .data-table td {
  padding: var(--s-xs) var(--s-sm);
  text-align: left;
  border-bottom: 1px solid var(--rule);
  font-size: 0.92rem;
}
.data-table th {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
}
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--t-mono); }

.related { margin-top: var(--s-2xl); padding-top: var(--s-lg); border-top: 1px solid var(--rule); }
.related h2 { font-size: 1.1rem; margin-bottom: var(--s-md); }
.related-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-md);
}
.related-card {
  display: flex; align-items: center; gap: var(--s-sm);
  padding: var(--s-xs);
  border: 1px solid var(--rule);
  background: var(--paper-1);
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.related-card:hover { background: var(--paper-2); border-color: var(--rule-2); }
.related-card .frame { width: 48px; height: 48px; background: var(--paper-2); border: 1px solid var(--rule); overflow: hidden; }
.related-card img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85) brightness(0.95) contrast(1.05); }
.related-card span { font-size: 0.9rem; color: var(--ink-1); font-weight: 500; }
@media (max-width: 800px) {
  .spread-head { grid-template-columns: 1fr; gap: var(--s-md); }
  .spread-illus { width: 160px; height: 160px; }
  .spread-body { grid-template-columns: 1fr; gap: var(--s-lg); }
  .related-row { grid-template-columns: 1fr; }
}

/* =====================  News article - editorial column  ===================== */
.article { padding: var(--s-2xl) 0 var(--s-3xl); }
.article-header { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); border-bottom: 1px solid var(--rule); padding-bottom: var(--s-lg); margin-bottom: var(--s-xl); }
.article-eyebrow {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex; gap: var(--s-sm); align-items: center;
}
.article-eyebrow .tag { color: var(--burgundy); }
.article-title {
  font-family: var(--t-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.04;
  letter-spacing: -0.022em;
  color: var(--ink-0);
  margin: var(--s-sm) 0 0;
}
.article-lede {
  max-width: 760px;
  margin: var(--s-xl) auto var(--s-lg);
  padding: 0 var(--gutter);
  font-size: 1.18rem;
  line-height: 1.55;
  color: var(--ink-1);
  font-family: var(--t-display);
  font-weight: 400;
  font-style: italic;
  border-top: 1px solid var(--rule);
  padding-top: var(--s-md);
}
/* Drop-cap reserved for .spread-lede (entity details with 2+ sentence ledes).
   .article-lede for news / guides / builds reads as unadorned italic lead — the
   universal drop-cap lost its meaning when applied across 160+ pages. */
.article-lede::first-letter {
  font-weight: inherit;
  font-size: inherit;
  float: none;
  line-height: inherit;
  padding: 0;
  color: inherit;
  font-style: inherit;
}
.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  font-size: 1.02rem;
  line-height: 1.7;
  color: var(--ink-1);
}
.article-body h3 {
  font-family: var(--t-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--ink-0);
  margin: var(--s-xl) 0 var(--s-sm);
}
.article-body p { margin: 0 0 var(--s-md); }
.article-body ul, .article-body ol { padding-left: 1.2rem; margin: 0 0 var(--s-md); }
.article-body li { margin-bottom: var(--s-2xs); }

.article-divider {
  max-width: 760px;
  margin: var(--s-2xl) auto;
  padding: 0 var(--gutter);
  text-align: center;
  font-family: var(--t-mono);
  font-size: 1rem;
  letter-spacing: 0.6em;
  color: var(--ink-3);
}

.prev-next {
  max-width: 760px;
  margin: var(--s-2xl) auto 0;
  padding: var(--s-lg) var(--gutter) 0;
  border-top: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-md);
}
.pn { display: flex; flex-direction: column; gap: var(--s-2xs); padding: var(--s-sm) 0; }
.pn-prev { border-right: 1px solid var(--rule); padding-right: var(--s-md); }
.pn-next { text-align: right; padding-left: var(--s-md); }
.pn small {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pn span:not(small) { color: var(--ink-0); font-weight: 500; }
.pn:hover span { color: var(--burgundy); }

/* =====================  News index  ===================== */
.news-index {
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
}
.news-row {
  display: grid;
  grid-template-columns: 140px 1fr 220px;
  gap: var(--s-lg);
  padding: var(--s-lg) 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.news-row:last-child { border-bottom: 0; }
.news-row-date {
  font-family: var(--t-mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.news-row-date strong { display: block; color: var(--burgundy); margin-bottom: 2px; }
.news-row-title { font-family: var(--t-display); font-size: 1.6rem; font-weight: 700; margin: 0 0 var(--s-xs); }
.news-row-title a { color: var(--ink-0); }
.news-row-title a:hover { color: var(--burgundy); }
.news-row-summary { color: var(--ink-2); margin: 0; font-size: 0.96rem; max-width: 60ch; }
.news-row-hl {
  list-style: none; padding: 0; margin: 0;
  font-family: var(--t-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  display: flex; flex-direction: column; gap: var(--s-2xs);
}
.news-row-hl li::before { content: "› "; color: var(--ink-3); }
@media (max-width: 800px) {
  .news-row { grid-template-columns: 1fr; gap: var(--s-xs); }
  .news-row-hl { margin-top: var(--s-xs); }
}

/* =====================  Guides & Builds  ===================== */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 2px solid var(--ink-0);
}
.guide-card {
  display: flex; flex-direction: column; gap: var(--s-xs);
  padding: var(--s-lg);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-0);
  transition: background var(--dur-2) var(--ease);
}
.guide-card:hover { background: var(--paper-1); }
.guide-card:hover .guide-title { color: var(--burgundy); }
.guide-cat {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.guide-title {
  font-family: var(--t-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink-0);
  margin: 0;
  line-height: 1.05;
}
.guide-card p { color: var(--ink-2); font-size: 0.94rem; margin: var(--s-xs) 0 0; }
.guide-card .meta {
  margin-top: auto;
  padding-top: var(--s-md);
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
@media (max-width: 880px) {
  .guides-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .guides-grid { grid-template-columns: 1fr; }
  .guide-card { border-right: 0; }
}

.builds-list {
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
}
.build-row {
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  gap: var(--s-lg);
  padding: var(--s-lg) 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.build-row:last-child { border-bottom: 0; }
.build-row-arch {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  border-left: 2px solid var(--burgundy);
  padding-left: var(--s-sm);
}
.build-row-arch strong { display: block; color: var(--ink-0); font-family: var(--t-display); font-size: 1rem; letter-spacing: 0.06em; margin-bottom: 2px; }
.build-row-title { font-family: var(--t-display); font-size: 1.5rem; font-weight: 700; margin: 0 0 var(--s-xs); }
.build-row-title a { color: var(--ink-0); }
.build-row-title a:hover { color: var(--burgundy); }
.build-row p { color: var(--ink-2); margin: 0; font-size: 0.96rem; max-width: 60ch; }
.build-row-diff {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.build-row-diff.advanced { color: var(--burgundy); }
.build-row-diff.intermediate { color: var(--ink-1); }
@media (max-width: 800px) {
  .build-row { grid-template-columns: 1fr; gap: var(--s-xs); }
}

.loadout-table {
  width: 100%;
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
  border-collapse: collapse;
  margin-top: var(--s-sm);
}
.loadout-table th, .loadout-table td {
  padding: var(--s-sm) var(--s-md);
  text-align: left;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.loadout-table th { font-family: var(--t-mono); font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.loadout-table td { color: var(--ink-1); font-size: 0.96rem; }
.loadout-table strong { color: var(--ink-0); }

.statline {
  border-top: 2px solid var(--ink-0);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  margin-top: var(--s-sm);
}
.statline > div { padding: var(--s-md); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.statline dt { font-family: var(--t-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); margin-bottom: var(--s-2xs); }
.statline dd { margin: 0; font-family: var(--t-display); font-weight: 700; font-size: 1.6rem; color: var(--ink-0); font-variant-numeric: tabular-nums; }

/* =====================  FAQ  ===================== */
.faq-cat {
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: var(--s-xl) 0 var(--s-sm);
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--s-xs);
}
.faq-list { border-top: 1px solid var(--rule); }
.faq-list details {
  border-bottom: 1px solid var(--rule);
  padding: var(--s-md) 0;
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--t-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink-0);
  display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-md);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+";
  font-family: var(--t-mono);
  font-size: 1.3rem;
  color: var(--ink-3);
  transition: transform var(--dur-2) var(--ease), color var(--dur-2) var(--ease);
}
.faq-list details[open] summary::after { content: "−"; color: var(--burgundy); }
.faq-list details p { margin: var(--s-sm) 0 0; color: var(--ink-2); font-size: 0.96rem; max-width: 60ch; }

/* =====================  Tools page  ===================== */
.tools-list {
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
}
.tool-row {
  display: grid;
  grid-template-columns: 56px 200px 1fr;
  gap: var(--s-md);
  padding: var(--s-md) 0;
  border-bottom: 1px solid var(--rule);
  align-items: center;
}
.tool-row:last-child { border-bottom: 0; }
.tool-row .frame { width: 56px; height: 56px; background: var(--paper-1); border: 1px solid var(--rule); overflow: hidden; }
.tool-row .frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.8) brightness(0.95) contrast(1.05); }
.tool-name { font-family: var(--t-display); font-weight: 700; color: var(--ink-0); font-size: 1.1rem; }
.tool-desc { color: var(--ink-2); font-size: 0.94rem; }
@media (max-width: 800px) {
  .tool-row { grid-template-columns: 56px 1fr; gap: var(--s-sm); }
  .tool-desc { grid-column: 2; }
}

.calc {
  margin-top: var(--s-xl);
  border-top: 2px solid var(--ink-0);
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(4, 1fr) 1fr;
  align-items: stretch;
}
.calc label {
  display: flex; flex-direction: column; gap: var(--s-2xs);
  padding: var(--s-md);
  border-right: 1px solid var(--rule);
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.calc input {
  font-family: var(--t-display);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--ink-0);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  padding: 0;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  width: 100%;
  transition: border-color var(--dur-2) var(--ease);
}
.calc input:focus { outline: 0; border-bottom-color: var(--burgundy); }
.calc-out {
  padding: var(--s-md);
  display: flex; flex-direction: column; gap: var(--s-2xs);
  align-items: flex-end; justify-content: flex-end;
  background: var(--paper-1);
}
.calc-out small { font-family: var(--t-mono); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); }
.calc-out strong {
  font-family: var(--t-display);
  font-weight: 800;
  font-size: 2.6rem;
  color: var(--burgundy);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.calc-formula {
  margin: var(--s-md) 0 0;
  font-family: var(--t-mono);
  font-size: 0.78rem;
  color: var(--ink-2);
  max-width: 70ch;
}
.calc-formula-lbl {
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-right: var(--s-2xs);
}
.calc-state { color: var(--warn); font-size: 0.86rem; min-height: 1.2em; margin-top: var(--s-xs); }

/* =====================  Tools (calc-tool, calc-row, calc-out-grid, tool-page-grid)  ===================== */
.calc-tool {
  background: var(--paper-1);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--s-lg);
  margin-bottom: var(--s-xl);
}
.calc-tool h2 { font-size: 1.4rem; margin-top: 0; }
.calc-row {
  display: flex; flex-wrap: wrap; gap: var(--s-md) var(--s-lg);
  align-items: flex-end;
  margin-bottom: var(--s-md);
}
.calc-row label {
  display: flex; flex-direction: column; gap: 4px;
  font-family: var(--t-mono);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  min-width: 110px;
}
.calc-row label input[type="number"],
.calc-row label input[type="text"],
.calc-row label select {
  font-family: var(--t-mono);
  font-size: 0.95rem;
  color: var(--ink-0);
  background: var(--paper-0);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 2px;
  padding: 6px 8px;
  min-width: 120px;
  text-transform: none;
  letter-spacing: 0;
}
.calc-row label input:focus,
.calc-row label select:focus { outline: 0; border-bottom-color: var(--burgundy); }
.calc-row label input[type="checkbox"] {
  width: 18px; height: 18px;
  margin-top: 4px;
  accent-color: var(--burgundy);
}
.calc-out-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--s-md);
  padding-top: var(--s-md);
  border-top: 1px solid var(--rule);
  margin-top: var(--s-md);
}
.calc-out small { display: block; margin-bottom: 4px; }
.tool-page-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: var(--s-xl);
  align-items: start;
}
.tool-info h2 { font-size: 1.2rem; margin-top: var(--s-md); }
.tool-canvas {
  background: var(--paper-1);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: var(--s-lg);
  position: sticky;
  top: 100px;
}
.tool-canvas #tool-app h2:first-of-type { margin-top: 0; }
@media (max-width: 800px) {
  .tool-page-grid { grid-template-columns: 1fr; }
  .tool-canvas { position: static; }
  .calc-row label { min-width: 0; flex: 1 1 140px; }
}

/* =====================  Video modal  ===================== */
#video-modal[hidden] { display: none; }
#video-modal {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(20, 12, 8, 0.78);
  display: flex; align-items: center; justify-content: center;
  padding: var(--s-lg);
}
.vm-panel {
  position: relative;
  background: var(--paper-0);
  border: 1px solid var(--rule-2);
  border-radius: 4px;
  max-width: 960px; width: 100%;
  padding: var(--s-md);
}
.vm-close {
  position: absolute; top: 8px; right: 12px;
  font-size: 1.8rem; line-height: 1;
  color: var(--ink-1); padding: 4px 10px;
}
.vm-close:hover { color: var(--burgundy); }
.vm-body { aspect-ratio: 16 / 9; background: #000; border-radius: 2px; overflow: hidden; }
.vm-body iframe, .vm-body video { width: 100%; height: 100%; display: block; }
.vm-caption { font-family: var(--t-mono); font-size: 0.78rem; color: var(--ink-2); margin-top: var(--s-xs); text-align: center; }
body.vm-open { overflow: hidden; }

/* =====================  Crumbs  ===================== */
.crumbs {
  display: flex; flex-wrap: wrap; gap: var(--s-xs);
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: var(--s-md);
}
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--burgundy); }
.crumb-sep { color: var(--rule-2); }

/* =====================  Footer · Ft2  ===================== */
.site-footer {
  margin-top: var(--s-3xl);
  border-top: 2px solid var(--ink-0);
  padding-top: var(--s-2xl);
  background: var(--paper-0);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--s-2xl);
  padding-bottom: var(--s-2xl);
}
.footer-brand { display: flex; flex-direction: column; gap: var(--s-sm); }
.footer-brand p { color: var(--ink-2); font-size: 0.92rem; max-width: 36ch; }
.footer-brand small {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: var(--s-xs);
}
.footer-col h4 {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  margin: 0 0 var(--s-sm);
  padding-bottom: var(--s-xs);
  border-bottom: 1px solid var(--rule);
}
.footer-col ul {
  list-style: none; padding: 0; margin: 0 0 var(--s-lg);
  display: flex; flex-direction: column;
}
.footer-col li {
  border-bottom: 1px solid var(--rule);
  padding: var(--s-xs) 0;
}
.footer-col a { font-family: var(--t-body); font-size: 0.92rem; color: var(--ink-1); }
.footer-col a:hover { color: var(--burgundy); }
.footer-note {
  font-family: var(--t-mono);
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  line-height: 1.55;
  color: var(--ink-2);
  margin: var(--s-xs) 0 0;
  max-width: 32ch;
}
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding: var(--s-md) var(--gutter);
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-md);
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  flex-wrap: wrap;
}
.footer-bottom a { color: var(--ink-2); }
.footer-bottom a:hover { color: var(--burgundy); }
@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--s-xl); }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* =====================  Search overlay  ===================== */
#search-overlay {
  position: fixed; inset: 0;
  background: oklch(8% 0.012 75 / 0.78);
  z-index: 100;
  display: grid; place-items: start center;
  padding-top: 12vh;
}
#search-overlay[hidden] { display: none; }
.search-panel {
  width: min(640px, 92vw);
  background: var(--paper-1);
  border: 1px solid var(--rule-2);
  padding: var(--s-sm);
}
#search-input {
  width: 100%;
  background: transparent; border: 0; outline: 0;
  color: var(--ink-0);
  font-family: var(--t-display);
  font-size: 1.4rem;
  font-weight: 500;
  padding: var(--s-sm);
  border-bottom: 1px solid var(--rule);
}
.search-status {
  font-family: var(--t-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: var(--s-2xs) var(--s-sm);
  min-height: 1em;
}
#search-results { list-style: none; padding: var(--s-xs) 0; margin: 0; max-height: 56vh; overflow: auto; }
#search-results li a {
  display: grid; grid-template-columns: 90px 1fr; gap: var(--s-sm);
  align-items: baseline;
  padding: var(--s-xs) var(--s-sm);
}
#search-results li a:hover { background: var(--paper-2); }
.hit-kind {
  font-family: var(--t-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.hit-title { color: var(--ink-1); font-weight: 500; }
#search-results li a:hover .hit-title { color: var(--burgundy); }
.search-footer { padding: var(--s-xs) var(--s-sm); color: var(--ink-3); font-family: var(--t-mono); font-size: 0.7rem; letter-spacing: 0.16em; }
.search-footer kbd { border: 1px solid var(--rule); padding: 1px 5px; border-radius: 2px; }

/* =====================  Misc utility  ===================== */
.center { text-align: center; }
.muted { color: var(--ink-3); }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: var(--s-xl) 0; }
hr.rule-strong { border: 0; border-top: 2px solid var(--ink-0); margin: var(--s-xl) 0; }

/* ====== Ad placement (Adsterra native banner) ====== */
.ad-native-banner {
  display: flex; justify-content: center; align-items: center;
  margin: var(--s-xl) auto; padding: var(--s-4);
  max-width: 100%;
}
.ad-native-banner > div { max-width: 728px; }

/* ============= VIDEO EMBED (lite-youtube) + MODAL ============= */
lite-youtube {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #1a1410;
  background-size: cover;
  background-position: center;
  cursor: pointer;
  border: 1px solid var(--rule);
  overflow: hidden;
}
lite-youtube:focus-visible { outline: 3px solid var(--accent, #7a1f2b); outline-offset: 2px; }
lite-youtube .lite-yt-play {
  position: absolute; inset: 0; margin: auto;
  width: 68px; height: 48px;
  background: transparent; border: 0; padding: 0; cursor: pointer;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: transform 120ms ease-out;
}
lite-youtube:hover .lite-yt-play { transform: scale(1.08); }
.article-video { margin: 2rem 0; }
.article-video-feature { max-width: 880px; margin-left: auto; margin-right: auto; }
.article-video-kicker {
  font-family: var(--display);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 10px 0;
}
.article-video-caption {
  font-family: var(--mono); font-size: 12px; color: var(--ink-2);
  margin: 10px 0 0 0;
}

/* Modal */
.yt-modal {
  position: fixed; inset: 0;
  display: none;
  align-items: center; justify-content: center;
  z-index: 1000;
}
.yt-modal.is-open { display: flex; }
.yt-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 14, 10, 0.82);
  backdrop-filter: blur(2px);
  cursor: pointer;
}
.yt-modal-card {
  position: relative;
  width: min(90vw, 1280px);
  aspect-ratio: 16 / 9;
  background: #000;
  border: 1px solid var(--rule-2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  z-index: 1;
}
.yt-modal-frame { position: absolute; inset: 0; }
.yt-modal-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-modal-close {
  position: absolute; top: -42px; right: -2px;
  width: 36px; height: 36px;
  background: transparent; border: 1px solid rgba(255,255,255,0.5); color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.yt-modal-close:hover { background: rgba(255,255,255,0.1); }
.yt-modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 720px) {
  .yt-modal-card { width: 96vw; }
  .yt-modal-close { top: -40px; right: 0; }
}
