/* ==========================================================================
   BeaconLight Research — Bespoke Editorial & Research Lab Design System
   Aesthetic: Stripe Press × Anthropic Research × Quanta Magazine × Linear
   Themes: Observatory Obsidian (dark default) & Archival Vellum (light)
   ========================================================================== */

:root {
  /* Observatory Obsidian (Dark — Default) */
  --bg: #07090d;
  --bg-elevated: #0d1017;
  --bg-surface: #111520;
  --bg-surface-hover: #161c2a;
  --bg-glass: rgba(11, 14, 21, 0.78);
  --bg-code: #0a0d14;

  --text: #f3eee4;
  --text-secondary: #b6afa2;
  --text-muted: #7f796e;

  --border: rgba(243, 238, 228, 0.10);
  --border-strong: rgba(243, 238, 228, 0.20);
  --border-accent: rgba(229, 169, 60, 0.42);

  --gold: #e5a93c;
  --gold-bright: #f6cf7b;
  --gold-soft: rgba(229, 169, 60, 0.12);
  --gold-glow: rgba(229, 169, 60, 0.24);

  --emerald: #34d399;
  --emerald-soft: rgba(52, 211, 153, 0.12);
  --rose: #fb7185;
  --rose-soft: rgba(251, 113, 133, 0.12);
  --cyan: #67e8f9;
  --cyan-soft: rgba(103, 232, 249, 0.11);

  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.55);
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.32);

  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --container: 1240px;
  --prose: 720px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] {
  /* Archival Vellum (Light — Museum Monograph) */
  --bg: #f6f2e9;
  --bg-elevated: #fbf9f3;
  --bg-surface: #efeadd;
  --bg-surface-hover: #e7e0cf;
  --bg-glass: rgba(246, 242, 233, 0.86);
  --bg-code: #ece6d8;

  --text: #14161c;
  --text-secondary: #47443d;
  --text-muted: #706b61;

  --border: rgba(20, 22, 28, 0.11);
  --border-strong: rgba(20, 22, 28, 0.22);
  --border-accent: rgba(162, 108, 16, 0.45);

  --gold: #a66c10;
  --gold-bright: #8a5608;
  --gold-soft: rgba(166, 108, 16, 0.10);
  --gold-glow: rgba(166, 108, 16, 0.18);

  --emerald: #0d8a5f;
  --emerald-soft: rgba(13, 138, 95, 0.10);
  --rose: #be2346;
  --rose-soft: rgba(190, 35, 70, 0.10);
  --cyan: #0e7490;
  --cyan-soft: rgba(14, 116, 144, 0.10);

  --shadow-lg: 0 20px 50px rgba(20, 22, 28, 0.10);
  --shadow-sm: 0 6px 18px rgba(20, 22, 28, 0.06);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.87em;
  background: var(--bg-code);
  border: 1px solid var(--border);
  padding: 0.12em 0.38em;
  border-radius: 4px;
}

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

/* ---------- Layout Containers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.prose-container {
  width: 100%;
  max-width: var(--prose);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 32px);
}

/* ---------- Reading Progress Bar ---------- */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  z-index: 120;
  transition: width 0.08s linear;
}

/* ---------- Masthead Top Architectural Strip ---------- */
.masthead-strip {
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.masthead-strip-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
  padding: 6px 0;
  flex-wrap: wrap;
}

.masthead-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.masthead-meta strong {
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.12em;
}

.masthead-sep {
  opacity: 0.35;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 11px;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.status-pill:hover {
  border-color: var(--border-accent);
  color: var(--text);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-soft);
  flex-shrink: 0;
}

/* ---------- Primary Navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 600;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 1px solid var(--border-accent);
}

.brand-name {
  font-family: var(--font-serif);
  font-size: 1.22rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.brand-name span {
  color: var(--gold);
  font-style: italic;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s var(--ease);
  position: relative;
  padding: 4px 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
}

.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1.5px;
  background: var(--gold);
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  transition: all 0.2s var(--ease);
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.nav-doi-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--border-accent);
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-family: var(--font-mono);
  font-size: 11.5px;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-doi-pill:hover {
  transform: translateY(-1px);
  background: var(--gold-glow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: transform 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease), color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--gold);
  color: #090b10;
  font-weight: 600;
}

[data-theme="light"] .btn-primary {
  color: #fbf9f3;
}

.btn-primary:hover {
  background: var(--gold-bright);
  box-shadow: 0 8px 24px var(--gold-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--border-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
  padding: 8px 14px;
  font-size: 0.84rem;
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* ---------- Eyebrows & Section Headers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.eyebrow-num {
  color: var(--text-muted);
}

.section {
  padding: clamp(64px, 8vw, 108px) 0;
  border-top: 1px solid var(--border);
}

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.6vw, 2.95rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}

.section-title em {
  font-style: italic;
  color: var(--gold-bright);
}

.section-lead {
  margin: 0;
  max-width: 62ch;
  color: var(--text-secondary);
  font-size: 1.02rem;
  line-height: 1.65;
}

/* ==========================================================================
   BESPOKE ARCHITECTURAL HERO + 3D SIMPLICIAL-BOOK SCULPTURE
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(44px, 6vw, 76px) 0 clamp(48px, 6vw, 72px);
  background:
    radial-gradient(ellipse 80% 60% at 72% 38%, rgba(229, 169, 60, 0.08), transparent 65%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(103, 232, 249, 0.04), transparent 60%);
}

[data-theme="light"] .hero {
  background:
    radial-gradient(ellipse 80% 60% at 72% 38%, rgba(166, 108, 16, 0.09), transparent 65%),
    radial-gradient(ellipse 60% 50% at 15% 80%, rgba(14, 116, 144, 0.05), transparent 60%);
}

/* Subtle atmospheric hero-banner blend */
.hero-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  opacity: 0.14;
  filter: saturate(0.75) contrast(1.08);
  mask-image: radial-gradient(ellipse 85% 85% at 68% 45%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 85% 85% at 68% 45%, #000 10%, transparent 78%);
}

[data-theme="light"] .hero-backdrop img {
  opacity: 0.08;
  filter: saturate(0.5) contrast(1.05);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}

.hero-copy {
  position: relative;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.55rem, 4.9vw, 4.35rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.03em;
  margin: 0 0 22px;
}

.hero-title em {
  font-style: italic;
  color: var(--gold-bright);
}

.hero-subtitle {
  font-size: clamp(1.02rem, 1.3vw, 1.14rem);
  line-height: 1.68;
  color: var(--text-secondary);
  max-width: 54ch;
  margin: 0 0 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

/* Precision Metric Rail inside Hero */
.hero-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero-metric {
  padding: 16px 14px 16px 0;
  border-right: 1px solid var(--border);
  padding-left: 14px;
}

.hero-metric:first-child {
  padding-left: 0;
}

.hero-metric:last-child {
  border-right: none;
  padding-right: 0;
}

.hero-metric-val {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 5px;
  font-variant-numeric: tabular-nums;
}

.hero-metric-val .accent {
  color: var(--gold-bright);
}

.hero-metric-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* Interactive 3D Sculpture Stage */
.sculpture-stage {
  position: relative;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(160deg, rgba(17, 21, 32, 0.88), rgba(7, 9, 13, 0.94));
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3.55;
  min-height: 410px;
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .sculpture-stage {
  background:
    linear-gradient(160deg, rgba(251, 249, 243, 0.92), rgba(235, 229, 214, 0.96));
}

.sculpture-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
}

.sculpture-canvas:active {
  cursor: grabbing;
}

.sculpture-hud-top {
  position: absolute;
  top: 14px;
  left: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  pointer-events: none;
}

.hud-tag {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
}

.hud-mode-switch {
  display: inline-flex;
  pointer-events: auto;
  background: var(--bg-glass);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 2px;
  backdrop-filter: blur(10px);
}

.hud-mode-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 4px 9px;
  border-radius: 4px;
  transition: all 0.2s var(--ease);
}

.hud-mode-btn.is-active {
  background: var(--gold-soft);
  color: var(--gold-bright);
}

.sculpture-hud-bottom {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}

.spectrum-readout {
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.spectrum-readout .spec-title {
  color: var(--gold-bright);
  font-weight: 600;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.spectrum-readout .spec-hl {
  color: var(--emerald);
}

.spectrum-readout .spec-warn {
  color: var(--rose);
}

.hud-hint {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  padding: 4px 8px;
  border-radius: 4px;
}

/* ==========================================================================
   SECTION 01 — FLAGSHIP EDITORIAL DISPATCH / BLOG FEATURE
   ========================================================================== */
.dispatch-feature {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: clamp(28px, 4vw, 56px);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  padding: clamp(28px, 4vw, 44px) 0;
  align-items: start;
}

.dispatch-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.dispatch-pill {
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--gold-soft);
  color: var(--gold-bright);
  border: 1px solid var(--border-accent);
  font-weight: 500;
}

.dispatch-headline {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 3.8vw, 3.25rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}

.dispatch-headline a:hover {
  color: var(--gold-bright);
}

.dispatch-dek {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.55;
  color: var(--text-secondary);
  margin: 0 0 22px;
  max-width: 54ch;
}

.dispatch-pullquote {
  margin: 0 0 24px;
  padding: 16px 0 16px 20px;
  border-left: 2px solid var(--gold);
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.62;
  color: var(--text);
}

.dispatch-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.dispatch-byline {
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.dispatch-byline strong {
  color: var(--text);
}

/* Dual-Voice Dialogue Preview Card (Drew <-> GUS) */
.dialogue-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
}

.dialogue-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dialogue-stream {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.voice-turn {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border-left: 2.5px solid var(--border-strong);
  background: var(--bg-surface);
}

.voice-turn.voice-drew {
  border-left-color: var(--gold);
}

.voice-turn.voice-gus {
  border-left-color: var(--emerald);
}

.voice-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.voice-drew .voice-label {
  color: var(--gold-bright);
}

.voice-gus .voice-label {
  color: var(--emerald);
}

.voice-turn p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.voice-turn p strong {
  color: var(--text);
}

.dialogue-panel-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   SECTION 02 — SPLIT-PANE RESEARCH LEDGER (ZERO CARD SOUP)
   ========================================================================== */
.filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11.5px;
  transition: all 0.2s var(--ease);
}

.filter-pill:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-pill.is-active {
  background: var(--gold-soft);
  border-color: var(--border-accent);
  color: var(--gold-bright);
}

.ledger-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
}

.ledger-list {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.ledger-list-head {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

.ledger-row {
  appearance: none;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 20px 22px;
  color: inherit;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 14px;
  transition: background 0.18s var(--ease), border-color 0.18s var(--ease);
  position: relative;
}

.ledger-row:last-child {
  border-bottom: none;
}

.ledger-row::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: transparent;
  transition: background 0.18s var(--ease);
}

.ledger-row:hover {
  background: var(--bg-surface);
}

.ledger-row.is-active {
  background: var(--bg-surface);
}

.ledger-row.is-active::before {
  background: var(--gold);
}

.ledger-row.is-hidden {
  display: none;
}

.ledger-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  padding-top: 3px;
}

.ledger-row.is-active .ledger-code {
  color: var(--gold-bright);
}

.ledger-row-title {
  font-family: var(--font-serif);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.28;
  margin: 0 0 8px;
  color: var(--text);
}

.ledger-row-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge-amber {
  background: var(--gold-soft);
  color: var(--gold-bright);
  border-color: var(--border-accent);
}

.badge-green {
  background: var(--emerald-soft);
  color: var(--emerald);
  border-color: rgba(52, 211, 153, 0.28);
}

.badge-rose {
  background: var(--rose-soft);
  color: var(--rose);
  border-color: rgba(251, 113, 133, 0.30);
}

/* Right Pane: Paper Inspection Chamber */
.ledger-inspector {
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
  background: var(--bg-elevated);
}

.inspector-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.inspector-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inspector-doi {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gold-bright);
}

.inspector-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
  margin: 14px 0 12px;
}

.inspector-summary {
  margin: 0 0 18px;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.65;
}

.formula-box {
  background: var(--bg-code);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius-sm);
  padding: 15px 18px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.65;
  margin-bottom: 18px;
  overflow-x: auto;
}

.formula-box .dim {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.formula-box .hl {
  color: var(--gold-bright);
  font-weight: 600;
}

.inspector-highlights {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.inspector-highlights li {
  margin-bottom: 8px;
}

.inspector-highlights strong {
  color: var(--text);
}

.inspector-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.receipt-panel {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
}

.receipt-label {
  color: var(--text-secondary);
  flex-shrink: 0;
}

.receipt-hash {
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.copy-btn {
  border: 1px solid var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 3px 9px;
  border-radius: 4px;
  flex-shrink: 0;
  transition: all 0.15s var(--ease);
}

.copy-btn:hover {
  border-color: var(--border-accent);
  color: var(--gold-bright);
}

/* ==========================================================================
   SECTION 03 — INTERACTIVE 15-SECOND NAPKIN VERIFIER (ELEVATED)
   ========================================================================== */
.napkin-shell {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.napkin-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  border-bottom: 1px solid var(--border);
}

.matrix-card {
  padding: clamp(24px, 3vw, 34px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.matrix-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.matrix-display {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 1.08rem;
  padding: 18px 20px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.matrix-brackets {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 8px;
  padding: 10px 14px;
  border-left: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 4px;
}

.matrix-cell {
  text-align: center;
  padding: 6px 0;
  border-radius: 4px;
  font-variant-numeric: tabular-nums;
  color: var(--text-secondary);
}

.matrix-cell.diag {
  background: var(--gold-soft);
  color: var(--gold-bright);
  font-weight: 600;
}

.napkin-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.83rem;
  color: var(--text-secondary);
}

.napkin-step {
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  line-height: 1.5;
}

.napkin-step strong {
  color: var(--text);
}

.napkin-controls {
  padding: clamp(24px, 3vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.control-val {
  font-family: var(--font-mono);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--gold-bright);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--gold);
  height: 6px;
  cursor: pointer;
}

.vector-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vec-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.vec-field label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

.vec-field input {
  width: 100%;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-code);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.95rem;
}

.vec-field input:focus {
  outline: none;
  border-color: var(--gold);
}

.preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.preset-btn {
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.16s var(--ease);
}

.preset-btn:hover {
  border-color: var(--border-accent);
  color: var(--gold-bright);
}

/* Visual Excess Spectrum Meter */
.spectrum-meter {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  border: 1px solid var(--border);
}

.spectrum-meter-head {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.spectrum-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  overflow: visible;
}

.spectrum-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), var(--emerald));
  transition: width 0.25s var(--ease);
}

.spectrum-fill.is-neutral {
  background: var(--text-muted);
}

.spectrum-threshold {
  position: absolute;
  top: -5px;
  bottom: -5px;
  width: 2px;
  background: var(--rose);
  left: 72%;
}

.verdict-box {
  padding: 15px 17px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: var(--emerald-soft);
  font-family: var(--font-mono);
  font-size: 0.83rem;
  line-height: 1.65;
  color: var(--text);
}

.verdict-box.is-neutral {
  border-color: var(--border-strong);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.homology-callout {
  padding: 22px clamp(24px, 3vw, 34px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  align-items: center;
  background: var(--bg-surface);
}

.homology-symbol {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-style: italic;
  color: var(--gold-bright);
  padding: 10px 16px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-sm);
  background: var(--gold-soft);
  white-space: nowrap;
}

.homology-callout p {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

.homology-callout strong {
  color: var(--text);
}

/* ==========================================================================
   SECTION 04 — 4-LAYER VERIFICATION STANDARD (ARCHITECTURAL BANDS)
   ========================================================================== */
.layers-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.layer-col {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  transition: background 0.2s var(--ease);
}

.layer-col:first-child {
  padding-left: 0;
}

.layer-col:last-child {
  border-right: none;
  padding-right: 0;
}

.layer-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 14px;
}

.layer-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 500;
  line-height: 1.22;
  margin: 0 0 12px;
}

.layer-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-secondary);
}

/* Erdős #610 Editorial Inset */
.erdos-inset {
  margin-top: 36px;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--gold-soft), transparent 65%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
}

.erdos-inset h3 {
  font-family: var(--font-serif);
  font-size: 1.55rem;
  font-weight: 400;
  margin: 0 0 10px;
}

.erdos-inset p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.65;
  max-width: 72ch;
}

/* ==========================================================================
   SECTION 05 — HIGH-TICKET B2B ENGAGEMENT BAR
   ========================================================================== */
.cta-panel {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: clamp(28px, 4vw, 52px);
  align-items: center;
}

.cta-panel h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3vw, 2.55rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}

.cta-panel > div > p {
  color: var(--text-secondary);
  margin: 0 0 20px;
  max-width: 56ch;
}

.cta-scope {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 0.93rem;
  line-height: 1.75;
}

.cta-box {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.mono-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   EDITORIAL BLOG INDEX (blog.html) & LONGFORM ARTICLE (blog/*.html)
   ========================================================================== */
.blog-hero {
  padding: clamp(56px, 7vw, 92px) 0 40px;
  border-bottom: 1px solid var(--border);
}

.blog-list {
  display: flex;
  flex-direction: column;
}

.blog-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) auto;
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
  transition: background 0.2s var(--ease);
}

.blog-row-date {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  padding-top: 6px;
}

.blog-row-title {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 2.5vw, 2.15rem);
  font-weight: 400;
  line-height: 1.16;
  margin: 0 0 10px;
}

.blog-row-title a:hover {
  color: var(--gold-bright);
}

.blog-row-excerpt {
  margin: 0 0 14px;
  color: var(--text-secondary);
  max-width: 62ch;
  line-height: 1.65;
}

.blog-row-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Longform Article Page */
.article-hero {
  padding: clamp(56px, 7vw, 92px) 0 34px;
  border-bottom: 1px solid var(--border);
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.85rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.article-dek {
  font-family: var(--font-serif);
  font-size: clamp(1.18rem, 1.7vw, 1.38rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text-secondary);
  margin: 0 0 24px;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}

.article-meta a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-figure {
  margin: 34px 0 0;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
}

.article-figure figcaption {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.article-body {
  padding: 44px 0 72px;
  font-family: var(--font-serif);
  font-size: 1.17rem;
  line-height: 1.78;
  color: var(--text);
}

.article-body > p:first-of-type::first-letter {
  float: left;
  font-size: 3.6rem;
  line-height: 0.85;
  padding: 6px 10px 0 0;
  color: var(--gold-bright);
  font-weight: 500;
}

.article-body p {
  margin: 0 0 1.35em;
}

.article-body a {
  color: var(--gold-bright);
  text-decoration: underline;
  text-decoration-color: var(--border-accent);
  text-underline-offset: 3px;
}

.article-body a:hover {
  text-decoration-color: var(--gold-bright);
}

.article-body h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 2.6vw, 2.05rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 2.3em 0 0.75em;
  padding-top: 0.8em;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  scroll-margin-top: 86px;
}

.anchor-link {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none !important;
  opacity: 0.45;
  transition: opacity 0.18s var(--ease), color 0.18s var(--ease);
  flex-shrink: 0;
}

.article-body h2:hover .anchor-link,
.anchor-link:focus {
  opacity: 1;
  color: var(--gold-bright);
}

.article-body blockquote {
  margin: 2em 0;
  padding: 18px 0 18px 24px;
  border-left: 3px solid var(--gold);
  font-size: 1.24rem;
  font-style: italic;
  line-height: 1.62;
  color: var(--text);
}

.article-body ol,
.article-body ul {
  margin: 0 0 1.4em;
  padding-left: 24px;
}

.article-body li {
  margin-bottom: 0.65em;
}

.math-block {
  margin: 1.3em 0;
  padding: 15px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-code);
  border: 1px solid var(--border-strong);
  border-left: 3px solid var(--gold);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--gold-bright);
  overflow-x: auto;
}

/* Dual-Voice Interlude inside Longform Articles */
.article-dialogue {
  margin: 2.2em 0;
  font-family: var(--font-sans);
}

/* Signature Block */
.article-closing-line {
  margin: 3.2em 0 2.6em;
  padding: 28px 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-style: italic;
  line-height: 1.45;
  text-align: center;
  color: var(--gold-bright);
}

.article-signature {
  margin: 0 0 2.8em;
  font-family: var(--font-sans);
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--text-secondary);
}

.article-signature .sig-name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.article-signature .sig-line {
  display: block;
}

/* Receipt Table */
.receipt-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  margin: 1.4em 0 2.2em;
}

.receipt-table th,
.receipt-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.receipt-table th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--bg-surface);
}

/* ==========================================================================
   EDITORIAL FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-strong);
  background: var(--bg-elevated);
  padding: 48px 0 34px;
}

.footer-grid {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border);
}

.footer-founder {
  max-width: 48ch;
}

.footer-founder strong {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}

.footer-founder p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--gold-bright);
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .dispatch-feature,
  .ledger-shell,
  .napkin-grid,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .ledger-list,
  .matrix-card {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .layers-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .layer-col {
    padding: 24px 18px;
    border-bottom: 1px solid var(--border);
  }

  .layer-col:nth-child(2n) {
    border-right: none;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .nav-doi-pill {
    display: none;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-metric {
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
  }

  .hero-metric:nth-child(2n) {
    border-right: none;
  }

  .layers-band {
    grid-template-columns: 1fr;
  }

  .layer-col {
    border-right: none;
    padding: 22px 0;
  }

  .erdos-inset,
  .homology-callout,
  .blog-row {
    grid-template-columns: 1fr;
  }

  .sculpture-stage {
    min-height: 350px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
