/* ═══════════════════════════════════════════════════════════════════════
   THEREVPROGAMERS — "Arcade Broadsheet"
   Editorial print structure (masthead, hairlines, drop caps, column rules)
   crossed with CRT-arcade energy (phosphor glow, scanlines, score readouts).
   ═══════════════════════════════════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────────────────────────────────── */
:root {
  /* Ink & paper — dark is the default */
  --ink:          #08090d;
  --ink-2:        #0e1017;
  --panel:        #141823;
  --panel-2:      #1b2030;
  --panel-3:      #232941;

  --rule:         rgba(242, 236, 225, 0.10);
  --rule-strong:  rgba(242, 236, 225, 0.20);

  --paper:        #f2ece1;
  --paper-dim:    #a8a294;
  --paper-faint:  #6b6659;

  /* Accents */
  --gold:         #e8c547;
  --gold-deep:    #b8951f;
  --crimson:      #e85d47;
  --phosphor:     #7dd3a0;

  --glow-gold:    rgba(232, 197, 71, 0.22);
  --glow-crimson: rgba(232, 93, 71, 0.22);

  --code-bg:      #0b0d14;

  /* Geometry */
  --r-sm: 4px;
  --r:    10px;
  --r-lg: 18px;

  --shadow-1: 0 1px 2px rgba(0,0,0,.5);
  --shadow-2: 0 6px 24px rgba(0,0,0,.45);
  --shadow-3: 0 24px 64px rgba(0,0,0,.55);

  --wrap:      1280px;
  --wrap-text: 760px;

  --f-display: 'Playfair Display', 'Iowan Old Style', Georgia, serif;
  --f-ui:      'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);

  color-scheme: dark;
}

[data-theme='light'] {
  --ink:          #f4efe4;
  --ink-2:        #ece5d6;
  --panel:        #fffdf7;
  --panel-2:      #f7f2e6;
  --panel-3:      #ece4d2;

  --rule:         rgba(26, 22, 18, 0.12);
  --rule-strong:  rgba(26, 22, 18, 0.26);

  --paper:        #16130f;
  --paper-dim:    #5f574c;
  --paper-faint:  #928878;

  --gold:         #9a7b0a;
  --gold-deep:    #6d5605;
  --crimson:      #c4331c;
  --phosphor:     #1d7a4c;

  --glow-gold:    rgba(154, 123, 10, 0.14);
  --glow-crimson: rgba(196, 51, 28, 0.14);

  --code-bg:      #12151f;

  --shadow-1: 0 1px 2px rgba(60,45,20,.10);
  --shadow-2: 0 6px 24px rgba(60,45,20,.13);
  --shadow-3: 0 24px 64px rgba(60,45,20,.18);

  color-scheme: light;
}

/* ── RESET ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-ui);
  font-size: 17px;
  line-height: 1.65;
  color: var(--paper);
  background: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}

img, svg, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--crimson); }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--gold); color: var(--ink); }

/* ── ATMOSPHERE: grain + scanlines ──────────────────────────────────── */
body::before {
  /* Fine film grain, keeps flat panels from looking plasticky */
  content: '';
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: .30;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.42'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
[data-theme='light'] body::before { opacity: .16; }

body::after {
  /* CRT scanlines — dark theme only, extremely subtle */
  content: '';
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: repeating-linear-gradient(
    180deg,
    rgba(255,255,255,.020) 0px,
    rgba(255,255,255,.020) 1px,
    transparent 1px,
    transparent 3px
  );
}
[data-theme='light'] body::after { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Content sits above the atmosphere layers */
.masthead, .site-main, .site-footer, .cmd-overlay, .to-top { position: relative; z-index: 2; }

/* ── UTILITIES ──────────────────────────────────────────────────────── */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 24px; }
.wrap-text { width: 100%; max-width: var(--wrap-text); margin-inline: auto; padding-inline: 24px; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
}

.rule { height: 1px; background: var(--rule); border: 0; }
.rule-thick {
  height: 3px;
  border: 0;
  background: var(--paper);
  opacity: .9;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  font-family: var(--f-mono);
  font-size: .8rem;
  font-weight: 600;
}
.skip-link:focus { left: 12px; top: 12px; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── MASTHEAD ───────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.5);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--rule);
}

.masthead-top {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
}

.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  flex: 0 0 auto;
  border: 1.5px solid var(--gold);
  border-radius: var(--r-sm);
  background: linear-gradient(145deg, var(--panel-2), var(--panel));
  font-family: var(--f-mono);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--gold);
  box-shadow: inset 0 0 14px var(--glow-gold), var(--shadow-1);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.brand:hover .brand-mark {
  transform: translateY(-2px) rotate(-4deg);
  box-shadow: inset 0 0 22px var(--glow-gold), 0 0 20px var(--glow-gold);
}

.brand-name {
  font-family: var(--f-display);
  font-size: 1.32rem;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
  color: var(--paper);
}
.brand-tag {
  font-family: var(--f-mono);
  font-size: .6rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-top: 3px;
}

.masthead-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--paper-dim);
  cursor: pointer;
  transition: all .2s var(--ease);
}
.icon-btn:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--panel-2);
  transform: translateY(-1px);
}
.icon-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.search-trigger {
  display: flex; align-items: center; gap: 10px;
  height: 38px;
  padding: 0 12px;
  min-width: 210px;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--paper-faint);
  font-size: .86rem;
  cursor: pointer;
  transition: all .2s var(--ease);
}
.search-trigger:hover { border-color: var(--gold); color: var(--paper-dim); }
.search-trigger svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; }
.search-trigger kbd {
  margin-left: auto;
  font-family: var(--f-mono);
  font-size: .66rem;
  padding: 2px 6px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  color: var(--paper-faint);
}

/* Navigation strip — the "section index" of the paper */
.masthead-nav { border-top: 1px solid var(--rule); }
.masthead-nav .wrap { display: flex; align-items: center; }

.nav-list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: none;
  width: 100%;
}
.nav-list::-webkit-scrollbar { display: none; }

.nav-link {
  position: relative;
  display: block;
  padding: 12px 15px;
  font-family: var(--f-mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--paper-dim);
  white-space: nowrap;
  transition: color .2s var(--ease);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 15px; right: 15px; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-link:hover { color: var(--paper); }
.nav-link:hover::after { transform: scaleX(1); }
.nav-link[aria-current='page'] { color: var(--gold); }
.nav-link[aria-current='page']::after { transform: scaleX(1); }

.nav-toggle { display: none; }

@media (max-width: 860px) {
  .search-trigger { min-width: 0; padding: 0 11px; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .nav-toggle { display: grid; }
  .masthead-nav {
    display: none;
    border-top: 1px solid var(--rule);
    max-height: 65vh;
    overflow-y: auto;
  }
  .masthead-nav.open { display: block; }
  .nav-list { flex-direction: column; padding-block: 6px; }
  .nav-link { padding: 13px 4px; font-size: .78rem; }
  .nav-link::after { left: 4px; right: 4px; }
}

/* ── SCOREBOARD TICKER ──────────────────────────────────────────────── */
.ticker {
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(90deg, var(--ink-2), var(--panel), var(--ink-2));
  overflow: hidden;
}
.ticker-inner {
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 9px 0;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-faint);
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.ticker-inner::-webkit-scrollbar { display: none; }

.ticker-item { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.ticker-item b {
  color: var(--gold);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ticker-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--phosphor);
  box-shadow: 0 0 8px var(--phosphor);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .28; } }

/* ── HERO ───────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 68px 0 54px;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}
.hero::before {
  /* Warm phosphor bloom bleeding in from the top-right */
  content: '';
  position: absolute;
  top: -220px; right: -140px;
  width: 620px; height: 620px;
  background: radial-gradient(circle, var(--glow-gold) 0%, transparent 68%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
}

.hero-title {
  font-family: var(--f-display);
  font-size: clamp(2.9rem, 8vw, 6rem);
  font-weight: 900;
  line-height: .93;
  letter-spacing: -.035em;
  margin: 18px 0 22px;
  text-wrap: balance;
}
.hero-title em {
  font-style: italic;
  color: var(--gold);
  position: relative;
}
.hero-title em::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: .08em;
  height: 3px;
  background: var(--crimson);
  transform: scaleX(0);
  transform-origin: left;
  animation: sweep 1s var(--ease) .5s forwards;
}
@keyframes sweep { to { transform: scaleX(1); } }

.hero-lede {
  font-size: 1.1rem;
  color: var(--paper-dim);
  max-width: 54ch;
  text-wrap: pretty;
}
.hero-lede strong { color: var(--paper); font-weight: 600; }

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Oversized ghost letterform anchoring the right column */
.hero-deco {
  font-family: var(--f-display);
  font-size: clamp(7rem, 17vw, 15rem);
  font-weight: 900;
  line-height: .72;
  letter-spacing: -.06em;
  text-align: right;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--rule-strong);
  user-select: none;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero { padding: 44px 0 38px; }
  .hero-grid { grid-template-columns: 1fr; gap: 26px; }
  .hero-deco { display: none; }
}

/* ── BUTTONS ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 20px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--paper);
  font-family: var(--f-mono);
  font-size: .74rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .25s var(--ease);
}
.btn:hover {
  color: var(--paper);
  border-color: var(--gold);
  background: var(--panel-2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-2);
}
.btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0b0f;
  font-weight: 700;
}
.btn-primary:hover {
  background: var(--gold);
  color: #0a0b0f;
  box-shadow: 0 0 26px var(--glow-gold), var(--shadow-2);
}

.btn-crimson {
  background: var(--crimson);
  border-color: var(--crimson);
  color: #fff;
  font-weight: 700;
}
.btn-crimson:hover { color: #fff; box-shadow: 0 0 26px var(--glow-crimson), var(--shadow-2); }

/* ── SECTION HEADERS ────────────────────────────────────────────────── */
.section { padding: 62px 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--paper);
}
.section-title {
  font-family: var(--f-display);
  font-size: clamp(1.7rem, 3.4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.05;
}
.section-more {
  font-family: var(--f-mono);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-bottom: 4px;
}
.section-more::after { content: ' →'; }

/* ── CARD GRIDS ─────────────────────────────────────────────────────── */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ── POST CARD ──────────────────────────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  overflow: hidden;
  transition: transform .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.card::before {
  /* Accent rule that sweeps across the top edge on hover */
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--crimson));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
  z-index: 3;
}
.card:hover {
  transform: translateY(-5px);
  border-color: var(--rule-strong);
  box-shadow: var(--shadow-3);
}
.card:hover::before { transform: scaleX(1); }

.card-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--panel-2), var(--panel-3));
  border-bottom: 1px solid var(--rule);
}
.card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.card:hover .card-media img { transform: scale(1.045); }

.card-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.card-meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--paper-faint);
  flex-wrap: wrap;
}
.card-meta .sep { opacity: .4; }

.card-title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.card-title a { color: var(--paper); }
.card:hover .card-title a { color: var(--gold); }

.card-desc {
  font-size: .93rem;
  color: var(--paper-dim);
  line-height: 1.6;
  text-wrap: pretty;
}

.card-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Featured card spans two columns on wide screens */
.card-featured { grid-column: span 2; }
.card-featured .card-media { aspect-ratio: 21 / 9; }
.card-featured .card-title { font-size: 1.95rem; }
@media (max-width: 760px) { .card-featured { grid-column: span 1; } }

/* ── TAGS & BADGES ──────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border: 1px solid var(--rule);
  border-radius: 100px;
  background: var(--panel-2);
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-dim);
  transition: all .2s var(--ease);
}
a.tag:hover { border-color: var(--gold); color: var(--gold); background: var(--panel-3); }
.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 3px;
  font-family: var(--f-mono);
  font-size: .6rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
}
.badge-review  { background: var(--crimson); color: #fff; }
.badge-guide   { background: var(--phosphor); color: #06120b; }
.badge-project { background: var(--gold); color: #0a0b0f; }
.badge-sample  { background: var(--panel-3); color: var(--paper-dim); border: 1px dashed var(--rule-strong); }

/* Arcade score readout for review ratings */
.score {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  padding: 6px 11px;
  border: 1px solid var(--gold);
  border-radius: var(--r-sm);
  background: var(--code-bg);
  font-family: var(--f-mono);
  font-weight: 700;
  color: var(--gold);
  text-shadow: 0 0 12px var(--glow-gold);
  box-shadow: inset 0 0 16px var(--glow-gold);
  font-variant-numeric: tabular-nums;
}
.score-value { font-size: 1.18rem; line-height: 1; }
.score-max { font-size: .68rem; opacity: .6; }
.score-lg { padding: 14px 20px; }
.score-lg .score-value { font-size: 2.5rem; }
.score-lg .score-max { font-size: 1rem; }

/* ── ARTICLE ────────────────────────────────────────────────────────── */
.article-header {
  padding: 54px 0 34px;
  border-bottom: 1px solid var(--rule);
}
.article-title {
  font-family: var(--f-display);
  font-size: clamp(2.1rem, 5.4vw, 3.9rem);
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -.03em;
  margin: 14px 0 18px;
  text-wrap: balance;
}
.article-lede {
  font-size: 1.16rem;
  color: var(--paper-dim);
  max-width: 62ch;
  text-wrap: pretty;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  font-family: var(--f-mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

.article-cover {
  margin: 34px 0 0;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--rule);
  box-shadow: var(--shadow-3);
}
.article-cover img { width: 100%; aspect-ratio: 21/9; object-fit: cover; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 56px;
  align-items: start;
  padding: 44px 0 72px;
}
@media (max-width: 1080px) {
  .article-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .toc-rail { display: none; }
}

/* ── PROSE ──────────────────────────────────────────────────────────── */
.prose { font-size: 1.06rem; line-height: 1.76; color: var(--paper); max-width: 72ch; }
.prose > * + * { margin-top: 1.15em; }

.prose h2 {
  font-family: var(--f-display);
  font-size: 1.95rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-top: 2.2em;
  padding-top: .55em;
  border-top: 1px solid var(--rule);
  scroll-margin-top: 100px;
}
.prose h3 {
  font-family: var(--f-display);
  font-size: 1.42rem;
  font-weight: 700;
  line-height: 1.3;
  margin-top: 1.9em;
  scroll-margin-top: 100px;
}
.prose h4 {
  font-family: var(--f-ui);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: .01em;
  margin-top: 1.7em;
}

.prose .anchor {
  float: left;
  margin-left: -.85em;
  padding-right: .3em;
  color: var(--gold);
  opacity: 0;
  font-weight: 400;
  transition: opacity .2s var(--ease);
  text-decoration: none;
}
.prose h2:hover .anchor,
.prose h3:hover .anchor { opacity: .6; }
@media (max-width: 900px) { .prose .anchor { display: none; } }

/* Editorial drop cap on the opening paragraph */
.prose > p:first-of-type::first-letter {
  float: left;
  font-family: var(--f-display);
  font-size: 3.9em;
  font-weight: 900;
  line-height: .78;
  padding: .06em .1em 0 0;
  margin-right: .04em;
  color: var(--gold);
}

.prose a { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.prose a:hover { text-decoration-color: var(--crimson); }

.prose a[data-affiliate]::after {
  content: '↗';
  font-size: .7em;
  vertical-align: super;
  margin-left: 2px;
  opacity: .7;
}

.prose strong { font-weight: 600; color: var(--paper); }
.prose em { font-style: italic; }

.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--gold); }

.prose blockquote {
  border-left: 3px solid var(--gold);
  padding: .35em 0 .35em 1.3em;
  font-family: var(--f-display);
  font-size: 1.25rem;
  font-style: italic;
  line-height: 1.5;
  color: var(--paper-dim);
}

.prose img { border-radius: var(--r); border: 1px solid var(--rule); margin-inline: auto; }

.prose hr { height: 1px; border: 0; background: var(--rule); margin: 2.6em 0; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
}
.prose thead th {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 2px solid var(--paper);
  font-family: var(--f-mono);
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.prose tbody td { padding: 11px 13px; border-bottom: 1px solid var(--rule); }
.prose tbody tr:hover { background: var(--panel); }

.table-scroll { overflow-x: auto; margin-inline: -4px; padding-inline: 4px; }

/* Code */
.prose code {
  font-family: var(--f-mono);
  font-size: .87em;
  padding: .15em .4em;
  border-radius: 4px;
  background: var(--panel-2);
  border: 1px solid var(--rule);
  color: var(--gold);
}
.prose pre {
  position: relative;
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 20px;
  overflow-x: auto;
  font-size: .87rem;
  line-height: 1.62;
  box-shadow: var(--shadow-1);
}
.prose pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: #d8dae4;
}

.copy-btn {
  position: absolute;
  top: 10px; right: 10px;
  padding: 5px 10px;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--panel-2);
  color: var(--paper-dim);
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  transition: all .2s var(--ease);
}
.prose pre:hover .copy-btn, .copy-btn:focus-visible { opacity: 1; }
.copy-btn:hover { color: var(--gold); border-color: var(--gold); }
.copy-btn.done { color: var(--phosphor); border-color: var(--phosphor); }

/* highlight.js — tuned to the broadsheet palette */
.hljs-comment, .hljs-quote { color: #5d6478; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-type { color: #e85d47; }
.hljs-string, .hljs-regexp, .hljs-addition { color: #7dd3a0; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #e8c547; }
.hljs-title, .hljs-section, .hljs-name { color: #79b8ff; }
.hljs-attr, .hljs-attribute, .hljs-variable, .hljs-template-variable { color: #d5b3ff; }
.hljs-built_in, .hljs-class .hljs-title { color: #ffab70; }
.hljs-meta { color: #6b7488; }
.hljs-deletion { color: #e85d47; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }

/* ── CALLOUTS ───────────────────────────────────────────────────────── */
.callout {
  display: flex;
  gap: 13px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--gold);
  border-radius: var(--r-sm);
  background: var(--panel);
  font-size: .95rem;
  color: var(--paper-dim);
}
.callout strong { color: var(--paper); }
.callout-disclosure { border-left-color: var(--crimson); font-size: .85rem; }

/* ── TOC RAIL ───────────────────────────────────────────────────────── */
.toc-rail { position: sticky; top: 104px; }
.toc-head {
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper-faint);
  padding-bottom: 11px;
  margin-bottom: 11px;
  border-bottom: 1px solid var(--rule);
}
.toc-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.toc-list a {
  display: block;
  padding: 6px 0 6px 13px;
  border-left: 2px solid var(--rule);
  font-size: .84rem;
  line-height: 1.4;
  color: var(--paper-faint);
  transition: all .2s var(--ease);
}
.toc-list a:hover { color: var(--paper); border-left-color: var(--paper-dim); }
.toc-list a.active { color: var(--gold); border-left-color: var(--gold); }
.toc-list .depth-3 a { padding-left: 25px; font-size: .79rem; }

/* ── REVIEW VERDICT PANEL ───────────────────────────────────────────── */
.verdict {
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  overflow: hidden;
  margin: 34px 0;
  box-shadow: var(--shadow-2);
}
.verdict-top {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
}
.verdict-copy { flex: 1; min-width: 220px; }
.verdict-label {
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 6px;
}
.verdict-text {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-style: italic;
  line-height: 1.4;
  color: var(--paper);
}
.verdict-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
@media (max-width: 620px) { .verdict-cols { grid-template-columns: 1fr; } }

.verdict-col { padding: 20px 24px; }
.verdict-col + .verdict-col { border-left: 1px solid var(--rule); }
@media (max-width: 620px) {
  .verdict-col + .verdict-col { border-left: 0; border-top: 1px solid var(--rule); }
}
.verdict-col h4 {
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.verdict-col.pros h4 { color: var(--phosphor); }
.verdict-col.cons h4 { color: var(--crimson); }
.verdict-col ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.verdict-col li {
  position: relative;
  padding-left: 20px;
  font-size: .93rem;
  color: var(--paper-dim);
  line-height: 1.5;
}
.verdict-col li::before { position: absolute; left: 0; font-family: var(--f-mono); font-weight: 700; }
.verdict-col.pros li::before { content: '+'; color: var(--phosphor); }
.verdict-col.cons li::before { content: '−'; color: var(--crimson); }

.spec-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.spec-table th, .spec-table td { padding: 9px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.spec-table th {
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  font-weight: 500;
  width: 42%;
}

/* ── VIDEO CARD ─────────────────────────────────────────────────────── */
.video-thumb { position: relative; }
.video-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(0,0,0,.85);
  color: #fff;
  font-family: var(--f-mono);
  font-size: .68rem;
  font-variant-numeric: tabular-nums;
}
.video-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(8,9,13,.35);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
.card:hover .video-play { opacity: 1; }
.video-play span {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--crimson);
  box-shadow: 0 0 30px var(--glow-crimson);
  transform: scale(.85);
  transition: transform .3s var(--ease);
}
.card:hover .video-play span { transform: scale(1); }
.video-play svg { width: 20px; height: 20px; fill: #fff; stroke: none; margin-left: 3px; }

/* ── REPO CARD ──────────────────────────────────────────────────────── */
.repo-card { padding: 20px; gap: 12px; }
.repo-name {
  font-family: var(--f-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--paper);
  word-break: break-word;
}
.card:hover .repo-name { color: var(--gold); }
.repo-stats {
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: var(--f-mono);
  font-size: .68rem;
  color: var(--paper-faint);
}
.repo-stats span { display: inline-flex; align-items: center; gap: 5px; }
.lang-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: 0 0 auto; }

/* ── GEAR CARD ──────────────────────────────────────────────────────── */
.gear-media {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--panel-2), var(--panel-3));
  display: grid;
  place-items: center;
  padding: 22px;
  border-bottom: 1px solid var(--rule);
}
.gear-media img { max-height: 100%; width: auto; object-fit: contain; transition: transform .5s var(--ease); }
.card:hover .gear-media img { transform: scale(1.06) rotate(-1.5deg); }

.gear-why {
  font-size: .87rem;
  font-style: italic;
  color: var(--paper-faint);
  border-left: 2px solid var(--rule);
  padding-left: 11px;
  line-height: 1.55;
}
.gear-price {
  font-family: var(--f-mono);
  font-size: .9rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: .06em;
}

/* ── SUPPORT / TIERS ────────────────────────────────────────────────── */
.tier {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 26px 22px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--panel);
  transition: all .3s var(--ease);
}
.tier:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: var(--shadow-2); }
.tier-name {
  font-family: var(--f-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.tier-price {
  font-family: var(--f-mono);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: -.02em;
  line-height: 1;
}
.tier-price small { font-size: .8rem; color: var(--paper-faint); font-weight: 400; letter-spacing: .1em; }
.tier-desc { font-size: .92rem; color: var(--paper-dim); flex: 1; line-height: 1.6; }

.support-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
@media (max-width: 800px) { .support-split { grid-template-columns: 1fr; } }

.platform-card {
  padding: 28px;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.platform-card h3 { font-family: var(--f-display); font-size: 1.7rem; font-weight: 800; }
.platform-card p { color: var(--paper-dim); font-size: .95rem; flex: 1; }

/* ── EMPTY / NOTICE STATES ──────────────────────────────────────────── */
.empty {
  padding: 46px 26px;
  border: 1px dashed var(--rule-strong);
  border-radius: var(--r);
  background: var(--panel);
  text-align: center;
  color: var(--paper-dim);
}
.empty h3 { font-family: var(--f-display); font-size: 1.4rem; color: var(--paper); margin-bottom: 8px; }
.empty code {
  font-family: var(--f-mono);
  font-size: .85em;
  padding: .15em .45em;
  border-radius: 4px;
  background: var(--code-bg);
  color: var(--gold);
  border: 1px solid var(--rule);
}

/* ── PAGINATION / POST NAV ──────────────────────────────────────────── */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 30px 0;
  border-top: 1px solid var(--rule);
}
@media (max-width: 620px) { .post-nav { grid-template-columns: 1fr; } }
.post-nav a {
  padding: 18px 20px;
  border: 1px solid var(--rule);
  border-radius: var(--r);
  background: var(--panel);
  transition: all .25s var(--ease);
}
.post-nav a:hover { border-color: var(--gold); transform: translateY(-2px); }
.post-nav .dir {
  font-family: var(--f-mono);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--paper-faint);
  display: block;
  margin-bottom: 6px;
}
.post-nav .ttl { font-family: var(--f-display); font-size: 1.08rem; font-weight: 700; color: var(--paper); line-height: 1.3; }
.post-nav .next { text-align: right; }

/* ── SEARCH OVERLAY ─────────────────────────────────────────────────── */
.cmd-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: 12vh 20px 20px;
  background: color-mix(in srgb, var(--ink) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cmd-overlay.open { display: block; animation: fade .18s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.cmd-box {
  max-width: 640px;
  margin-inline: auto;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-lg);
  background: var(--panel);
  box-shadow: var(--shadow-3);
  overflow: hidden;
  animation: rise .25s var(--ease);
}
@keyframes rise { from { transform: translateY(-14px); opacity: 0; } to { transform: none; opacity: 1; } }

.cmd-input-row { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.cmd-input-row svg { width: 18px; height: 18px; stroke: var(--paper-faint); fill: none; stroke-width: 2; flex: 0 0 auto; }
.cmd-input { flex: 1; border: 0; background: none; font-size: 1.05rem; color: var(--paper); outline: none; }
.cmd-input::placeholder { color: var(--paper-faint); }

.cmd-results { max-height: 52vh; overflow-y: auto; }
.cmd-item {
  display: block;
  padding: 13px 20px;
  border-bottom: 1px solid var(--rule);
  transition: background .15s;
}
.cmd-item:last-child { border-bottom: 0; }
.cmd-item:hover, .cmd-item.sel { background: var(--panel-2); }
.cmd-item-title { font-weight: 600; color: var(--paper); font-size: .97rem; margin-bottom: 3px; }
.cmd-item-meta { font-family: var(--f-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--paper-faint); }
.cmd-empty { padding: 34px 20px; text-align: center; color: var(--paper-faint); font-size: .92rem; }
.cmd-foot {
  display: flex; gap: 16px;
  padding: 10px 20px;
  border-top: 1px solid var(--rule);
  background: var(--panel-2);
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-faint);
}

/* ── READING PROGRESS ───────────────────────────────────────────────── */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0;
  z-index: 95;
  background: linear-gradient(90deg, var(--gold), var(--crimson));
  box-shadow: 0 0 10px var(--glow-gold);
  transition: width .1s linear;
}

/* ── TO TOP ─────────────────────────────────────────────────────────── */
.to-top {
  position: fixed;
  right: 22px; bottom: 22px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--rule-strong);
  border-radius: var(--r-sm);
  background: var(--panel);
  color: var(--paper-dim);
  cursor: pointer;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all .3s var(--ease);
  z-index: 80;
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--gold); border-color: var(--gold); }
.to-top svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── FOOTER ─────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 3px solid var(--paper);
  background: var(--ink-2);
  padding: 52px 0 30px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

.footer-brand-name {
  font-family: var(--f-display);
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: -.02em;
  margin-bottom: 10px;
}
.footer-bio { color: var(--paper-dim); font-size: .93rem; max-width: 42ch; line-height: 1.6; }

.footer-col h4 {
  font-family: var(--f-mono);
  font-size: .64rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 13px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--paper-dim); font-size: .92rem; }
.footer-col a:hover { color: var(--gold); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 22px;
  font-family: var(--f-mono);
  font-size: .66rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--paper-faint);
}
.footer-social { display: flex; gap: 8px; }
.footer-social a {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  color: var(--paper-dim);
  transition: all .25s var(--ease);
}
.footer-social a:hover { color: var(--gold); border-color: var(--gold); transform: translateY(-2px); }
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

/* ── ENTRANCE ANIMATION ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(14px); animation: reveal .6s var(--ease) forwards; }
  @keyframes reveal { to { opacity: 1; transform: none; } }
  .reveal:nth-child(1) { animation-delay: .04s; }
  .reveal:nth-child(2) { animation-delay: .09s; }
  .reveal:nth-child(3) { animation-delay: .14s; }
  .reveal:nth-child(4) { animation-delay: .19s; }
  .reveal:nth-child(5) { animation-delay: .24s; }
  .reveal:nth-child(6) { animation-delay: .29s; }
  .reveal:nth-child(n+7) { animation-delay: .34s; }
}

/* ── PRINT ──────────────────────────────────────────────────────────── */
@media print {
  body::before, body::after,
  .masthead, .site-footer, .to-top, .toc-rail, .progress, .cmd-overlay { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .prose a::after { content: ' (' attr(href) ')'; font-size: .8em; word-break: break-all; }
  .article-layout { display: block; padding: 0; }
}
