/* ============================================================
   100 DAYS AT SEA WIKI — almanac on storm-teal
   Theme: weathered parchment on storm-teal, single ember-amber accent.
   Hard constraints:
     - [hidden] HTML attribute MUST always hide (CSS display wins by default)
     - No gradient text. No glassmorphism. No eyebrow-on-every-section.
     - one named kicker per page max.
     - Geist + IBM Plex Sans + IBM Plex Mono.
   ============================================================ */

:root {
  /* Storm-teal ground (paper-equivalent) */
  --paper-0: #f4ecd8;          /* main paper surface (warm parchment) */
  --paper-1: #ebe0c6;          /* slightly darker paper */
  --paper-2: #e0d3b3;          /* elevated panel */
  --paper-3: #d2c39a;          /* hovered surface */
  --rule:    #b8a87f;          /* hairline */
  --rule-2:  #8a7a55;          /* visible rule */

  /* Deep ocean ink */
  --ink-0:   #0e3a4a;          /* primary ink (storm-teal) */
  --ink-1:   #1a5566;          /* secondary */
  --ink-2:   #406a78;          /* muted body */
  --ink-3:   #708a93;          /* most muted */

  /* Single accent: ember-amber (volcano / bonfire) */
  --accent:  #c98a2b;
  --accent-d:#9a6818;
  --accent-w:#8a5a12;

  /* Status */
  --ok:      #4a8e4a;
  --warn:    #c98a2b;
  --err:     #a23a2a;

  /* Typography */
  --display: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --body:    'IBM Plex Sans', system-ui, sans-serif;
  --mono:    'IBM Plex Mono', ui-monospace, 'Cascadia Mono', monospace;

  /* Spacing scale (8pt) */
  --s-1: 4px;   --s-2: 8px;   --s-3: 12px;  --s-4: 16px;
  --s-5: 24px;  --s-6: 32px;  --s-7: 48px;  --s-8: 64px;

  --radius: 4px;
  --radius-lg: 8px;
  --max: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-0);
  background: var(--paper-0);
  min-height: 100vh;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-0); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-d); }
h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 700; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 var(--s-3) 0; }
code, kbd, pre, .tnum { font-family: var(--mono); font-feature-settings: 'tnum' 1; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--rule); }
th { font-family: var(--display); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-1); }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ============================================================
   LAYOUT — single hairline nav (no drawer chrome)
   ============================================================ */
.col { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-4); }
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--paper-0);
  border-bottom: 1px solid var(--rule);
}
.nav { display: flex; align-items: center; gap: var(--s-5); height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--display); font-weight: 800; font-size: 18px;
  color: var(--ink-0); text-decoration: none; white-space: nowrap;
}
.brand-mark { width: 32px; height: 24px; color: var(--ink-0); flex: 0 0 32px; }
.primary-nav { display: flex; gap: var(--s-5); margin-left: auto; }
.primary-nav a {
  font-family: var(--display); font-size: 14px; font-weight: 500;
  color: var(--ink-1); text-decoration: none; padding: 4px 0;
  border-bottom: 2px solid transparent;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--ink-0); border-bottom-color: var(--accent); }
.nav-tail { display: flex; align-items: center; gap: var(--s-3); }
.search-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper-1); border: 1px solid var(--rule);
  padding: 6px 12px; border-radius: 999px;
  font-family: var(--body); font-size: 13px; color: var(--ink-1);
}
.search-pill:hover { background: var(--paper-2); color: var(--ink-0); }
.search-pill kbd {
  font-size: 11px; padding: 2px 6px; border-radius: 4px;
  background: var(--paper-0); border: 1px solid var(--rule); color: var(--ink-2);
}
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; }
.nav-toggle-bars { display: block; width: 22px; height: 2px; background: var(--ink-0); position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ''; position: absolute; left: 0; width: 100%; height: 2px; background: var(--ink-0); }
.nav-toggle-bars::before { top: -7px; }
.nav-toggle-bars::after { top: 7px; }
.mobile-nav {
  display: none;
  border-top: 1px solid var(--rule);
  background: var(--paper-0);
}
.mobile-nav.is-open { display: block; }
.mobile-nav-inner { padding: var(--s-4); display: flex; flex-direction: column; gap: var(--s-3); }
.mobile-nav-inner a { color: var(--ink-0); text-decoration: none; font-family: var(--display); font-weight: 500; }

main { display: block; min-height: 50vh; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-1);
  margin-top: var(--s-8);
  padding: var(--s-7) 0 var(--s-4);
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: var(--s-6); }
.footer-brand p { font-size: 13px; color: var(--ink-2); margin-top: var(--s-3); }
.footer-col h4 {
  font-family: var(--display); font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--ink-2); margin: var(--s-4) 0 var(--s-2);
}
.footer-col h4:first-child { margin-top: 0; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { padding: 3px 0; }
.footer-col a { color: var(--ink-0); text-decoration: none; font-size: 13px; }
.footer-col a:hover { color: var(--accent-d); text-decoration: underline; }
.footer-note { font-size: 12px; color: var(--ink-3); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-2);
  border-top: 1px solid var(--rule); margin-top: var(--s-5); padding-top: var(--s-4);
  font-size: 12px; color: var(--ink-3);
}
@media (max-width: 880px) {
  .primary-nav { display: none; }
  .nav-toggle { display: inline-block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.crumbs { font-size: 13px; color: var(--ink-2); padding: var(--s-4) 0 0; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink-0); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink-0); font-weight: 500; }
.crumb-sep { padding: 0 8px; color: var(--ink-3); }

/* ============================================================
   HERO / HOME
   ============================================================ */
.gz-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background: var(--ink-0);
  color: var(--paper-0);
}
.gz-hero-img { position: absolute; inset: 0; opacity: 0.5; }
.gz-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.gz-hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,58,74,0.5) 0%, rgba(14,58,74,0.85) 100%);
}
.gz-hero-inner {
  position: relative; padding: var(--s-8) var(--s-4); min-height: 480px;
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-4);
}
.kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.gz-headline { color: var(--paper-0); max-width: 720px; }
.gz-headline em { color: var(--accent); font-style: normal; }
.gz-lede { font-size: 17px; max-width: 640px; color: var(--paper-1); }
.gz-hero-ctas { display: flex; align-items: center; gap: var(--s-4); flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 12px 20px; font-family: var(--display); font-weight: 600; font-size: 14px;
  border-radius: var(--radius); text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--ink-0); border: 1px solid var(--accent); }
.btn-primary:hover { background: var(--accent-d); color: var(--paper-0); }
.btn-secondary { background: transparent; color: var(--paper-0); border: 1px solid var(--paper-1); }
.btn-secondary:hover { background: var(--paper-1); color: var(--ink-0); }
.gz-hero-footlinks { font-size: 13px; color: var(--paper-2); margin: 0; }
.gz-hero-footlinks a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted var(--accent); }
.gz-hero-footlinks a:hover { color: var(--paper-0); }

/* ============================================================
   SECTION / HANG
   ============================================================ */
.section { padding: var(--s-7) 0; border-bottom: 1px solid var(--rule); }
.section-tight { padding: var(--s-5) 0; }
.sec-hang {
  display: grid; grid-template-columns: 80px 1fr; gap: var(--s-4);
  padding: 0 var(--s-4); max-width: var(--max); margin: 0 auto var(--s-5);
  align-items: end;
}
.sec-hang-rail {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); padding-top: 6px; border-top: 2px solid var(--accent);
}
.sec-hang-norail { grid-template-columns: 1fr; }
.sec-hang h2 { margin-bottom: var(--s-2); }
.sec-hang-note { color: var(--ink-2); font-size: 14px; }

/* ============================================================
   LEDGER (stat-led row of columns)
   ============================================================ */
.gz-ledger-section { padding: var(--s-7) 0; border-bottom: 1px solid var(--rule); background: var(--paper-1); }
.gz-ledger { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 0; }
.gz-ledger-col {
  padding: var(--s-4) var(--s-5);
  border-right: 1px solid var(--rule);
}
.gz-ledger-col:last-child { border-right: 0; }
.gz-ledger-num {
  font-family: var(--display); font-weight: 800; font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1; color: var(--ink-0); letter-spacing: -0.03em;
}
.gz-ledger-label {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); margin-top: var(--s-2);
}
.gz-ledger-roll { margin-top: var(--s-3); display: flex; flex-direction: column; gap: 4px; }
.gz-ledger-roll a { font-size: 13px; color: var(--ink-1); text-decoration: none; }
.gz-ledger-roll a:hover { color: var(--accent-d); text-decoration: underline; }
@media (max-width: 880px) {
  .gz-ledger { grid-template-columns: 1fr 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); }
}

/* ============================================================
   TILE GRIDS — wiki categories, tools, tier lists
   ============================================================ */
.tile-grid, .wiki-grid, .guides-grid, .tool-tiles {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s-3);
}
.wiki-grid li a, .tile-grid a, .guides-grid a, .tool-tiles a {
  display: block; padding: var(--s-4); height: 100%;
  background: var(--paper-1); border: 1px solid var(--rule);
  border-radius: var(--radius-lg); text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease;
}
.wiki-grid li a:hover, .tile-grid a:hover, .guides-grid a:hover, .tool-tiles a:hover {
  border-color: var(--accent); transform: translateY(-2px);
}
.tile-eyebrow, .guide-cat {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent);
}
.tile-title, .guide-title { font-family: var(--display); font-size: 16px; font-weight: 700; margin: var(--s-2) 0 var(--s-1); color: var(--ink-0); }
.tile-desc { font-size: 13px; color: var(--ink-2); margin: 0; }
.meta { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }

/* ============================================================
   TOOL TILES — emphasised on home
   ============================================================ */
.tool-tiles li a {
  background: linear-gradient(180deg, var(--ink-0) 0%, #1a5566 100%);
  color: var(--paper-0);
  border-color: var(--ink-1);
  position: relative; overflow: hidden;
}
.tool-tiles li a::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent);
}
.tool-tiles .tile-eyebrow { color: var(--accent); }
.tool-tiles .tile-title { color: var(--paper-0); }
.tool-tiles .tile-desc { color: var(--paper-2); }
.tool-tiles li a:hover { border-color: var(--accent); transform: translateY(-3px); }

/* ============================================================
   DISPATCHES (news cards)
   ============================================================ */
.dispatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.dispatch {
  background: var(--paper-1); border: 1px solid var(--rule); padding: var(--s-4); border-radius: var(--radius-lg);
}
.dispatch-first { grid-column: 1 / -1; padding: var(--s-5); }
.dispatch-meta { font-family: var(--mono); font-size: 11px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.1em; display: flex; gap: var(--s-3); margin-bottom: var(--s-3); }
.dispatch h3 { font-family: var(--display); font-size: 18px; margin: 0 0 var(--s-2); }
.dispatch h3 a { color: var(--ink-0); text-decoration: none; }
.dispatch h3 a:hover { color: var(--accent-d); }
.dispatch p { font-size: 13px; color: var(--ink-2); margin: 0; }
.tag { color: var(--accent); font-weight: 600; }
@media (max-width: 880px) {
  .dispatches { grid-template-columns: 1fr; }
  .dispatch-first { grid-column: 1; padding: var(--s-4); }
}

/* ============================================================
   FIELD NOTES (priorities cards on home)
   ============================================================ */
.field-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); }
.field-note {
  background: var(--paper-1); border-left: 3px solid var(--accent); padding: var(--s-4); border-radius: var(--radius);
}
.field-note-no { font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.field-note h3 { font-family: var(--display); font-size: 16px; margin: var(--s-2) 0; }
.field-note p { font-size: 13px; color: var(--ink-2); }
.field-note a { font-size: 12px; color: var(--ink-0); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--ink-0); }
@media (max-width: 880px) { .field-notes { grid-template-columns: 1fr; } }

/* ============================================================
   ENTITY DETAIL PAGES (boss / era / material / weapon / etc.)
   ============================================================ */
.entity-shell { padding: var(--s-6) 0; }
.entity-head {
  display: grid; grid-template-columns: 220px 1fr; gap: var(--s-6);
  padding: var(--s-5); background: var(--paper-1); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  margin-bottom: var(--s-5);
}
.entity-icon { width: 220px; height: 220px; background: var(--paper-0); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; display: flex; align-items: center; justify-content: center; }
.entity-icon svg { width: 100%; height: 100%; }
.entity-title { font-family: var(--display); font-size: 32px; font-weight: 800; line-height: 1.1; margin: 0 0 var(--s-2); }
.entity-meta { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin-bottom: var(--s-3); display: flex; gap: var(--s-3); flex-wrap: wrap; }
.entity-tagline { font-family: var(--display); font-size: 17px; color: var(--ink-1); margin-bottom: var(--s-3); }
.entity-lede { font-size: 15px; color: var(--ink-2); margin-bottom: var(--s-4); }
@media (max-width: 720px) {
  .entity-head { grid-template-columns: 1fr; }
  .entity-icon { width: 100%; max-width: 200px; margin: 0 auto; }
}

.stat-block {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-2);
  background: var(--paper-0); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-3);
  margin-bottom: var(--s-5);
}
.stat { padding: var(--s-2); }
.stat-label { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); }
.stat-value { font-family: var(--mono); font-size: 17px; font-weight: 700; color: var(--ink-0); margin-top: 4px; }
.stat-unit { font-size: 11px; color: var(--ink-3); margin-left: 2px; font-weight: 400; }

.section-h3 {
  font-family: var(--display); font-size: 20px; font-weight: 700;
  margin: var(--s-5) 0 var(--s-3);
  padding-bottom: var(--s-2); border-bottom: 1px solid var(--rule);
}
.data-table { width: 100%; border-collapse: collapse; margin-bottom: var(--s-4); }
.data-table th, .data-table td { padding: 8px 12px; border-bottom: 1px solid var(--rule); }
.data-table th { background: var(--paper-1); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.data-table td { font-size: 14px; }

.prose { font-size: 16px; line-height: 1.7; }
.prose p { margin-bottom: var(--s-3); }
.prose ul, .prose ol { padding-left: var(--s-5); margin-bottom: var(--s-4); }
.prose li { margin-bottom: 4px; }
.prose strong { color: var(--ink-0); }

.callout {
  background: var(--paper-1); border-left: 3px solid var(--accent); padding: var(--s-3) var(--s-4);
  margin: var(--s-4) 0;
}
.callout-title { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-2); }

/* ============================================================
   TIER LIST RAIL (S+, S, A, B, C, D, F)
   ============================================================ */
.tier-rail {
  display: inline-block; padding: 4px 10px;
  font-family: var(--display); font-weight: 800; font-size: 13px;
  border-radius: var(--radius);
}
.t-sp { background: #c98a2b; color: var(--ink-0); }
.t-s  { background: #d2a060; color: var(--ink-0); }
.t-a  { background: #4a8e8e; color: var(--paper-0); }
.t-b  { background: #708a93; color: var(--paper-0); }
.t-c  { background: #b8a87f; color: var(--ink-0); }
.t-d  { background: #d2c39a; color: var(--ink-0); }
.t-f  { background: var(--paper-3); color: var(--ink-2); }

.tl-rail-page { background: var(--paper-1); border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; }
.tl-row { display: grid; grid-template-columns: 80px 1fr; gap: var(--s-3); border-bottom: 1px solid var(--rule); padding: var(--s-3) var(--s-4); }
.tl-row:last-child { border-bottom: 0; }
.tl-row-head { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: var(--s-2); background: var(--paper-0); border-radius: var(--radius); }
.tl-row-letter { font-family: var(--display); font-weight: 800; font-size: 28px; color: var(--ink-0); }
.tl-row-count { font-family: var(--mono); font-size: 10px; color: var(--ink-2); text-transform: uppercase; }
.tl-items { display: flex; flex-direction: column; gap: var(--s-2); }
.tl-item { padding: var(--s-2); background: var(--paper-0); border: 1px solid var(--rule); border-radius: var(--radius); }
.tl-item-name { font-family: var(--display); font-weight: 600; font-size: 14px; }
.tl-item-name a { color: var(--ink-0); text-decoration: none; }
.tl-item-name a:hover { color: var(--accent-d); }
.tl-item-reason { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
@media (max-width: 560px) {
  .tl-row { grid-template-columns: 60px 1fr; }
  .tl-row-letter { font-size: 22px; }
}

/* ============================================================
   TOOL PAGES — calculator UI
   ============================================================ */
.tool-shell { padding: var(--s-6) 0; }
.tool-form {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--s-3);
  background: var(--paper-1); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--s-4); margin-bottom: var(--s-4);
}
.tool-form label { display: flex; flex-direction: column; gap: 4px; font-family: var(--mono); font-size: 12px; color: var(--ink-1); text-transform: uppercase; letter-spacing: 0.06em; }
.tool-form input[type="number"],
.tool-form input[type="range"],
.tool-form select { font-family: var(--mono); font-size: 14px; padding: 8px 10px; background: var(--paper-0); border: 1px solid var(--rule); border-radius: var(--radius); color: var(--ink-0); }
.tool-form input[type="range"] { padding: 0; }
.tool-form .checkbox { flex-direction: row; align-items: center; gap: var(--s-2); text-transform: none; }
.tool-outputs {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--s-3);
  background: var(--paper-0); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--s-4);
}
.tool-output { padding: var(--s-3); background: var(--paper-1); border: 1px solid var(--rule); border-radius: var(--radius); }
.tool-output-label { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-2); }
.tool-output-value { font-family: var(--display); font-size: 24px; font-weight: 800; color: var(--ink-0); margin-top: 4px; }
.tool-output-rec { font-size: 13px; color: var(--ink-1); margin-top: var(--s-2); padding: var(--s-2); border-radius: var(--radius); }
.tool-output-rec.rec-safe { background: rgba(74,142,74,0.12); border-left: 3px solid var(--ok); }
.tool-output-rec.rec-warn { background: rgba(201,138,43,0.12); border-left: 3px solid var(--warn); }
.tool-output-rec.rec-fatal { background: rgba(162,58,42,0.12); border-left: 3px solid var(--err); color: var(--err); font-weight: 700; }

/* ============================================================
   ARTICLE (guides / news detail)
   ============================================================ */
.article { max-width: 720px; margin: 0 auto; padding: var(--s-6) var(--s-4); }
.article-header { margin-bottom: var(--s-5); }
.article-eyebrow { font-family: var(--mono); font-size: 12px; color: var(--ink-2); text-transform: uppercase; letter-spacing: 0.08em; display: flex; gap: var(--s-2); align-items: center; margin-bottom: var(--s-3); }
.article-title { font-family: var(--display); font-weight: 800; font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1.1; }
.article-lede { font-family: var(--display); font-size: 17px; color: var(--ink-1); margin: var(--s-3) 0 0; }
.article-divider { text-align: center; color: var(--ink-3); margin: var(--s-4) 0; font-family: var(--mono); letter-spacing: 0.5em; }
.article-body { font-size: 17px; line-height: 1.75; }
.article-body h3 { font-family: var(--display); font-size: 22px; font-weight: 700; margin: var(--s-6) 0 var(--s-3); padding-bottom: var(--s-2); border-bottom: 1px solid var(--rule); }
.article-body h4 { font-family: var(--display); font-size: 18px; font-weight: 700; margin: var(--s-5) 0 var(--s-2); }
.article-body p { margin: 0 0 var(--s-4); }
.article-body ul, .article-body ol { padding-left: var(--s-5); margin-bottom: var(--s-4); }
.article-body li { margin-bottom: var(--s-2); }
.article-body code { background: var(--paper-1); padding: 2px 6px; border-radius: 3px; border: 1px solid var(--rule); font-size: 0.9em; }
.article-body blockquote { border-left: 3px solid var(--accent); padding-left: var(--s-4); color: var(--ink-1); margin: var(--s-4) 0; font-style: italic; }

/* ============================================================
   LITE-YOUTUBE + VIDEO MODAL
   ============================================================ */
lite-youtube {
  display: block; position: relative; width: 100%; aspect-ratio: 16 / 9;
  background-color: #0a1f2c; background-size: cover; background-position: center;
  cursor: pointer; border: 1px solid var(--rule); overflow: hidden;
}
lite-youtube:focus-visible { outline: 3px solid var(--accent); 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: var(--s-5) 0; }
.article-video-feature { max-width: 880px; margin-left: auto; margin-right: auto; }
.article-video-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-2); margin: 0 0 var(--s-2) 0;
}
.article-video-caption { font-family: var(--mono); font-size: 12px; color: var(--ink-2); margin: var(--s-2) 0 0; }

.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(8, 18, 28, 0.85); backdrop-filter: blur(3px); 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); }
@media (max-width: 720px) { .yt-modal-card { width: 96vw; } .yt-modal-close { top: -40px; right: 0; } }

/* ============================================================
   SEARCH OVERLAY
   ============================================================ */
#search-overlay {
  position: fixed; inset: 0;
  background: rgba(14, 58, 74, 0.85); backdrop-filter: blur(8px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center;
  padding: 6rem 1rem 2rem;
}
/* !important: HTML [hidden] attribute MUST always hide, regardless of `display: flex` above. */
#search-overlay[hidden] { display: none !important; }
.search-panel {
  width: 100%; max-width: 640px; background: var(--paper-0);
  border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  overflow: hidden; display: flex; flex-direction: column; max-height: 70vh;
}
.search-panel input { width: 100%; padding: var(--s-4); border: 0; border-bottom: 1px solid var(--rule); font-family: var(--body); font-size: 17px; background: var(--paper-0); color: var(--ink-0); }
.search-panel input:focus { outline: 0; border-bottom-color: var(--accent); }
.search-status { padding: var(--s-2) var(--s-4); font-family: var(--mono); font-size: 12px; color: var(--ink-2); border-bottom: 1px solid var(--rule); }
.search-results, #search-results { list-style: none; padding: 0; margin: 0; overflow-y: auto; }
#search-results li a { display: grid; grid-template-columns: 80px 1fr; gap: var(--s-3); padding: var(--s-3) var(--s-4); color: var(--ink-0); text-decoration: none; border-bottom: 1px solid var(--rule); }
#search-results li a:hover { background: var(--paper-1); }
#search-results li:last-child a { border-bottom: 0; }
.hit-kind { font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); padding-top: 4px; }
.hit-title { font-family: var(--display); font-weight: 600; font-size: 14px; }
.hit-sub { font-family: var(--mono); font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.search-footer { padding: var(--s-2) var(--s-4); background: var(--paper-1); font-family: var(--mono); font-size: 11px; color: var(--ink-2); display: flex; gap: var(--s-3); justify-content: flex-end; }

/* ============================================================
   ABOUT / LEGAL / 404
   ============================================================ */
.legal-shell { max-width: 720px; margin: 0 auto; padding: var(--s-6) var(--s-4); }
.legal-shell h1 { margin-bottom: var(--s-4); }
.legal-shell p { margin-bottom: var(--s-3); }
.notfound-shell { text-align: center; padding: var(--s-8) var(--s-4); }
.notfound-shell h1 { font-size: clamp(3rem, 8vw, 5rem); color: var(--accent); margin-bottom: var(--s-3); }
.notfound-shell .lede { font-size: 18px; color: var(--ink-1); max-width: 480px; margin: 0 auto var(--s-5); }

/* ============================================================
   FAQ
   ============================================================ */
.faq-list { display: flex; flex-direction: column; gap: var(--s-2); }
.faq-list details { background: var(--paper-1); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-3) var(--s-4); }
.faq-list summary { font-family: var(--display); font-weight: 600; font-size: 15px; cursor: pointer; list-style: none; }
.faq-list summary::after { content: '+'; float: right; font-family: var(--mono); color: var(--accent); font-weight: 700; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { margin-top: var(--s-2); font-size: 14px; color: var(--ink-2); }

/* ============================================================
   A11Y / MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
.skip-link { position: absolute; left: -9999px; top: 8px; padding: 8px 12px; background: var(--ink-0); color: var(--paper-0); z-index: 1000; }
.skip-link:focus { left: 8px; }

kbd { font-family: var(--mono); background: var(--paper-2); padding: 1px 6px; border-radius: 3px; border: 1px solid var(--rule); font-size: 12px; }
.center { text-align: center; }
.muted { color: var(--ink-3); }
hr.rule { border: 0; border-top: 1px solid var(--rule); margin: var(--s-5) 0; }

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