/* =============================================================
   Gamers Haven — main.css
   Arcade-CRT Magazine archetype, vanilla CSS, no framework.
   ============================================================= */

/* --- 1. Self-hosted fonts ---------------------------------- */
@font-face {
  font-family: 'Tanker';
  src: url('../fonts/tanker-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Bespoke Stencil';
  src: url('../fonts/bespoke-stencil-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-800.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* --- 2. Tokens --------------------------------------------- */
:root {
  --crt-bg: #0a1228;
  --crt-bg-soft: #111a36;
  --phosphor: #4ade80;
  --phosphor-dim: rgba(74, 222, 128, 0.18);
  --phosphor-line: rgba(74, 222, 128, 0.32);
  --crt-amber: #f5a623;
  --print-white: #e2e8f0;
  --print-dim: rgba(226, 232, 240, 0.72);
  --rule-thin: rgba(226, 232, 240, 0.14);

  --font-headline: 'Tanker', 'Archivo', sans-serif;
  --font-display: 'Bespoke Stencil', 'Archivo', sans-serif;
  --font-body: 'Archivo', system-ui, -apple-system, sans-serif;

  --pad-x: clamp(1rem, 2.5vw, 2.5rem);
  --container-max: 1480px;
}

/* --- 3. Base ----------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 0;
  background-color: var(--crt-bg);
  color: var(--print-white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img, picture, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover, a:focus-visible { color: var(--phosphor); text-shadow: 0 0 8px var(--phosphor); }
:focus-visible { outline: 2px solid var(--phosphor); outline-offset: 3px; }

/* --- 4. CRT scanline overlay (decorative, pointer-events off) - */
.crt-overlay {
  position: fixed;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.16),
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 2px
  );
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

/* --- 5. Container ------------------------------------------ */
.shell {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}

/* --- 6. Header / nav --------------------------------------- */
.site-header {
  padding: 2rem 0 1rem;
}
.site-header .row {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}
@media (min-width: 768px) {
  .site-header .row {
    flex-direction: row;
    align-items: baseline;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.brand-mark { width: 48px; height: 48px; flex-shrink: 0; }
.brand-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--phosphor);
  text-transform: uppercase;
  margin: 0;
  line-height: 1;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
}
.site-nav a {
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  transition: color 0.2s, text-shadow 0.2s;
}

/* --- 7. Magazine ruled divider ----------------------------- */
.rule {
  border-top: 4px solid var(--phosphor);
  border-bottom: 1px solid var(--phosphor);
  height: 8px;
  margin: 2.5rem 0;
}
.rule-thin { border-top: 1px solid var(--phosphor-line); margin: 1.75rem 0; }

/* --- 8. Eyebrow label (replaces AI-slop callout idiom) ----- */
.eyebrow {
  font-family: var(--font-display);
  letter-spacing: 0.22em;
  color: var(--crt-amber);
  font-size: 0.72rem;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  display: block;
}

/* --- 9. Hero ----------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
  align-items: stretch;
}
@media (min-width: 1024px) {
  .hero { grid-template-columns: 6fr 6fr; gap: 3rem; }
}
@media (min-width: 1440px) {
  .hero { grid-template-columns: 7fr 6fr; }
}

/* Hero image — sits to the right of the H1, identifies the site at a glance.
   Aspect-ratio carries the visual weight matched to the giant headline. */
.hero-figure {
  position: relative;
  margin: 0;
  border: 2px solid var(--phosphor);
  padding: 4px;
  background: var(--crt-bg-soft);
  align-self: stretch;
  overflow: hidden;
  min-height: 280px;
}
.hero-figure .frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1px solid var(--phosphor-line);
  overflow: hidden;
  background: var(--crt-bg);
}
.hero-figure picture,
.hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.78) saturate(1.08);
}
.hero-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(10, 18, 40, 0) 0%, rgba(10, 18, 40, 0.55) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(10, 18, 40, 0),
      rgba(10, 18, 40, 0) 2px,
      rgba(10, 18, 40, 0.18) 2px,
      rgba(10, 18, 40, 0.18) 3px
    );
  z-index: 2;
}
.hero-figure .figure-tag {
  position: absolute;
  bottom: 0.7rem;
  right: 0.85rem;
  z-index: 3;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.6rem;
  color: var(--phosphor);
  letter-spacing: 0.12em;
  text-shadow: 0 0 4px rgba(74, 222, 128, 0.6);
}
.hero-figure .figure-badge {
  position: absolute;
  top: 0.7rem;
  left: 0.85rem;
  z-index: 3;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.62rem;
  color: var(--crt-amber);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  background: rgba(10, 18, 40, 0.78);
  border: 1px solid var(--phosphor-line);
  padding: 0.25rem 0.5rem;
}
@media (min-width: 1024px) {
  .hero-figure { min-height: 0; }
}

/* --- 9b. Hero slider (tile-mosaic dissolve, minimal chrome) ---------
   Borderless full-bleed cover gallery. 7 images cycle on a 4 s timer; the
   transition is a fast CRT pixel-dissolve — a grid of ~60 tiles paints the
   incoming image with randomised stagger. Each tile contains a full <img>
   absolutely positioned + cropped via overflow:hidden so the tile shows
   exactly the same pixels object-fit:cover would produce on the underlying
   slide — eliminates the snap that happened when the tiles were a stretched
   background. */
.hero-slider {
  position: relative;
  display: block;
  align-self: stretch;
}
.hero-slider .stage {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  min-height: 240px;
  background: var(--crt-bg);
}
.hero-slider .frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--crt-bg);
}
/* Simple opacity crossfade — the original v1 transition restored. Each
   slide fades in over 700ms when its is-active class is added, and out
   when removed; no tile overlay, no chrome on the stage. */
.hero-slider .slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.7s ease, visibility 0s linear 0.7s;
  z-index: 1;
}
.hero-slider .slide.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.7s ease;
  z-index: 2;
}
.hero-slider .slide picture,
.hero-slider .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.82) saturate(1.08);
}

/* Persistent CRT scanline + corner vignette — lives on .frame so it stays
   painted on top of every slide throughout the crossfade. */
.hero-slider .frame::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(10, 18, 40, 0) 0%, rgba(10, 18, 40, 0.55) 100%),
    repeating-linear-gradient(
      0deg,
      rgba(10, 18, 40, 0),
      rgba(10, 18, 40, 0) 2px,
      rgba(10, 18, 40, 0.18) 2px,
      rgba(10, 18, 40, 0.18) 3px
    );
  z-index: 4;
}

/* Prev / next controls — small monochrome chevrons in the bottom-right
   corner of the stage. Keyboard arrows do the same. */
.hero-slider .controls {
  position: absolute;
  bottom: 0.7rem;
  right: 0.85rem;
  z-index: 8;
  display: flex;
  gap: 4px;
}
.hero-slider .ctrl {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 18, 40, 0.85);
  border: 1px solid var(--phosphor-line);
  color: var(--phosphor);
  font: 700 0.9rem/1 ui-monospace, monospace;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.15s, background 0.15s;
}
.hero-slider .ctrl:hover,
.hero-slider .ctrl:focus-visible {
  border-color: var(--phosphor);
  background: rgba(74, 222, 128, 0.16);
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-slider .slide { transition: none; }
}
.headline-glitch {
  font-family: var(--font-headline);
  text-shadow: 2px 0 0 rgba(255, 0, 0, 0.30), -2px 0 0 rgba(0, 255, 255, 0.30);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 400;
  line-height: 0.85;
  margin: 0;
}
.hero h1.headline-glitch {
  font-size: clamp(3.5rem, 11vw, 9rem);
  color: var(--print-white);
}
.hero .lede {
  max-width: 36rem;
  font-size: clamp(1.05rem, 1.5vw, 1.4rem);
  font-weight: 600;
  font-style: italic;
  color: var(--phosphor);
  line-height: 1.25;
  margin: 1.5rem 0 0;
}
.hero-sidebar {
  border: 2px solid var(--rule-thin);
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.035);
  align-self: end;
}
.hero-sidebar p { font-size: 0.92rem; opacity: 0.85; margin: 0; }

/* --- 10. Flagship section ---------------------------------- */
.flagship {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0;
}
@media (min-width: 1024px) {
  .flagship { grid-template-columns: 3fr 6fr 3fr; }
}
.flagship-meta {
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  line-height: 2;
  border-top: 1px solid var(--phosphor);
  padding-top: 1rem;
}
.flagship-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4vw, 3.75rem);
  text-transform: uppercase;
  line-height: 0.95;
  color: var(--print-white);
  margin: 0 0 1.25rem;
  transition: color 0.2s;
}
.flagship a:hover .flagship-title,
.flagship a:focus-visible .flagship-title { color: var(--crt-amber); text-shadow: none; }
.flagship-deck { font-size: 1.05rem; line-height: 1.55; margin: 0 0 1.5rem; }
.flagship-thumb {
  border: 1px solid var(--phosphor);
  padding: 2px;
  aspect-ratio: 1 / 1;
  position: relative;
}
.flagship-thumb-inner {
  border: 1px solid var(--phosphor);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(74, 222, 128, 0.05);
  overflow: hidden;
}
.flagship-thumb-inner img,
.flagship-thumb-inner picture { width: 100%; height: 100%; object-fit: cover; }
.flagship-thumb-tag {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.55rem;
  color: var(--phosphor);
  letter-spacing: 0.08em;
}

/* --- 11. Cornerstone grid ---------------------------------- */
.cornerstone-section { padding: 3rem 0; }
.cornerstone-section .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.cornerstone-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.75vw, 2rem);
  text-transform: uppercase;
  color: var(--phosphor);
  margin: 0;
}
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem 3rem;
}
@media (min-width: 768px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }
.card { display: flex; flex-direction: column; }
.card-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--crt-amber);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}
.card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  text-transform: uppercase;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}
.card h3 a { transition: color 0.2s; }
.card p { font-size: 0.92rem; line-height: 1.55; color: var(--print-dim); margin: 0; }
.card-foot {
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule-thin);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
}
@media (min-width: 768px) {
  .card-grid > :nth-child(3n+2),
  .card-grid > :nth-child(3n+3) { border-left: 1px solid var(--phosphor-dim); padding-left: 3rem; }
  .card-grid > :nth-child(3n+1) { padding-left: 0; }
}

/* --- 12. Category shortcuts -------------------------------- */
.category-strip { padding: 2.5rem 0; }
.category-strip .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--phosphor-line);
  border: 1px solid var(--phosphor);
}
@media (min-width: 768px) { .category-strip .grid { grid-template-columns: repeat(4, 1fr); } }
.cat-cell {
  background: var(--crt-bg);
  padding: 1.5rem 1.5rem 1.25rem;
  transition: background 0.2s;
}
.cat-cell:hover, .cat-cell:focus-visible { background: var(--crt-bg-soft); text-shadow: none; color: var(--phosphor); }
.cat-cell .label {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  font-weight: 700;
}
.cat-cell .count {
  font-size: 0.66rem;
  color: var(--crt-amber);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* --- 13. Recent posts list --------------------------------- */
.recent { padding: 2.5rem 0 3.5rem; }
.recent ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.recent li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.1rem 0;
  border-top: 1px solid var(--rule-thin);
}
.recent li:last-child { border-bottom: 1px solid var(--rule-thin); }
.recent .idx {
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--crt-amber);
  letter-spacing: 0.16em;
}
.recent .title {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.02em;
  font-weight: 700;
}
.recent time {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  color: var(--print-dim);
  letter-spacing: 0.05em;
}

/* --- 14. Editorial note block ------------------------------ */
.editorial-note {
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 1024px) { .editorial-note { grid-template-columns: 4fr 8fr; } }
.editorial-note p { font-size: 1rem; line-height: 1.7; max-width: 44rem; }

/* --- 15. Article-page typography (single.html) ------------- */
.article-shell {
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 clamp(1rem, 2.5vw, 2.5rem);
  position: relative;
}

/* Article grid — main reading column + Tufte-style right sidebar on wide
   viewports. Below 1024px the sidebar slides under the main column so the
   reading flow stays clean on tablet / phone. On wide screens we expand both
   the main reading column AND the sidebar to fill the available width — the
   reading column max-width sits on .article-main itself so prose stays
   typographically comfortable, while figures and infographics can span the
   full main-column cell.

   Earlier iteration capped the main column at 64ch which left ~700px of dead
   side margin on a 1920px viewport; bumped to 86ch / 96ch for ≥1024 / ≥1440. */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr) 20rem;
    gap: 3.5rem;
  }
  .article-grid > .article-main { min-width: 0; }
  /* prose constrained for typography only — figures still span full cell */
  .article-grid > .article-main > p,
  .article-grid > .article-main > ul,
  .article-grid > .article-main > ol,
  .article-grid > .article-main > blockquote,
  .article-grid > .article-main > h2,
  .article-grid > .article-main > h3,
  .article-grid > .article-main > header,
  .article-grid > .article-main > .further,
  .article-grid > .article-main > .faq { max-width: 78ch; }
}
@media (min-width: 1440px) {
  .article-grid { grid-template-columns: minmax(0, 1fr) 22rem; gap: 4rem; }
  .article-grid > .article-main > p,
  .article-grid > .article-main > ul,
  .article-grid > .article-main > ol,
  .article-grid > .article-main > blockquote,
  .article-grid > .article-main > h2,
  .article-grid > .article-main > h3,
  .article-grid > .article-main > header,
  .article-grid > .article-main > .further,
  .article-grid > .article-main > .faq { max-width: 86ch; }
}

/* Sidebar — sticky on wide viewports, scrolls with the page until it hits
   the article footer. Holds: in-article TOC (h2 jump-links), "Filed under"
   key/value, and a "Related from Gamers Haven" link list. */
.article-sidebar {
  font-family: var(--font-body);
  font-size: 0.86rem;
  color: var(--print-dim);
  border-top: 4px solid var(--phosphor);
  border-bottom: 1px solid var(--phosphor);
  padding: 1.25rem 0 1rem;
}
@media (min-width: 1024px) {
  .article-sidebar {
    position: sticky;
    top: 1rem;
    align-self: start;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    border-top-width: 4px;
  }
}
.article-sidebar .sb-block {
  padding: 0 0 1.25rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px dotted var(--rule-thin);
}
.article-sidebar .sb-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.article-sidebar .sb-eyebrow {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--crt-amber);
  margin: 0 0 0.75rem;
  display: block;
}
.article-sidebar ul,
.article-sidebar ol { list-style: none; padding: 0; margin: 0; }
.article-sidebar .sb-toc li {
  padding: 0.32rem 0;
  font-size: 0.82rem;
  line-height: 1.35;
  border-bottom: 1px dotted var(--rule-thin);
}
.article-sidebar .sb-toc li:last-child { border-bottom: none; }
.article-sidebar .sb-toc a {
  color: var(--print-dim);
  transition: color 0.15s, padding-left 0.15s;
  display: block;
  padding-left: 0.6rem;
  border-left: 2px solid transparent;
}
.article-sidebar .sb-toc a::before {
  content: attr(data-idx);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.65rem;
  color: var(--crt-amber);
  letter-spacing: 0.08em;
  margin-right: 0.5rem;
  opacity: 0.7;
}
.article-sidebar .sb-toc a:hover,
.article-sidebar .sb-toc a:focus-visible {
  color: var(--phosphor);
  border-left-color: var(--phosphor);
  padding-left: 0.85rem;
  text-shadow: none;
}
.article-sidebar dl.sb-kv {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  margin: 0;
}
.article-sidebar dl.sb-kv dt {
  color: var(--crt-amber);
  margin-top: 0.45rem;
  letter-spacing: 0.06em;
}
.article-sidebar dl.sb-kv dt:first-child { margin-top: 0; }
.article-sidebar dl.sb-kv dd {
  margin: 0 0 0.35rem;
  color: var(--print-white);
}
.article-sidebar .sb-related li {
  margin: 0.55rem 0;
  font-size: 0.84rem;
  line-height: 1.3;
}
.article-sidebar .sb-related a {
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--print-white);
  font-weight: 700;
  display: block;
  padding: 0.2rem 0;
  border-left: 2px solid transparent;
  padding-left: 0.6rem;
  transition: color 0.15s, border-color 0.15s;
}
.article-sidebar .sb-related a:hover,
.article-sidebar .sb-related a:focus-visible {
  color: var(--phosphor);
  border-left-color: var(--phosphor);
  text-shadow: none;
}
.article-sidebar .sb-related .sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: none;
  font-size: 0.72rem;
  color: var(--print-dim);
  margin-top: 0.15rem;
}

/* Ambient margin decoration on wide viewports — vertical CRT scan-line band
   running parallel to the 64ch reading column on both sides. The reading
   column width is NOT changed; the decoration lives in the absolute side
   space outside the column. Activates above 1024px where empty side space
   starts to feel like a visual void on the dark theme. Mobile/tablet stay
   unchanged.

   Layered background:
     1. A vertical scan-line SVG data-URI — fine 1px phosphor verticals every
        4px, the "CRT phosphor mask" reference.
     2. A horizontal beam-line dash pattern overlaid at 70% opacity, the
        "horizontal scan-line" reference that the .crt-overlay uses globally.
     3. A pair of phosphor edge-rules at the band's inner and outer borders
        so the band reads as an editorial side-margin rule, not as noise.

   The band has a soft top/bottom fade (mask-image) so it doesn't compete
   with the article header or footer.
*/
@media (min-width: 1024px) {
  article.post .article-shell::before,
  article.post .article-shell::after {
    content: '';
    position: absolute;
    top: 4rem;
    bottom: 4rem;
    width: 2rem;
    pointer-events: none;
    opacity: 0.62;
    background-color: transparent;
    background-image:
      url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'><rect width='32' height='32' fill='none'/><line x1='2'  y1='0' x2='2'  y2='32' stroke='%234ade80' stroke-width='0.6' stroke-opacity='0.55'/><line x1='8'  y1='0' x2='8'  y2='32' stroke='%234ade80' stroke-width='0.4' stroke-opacity='0.30'/><line x1='14' y1='0' x2='14' y2='32' stroke='%234ade80' stroke-width='0.4' stroke-opacity='0.30'/><line x1='20' y1='0' x2='20' y2='32' stroke='%234ade80' stroke-width='0.4' stroke-opacity='0.30'/><line x1='26' y1='0' x2='26' y2='32' stroke='%234ade80' stroke-width='0.4' stroke-opacity='0.30'/><line x1='30' y1='0' x2='30' y2='32' stroke='%234ade80' stroke-width='0.6' stroke-opacity='0.55'/><line x1='0' y1='10' x2='32' y2='10' stroke='%23f5a623' stroke-width='0.4' stroke-opacity='0.22'/><line x1='0' y1='22' x2='32' y2='22' stroke='%23f5a623' stroke-width='0.4' stroke-opacity='0.22'/></svg>"),
      repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent 4px,
        var(--phosphor-line) 4px,
        var(--phosphor-line) 6px
      );
    background-size: 32px 32px, auto;
    background-repeat: repeat;
    border-left: 1px solid var(--phosphor-line);
    border-right: 1px solid var(--phosphor-line);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 3rem, #000 calc(100% - 3rem), transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 3rem, #000 calc(100% - 3rem), transparent 100%);
  }
  article.post .article-shell::before { left: -1.5rem; }
  article.post .article-shell::after  { right: -1.5rem; }

  /* Editorial corner brackets at the top of each margin band — a small
     fixed-width L on the inner side of the band that frames the article
     header. Pure decoration, decorative-only role, hidden from AT. */
  article.post .article-shell {
    --margin-corner: 0.9rem;
  }
}

/* A larger / quieter ambient scan-line wash that sits behind the entire
   article column on extra-wide viewports — only kicks in above 1440px where
   the absolute side bands at -4.5rem are well clear of the column edge and
   the wider gutter starts to dominate the page. */
@media (min-width: 1440px) {
  article.post .article-shell::before,
  article.post .article-shell::after {
    width: 2.4rem;
    opacity: 0.74;
    box-shadow:
      inset 0 0 0 1px rgba(74, 222, 128, 0.08),
      0 0 14px 0 rgba(74, 222, 128, 0.05);
  }
  article.post .article-shell::before { left: -2rem; }
  article.post .article-shell::after  { right: -2rem; }
}

/* Reduced-motion / reduced-transparency users: drop the SVG layer entirely
   and fall back to the original dash pattern only. The scan-line wash is a
   pure flourish — it must never become a barrier to legibility. */
@media (min-width: 1024px) and (prefers-reduced-transparency: reduce) {
  article.post .article-shell::before,
  article.post .article-shell::after {
    background-image: repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 4px,
      var(--phosphor-line) 4px,
      var(--phosphor-line) 6px
    );
    opacity: 0.4;
    -webkit-mask-image: none;
            mask-image: none;
  }
}

/* Editorial margin notes — inline-block callouts in the prose column.
   (Previously these floated into the right gutter Tufte-style with
   margin-right: -14rem, but that gutter is now occupied by the real
   .article-sidebar, so the float collided with the sidebar text. Now
   the notes stay in the reading column as a left-rule amber callout —
   no float, no negative margin, no collision.) */
article.post .margin-note {
  display: block;
  clear: both;
  float: none !important;
  width: auto;
  font-family: var(--font-display);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--crt-amber);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-top: none;
  border-left: 3px solid var(--crt-amber);
  background: rgba(245, 166, 35, 0.05);
  padding: 0.65rem 0.95rem 0.7rem;
  margin: 1.5rem 0;
  max-width: 100%;
  text-align: left;
}
article.post .margin-note.left {
  /* .left was the older "float-left, right-aligned" variant — now indistinguishable
     from the right variant since neither floats. Force left-align to override. */
  text-align: left;
  border-left: 3px solid var(--crt-amber);
  border-right: none;
  margin: 1.5rem 0;
}
article.post .margin-note .source {
  display: block;
  color: var(--print-dim);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: none;
  margin-top: 0.45rem;
  line-height: 1.45;
  font-weight: 400;
}

/* Body figure (non-hero illustrative images embedded mid-article) */
article.post .body-figure {
  margin: 2.5rem 0;
}
article.post .body-figure picture,
article.post .body-figure img {
  width: 100%;
  height: auto;
  display: block;
}
article.post .body-figure figcaption {
  font-size: 0.78rem;
  color: var(--print-dim);
  margin-top: 0.5rem;
  font-style: italic;
  line-height: 1.45;
}
article.post header { padding: 2.5rem 0 1rem; }
article.post h1 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 0.95;
  margin: 0 0 1.25rem;
  color: var(--print-white);
}
article.post .post-meta {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--phosphor);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
article.post .dek {
  font-size: 1.15rem;
  font-style: italic;
  color: var(--print-dim);
  line-height: 1.5;
  margin-bottom: 2rem;
}
article.post .hero-figure { margin: 1.5rem 0 2.5rem; }
article.post .hero-figure figcaption {
  font-size: 0.78rem;
  color: var(--print-dim);
  margin-top: 0.5rem;
  font-style: italic;
}
article.post h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  letter-spacing: 0.02em;
  margin: 2.5rem 0 0.75rem;
  color: var(--phosphor);
  border-bottom: 1px solid var(--phosphor-line);
  padding-bottom: 0.4rem;
}
article.post h3 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(1.1rem, 1.8vw, 1.35rem);
  margin: 2rem 0 0.6rem;
  color: var(--print-white);
}
article.post p { margin: 0 0 1.2rem; font-size: 1.02rem; line-height: 1.7; }
article.post a { color: var(--phosphor); border-bottom: 1px dotted var(--phosphor-line); }
article.post a:hover { background: rgba(74, 222, 128, 0.08); text-shadow: none; }
article.post ul, article.post ol { margin: 0 0 1.4rem; padding-left: 1.5rem; }
article.post li { margin-bottom: 0.4rem; }
article.post strong { color: var(--crt-amber); font-weight: 800; }
article.post em { color: var(--phosphor); font-style: italic; }
article.post blockquote {
  border-left: 4px solid var(--phosphor);
  padding: 0.4rem 0 0.4rem 1.25rem;
  margin: 1.5rem 0;
  color: var(--print-dim);
  font-style: italic;
}
article.post .infographic {
  margin: 2.5rem 0;
  padding: 1.25rem;
  border: 1px solid var(--phosphor-line);
  background: rgba(74, 222, 128, 0.04);
}
article.post .infographic figcaption {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--crt-amber);
  margin-top: 0.5rem;
}
/* FAQ — editorial Q/A cards. Each entry is a <details open>, so the answer
   is visible by default but the user can still collapse it. The card carries
   a large amber numbered prefix from data-idx="01" .. "05", alternating
   left-rule accents (phosphor / amber) keep the column from looking like a
   monotone list, and the question stays the visual hook even when expanded. */
.faq, article.post .faq { margin: 2.5rem 0; }
.faq h2 { margin-bottom: 1.5rem; }

.faq details.qa,
article.post .faq details.qa {
  position: relative;
  margin: 0 0 0.9rem;
  padding: 1.1rem 1.4rem 1.1rem 4.2rem;
  background: rgba(74, 222, 128, 0.04);
  border: 1px solid var(--phosphor-line);
  border-left: 3px solid var(--phosphor);
  border-top: 1px solid var(--phosphor-line);
  transition: border-color 0.15s, background 0.15s;
}
.faq details.qa:last-of-type,
article.post .faq details.qa:last-of-type { margin-bottom: 0; border-bottom: 1px solid var(--phosphor-line); }

/* Numbered prefix from data-idx attribute. */
.faq details.qa::before,
article.post .faq details.qa::before {
  content: attr(data-idx);
  position: absolute;
  top: 1.1rem;
  left: 1.2rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--crt-amber);
  letter-spacing: 0.04em;
  line-height: 1;
  min-width: 2.4rem;
  text-align: left;
}

/* Alternate stripe so a list of 5 doesn't read as a solid block. */
.faq details.qa:nth-child(even),
article.post .faq details.qa:nth-child(even) {
  background: rgba(245, 166, 35, 0.05);
  border-left-color: var(--crt-amber);
}
.faq details.qa:nth-child(even)::before,
article.post .faq details.qa:nth-child(even)::before {
  color: var(--phosphor);
}

.faq details.qa:hover,
.faq details.qa:focus-within,
article.post .faq details.qa:hover,
article.post .faq details.qa:focus-within {
  border-color: var(--phosphor);
  background: rgba(74, 222, 128, 0.08);
}

.faq details.qa summary.q,
article.post .faq details.qa summary.q {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  letter-spacing: 0.02em;
  color: var(--print-white);
  cursor: pointer;
  position: relative;
  padding: 0 2.4rem 0 0;
  list-style: none;
  line-height: 1.22;
}
.faq details.qa summary.q::-webkit-details-marker,
article.post .faq details.qa summary.q::-webkit-details-marker { display: none; }

.faq details.qa summary.q::after,
article.post .faq details.qa summary.q::after {
  content: '\2212';
  position: absolute;
  right: 0;
  top: -0.1rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
  line-height: 1;
  color: var(--phosphor);
  transition: transform 0.2s;
}
.faq details:not([open]) summary.q::after,
article.post .faq details:not([open]) summary.q::after {
  content: '+';
  color: var(--crt-amber);
}

.faq details.qa summary.q:hover,
.faq details.qa summary.q:focus-visible,
article.post .faq details.qa summary.q:hover,
article.post .faq details.qa summary.q:focus-visible {
  color: var(--phosphor);
  text-shadow: 0 0 8px var(--phosphor-dim);
  outline: none;
}

.faq details.qa .a,
article.post .faq details.qa .a {
  font-size: 0.98rem;
  line-height: 1.65;
  margin: 0.85rem 0 0;
  padding-left: 0;
  color: var(--print-white);
}
article.post .further {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--phosphor-line);
}
article.post .further h2 { border: none; padding: 0; }
article.post .further ul { list-style: none; padding: 0; }
article.post .further li { margin-bottom: 0.4rem; font-size: 0.95rem; }

/* --- 16. Footer -------------------------------------------- */
/* Magazine-masthead style: 4-column sitemap on wide screens, distinct from
   primary nav. Top: ASCII-art rule + amber publication-mark line. Middle:
   columns grouped by purpose (Read by Topic / Archive / Editorial / Colophon).
   Bottom: terminal-style colophon + last-updated timestamp. */
.site-footer {
  padding: 3rem 0 2rem;
  margin-top: 3rem;
  border-top: 4px double var(--phosphor);
  position: relative;
}
.site-footer .ascii-rule {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  color: var(--phosphor-line);
  text-align: center;
  letter-spacing: 0.05em;
  margin: 0 0 1.5rem;
  user-select: none;
  overflow: hidden;
  white-space: nowrap;
}
.site-footer .pub-mark {
  font-family: var(--font-display);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.36em;
  color: var(--crt-amber);
  text-align: center;
  margin: 0 0 2rem;
}
.site-footer .sitemap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin: 0 0 2.5rem;
}
@media (min-width: 640px) { .site-footer .sitemap { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .site-footer .sitemap { grid-template-columns: repeat(4, 1fr); gap: 2.5rem; } }
.site-footer .sitemap-col h3 {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crt-amber);
  margin: 0 0 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--phosphor-line);
}
.site-footer .sitemap-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .sitemap-col li {
  margin: 0.4rem 0;
  font-size: 0.82rem;
  line-height: 1.4;
}
.site-footer .sitemap-col a {
  font-family: var(--font-body);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--print-dim);
  display: inline-block;
  border-bottom: 1px dotted transparent;
  transition: color 0.15s, border-color 0.15s;
}
.site-footer .sitemap-col a:hover,
.site-footer .sitemap-col a:focus-visible {
  color: var(--phosphor);
  border-bottom-color: var(--phosphor-line);
  text-shadow: none;
}
.site-footer .sitemap-col .sub {
  display: block;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.66rem;
  color: var(--crt-amber);
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
  text-transform: uppercase;
}

/* Editorial column has the brand mark + colophon — gets a slightly different
   treatment so it doesn't look like the link columns. */
.site-footer .editorial-col p {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--print-dim);
  margin: 0 0 0.6rem;
}
.site-footer .editorial-col .brand {
  margin-bottom: 0.85rem;
}

/* Bottom strip — single centered editorial colophon line. The previous
   3-column version with "terminal connection · established" and "last build"
   timestamp violated the build-state and decorative-noise rules in
   easy-repurposing/CLAUDE.md, so only the editorial © line remains. */
.site-footer .strip {
  border-top: 1px solid var(--phosphor-line);
  padding-top: 1.25rem;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.7rem;
  color: var(--print-dim);
  letter-spacing: 0.06em;
  text-align: center;
}
.site-footer .strip .copyright { display: inline-block; }
.site-footer .terminal {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--print-dim);
  margin: 0.5rem 0 0.4rem;
}
.site-footer .colophon {
  font-size: 0.7rem;
  color: var(--print-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}
.site-footer .brand-name { font-size: 1.15rem; }

/* --- 16b. Homepage hero banner image ----------------------- */
.home-hero-banner {
  position: relative;
  margin: 0 0 0;
  overflow: hidden;
  background: var(--crt-bg);
  border-bottom: 1px solid var(--phosphor-line);
}
.home-hero-banner picture,
.home-hero-banner img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: brightness(0.78) saturate(1.05);
}
@media (min-width: 768px) {
  .home-hero-banner picture,
  .home-hero-banner img { aspect-ratio: 21 / 9; }
}
.home-hero-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 50% 90%, rgba(10, 18, 40, 0.0) 0%, var(--crt-bg) 88%),
    linear-gradient(180deg, rgba(10, 18, 40, 0.0) 60%, rgba(10, 18, 40, 0.78) 100%);
}
.home-hero-banner .overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: clamp(1rem, 3vw, 3rem) clamp(1rem, 4vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  z-index: 2;
}
.home-hero-banner .overlay .badge {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--crt-amber);
  background: rgba(10, 18, 40, 0.7);
  border: 1px solid var(--phosphor-line);
  padding: 0.35rem 0.65rem;
  display: inline-block;
}

/* --- 16c. Homepage cornerstone visual mosaic -------------- */
.visual-mosaic { padding: 2.5rem 0 1rem; }
.visual-mosaic .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.visual-mosaic .head h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.75vw, 2rem);
  text-transform: uppercase;
  color: var(--phosphor);
  margin: 0;
}
.mosaic-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--phosphor-line);
  border: 1px solid var(--phosphor);
}
@media (min-width: 768px) { .mosaic-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .mosaic-grid { grid-template-columns: repeat(6, 1fr); } }
.mosaic-cell {
  background: var(--crt-bg);
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  display: block;
}
.mosaic-cell picture,
.mosaic-cell img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.62) saturate(1.1);
  transition: filter 0.2s, transform 0.5s;
}
.mosaic-cell:hover picture,
.mosaic-cell:hover img,
.mosaic-cell:focus-visible picture,
.mosaic-cell:focus-visible img {
  filter: brightness(1.0) saturate(1.15);
  transform: scale(1.03);
}
.mosaic-cell .label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.6rem 0.7rem 0.55rem;
  background: linear-gradient(180deg, rgba(10, 18, 40, 0) 0%, rgba(10, 18, 40, 0.92) 100%);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--print-white);
  font-weight: 700;
  line-height: 1.15;
  z-index: 2;
}
.mosaic-cell .label .tag {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: var(--crt-amber);
  margin-bottom: 0.18rem;
  font-weight: 400;
}

/* --- 16d. Homepage featured infographic ------------------- */
.featured-infographic {
  padding: 3rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}
@media (min-width: 1024px) { .featured-infographic { grid-template-columns: 4fr 8fr; gap: 3rem; } }
.featured-infographic .intro span.eyebrow { color: var(--crt-amber); }
.featured-infographic .intro h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  text-transform: uppercase;
  line-height: 1.0;
  color: var(--print-white);
  margin: 0.5rem 0 1rem;
}
.featured-infographic .intro p { font-size: 0.96rem; line-height: 1.55; color: var(--print-dim); margin: 0 0 1.1rem; }
.featured-infographic .intro a {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--phosphor);
  border-bottom: 1px solid var(--phosphor-line);
  padding-bottom: 0.15rem;
}
.featured-infographic figure {
  margin: 0;
  border: 1px solid var(--phosphor-line);
  padding: 0.6rem 0.6rem 0.4rem;
  background: rgba(74, 222, 128, 0.04);
}
.featured-infographic figure picture,
.featured-infographic figure img {
  width: 100%;
  height: auto;
  display: block;
}
.featured-infographic figure figcaption {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  color: var(--crt-amber);
  letter-spacing: 0.06em;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--rule-thin);
}

/* --- Pull-quote — magazine-style large editorial quote ---- */
.pull-quote {
  padding: 2.5rem 0;
  border-top: 4px solid var(--phosphor);
  border-bottom: 1px solid var(--phosphor);
  margin: 2.5rem 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 1024px) { .pull-quote { grid-template-columns: 1fr 3fr; gap: 3rem; align-items: start; } }
.pull-quote .lead {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crt-amber);
}
.pull-quote q {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.75vw, 2rem);
  font-weight: 700;
  line-height: 1.18;
  color: var(--print-white);
  display: block;
  font-style: italic;
  letter-spacing: 0.01em;
  quotes: none;
}
.pull-quote q::before { content: '"'; color: var(--crt-amber); font-style: normal; padding-right: 0.2em; }
.pull-quote q::after  { content: '"'; color: var(--crt-amber); font-style: normal; padding-left: 0.2em; }
.pull-quote .attribution {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.72rem;
  color: var(--phosphor);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 1.1rem;
  display: block;
}

/* --- Feature-card — image-left text-right article card ---- */
.feature-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  border: 1px solid var(--phosphor-line);
  background: rgba(74, 222, 128, 0.04);
  padding: 1.25rem;
  transition: border-color 0.2s, background 0.2s;
}
@media (min-width: 768px) { .feature-card { grid-template-columns: 5fr 7fr; gap: 2rem; padding: 1.25rem 1.5rem 1.5rem; } }
.feature-card:hover { border-color: var(--phosphor); background: rgba(74, 222, 128, 0.08); }
.feature-card .thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--phosphor-line);
}
.feature-card .thumb picture,
.feature-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.78) saturate(1.08);
  transition: filter 0.2s, transform 0.5s;
}
.feature-card:hover .thumb img,
.feature-card:focus-within .thumb img { filter: brightness(0.95) saturate(1.12); transform: scale(1.02); }
.feature-card .copy { display: flex; flex-direction: column; justify-content: center; gap: 0.6rem; }
.feature-card .feature-tag {
  font-family: var(--font-display);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--crt-amber);
}
.feature-card h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.4vw, 1.85rem);
  text-transform: uppercase;
  line-height: 1.1;
  margin: 0;
  color: var(--print-white);
}
.feature-card h3 a { color: inherit; transition: color 0.2s; }
.feature-card h3 a:hover { color: var(--phosphor); text-shadow: 0 0 8px var(--phosphor-dim); }
.feature-card p {
  font-size: 0.96rem;
  line-height: 1.55;
  color: var(--print-dim);
  margin: 0;
}
.feature-card .meta {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  color: var(--phosphor);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 0.4rem;
}

/* --- 16e. Homepage editorial-stats data block ------------- */
.editorial-stats {
  padding: 2.5rem 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--phosphor-line);
  border: 1px solid var(--phosphor);
  margin: 2rem 0;
}
@media (min-width: 768px) { .editorial-stats { grid-template-columns: repeat(4, 1fr); } }
.editorial-stats .stat {
  background: var(--crt-bg);
  padding: 1.5rem 1.2rem 1.25rem;
}
.editorial-stats .stat .val {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 700;
  color: var(--phosphor);
  line-height: 1;
  letter-spacing: 0.02em;
}
.editorial-stats .stat .label {
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crt-amber);
  margin: 0.45rem 0 0.25rem;
}
.editorial-stats .stat .note {
  font-size: 0.74rem;
  color: var(--print-dim);
  margin: 0;
  line-height: 1.35;
}

/* --- 16f. Lightbox / zoom for infographic figures --------- */
figure.zoomable {
  cursor: zoom-in;
  position: relative;
}
figure.zoomable::after {
  content: '';
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 32px;
  height: 32px;
  background-color: rgba(10, 18, 40, 0.85);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/><line x1='11' y1='8' x2='11' y2='14'/><line x1='8' y1='11' x2='14' y2='11'/></svg>");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  border: 1px solid var(--phosphor-line);
  pointer-events: none;
  opacity: 0.78;
  transition: opacity 0.2s, border-color 0.2s, background-color 0.2s;
  z-index: 3;
}
figure.zoomable:hover::after,
figure.zoomable:focus-visible::after {
  opacity: 1;
  border-color: var(--phosphor);
  background-color: rgba(10, 18, 40, 0.95);
}
figure.zoomable:focus-visible {
  outline: 2px solid var(--phosphor);
  outline-offset: 4px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  background: rgba(10, 18, 40, 0.96);
  overflow: auto;
}
.lightbox[hidden] { display: none; }

/* Persistent CRT scanline on the lightbox backdrop so the overlay feels
   continuous with the rest of the site, not a foreign chrome layer. */
.lightbox::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.16),
    rgba(0, 0, 0, 0.16) 1px,
    transparent 1px,
    transparent 2px
  );
  mix-blend-mode: multiply;
  z-index: 1;
}

.lightbox-stage {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 1400px;
  align-items: center;
}

.lightbox-content {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--crt-bg);
  border: 1px solid var(--phosphor);
  padding: 0.6rem;
  max-height: calc(100vh - 9rem);
}
.lightbox-content svg,
.lightbox-content img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: calc(100vh - 10rem);
  object-fit: contain;
}

.lightbox-caption {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.78rem;
  color: var(--print-dim);
  text-align: center;
  max-width: 72ch;
  letter-spacing: 0.04em;
  line-height: 1.45;
  padding: 0 0.5rem;
}

.lightbox-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10000;
  width: 44px;
  height: 44px;
  background: var(--crt-bg-soft);
  border: 1px solid var(--phosphor);
  color: var(--phosphor);
  font: 700 1.5rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.lightbox-close:hover,
.lightbox-close:focus-visible {
  background: var(--phosphor);
  color: var(--crt-bg);
  outline: none;
  transform: rotate(90deg);
}

body.lightbox-open { overflow: hidden; }

/* --- 17. Print + reduced-motion ---------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .crt-overlay { display: none; }
  body { background: white; color: black; }
}
