:root {
  /* Dark default — synthwave neon-on-deep-purple. Body ink is off-white
     with slight purple tint (#E8E8FF, AA-safe over #1A0B2E at every size);
     hot magenta (#FF006E) carries link/CTA contrast; electric cyan (#00F5FF)
     and soft purple (#B100FF) round out the accent set. The brighter
     near-white #FFFFFF lives only inside drop-shadows for the neon glow
     halo, never as foreground. */
  --bg: #1A0B2E;
  --bg-soft: #20103A;
  --paper: #2A1748;
  --surface: #2E1A52;
  --ink: #E8E8FF;
  --ink-soft: #C8C0E8;
  --muted: #9A8FBE;
  --muted-soft: #7A6F9E;
  --rule: #3D2566;
  --rule-soft: #2E1A52;
  --rule-strong: #553388;
  --accent: #FF006E;
  --accent-soft: #FF4A95;
  --accent-bg: #3D0E2E;
  --cyan: #00F5FF;
  --cyan-soft: #66F9FF;
  --purple: #B100FF;
  --purple-soft: #C966FF;
  --sunset-1: #FF006E;
  --sunset-2: #FF6B35;
  --sunset-3: #B100FF;
  --grid-line: rgba(255, 0, 110, 0.18);
  --grid-line-soft: rgba(0, 245, 255, 0.10);
  --glow-magenta: rgba(255, 0, 110, 0.55);
  --glow-cyan: rgba(0, 245, 255, 0.45);
  --error: #FF3B6F;
  --footer-bg: #0F0620;
  --footer-ink: #C8C0E8;
  --footer-ink-strong: #E8E8FF;
  --footer-muted: #7A6F9E;

  /* Type — VT323 display (retro CRT, used SPARINGLY — hero kickers + 404
     numeral only); Inter body for legibility. No proportional fonts mixed
     with the body. */
  --display: 'VT323', 'Press Start 2P', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --heading: 'Inter', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --micro: 'Inter', system-ui, -apple-system, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --content-maxw: 720px;
  --sidebar-w: 280px;

  /* Spacing — 4px base, 9 steps. */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: 6rem;

  /* Radii — sharp synthwave edges. */
  --radius-sm: 0;
  --radius-md: 2px;
  --radius-lg: 4px;

  /* Shadows — 1px rings with chromatic glow halos. */
  --shadow-sm: 0 0 0 1px var(--rule);
  --shadow-md: 0 0 0 1px var(--rule-strong), 0 0 20px rgba(255, 0, 110, 0.10);
  --shadow-lg: 0 0 0 1px var(--rule-strong), 0 0 32px rgba(255, 0, 110, 0.18), 0 0 64px rgba(0, 245, 255, 0.08);
}

/* Light fallback — soft lavender pastel. Per DESIGN.md §7 anti-pattern:
   never ship a dark-mode-only template. Glow + grid + scanline disabled;
   magenta + cyan preserved as accent ornaments only so the template's
   identity survives the mode flip. */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #FAF7FF;
    --bg-soft: #F0EAFF;
    --paper: #FFFFFF;
    --surface: #FFFFFF;
    --ink: #1A0B2E;
    --ink-soft: #3D2566;
    --muted: #6A5B8E;
    --muted-soft: #8A7BAE;
    --rule: #E0D6F0;
    --rule-soft: #EEE6FA;
    --rule-strong: #C8B8E0;
    --accent: #D6005E;
    --accent-soft: #FF4A95;
    --accent-bg: #FFE6F0;
    --cyan: #008B96;
    --cyan-soft: #00B8C5;
    --purple: #7A00B8;
    --purple-soft: #9A33D6;
    --sunset-1: #D6005E;
    --sunset-2: #E55A2B;
    --sunset-3: #7A00B8;
    --grid-line: transparent;
    --grid-line-soft: transparent;
    --glow-magenta: transparent;
    --glow-cyan: transparent;
    --error: #C8002E;
    --footer-bg: #1A0B2E;
    --footer-ink: #E8E8FF;
    --footer-ink-strong: #FFFFFF;
    --footer-muted: #9A8FBE;
    --shadow-sm: 0 0 0 1px var(--rule);
    --shadow-md: 0 1px 3px rgba(26, 11, 46, 0.10), 0 0 0 1px var(--rule);
    --shadow-lg: 0 4px 16px rgba(26, 11, 46, 0.12), 0 0 0 1px var(--rule);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  /* Subtle scanline overlay — <3% alpha so body type remains AA-legible.
     Pure CSS gradient, no image fetch. Disabled in light mode + reduced-motion. */
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 0, 110, 0.020) 0,
    rgba(255, 0, 110, 0.020) 1px,
    transparent 1px,
    transparent 3px
  );
  background-attachment: fixed;
}
@media (prefers-color-scheme: light) {
  body { background-image: none; }
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(255, 0, 110, 0.45);
  transition: color 0.2s ease-out, text-shadow 0.2s ease-out, text-decoration-color 0.2s ease-out;
}
a:hover {
  color: var(--cyan);
  text-decoration-color: var(--cyan);
  text-shadow: 0 0 8px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  a:hover { text-shadow: none; }
}
a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--rule); margin: var(--space-6) 0; }
code, pre, kbd, samp { font-family: var(--mono); }

/* Selection — hot magenta block. */
::selection { background: var(--accent); color: var(--bg); }

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px; left: 0;
  background: var(--accent);
  color: var(--bg);
  padding: var(--space-2) var(--space-4);
  text-decoration: none;
  z-index: 1000;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.skip-link:focus { top: 0; }

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

/* Shared utility — neon micro-label used in eyebrows and footer columns. */
.nd-eyebrow {
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1;
}

/* ---------- Site header ---------- */
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule-strong);
  position: relative;
  box-shadow: 0 1px 0 rgba(0, 245, 255, 0.10);
}
@media (prefers-color-scheme: light) {
  .site-header { box-shadow: none; }
}
.site-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.site-logo {
  font-family: var(--display);
  font-size: 1.625rem;
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 12px var(--glow-magenta);
}
@media (prefers-color-scheme: light) {
  .site-logo { text-shadow: none; }
}
.site-logo:hover {
  color: var(--cyan);
  text-shadow: 0 0 16px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  .site-logo:hover { text-shadow: none; }
}

/* CSS-only hamburger — checkbox-hack pattern. */
.nav-toggle { position: absolute; left: -9999px; }
.nav-toggle__button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: var(--space-2) var(--space-3);
  font-family: var(--micro);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  margin-left: auto;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease-out, color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.nav-toggle__button:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 12px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  .nav-toggle__button:hover { box-shadow: none; }
}
.nav-toggle__bar {
  width: 14px; height: 1px; background: currentColor;
}
.nav-toggle__bar + .nav-toggle__bar { display: none; }
.nav-toggle__label { font-weight: 600; }

.site-header__rail {
  display: none;
  width: 100%;
  flex-direction: column;
  gap: var(--space-3);
}
.nav-toggle:checked ~ .site-header .site-header__rail {
  display: flex;
}
.site-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-4);
}
.site-nav__link {
  color: var(--ink-soft);
  text-decoration: none;
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: var(--space-1) 0;
  letter-spacing: 0.02em;
  transition: color 0.2s ease-out, text-shadow 0.2s ease-out;
  border-bottom: 1px solid transparent;
}
.site-nav__link:hover { color: var(--cyan); text-shadow: 0 0 8px var(--glow-cyan); }
@media (prefers-color-scheme: light) {
  .site-nav__link:hover { text-shadow: none; }
}
.site-nav__link.is-active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

@media (min-width: 880px) {
  .nav-toggle__button { display: none; }
  .site-header__inner { flex-wrap: nowrap; }
  .site-header__rail {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    width: auto;
    gap: var(--space-5);
  }
  .site-nav__list { flex-wrap: nowrap; }
}

/* Header search */
.search-form { width: 100%; }
.search-form__row { display: flex; gap: var(--space-1); }
.search-form__input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  color: var(--ink);
  padding: var(--space-2) var(--space-3);
  font-family: var(--body);
  font-size: 0.875rem;
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.search-form__input::placeholder { color: var(--muted); }
.search-form__input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.25);
}
.search-form__button {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: var(--space-2) var(--space-3);
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.2s ease-out, border-color 0.2s ease-out, background 0.2s ease-out;
}
.search-form__button:hover {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
}
.search-form--header { max-width: 260px; }

/* ---------- Layout ---------- */
.layout {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-5) var(--space-4) var(--space-7);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 880px) {
  .layout {
    grid-template-columns: minmax(0, 1fr) var(--sidebar-w);
    gap: var(--space-7);
  }
}
.content { min-width: 0; }
.content > * + * { margin-top: var(--space-5); }

/* ---------- Hero (home) — sunset gradient + perspective grid horizon ----------
   The grid horizon is the load-bearing motif. Pure CSS: two layered
   repeating-linear-gradient (vertical + horizontal grid lines) on a
   transform: perspective() pseudo-element so the lines visually recede to
   a vanishing point at the horizon. Disabled in light mode + when
   prefers-reduced-motion is set (the transform is static, but the
   gradient lines feel kinetic and we honor the user's preference). */
.hero {
  position: relative;
  padding: var(--space-7) var(--space-4) var(--space-6);
  margin: calc(var(--space-5) * -1) calc(var(--space-4) * -1) var(--space-5);
  background: linear-gradient(
    180deg,
    var(--sunset-3) 0%,
    var(--sunset-1) 45%,
    var(--sunset-2) 75%,
    var(--bg) 100%
  );
  overflow: hidden;
  isolation: isolate;
}
@media (prefers-color-scheme: light) {
  .hero {
    background: linear-gradient(
      180deg,
      rgba(177, 0, 255, 0.10) 0%,
      rgba(255, 0, 110, 0.08) 50%,
      var(--bg) 100%
    );
  }
}
/* Perspective grid horizon — pure CSS, no images. The pseudo-element sits
   below the hero text via z-index and tilts away toward the vanishing
   point at the horizon line. */
.hero::before {
  content: '';
  position: absolute;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 55%;
  background-image:
    repeating-linear-gradient(
      to right,
      var(--grid-line) 0,
      var(--grid-line) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--grid-line) 0,
      var(--grid-line) 1px,
      transparent 1px,
      transparent 48px
    );
  transform: perspective(420px) rotateX(58deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, var(--bg) 0%, var(--bg) 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, var(--bg) 0%, var(--bg) 30%, transparent 100%);
  z-index: -1;
  pointer-events: none;
}
@media (prefers-color-scheme: light) {
  .hero::before { display: none; }
}
.hero__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: var(--space-5);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  filter: saturate(1.1);
  box-shadow: 0 8px 32px rgba(255, 0, 110, 0.25), 0 0 0 1px rgba(0, 245, 255, 0.20);
}
@media (prefers-color-scheme: light) {
  .hero__image { box-shadow: 0 4px 16px rgba(26, 11, 46, 0.15); }
}
.hero__kicker {
  margin: 0 0 var(--space-3);
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 12px var(--glow-cyan);
  line-height: 1;
}
@media (prefers-color-scheme: light) {
  .hero__kicker { text-shadow: none; }
}
.hero__title {
  margin: 0;
  font-family: var(--heading);
  font-weight: 800;
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-shadow:
    0 0 24px rgba(255, 0, 110, 0.55),
    0 0 48px rgba(177, 0, 255, 0.35);
}
@media (prefers-color-scheme: light) {
  .hero__title {
    color: var(--ink);
    text-shadow: none;
  }
}
.hero__tagline {
  margin: var(--space-4) 0 0;
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 60ch;
}
@media (prefers-color-scheme: light) {
  .hero__tagline { color: var(--ink-soft); }
}

/* Category hero variant — quieter, keeps the gradient but flattens it. */
.hero--category {
  padding: var(--space-6) var(--space-4) var(--space-5);
}
.hero--category .hero__title {
  font-size: clamp(1.75rem, 4.5vw, 2.75rem);
}

/* ---------- Section eyebrow ---------- */
.section-eyebrow {
  margin: 0 0 var(--space-2);
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1;
}

/* ---------- Article ---------- */
.article-header {
  padding: var(--space-2) 0 var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.article-title {
  margin: 0;
  font-family: var(--heading);
  font-weight: 800;
  font-size: clamp(1.75rem, 4.5vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--ink);
  text-shadow: 0 0 24px rgba(255, 0, 110, 0.18);
}
@media (prefers-color-scheme: light) {
  .article-title { text-shadow: none; }
}
.article-meta {
  margin-top: var(--space-3);
  font-size: 0.8125rem;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  letter-spacing: 0.02em;
}
.nd-article-meta__sep { color: var(--rule-strong); }
.article-meta__byline a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.article-meta__byline a:hover {
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 6px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  .article-meta__byline a:hover { text-shadow: none; }
}
.article-meta__category {
  color: var(--accent);
  text-decoration: none;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-md);
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 600;
  transition: border-color 0.2s ease-out, background 0.2s ease-out;
}
.article-meta__category:hover {
  border-color: var(--accent);
  background: var(--accent-bg);
}
.article-meta__format {
  color: var(--muted);
  border: 1px dashed var(--rule-strong);
  border-radius: var(--radius-md);
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.article-meta__time { font-variant-numeric: tabular-nums; }

/* Article hero band */
.nd-hero { margin: var(--space-3) 0 0; }
.nd-hero--article img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  filter: saturate(1.1);
  box-shadow: 0 4px 24px rgba(255, 0, 110, 0.15), 0 0 0 1px rgba(0, 245, 255, 0.10);
}
@media (prefers-color-scheme: light) {
  .nd-hero--article img { box-shadow: 0 2px 12px rgba(26, 11, 46, 0.12); }
}

/* Article body */
.article-body {
  font-family: var(--body);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.75;
  max-width: 70ch;
}
.article-body > * + * { margin-top: var(--space-4); }
.article-body h2 {
  margin-top: var(--space-6);
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(1.375rem, 3vw, 1.75rem);
  letter-spacing: -0.01em;
  color: var(--ink);
}
.article-body h2::before {
  content: '— ';
  color: var(--accent);
}
.article-body h3 {
  margin-top: var(--space-5);
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  color: var(--ink);
}
.article-body p { margin: 0; }
.article-body ul, .article-body ol { padding-left: 1.5rem; }
.article-body li { margin: var(--space-1) 0; }
.article-body blockquote {
  margin: 0;
  border-left: 3px solid var(--accent);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-soft);
  color: var(--ink-soft);
  font-style: italic;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}
.article-body code {
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  padding: 0.1rem 0.4rem;
  font-size: 0.875em;
  border-radius: var(--radius-md);
  color: var(--cyan);
}
.article-body pre {
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: var(--space-3);
  overflow-x: auto;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}
.article-body pre code {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--ink);
}
.article-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 0, 110, 0.45);
}
.article-body--intro { max-width: 70ch; }

/* ---------- Post list ---------- */
.post-list { margin-top: var(--space-5); }
.post-list__heading {
  margin: 0 0 var(--space-4);
  font-family: var(--display);
  font-size: 1.5rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1;
}
.post-list__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}
.post-list__item {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule);
  transition: padding-left 0.2s ease-out;
}
.post-list__item:first-child { border-top: 0; padding-top: 0; }
.post-list__item:hover {
  padding-left: var(--space-2);
}
@media (prefers-reduced-motion: reduce) {
  .post-list__item:hover { padding-left: 0; }
}
.post-list__title {
  margin: 0;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.post-list__title a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out, text-shadow 0.2s ease-out;
}
.post-list__title a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 12px var(--glow-magenta);
}
@media (prefers-color-scheme: light) {
  .post-list__title a:hover { text-shadow: none; }
}
.post-list__excerpt {
  margin: var(--space-2) 0 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
  max-width: 70ch;
}
.post-list__more-row {
  margin: var(--space-3) 0 0;
}
.post-list__more {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--cyan);
  text-decoration: none;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease-out, text-shadow 0.2s ease-out;
}
.post-list__more:hover {
  border-bottom-color: var(--cyan);
  text-shadow: 0 0 8px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  .post-list__more:hover { text-shadow: none; }
}
.post-list__pagination {
  margin-top: var(--space-5);
  color: var(--muted);
  font-size: 0.875rem;
}
.post-list__pagination a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid var(--rule-strong);
}
.post-list__pagination a:hover { border-bottom-color: var(--cyan); }
.post-list__older {
  display: inline-block;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: var(--space-2) var(--space-5);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: background 0.2s ease-out, color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.post-list__older:hover {
  background: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px var(--glow-magenta);
}
@media (prefers-color-scheme: light) {
  .post-list__older:hover { box-shadow: none; }
}

/* Category index hero band */
.nd-cathero { margin: 0 0 var(--space-4); }
.nd-cathero__img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  filter: saturate(1.1);
}

/* ---------- Sitemap ---------- */
.sitemap-section {
  padding: var(--space-5) 0;
  border-top: 1px solid var(--rule);
}
.sitemap-section:first-of-type { border-top: 0; padding-top: 0; }
.sitemap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
}
@media (min-width: 640px) {
  .sitemap-list { grid-template-columns: 1fr 1fr; }
}
.sitemap-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}
.sitemap-list a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }

/* ---------- 404 — synthwave-glow numeral ---------- */
.nd-404 {
  padding: var(--space-6) 0 var(--space-5);
  border-bottom: 1px solid var(--rule);
}
.nd-404__numeral {
  margin: 0 0 var(--space-3);
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(4rem, 14vw, 8rem);
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--accent);
  text-shadow:
    0 0 16px var(--glow-magenta),
    0 0 32px rgba(0, 245, 255, 0.35),
    0 0 56px rgba(177, 0, 255, 0.30);
}
@media (prefers-color-scheme: light) {
  .nd-404__numeral { text-shadow: none; }
}
.nd-404__header { padding: var(--space-2) 0 var(--space-4); }
.nd-404__title {
  margin: var(--space-2) 0 var(--space-3);
  font-family: var(--heading);
  font-weight: 700;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  color: var(--ink);
}
.nd-404__path-block {
  margin: 0 0 var(--space-4);
  padding: var(--space-3);
  background: var(--paper);
  border: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 0.875rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-all;
  border-radius: var(--radius-md);
}
.nd-404__path-block strong {
  color: var(--accent);
  font-weight: 600;
}
.nd-404__lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
  max-width: 60ch;
  line-height: 1.6;
}
.nd-404__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin: var(--space-4) 0;
}
.nd-404__cta {
  display: inline-block;
  border: 1px solid var(--rule-strong);
  padding: var(--space-2) var(--space-5);
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease-out, color 0.2s ease-out, background 0.2s ease-out, box-shadow 0.2s ease-out;
}
.nd-404__cta--primary {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.nd-404__cta--primary:hover {
  box-shadow: 0 0 20px var(--glow-magenta);
}
@media (prefers-color-scheme: light) {
  .nd-404__cta--primary:hover { box-shadow: none; }
}
.nd-404__cta--ghost {
  color: var(--cyan);
  border-color: var(--rule-strong);
}
.nd-404__cta--ghost:hover {
  color: var(--cyan);
  border-color: var(--cyan);
  box-shadow: 0 0 16px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  .nd-404__cta--ghost:hover { box-shadow: none; }
}
.nd-404__search {
  margin: var(--space-4) 0;
  padding: var(--space-3);
  border: 1px solid var(--rule);
  background: var(--paper);
  border-radius: var(--radius-md);
}
.nd-404__search-label {
  display: block;
  margin-bottom: var(--space-2);
  font-family: var(--display);
  font-size: 1rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nd-404__search-row { display: flex; gap: var(--space-1); }
.nd-404__search-input {
  flex: 1;
  background: var(--bg-soft);
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: var(--space-2) var(--space-3);
  font-family: var(--body);
  font-size: 0.9375rem;
  outline: none;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.nd-404__search-input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(0, 245, 255, 0.25);
}
.nd-404__search-button {
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink);
  padding: var(--space-2) var(--space-4);
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: color 0.2s ease-out, border-color 0.2s ease-out, background 0.2s ease-out;
}
.nd-404__search-button:hover {
  color: var(--bg);
  background: var(--cyan);
  border-color: var(--cyan);
}
.nd-404__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.nd-404__chip {
  border: 1px solid var(--rule-strong);
  padding: var(--space-1) var(--space-3);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease-out, color 0.2s ease-out;
}
.nd-404__chip:hover { color: var(--cyan); border-color: var(--cyan); }
.nd-404__feed { margin-top: var(--space-6); }

/* ---------- Browse-by-category card grid (home) ---------- */
.nd-cats {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--rule);
}
.nd-cats__heading {
  margin: 0 0 var(--space-5);
  font-family: var(--display);
  font-size: 1.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1;
  text-shadow: 0 0 12px var(--glow-cyan);
}
@media (prefers-color-scheme: light) {
  .nd-cats__heading { text-shadow: none; }
}
.nd-cats__grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
@media (min-width: 600px) { .nd-cats__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .nd-cats__grid { grid-template-columns: 1fr 1fr 1fr; } }
.nd-cat-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s ease-out, transform 0.2s ease-out, box-shadow 0.2s ease-out;
  position: relative;
  overflow: hidden;
}
/* Hover halo — magenta-cyan duotone glow on the border, plus a 1px lift. */
.nd-cat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 0, 110, 0.30), 0 0 0 1px var(--cyan);
}
@media (prefers-color-scheme: light) {
  .nd-cat-card:hover {
    border-color: var(--accent);
    box-shadow: 0 4px 16px rgba(26, 11, 46, 0.15);
  }
}
@media (prefers-reduced-motion: reduce) {
  .nd-cat-card:hover { transform: none; }
}
.nd-cat-card__link {
  display: block;
  padding: var(--space-5);
  color: var(--ink);
  text-decoration: none;
}
.nd-cat-card__name {
  margin: 0;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 1.1875rem;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.nd-cat-card__desc {
  margin: var(--space-2) 0 0;
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.nd-cat-card__cta {
  display: inline-block;
  margin-top: var(--space-4);
  font-family: var(--display);
  font-size: 1.0625rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---------- Sidebar ---------- */
.sidebar { min-width: 0; }
.sidebar > * + * { margin-top: var(--space-5); }
.sidebar-box {
  padding: var(--space-5);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
}
.sidebar-box__title {
  margin: 0 0 var(--space-3);
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--rule);
  line-height: 1;
}
.sidebar-box__empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}
.sidebar-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.sidebar-list li {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  font-size: 0.9375rem;
}
.sidebar-list li::before {
  content: '▸';
  color: var(--accent);
  font-size: 0.6875rem;
  flex-shrink: 0;
  margin-top: 0.2em;
}
.sidebar-list a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}
.sidebar-list a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.sidebar-list--archive li { justify-content: space-between; }
.sidebar-list__count {
  font-size: 0.75rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  margin-left: var(--space-1);
}
.sidebar-more {
  display: inline-block;
  margin-top: var(--space-3);
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease-out;
}
.sidebar-more:hover { border-bottom-color: var(--cyan); }
.about-box__body {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { font-size: 0.8125rem; color: var(--muted); letter-spacing: 0.04em; }
.breadcrumbs__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.breadcrumbs__item { display: inline-flex; align-items: center; }
.breadcrumbs__item + .breadcrumbs__item::before {
  content: '→';
  color: var(--accent);
  margin: 0 0.5rem;
}
.breadcrumbs__item a {
  color: var(--cyan);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
.breadcrumbs__item a:hover { border-bottom-color: var(--cyan); }
.breadcrumbs__item--current { color: var(--ink-soft); }

/* ---------- Author archive bio ---------- */
.author-bio {
  margin: var(--space-3) 0 0;
  color: var(--ink-soft);
  max-width: 60ch;
  font-size: 1rem;
  line-height: 1.65;
}
.author-bio p { margin: 0; }
.author-bio p + p { margin-top: var(--space-3); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  margin-top: var(--space-8);
  border-top: 1px solid var(--rule-strong);
  padding: var(--space-7) 0 var(--space-4);
  font-size: 0.9375rem;
  position: relative;
}
/* Footer top accent — magenta-to-cyan gradient hairline. */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--sunset-3) 0%, var(--sunset-1) 50%, var(--cyan) 100%);
}
.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--space-4);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}
@media (min-width: 720px) {
  .site-footer__inner { grid-template-columns: 2fr 1fr 1fr 1fr; }
}
.footer-col__heading {
  margin: 0 0 var(--space-3);
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  line-height: 1;
}
.footer-col__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.footer-col__list a {
  color: var(--footer-ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease-out, border-color 0.2s ease-out;
}
.footer-col__list a:hover { color: var(--cyan); border-bottom-color: var(--cyan); }
.footer-col__body, .footer-col__empty {
  margin: 0;
  color: var(--footer-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}
.site-footer__base {
  max-width: var(--maxw);
  margin: var(--space-5) auto 0;
  padding: var(--space-3) var(--space-4) 0;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: space-between;
  font-size: 0.8125rem;
  color: var(--footer-muted);
  letter-spacing: 0.02em;
}
.site-footer__copy, .site-footer__credit { margin: 0; }
.site-footer__credit { color: var(--cyan); }

/* Print */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .sidebar, .nav-toggle__button { display: none; }
  a { color: #000; text-decoration: underline; }
  .hero { background: none; padding: 0; margin: 0; }
  .hero::before { display: none; }
  .hero__title { color: #000; text-shadow: none; }
}

/* ---------- Loader (nd-loader) ----------
   Per-template wait state shown while the orchestrator loads a missing-but-
   allowed page. Standalone — does NOT compose with the full site shell, so
   the rules here re-establish body/layout/type from the same vocabulary the
   rest of the template uses (synthwave gradient, magenta-cyan duotone glow,
   VT323 display, Inter body, sharp edges).

   Spinner: a pure-CSS rotating ring with a magenta-to-cyan conic gradient,
   gated behind prefers-reduced-motion. Reduced-motion users still see the
   static ring with neon edges so the loader feels alive.

   Error variant swaps the spinner for a static [!] glyph in error color.
   No meta-refresh on the error page. */
.nd-loader-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 0, 110, 0.020) 0,
    rgba(255, 0, 110, 0.020) 1px,
    transparent 1px,
    transparent 3px
  );
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}
@media (prefers-color-scheme: light) {
  .nd-loader-body { background-image: none; }
}
/* Loader page also gets the perspective grid horizon — sets the synthwave
   mood as soon as the page paints. */
.nd-loader-body::before {
  content: '';
  position: fixed;
  left: -10%;
  right: -10%;
  bottom: 0;
  height: 40%;
  background-image:
    repeating-linear-gradient(
      to right,
      var(--grid-line) 0,
      var(--grid-line) 1px,
      transparent 1px,
      transparent 48px
    ),
    repeating-linear-gradient(
      to bottom,
      var(--grid-line) 0,
      var(--grid-line) 1px,
      transparent 1px,
      transparent 48px
    );
  transform: perspective(420px) rotateX(58deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, var(--bg) 0%, var(--bg) 30%, transparent 100%);
  -webkit-mask-image: linear-gradient(to top, var(--bg) 0%, var(--bg) 30%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}
@media (prefers-color-scheme: light) {
  .nd-loader-body::before { display: none; }
}
.nd-loader {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6) var(--space-4);
  position: relative;
  z-index: 1;
}
.nd-loader__card {
  width: 100%;
  max-width: 520px;
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-6) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: relative;
}
.nd-loader__kicker {
  margin: 0;
  font-family: var(--display);
  font-size: 1.125rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--rule);
  line-height: 1;
}
.nd-loader__row {
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-family: var(--body);
  font-size: 1.0625rem;
}
/* Spinner — pure CSS rotating ring with magenta-cyan conic gradient.
   The static look in reduced-motion is still a magenta ring so the loader
   feels intentional, not broken. */
.nd-loader__spinner {
  display: inline-block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    conic-gradient(
      from 0deg,
      var(--accent) 0%,
      var(--cyan) 50%,
      var(--purple) 100%
    );
  mask: radial-gradient(circle at center, transparent 0 11px, black 12px);
  -webkit-mask: radial-gradient(circle at center, transparent 0 11px, black 12px);
  animation: nd-loader-spin 1.2s linear infinite;
  box-shadow: 0 0 20px var(--glow-magenta);
}
@media (prefers-color-scheme: light) {
  .nd-loader__spinner { box-shadow: none; }
}
@keyframes nd-loader-spin {
  to { transform: rotate(360deg); }
}
.nd-loader__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 2px solid var(--error);
  color: var(--error);
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1;
}
.nd-loader__message {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
}
.nd-loader__hint {
  margin: 0;
  font-family: var(--body);
  font-size: 0.875rem;
  color: var(--muted);
}
.nd-loader__actions { margin: var(--space-2) 0 0; }
.nd-loader__link {
  font-family: var(--body);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--bg);
  background: var(--accent);
  text-decoration: none;
  border: 1px solid var(--accent);
  padding: var(--space-2) var(--space-5);
  display: inline-block;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-md);
  transition: box-shadow 0.2s ease-out, background 0.2s ease-out;
}
.nd-loader__link:hover {
  box-shadow: 0 0 20px var(--glow-magenta);
}
@media (prefers-color-scheme: light) {
  .nd-loader__link:hover { box-shadow: none; }
}
.nd-loader__path {
  margin: var(--space-2) 0 0;
  padding: var(--space-3);
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: var(--ink-soft);
  word-break: break-all;
  border-radius: var(--radius-md);
}
.nd-loader__path-inner {
  color: var(--cyan);
}
.nd-loader__card--error { border-color: var(--error); }
.nd-loader__card--error .nd-loader__spinner { display: none; }

@media (max-width: 520px) {
  .nd-loader__card { padding: var(--space-5) var(--space-4); }
  .nd-loader__row { font-size: 0.9375rem; }
}

@media (prefers-reduced-motion: reduce) {
  .nd-loader__spinner { animation: none; }
  .nd-loader__link { transition: none; }
  .post-list__item { transition: none; }
  a { transition: none; }
}
