/* ─────────────────────────────────────────────────────────────────────────────
   Sovereign Terminal — main.css
   Design system from DESIGN.md / code.html
   ───────────────────────────────────────────────────────────────────────────── */

/* ── 1. Design Tokens ─────────────────────────────────────────────────────── */
:root {
  /* Surface stack */
  --surface: #131313;
  --surface-dim: #131313;
  --surface-bright: #393939;
  --surface-container-lowest: #0e0e0e;
  --surface-container-low: #1c1b1b;
  --surface-container: #201f1f;
  --surface-container-high: #2a2a2a;
  --surface-container-highest: #353534;
  --surface-variant: #353534;
  --surface-tint: #3ce42f;

  /* On-surface */
  --on-surface: #e5e2e1;
  --on-surface-variant: #c4c6cc;
  --inverse-surface: #e5e2e1;
  --inverse-on-surface: #313030;

  /* Primary — Market Green */
  --primary: #3ce42f;
  --on-primary: #003a00;
  --primary-container: #002000;
  --on-primary-container: #009802;
  --primary-fixed: #77ff62;
  --primary-fixed-dim: #3ce42f;
  --on-primary-fixed: #002200;
  --on-primary-fixed-variant: #005300;
  --inverse-primary: #006e01;

  /* Secondary — Sovereign Gold */
  --secondary: #e9c176;
  --on-secondary: #412d00;
  --secondary-container: #604403;
  --on-secondary-container: #dab36a;
  --secondary-fixed: #ffdea5;
  --secondary-fixed-dim: #e9c176;
  --on-secondary-fixed: #261900;
  --on-secondary-fixed-variant: #5d4201;

  /* Tertiary — Editorial Navy */
  --tertiary: #bbc6e2;
  --on-tertiary: #263046;
  --tertiary-container: #0f1a2e;
  --on-tertiary-container: #78839c;
  --tertiary-fixed: #d7e2ff;
  --tertiary-fixed-dim: #bbc6e2;
  --on-tertiary-fixed: #101b30;
  --on-tertiary-fixed-variant: #3c475d;

  /* Error */
  --error: #ffb4ab;
  --on-error: #690005;
  --error-container: #93000a;
  --on-error-container: #ffdad6;

  /* Outline */
  --outline: #8e9196;
  --outline-variant: #44474c;

  /* Background */
  --background: #131313;
  --on-background: #e5e2e1;

  /* Typography */
  --font-headline: "Newsreader", Georgia, serif;
  --font-body: "Work Sans", system-ui, sans-serif;
  --font-label: "Inter", system-ui, sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border radius */
  --radius-sm: 0.125rem;
  --radius-md: 0.25rem;
  --radius-lg: 0.5rem;
  --radius-full: 9999px;

  /* Nav height */
  --nav-h: 64px;
  --topbar-h: 34px;
  --header-h: calc(var(--nav-h) + var(--topbar-h));

  /* Hairline rules — the dense-grid layout leans on these instead of cards */
  --rule: rgba(68, 71, 76, 0.28);
  --rule-strong: rgba(68, 71, 76, 0.5);
}

/* ── 2. Reset & Base ──────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--surface);
  color: var(--on-surface);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--secondary);
}
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}
ul,
ol {
  list-style: none;
}
h1,
h2,
h3,
h4,
h5 {
  font-family: var(--font-headline);
  line-height: 1.15;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ── 3. Layout Utilities ──────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1440px;
  margin-inline: auto;
  padding-inline: var(--space-8);
}

.container--narrow {
  max-width: 860px;
}

.section-pad {
  padding-block: var(--space-20);
}

/* ── 4. Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition:
    filter 0.15s ease,
    transform 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  filter: brightness(1.12);
}
.btn:active {
  transform: scale(0.97);
}

.btn--primary {
  background-color: var(--primary);
  color: var(--on-primary);
}

.btn--primary:hover {
  background-color: #30d124;
  color: var(--on-primary);
  filter: none;
}

.btn--secondary {
  background-color: var(--secondary-container);
  color: var(--on-secondary-container);
}

.btn--ghost {
  background: transparent;
  color: var(--tertiary);
  border: 1px solid rgba(68, 71, 76, 0.4);
}

/* ── 5. Chips / Tags ──────────────────────────────────────────────────────── */
.chip {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  background-color: var(--tertiary-container);
  color: var(--tertiary);
  transition: background-color 0.15s;
}

.chip:hover {
  background-color: var(--primary-container);
  color: var(--primary);
}

/* ── 6. Navigation ────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: var(--surface-container-lowest);
  border-bottom: 1px solid var(--rule);
}

/* Tier 1 — utility strip */
.topbar {
  border-bottom: 1px solid var(--rule);
  background: var(--surface-container-lowest);
}

.topbar__inner {
  max-width: 1440px;
  margin-inline: auto;
  height: var(--topbar-h);
  padding-inline: var(--space-8);
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topbar__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--primary);
  flex-shrink: 0;
}

.topbar__date {
  color: var(--on-surface-variant);
  padding-left: var(--space-6);
  border-left: 1px solid var(--rule);
  flex-shrink: 0;
}

.topbar__tagline {
  margin-left: auto;
  color: rgba(196, 198, 204, 0.55);
  letter-spacing: 0.1em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Tier 2 — masthead */
.nav-primary {
  width: 100%;
}

.nav-inner {
  max-width: 1440px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  height: var(--nav-h);
  padding-inline: var(--space-8);
  gap: var(--space-10);
}

.site-logo {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--secondary);
  flex-shrink: 0;
  letter-spacing: -0.03em;
}

.nav-menu {
  margin-right: auto;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}

.nav-list a {
  position: relative;
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  padding-block: 0.35rem;
  transition: color 0.15s;
}

.nav-list li.current-menu-item > a,
.nav-list a:hover {
  color: var(--on-surface);
}

/* Underline grows from the left instead of a static border */
.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.22s ease;
}

.nav-list a:hover::after,
.nav-list li.current-menu-item > a::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
  flex-shrink: 0;
}

.nav-cta {
  padding: 0.55rem 1.15rem;
  font-size: 0.68rem;
}

/* Custom logo */
.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Height is customizer-driven; --logo-h is printed inline by st_customizer_css() */
.custom-logo {
  max-height: var(--logo-h, 40px);
  width: auto;
  display: block;
}

/* Hamburger — always last child, right-aligned on mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
  margin-left: auto;
}
.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--on-surface-variant);
  border-radius: 2px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── 7. Hero — split editorial / broadcast console ────────────────────────── */
.site-main--terminal {
  padding-top: var(--header-h);
}

.hero--split {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* No bottom padding: the ticker closes the section flush against its edge. */
  padding-block: var(--space-16) 0;

  /* Cursor position, updated from JS; centred until the pointer arrives */
  --mx: 50%;
  --my: 40%;
}


/* ── Hero backdrop layers ─────────────────────────────────────────────────── */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* 1. Plot grid — faint chart ruling */
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(142, 145, 150, 0.07) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(142, 145, 150, 0.07) 1px, transparent 1px);
  background-size: 64px 64px;
  /* Fade the ruling out toward the edges so it never fights the content */
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 40%, #000 40%, transparent 100%);
}

/* 2. Cursor reveal — the same grid in accent green, unmasked only near the pointer */
.hero__bg-reveal {
  position: absolute;
  inset: 0;
  opacity: 0;
  background-image:
    linear-gradient(to right, rgba(60, 228, 47, 0.42) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(60, 228, 47, 0.42) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(circle 200px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.28) 42%, transparent 68%);
  mask-image: radial-gradient(circle 200px at var(--mx) var(--my), #000 0%, rgba(0, 0, 0, 0.28) 42%, transparent 68%);
  transition: opacity 0.4s ease;
}

.hero--split.is-hovered .hero__bg-reveal {
  opacity: 1;
}

/* Soft green bloom trailing the cursor */
.hero__bg-glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle 260px at var(--mx) var(--my), rgba(60, 228, 47, 0.09) 0%, transparent 70%);
  transition: opacity 0.4s ease;
}

.hero--split.is-hovered .hero__bg-glow {
  opacity: 1;
}

/* 3. Scan sweep — radar-style band travelling downward.
   The band sits at the layer's top edge, so a 0 → 100% translate crosses
   exactly the hero's height. Because it moves DOWN, the bright leading edge
   must be at the BOTTOM of the band with the trail fading up behind it. */
.hero__bg-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0,
    rgba(60, 228, 47, 0.025) 100px,
    rgba(60, 228, 47, 0.06) 137px,
    rgba(60, 228, 47, 0.28) 140px,
    transparent 141px
  );
  transform: translateY(-140px);
  animation: hero-scan 9s linear infinite;
}

@keyframes hero-scan {
  0% {
    transform: translateY(-140px);
  }
  100% {
    transform: translateY(100%);
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-16);
  align-items: start;
  padding-bottom: var(--space-16);
}

.hero__content {
  min-width: 0;
}

/* Broadcast console — the image is now a contained element, not a backdrop */
.hero__console {
  position: relative;
  min-width: 0;
  background: var(--surface-container-low);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  /* Accent ring is drawn with box-shadow rather than the border: the base
     border uses a var() rgba that doesn't reliably transition in-place. */
  box-shadow: 0 0 0 0 rgba(60, 228, 47, 0);
  transition: box-shadow 0.35s ease;
}

.hero__console.is-playing {
  box-shadow:
    0 0 0 1px rgba(60, 228, 47, 0.45),
    0 0 24px -6px rgba(60, 228, 47, 0.35);
}

/* Instrument-panel corner brackets */
/* `color` drives the borders via currentColor, so the border shorthands in the
   corner rules below can't reset it. */
.hero__bracket {
  position: absolute;
  width: 24px;
  height: 24px;
  z-index: 2;
  pointer-events: none;
  color: var(--secondary);
  opacity: 0.8;
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
}

.hero__bracket--tl {
  top: 12px;
  left: 12px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
  border-top-left-radius: 3px;
}

.hero__bracket--br {
  right: 12px;
  bottom: 12px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  border-bottom-right-radius: 3px;
}

.hero__console:hover .hero__bracket {
  opacity: 1;
}

.hero__console.is-playing .hero__bracket {
  color: var(--primary);
  opacity: 1;
}

.hero__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
}

.hero__media-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 19, 19, 0.92) 0%, rgba(19, 19, 19, 0.15) 55%, transparent 100%);
}

/* Overlay strip: category left, transport state right */
.hero__media-meta {
  position: absolute;
  left: var(--space-5);
  right: var(--space-5);
  bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}

.hero__media-label {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--secondary);
}

.hero__media-live {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(14, 14, 14, 0.72);
  border: 1px solid var(--rule);
  backdrop-filter: blur(4px);
}

.hero__media-state {
  font-family: var(--font-label);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
  white-space: nowrap;
}

.is-playing .hero__media-state {
  color: var(--primary);
}

/* Equaliser — flat while idle, animating during playback */
.hero__eq {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
}

.hero__eq i {
  display: block;
  width: 2px;
  height: 20%;
  background: var(--outline);
  transition: background-color 0.2s;
}

.is-playing .hero__eq i {
  background: var(--primary);
  animation: eq-bounce 0.9s ease-in-out infinite;
}

.is-playing .hero__eq i:nth-child(2) {
  animation-delay: 0.15s;
}
.is-playing .hero__eq i:nth-child(3) {
  animation-delay: 0.3s;
}
.is-playing .hero__eq i:nth-child(4) {
  animation-delay: 0.45s;
}

@keyframes eq-bounce {
  0%,
  100% {
    height: 20%;
  }
  50% {
    height: 100%;
  }
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--primary-container);
  color: var(--primary);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-family: var(--font-label);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: var(--space-6);
}

.badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(60, 228, 47, 0.6);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(60, 228, 47, 0);
  }
}

.hero__title {
  font-family: var(--font-headline);
  font-size: clamp(2rem, 3.4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
  text-wrap: balance;
}

.hero__title-accent {
  color: var(--secondary);
}

.hero__title a {
  color: inherit;
}
.hero__title a:hover {
  color: var(--on-surface);
}

.hero__excerpt {
  font-size: 1.2rem;
  color: var(--on-surface-variant);
  max-width: 640px;
  margin-bottom: var(--space-6);
  line-height: 1.55;
}

/* Episode facts — scannable data row in place of a prose block */
.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-8);
  padding-block: var(--space-5);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-5);
}

.hero__fact-label {
  font-family: var(--font-label);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: 0.3rem;
}

.hero__fact-val {
  font-family: var(--font-label);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--on-surface);
  margin: 0;
}

/* Synopsis — short lede, full text behind a toggle */
.hero__about {
  max-width: 640px;
}

.hero__about-text {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--on-surface-variant);
}

.hero__about-more .hero__about-text {
  margin-top: var(--space-3);
}

.hero__about-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: 0;
  background: none;
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  transition: color 0.15s;
}

.hero__about-toggle:hover {
  color: var(--primary-fixed);
}

.hero__about-toggle-icon {
  transition: transform 0.2s ease;
}

.hero__about-toggle[aria-expanded="true"] .hero__about-toggle-icon {
  transform: rotate(180deg);
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-8);
}

.hero__author {
  color: var(--on-surface);
  font-weight: 600;
}

/* ── Podcast Player — scrubber over a centred transport ──────────────────── */
.hero__player {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-5);
  border-top: 1px solid var(--rule);
  background: var(--surface-container-lowest);
}

/* Transport row */
.player__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-5);
  position: relative;
}

.player__play-btn {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(60, 228, 47, 0.4);
  transition:
    filter 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.25s ease;
}

.player__play-btn:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 0 6px rgba(60, 228, 47, 0.12);
}
.player__play-btn:active {
  transform: scale(0.95);
}

/* Skip buttons — icon paired with a legible interval label */
.player__skip {
  flex-shrink: 0;
  height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding-inline: 0.6rem;
  border-radius: var(--radius-full);
  background: transparent;
  color: var(--on-surface-variant);
  transition:
    color 0.15s,
    background-color 0.15s;
}

.player__skip:hover {
  color: var(--on-surface);
  background: var(--surface-container-high);
}

.player__skip-num {
  font-family: var(--font-label);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

/* Rewind reads outward-in: "15 ◁" — forward stays "▷ 30" */
#player-back .player__skip-num {
  order: -1;
}

/* Speed toggle — parked at the right edge of the transport row */
.player__rate {
  position: absolute;
  right: 0;
  min-width: 40px;
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-md);
  background: var(--surface-container-high);
  color: var(--on-surface-variant);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  transition:
    color 0.15s,
    background-color 0.15s;
}

.player__rate:hover {
  color: var(--primary);
  background: var(--primary-container);
}

.player__play-btn .icon-pause {
  display: none;
}
.player__play-btn.is-playing .icon-play {
  display: none;
}
.player__play-btn.is-playing .icon-pause {
  display: block;
}

.player__track {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.player__times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--on-surface-variant);
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
}

/* Generous hit area; the visible rail is drawn with ::before */
.player__bar {
  position: relative;
  height: 18px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.player__bar::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  height: 5px;
  background: var(--surface-container-highest);
  border-radius: var(--radius-full);
}

.player__bar:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: var(--radius-full);
}

/* Buffered-ahead range */
.player__bar-buffer {
  position: absolute;
  left: 0;
  height: 5px;
  width: 0%;
  background: var(--surface-variant);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
}

.player__bar-fill {
  position: absolute;
  left: 0;
  height: 5px;
  background: var(--primary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(60, 228, 47, 0.45);
}

/* Knob rides the end of the fill; grows on hover/scrub */
.player__bar-knob {
  position: absolute;
  right: 0;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(50%, -50%) scale(0);
  transition: transform 0.15s ease;
  box-shadow: 0 0 0 3px rgba(19, 19, 19, 0.9);
}

.player__bar:hover .player__bar-knob,
.player__bar:focus-visible .player__bar-knob,
.player__bar.is-scrubbing .player__bar-knob {
  transform: translate(50%, -50%) scale(1);
}

.player__bar.is-scrubbing .player__bar-fill {
  transition: none;
}

/* ── 8. Market Ticker — persistent data rail under the masthead ───────────── */
.ticker {
  position: relative;
  z-index: 1; /* clears the hero's z-index:-1 backdrop layers */
  display: flex;
  align-items: stretch;
  background: var(--surface-container-lowest);
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
  white-space: nowrap;
}

/* Accent-bloom rule separating the ticker from the hero content above it */
.ticker::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  z-index: 2;
  background: linear-gradient(to right, var(--rule) 0%, rgba(60, 228, 47, 0.35) 50%, var(--rule) 100%);
}

/* Fixed label — stays put while the values scroll past it */
.ticker__tag {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding-inline: var(--space-5);
  background: var(--primary);
  color: var(--on-primary);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ticker__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding-block: 0.6rem;
}

.ticker__track {
  display: inline-flex;
  animation: marquee 35s linear infinite;
}

@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(var(--ticker-to, -50%));
  }
}

.ticker__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-right: 2.25rem;
  padding-right: 2.25rem;
  border-right: 1px solid var(--rule);
}

.ticker__label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.ticker__val {
  font-family: var(--font-label);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--on-surface);
  font-variant-numeric: tabular-nums;
}

.ticker__delta {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.ticker__delta--up {
  color: var(--primary);
}
.ticker__delta--down {
  color: var(--error);
}

/* ── 9. Editorial Grid & Sidebar Newsletter ─────────────────────────────── */
.editorial-grid {
  border-bottom: 1px solid var(--rule);
}

.editorial-grid__inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto;
  gap: var(--space-12);
}

/* Vertical rule separating main column from the sidebar rail */
@media (min-width: 1025px) {
  .editorial-grid__sidebar {
    padding-left: var(--space-12);
    border-left: 1px solid var(--rule);
  }
}

/* Section heading with a rule that fills the remaining width */
.rail-heading {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.rail-heading--tight {
  margin-bottom: var(--space-6);
}

.rail-heading__text {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--secondary);
  white-space: nowrap;
  margin: 0;
}

.rail-heading__rule {
  flex: 1;
  height: 1px;
  background: var(--rule);
}

/* Sidebar newsletter sits below the sidebar panel */
.sidebar-newsletter__inner {
  background: var(--surface-container-low);
  border: 1px solid var(--rule);
  border-left: 2px solid var(--primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-6);
}

.sidebar-newsletter__heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--on-surface);
  margin: 0 0 var(--space-2);
}

.sidebar-newsletter__sub {
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  margin: 0 0 var(--space-4);
  line-height: 1.5;
}

.sidebar-newsletter__inner .newsletter-form {
  display: flex;
  flex-direction: column;
  max-width: 100%;
  width: 100%;
  gap: var(--space-2);
  box-sizing: border-box;
}

.sidebar-newsletter__inner .newsletter-form__input {
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  flex: none;
}

.sidebar-newsletter__inner .newsletter-form__btn {
  display: flex;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  min-width: 0;
  white-space: normal;
}

/* All cards base */
.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  cursor: pointer;
  margin-bottom: 0;
}

.post-card__thumb-link {
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
}
.post-card__thumb {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  transition: transform 0.6s ease;
}
.post-card:hover .post-card__thumb {
  transform: scale(1.03);
}

/* Featured — horizontal split rather than a stacked hero card */
.post-card--featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: var(--space-8);
  align-items: center;
  padding-bottom: var(--space-10);
  border-bottom: 1px solid var(--rule);
}

.post-card--featured .post-card__thumb {
  height: 300px;
}

.post-card--featured .post-card__title {
  font-family: var(--font-headline);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

/* Secondary rows: numbered index list, hairlines instead of cards */
.editorial-grid__secondary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: var(--space-8);
}

.editorial-grid__secondary .post-card {
  display: grid;
  grid-template-columns: 2.5rem 96px 1fr;
  gap: var(--space-5);
  align-items: center;
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

.editorial-grid__secondary .post-card:last-child {
  border-bottom: none;
}

.post-card__index {
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--outline);
  font-variant-numeric: tabular-nums;
  transition: color 0.15s;
}

.editorial-grid__secondary .post-card:hover .post-card__index {
  color: var(--primary);
}

.editorial-grid__secondary .post-card__thumb {
  height: 68px;
}

/* Cards without a thumbnail must not leave a 96px hole */
.editorial-grid__secondary .post-card:not(:has(.post-card__thumb-link)) {
  grid-template-columns: 2.5rem 1fr;
}

.post-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.post-card__title {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  transition: color 0.15s;
}
.post-card:hover .post-card__title {
  color: var(--secondary);
}

.post-card__excerpt {
  color: var(--on-surface-variant);
  font-size: 1.05rem;
  line-height: 1.6;
  max-width: 700px;
}

.post-card__meta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

/* ── 10. Sidebar ──────────────────────────────────────────────────────────── */
.editorial-grid__sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.sidebar-panel {
  background: transparent;
  border-radius: 0;
  padding: 0;
}

.sidebar-panel__heading {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-weight: 700;
  border-bottom: 1px solid var(--rule);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-6);
}

/* Counter rail — each item numbered to echo the main column */
.sidebar-panel {
  counter-reset: side-idx;
}

.side-article {
  position: relative;
  counter-increment: side-idx;
  padding-left: var(--space-8);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--rule);
}

.side-article::before {
  content: counter(side-idx, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15rem;
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--outline);
  font-variant-numeric: tabular-nums;
  transition: color 0.15s;
}

.side-article:hover::before {
  color: var(--primary);
}
.side-article:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.side-article__title {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-2);
}

.side-article__title a:hover {
  color: var(--secondary);
}

.side-article__time {
  font-family: var(--font-label);
  font-size: 0.7rem;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── 11. Section Heading ──────────────────────────────────────────────────── */
.section-heading {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-10);
}

/* ── 12. Post Grid / Tiles — hairline cells, no card fills ────────────────── */
.post-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-bottom: var(--space-10);
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}

.post-grid--3 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.post-tile {
  background: transparent;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  overflow: hidden;
  transition: background-color 0.2s;
}
.post-tile:hover {
  background: var(--surface-container-low);
}

.post-tile__thumb-link {
  display: block;
  overflow: hidden;
}
.post-tile__thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.post-tile:hover .post-tile__thumb {
  transform: scale(1.04);
}

.post-tile__body {
  padding: var(--space-5);
}

.post-tile__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-bottom: var(--space-3);
}

.post-tile__title {
  font-family: var(--font-headline);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-2);
  transition: color 0.15s;
}
.post-tile:hover .post-tile__title {
  color: var(--secondary);
}

.post-tile__date,
.post-tile__meta {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--on-surface-variant);
}

.post-tile__excerpt {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  line-height: 1.5;
  margin-bottom: var(--space-3);
  -webkit-line-clamp: 3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-tile__meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

/* ── 13. Pagination ───────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: var(--space-12);
}

.pagination .nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-md);
  background: var(--surface-container);
  font-family: var(--font-label);
  font-size: 0.85rem;
  color: var(--on-surface-variant);
  transition: background-color 0.15s;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
  background: var(--primary-container);
  color: var(--primary);
}

.pagination-wrap {
  text-align: center;
  margin-top: var(--space-10);
}

/* ── 14. Single Post ──────────────────────────────────────────────────────── */
.single-main,
.page-main,
.archive-main,
.error-main {
  padding-top: var(--header-h);
  padding-bottom: var(--space-24);
}

/* Two-column layout: article + sidebar */
.single-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-12);
  align-items: start;
}

.single-main-col {
  min-width: 0;
}

.single-article {
  min-width: 0;
}

.single-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
  position: sticky;
  top: calc(var(--header-h) + var(--space-8));
}

.article-header {
  padding-block: var(--space-16) var(--space-10);
}

.article-header__chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.article-header__title {
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-5);
}

.article-header__excerpt {
  font-size: 1.2rem;
  color: var(--on-surface-variant);
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: var(--space-6);
}

.article-header__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

.article-header__author {
  color: var(--on-surface);
  font-weight: 600;
}

.article-hero {
  margin-bottom: var(--space-12);
}
.article-hero__img {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 500px;
  object-fit: cover;
}
.article-hero__caption {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  margin-top: var(--space-3);
  text-align: center;
}

/* Entry content typography */
.entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--on-surface);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  font-family: var(--font-headline);
  margin-top: var(--space-10);
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
}

.entry-content h2 {
  font-size: 1.8rem;
}
.entry-content h3 {
  font-size: 1.4rem;
}
.entry-content h4 {
  font-size: 1.15rem;
}

.entry-content p {
  margin-bottom: var(--space-5);
}

.entry-content a {
  color: var(--secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-8) 0;
  color: var(--on-surface-variant);
  font-size: 1.15rem;
  background: var(--surface-container-low);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.entry-content ul,
.entry-content ol {
  padding-left: var(--space-6);
  margin-bottom: var(--space-5);
}
.entry-content li {
  margin-bottom: var(--space-2);
}
.entry-content ul li {
  list-style-type: disc;
}
.entry-content ol li {
  list-style-type: decimal;
}

.entry-content code {
  font-size: 0.875em;
  background: var(--surface-container-highest);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
}

.entry-content pre {
  background: var(--surface-container-lowest);
  padding: var(--space-6);
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin-bottom: var(--space-6);
  font-size: 0.875rem;
}

.entry-content hr {
  border: none;
  border-top: 1px solid rgba(68, 71, 76, 0.25);
  margin: var(--space-10) 0;
}

.entry-content figure {
  margin: var(--space-8) 0;
}
.entry-content figcaption {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  text-align: center;
  margin-top: var(--space-2);
}

/* Article navigation */
.article-nav {
  display: flex;
  gap: var(--space-8);
  margin-top: var(--space-16);
  padding-top: var(--space-8);
  border-top: 1px solid rgba(68, 71, 76, 0.2);
}

.article-nav__prev,
.article-nav__next {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.article-nav__next {
  text-align: right;
}

.article-nav__label {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-surface-variant);
}

.article-nav__link {
  font-family: var(--font-headline);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--on-surface);
  transition: color 0.15s;
}
.article-nav__link:hover {
  color: var(--secondary);
}

/* Related posts */
.related-posts {
  margin-top: var(--space-16);
}

.related-posts__heading {
  font-family: var(--font-headline);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-8);
}

/* ── 15. Archive ──────────────────────────────────────────────────────────── */
.archive-header {
  padding-block: var(--space-12) var(--space-10);
}

.archive-header__eyebrow {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--secondary);
  margin-bottom: var(--space-3);
}

.archive-header__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-4);
}

.archive-header__desc {
  font-size: 1.1rem;
  color: var(--on-surface-variant);
  max-width: 600px;
  line-height: 1.6;
}

/* ── 16. Static Page ──────────────────────────────────────────────────────── */
.page-header {
  padding-block: var(--space-12) var(--space-8);
}

.page-header__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
}

.page-header__updated {
  font-family: var(--font-label);
  font-size: 0.8rem;
  color: var(--on-surface-variant);
}

.page-hero {
  margin-bottom: var(--space-10);
}
.page-hero__img {
  width: 100%;
  border-radius: var(--radius-md);
  max-height: 400px;
  object-fit: cover;
}

.page-content {
  /* inherits .entry-content */
}

/* ── 17. 404 ──────────────────────────────────────────────────────────────── */
.error-main {
  display: flex;
  align-items: center;
}

.error-page {
  text-align: center;
  padding-block: var(--space-24);
  max-width: 600px;
  margin-inline: auto;
}

.error-page__code {
  font-family: var(--font-headline);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--surface-container-highest), var(--surface-variant));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-4);
}

.error-page__title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: var(--space-5);
  letter-spacing: -0.03em;
}

.error-page__desc {
  font-size: 1.1rem;
  color: var(--on-surface-variant);
  margin-bottom: var(--space-10);
  line-height: 1.6;
}

.error-page__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-16);
}

.error-page__actions .search-form {
  display: flex;
  gap: var(--space-3);
}

.error-page__actions input[type="search"] {
  background: var(--surface-container);
  border: 1px solid rgba(68, 71, 76, 0.2);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  color: var(--on-surface);
  font-family: var(--font-body);
  min-width: 260px;
}

.error-page__actions button[type="submit"] {
  background: var(--primary);
  color: var(--on-primary);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-5);
  font-family: var(--font-label);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-recent__heading {
  font-family: var(--font-headline);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: var(--space-5);
}

.error-recent__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  text-align: left;
}

.error-recent__list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(68, 71, 76, 0.15);
}

.error-recent__list a {
  font-family: var(--font-headline);
  font-weight: 600;
  color: var(--on-surface);
  transition: color 0.15s;
  line-height: 1.3;
}
.error-recent__list a:hover {
  color: var(--secondary);
}

.error-recent__list time {
  font-family: var(--font-label);
  font-size: 0.75rem;
  color: var(--on-surface-variant);
  flex-shrink: 0;
}

/* ── 18. No Results ───────────────────────────────────────────────────────── */
.no-results,
.no-posts {
  text-align: center;
  padding: var(--space-16);
  color: var(--on-surface-variant);
  font-size: 1.1rem;
}

/* ── 19. Footer ───────────────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface-container-lowest);
  border-top: 1px solid var(--rule);
}

/* Newsletter — full-bleed strip across the top of the footer */
.footer-cta {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  background: var(--surface-container-low);
}

/* Faint plot grid tying the strip back to the hero backdrop */
.footer-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(142, 145, 150, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(142, 145, 150, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 15% 50%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 100% at 15% 50%, #000 0%, transparent 75%);
}

.footer-cta__inner {
  position: relative;
  max-width: 1440px;
  margin-inline: auto;
  padding: var(--space-16) var(--space-8);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: var(--space-16);
  align-items: center;
}

.footer-cta__copy {
  min-width: 0;
}

.footer-cta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: var(--space-4);
}

.footer-cta__heading {
  font-family: var(--font-headline);
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--on-surface);
  margin-bottom: var(--space-4);
  text-wrap: balance;
}

.footer-cta__heading-accent {
  color: var(--secondary);
}

.footer-cta__sub {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--on-surface-variant);
  max-width: 440px;
  margin-bottom: var(--space-5);
}

/* Benefit points — inline, rule-separated */
.footer-cta__points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3) var(--space-5);
}

.footer-cta__points li {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--on-surface-variant);
}

/* Green check preceding each point */
.footer-cta__points li::before {
  content: "";
  width: 12px;
  height: 7px;
  margin-right: var(--space-2);
  border-left: 2px solid var(--primary);
  border-bottom: 2px solid var(--primary);
  transform: rotate(-45deg) translateY(-2px);
  flex-shrink: 0;
}

/* Form panel — bordered card, distinct from the copy */
.footer-cta__form {
  min-width: 0;
  background: var(--surface-container-lowest);
  border: 1px solid var(--rule);
  border-top: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}

.footer-cta__form .newsletter-form {
  display: block;
  max-width: none;
  width: 100%;
}

.newsletter-form__label {
  display: block;
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--outline);
  margin-bottom: var(--space-3);
}

.newsletter-form__row {
  display: flex;
  gap: var(--space-3);
}

.newsletter-form__row .newsletter-form__input {
  flex: 1;
  min-width: 0;
}

.footer-cta__privacy {
  margin-top: var(--space-3);
  font-family: var(--font-label);
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  color: rgba(196, 198, 204, 0.5);
}

/* Link deck */
.footer-inner {
  max-width: 1440px;
  margin-inline: auto;
  padding: var(--space-16) var(--space-8);
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--space-16);
}

.footer-brand__name {
  display: block;
  font-family: var(--font-headline);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--secondary);
  margin-bottom: var(--space-4);
}

/* Customizer logo standing in for the wordmark */
.footer-brand__logo {
  margin-bottom: var(--space-4);
}

.footer-brand__logo .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.footer-brand__logo .custom-logo {
  max-height: 44px;
  width: auto;
  opacity: 0.92;
  transition: opacity 0.15s;
}

.footer-brand__logo .custom-logo-link:hover .custom-logo {
  opacity: 1;
}

.footer-brand__desc {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--on-surface-variant);
  max-width: 380px;
  margin-bottom: var(--space-5);
}

.footer-brand__status {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

/* Newsletter */
.newsletter-form {
  display: flex;
  gap: var(--space-3);
  max-width: 420px;
}

.newsletter-form__input {
  flex: 1;
  background: var(--surface-container);
  border: 1px solid rgba(68, 71, 76, 0.2);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  color: var(--on-surface);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: box-shadow 0.15s;
}

.newsletter-form__input:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--primary);
}

.newsletter-form__input::placeholder {
  color: rgba(196, 198, 204, 0.4);
}

.newsletter-form__btn {
  border-radius: var(--radius-md);
}

.newsletter-form__msg {
  margin-top: var(--space-3);
  font-family: var(--font-label);
  font-size: 0.85rem;
}

.newsletter-form__msg--success {
  color: var(--primary);
}
.newsletter-form__msg--error {
  color: var(--error);
}

/* Footer links */
.footer-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
  align-content: start;
}

.footer-col__heading {
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--secondary);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
  border-bottom: 1px solid var(--rule);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.footer-col__list a {
  font-size: 0.9rem;
  color: var(--on-surface-variant);
  transition: color 0.15s;
}
.footer-col__list a:hover {
  color: var(--primary);
}

/* Footer bottom bar */
.footer-bottom {
  max-width: 1440px;
  margin-inline: auto;
  padding: var(--space-5) var(--space-8);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer-copy {
  font-family: var(--font-label);
  font-size: 0.7rem;
  color: rgba(196, 198, 204, 0.5);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer-copy a {
  color: inherit;
}

.footer-legal {
  display: flex;
  gap: var(--space-8);
}

.footer-legal a {
  font-family: var(--font-label);
  font-size: 0.65rem;
  color: var(--on-surface-variant);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  transition: color 0.15s;
}
.footer-legal a:hover {
  color: var(--on-surface);
}

/* ── 19b. Bento — category desks ──────────────────────────────────────────── */
.bento {
  padding-block: var(--space-20);
  border-bottom: 1px solid var(--rule);
}

.bento__head {
  margin-bottom: var(--space-8);
}

.bento__intro {
  font-size: 0.95rem;
  color: var(--on-surface-variant);
  margin-top: var(--space-3);
}

/* Asymmetric grid. Desks 1 and 4 are "wide", 2 and 3 "tall", and the column
   ratio flips between rows so the emphasis runs diagonally rather than
   stacking in a predictable 2x2. */
.bento__grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: var(--space-6);
  align-items: stretch;
}

/* Row 1: wide desk in the 1.35fr column. Row 2: the emphasis crosses over, so
   the wide desk takes the right-hand track and the grid reads diagonally. */
.bento__grid > .bento-desk:nth-child(1) {
  grid-area: 1 / 1;
}
.bento__grid > .bento-desk:nth-child(2) {
  grid-area: 1 / 2;
}
.bento__grid > .bento-desk:nth-child(3) {
  grid-area: 2 / 1;
}
.bento__grid > .bento-desk:nth-child(4) {
  grid-area: 2 / 2;
}

/* ── Desk shell ───────────────────────────────────────────────────────────── */
.bento-desk {
  --desk: var(--primary);
  --desk-dim: rgba(60, 228, 47, 0.14);

  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-5);
  background: var(--surface-container-low);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition:
    border-color 0.25s ease,
    background-color 0.25s ease;
}

/* Accent edge — the category's colour, brightening on hover */
.bento-desk::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 2px;
  background: var(--desk);
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

.bento-desk:hover {
  border-color: var(--desk-dim);
  background: var(--surface-container);
}

.bento-desk:hover::before {
  opacity: 1;
}

/* Per-category accents. Green / gold / navy come straight from the palette;
   Investing borrows the error-family salmon so all four stay in-family. */
.bento-desk--stock {
  --desk: var(--primary);
  --desk-dim: rgba(60, 228, 47, 0.14);
}

.bento-desk--politics {
  --desk: var(--secondary);
  --desk-dim: rgba(233, 193, 118, 0.16);
}

.bento-desk--business {
  --desk: var(--tertiary);
  --desk-dim: rgba(187, 198, 226, 0.16);
}

.bento-desk--investing {
  --desk: var(--error);
  --desk-dim: rgba(255, 180, 171, 0.16);
}

/* ── Desk header ──────────────────────────────────────────────────────────── */
.bento-desk__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  margin-bottom: var(--space-4);
  border-bottom: 1px solid var(--rule);
}

.bento-desk__cat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-label);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--desk);
  transition: opacity 0.15s;
}

.bento-desk__cat:hover {
  color: var(--desk);
  opacity: 0.75;
}

.bento-desk__cat-bar {
  width: 3px;
  height: 12px;
  border-radius: 1px;
  background: var(--desk);
  flex-shrink: 0;
}

.bento-desk__count {
  font-family: var(--font-label);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--outline);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ── Lead post ────────────────────────────────────────────────────────────── */
.bento-lead {
  display: block;
  margin-bottom: var(--space-4);
}

.bento-lead__media {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
}

.bento-lead__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.bento-lead__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(19, 19, 19, 0.55) 0%, transparent 55%);
}

.bento-desk:hover .bento-lead__img {
  transform: scale(1.04);
}

/* Crop follows the column, not the source order. Desks 1 and 3 occupy the
   wide (1.35fr) track and take a letterbox ratio so tall artwork can't
   dominate; desks 2 and 4 sit in the narrow track and can afford 16:9. */
.bento__grid > .bento-desk:nth-child(1) .bento-lead__media,
.bento__grid > .bento-desk:nth-child(3) .bento-lead__media {
  aspect-ratio: 21 / 9;
}

.bento__grid > .bento-desk:nth-child(2) .bento-lead__media,
.bento__grid > .bento-desk:nth-child(4) .bento-lead__media {
  aspect-ratio: 16 / 9;
}

.bento-lead__title {
  font-family: var(--font-headline);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--on-surface);
  margin-bottom: var(--space-2);
  transition: color 0.15s;
}

.bento__grid > .bento-desk:nth-child(1) .bento-lead__title,
.bento__grid > .bento-desk:nth-child(3) .bento-lead__title {
  font-size: 1.5rem;
}

.bento-lead:hover .bento-lead__title {
  color: var(--desk);
}

.bento-lead__date {
  font-family: var(--font-label);
  font-size: 0.68rem;
  color: var(--on-surface-variant);
}

/* ── Secondary headline list ──────────────────────────────────────────────── */
.bento-desk__list {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding-top: var(--space-3);
}

.bento-desk__list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-3);
  border-bottom: 1px solid var(--rule);
}

.bento-desk__list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Marker echoes the category colour on hover */
.bento-desk__list a {
  position: relative;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--on-surface-variant);
  transition: color 0.15s;
}

.bento-desk__list li:hover a {
  color: var(--on-surface);
}

.bento-desk__ago {
  font-family: var(--font-label);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--outline);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── 20. WordPress core alignment helpers ─────────────────────────────────── */
.alignleft {
  float: left;
  margin: 0 var(--space-6) var(--space-4) 0;
}
.alignright {
  float: right;
  margin: 0 0 var(--space-4) var(--space-6);
}
.aligncenter {
  display: block;
  margin-inline: auto;
}
.alignwide {
  margin-inline: calc(-1 * var(--space-8));
}
.alignfull {
  margin-inline: calc(-50vw + 50%);
  width: 100vw;
  max-width: 100vw;
}
.wp-caption {
  max-width: 100%;
}
.wp-caption-text {
  font-size: 0.8rem;
  color: var(--on-surface-variant);
  margin-top: var(--space-2);
  text-align: center;
}

/* ── 21. Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .post-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 1024px) {
  /* Even 2x2: the fractional asymmetry stops reading at this width */
  .bento__grid {
    grid-template-columns: 1fr 1fr;
  }

  .bento__grid > .bento-desk:nth-child(1) .bento-lead__media,
  .bento__grid > .bento-desk:nth-child(4) .bento-lead__media,
  .bento__grid > .bento-desk:nth-child(2) .bento-lead__media,
  .bento__grid > .bento-desk:nth-child(3) .bento-lead__media {
    aspect-ratio: 16 / 10;
  }

  .bento__grid > .bento-desk:nth-child(1) .bento-lead__title,
  .bento__grid > .bento-desk:nth-child(3) .bento-lead__title {
    font-size: 1.25rem;
  }

  .editorial-grid__inner {
    grid-template-columns: 1fr;
  }
  .editorial-grid__sidebar {
    display: none;
  } /* hidden on tablet, show on ≥1025 */

  /* Hero stacks: console above the copy reads better than a squeezed split */
  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-10);
  }

  .footer-inner,
  .footer-cta__inner {
    grid-template-columns: 1fr;
  }

  .post-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .topbar__tagline {
    display: none;
  }
}

@media (max-width: 768px) {
  :root {
    --space-20: 3rem;
    --space-16: 2.5rem;
  }

  .container {
    padding-inline: var(--space-5);
  }

  .nav-inner {
    padding-inline: var(--space-5);
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--surface-container-low);
    padding: var(--space-6) var(--space-5);
    z-index: 99;
    border-bottom: 1px solid var(--rule);
  }

  .nav-menu.is-open {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }

  /* Underline animation is a pointer affordance — drop it in the mobile drawer */
  .nav-list a::after {
    display: none;
  }

  /* Stacked hero: a shorter console keeps the transport nearer the fold */
  .hero__media {
    aspect-ratio: 16 / 9;
  }

  .nav-toggle {
    display: flex;
  }

  /* CTA lives in the drawer's place on mobile; the hamburger takes priority */
  .nav-cta {
    display: none;
  }

  .topbar__inner {
    justify-content: center;
    gap: var(--space-4);
    padding-inline: var(--space-5);
  }

  .topbar__date {
    padding-left: var(--space-4);
  }

  /* Bento stacks: release the explicit grid-areas or they'd hold a 2x2 */
  .bento__grid {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .bento__grid > .bento-desk:nth-child(1),
  .bento__grid > .bento-desk:nth-child(2),
  .bento__grid > .bento-desk:nth-child(3),
  .bento__grid > .bento-desk:nth-child(4) {
    grid-area: auto;
  }

  .bento__grid > .bento-desk .bento-lead__media {
    aspect-ratio: 16 / 9;
  }

  .bento-desk {
    padding: var(--space-4);
  }

  /* Featured card unstacks from its horizontal split */
  .post-card--featured {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .post-card--featured .post-card__thumb {
    height: 220px;
  }

  /* Index rows drop the thumbnail column, keep the number */
  .editorial-grid__secondary .post-card,
  .editorial-grid__secondary .post-card:not(:has(.post-card__thumb-link)) {
    grid-template-columns: 2rem 1fr;
    gap: var(--space-4);
  }

  .editorial-grid__secondary .post-card__thumb-link {
    display: none;
  }

  .ticker__tag {
    padding-inline: var(--space-4);
  }

  .post-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    grid-template-columns: 1fr 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .newsletter-form,
  .newsletter-form__row {
    flex-direction: column;
  }
  .newsletter-form__input,
  .newsletter-form__btn {
    width: 100%;
  }

  .editorial-grid__inner,
  .single-layout {
    grid-template-columns: 1fr;
  }

  .single-sidebar {
    position: static;
  }

  .editorial-grid__secondary {
    grid-template-columns: 1fr;
  }

  .article-nav {
    flex-direction: column;
  }

  .error-page__actions {
    padding-inline: var(--space-4);
  }
  .error-page__actions .search-form {
    flex-wrap: wrap;
  }
  .error-page__actions input[type="search"] {
    min-width: 0;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero--split {
    padding-block: var(--space-10) 0;
  }

  .hero__grid {
    padding-bottom: var(--space-10);
  }

  /* Keep the console short so the transport stays within reach on phones */
  .hero__media {
    aspect-ratio: 16 / 9;
  }

  .hero__player {
    padding: var(--space-4);
    gap: var(--space-4);
  }

  /* Facts wrap to two columns rather than a cramped single row */
  .hero__facts {
    gap: var(--space-4) var(--space-6);
  }

  .hero__fact {
    flex: 1 1 40%;
  }

  /* Speed control rejoins the flow so it can't collide with the skip buttons */
  .player__transport {
    gap: var(--space-4);
  }

  .player__rate {
    position: static;
  }

  .player__play-btn {
    width: 48px;
    height: 48px;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  /* Motion-driven hero decoration: remove rather than freeze mid-sweep.
     The static grid and brackets stay. */
  .hero__bg-scan,
  .hero__bg-reveal,
  .hero__bg-glow {
    display: none;
  }
}

