/* ═══════════════════════════════════════════════
   MACHINE-GENERATED — styles
   ═══════════════════════════════════════════════ */

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

/* ─── DESIGN TOKENS ─── */
:root {
  --bg:         #080808;
  --bg-surface: #0f0f0f;
  --bg-alt:     #131313;
  --text:       #e8e4dc;
  --text-dim:   #b8b3aa;
  --muted:      #5a5650;
  --accent:     #c41e3a;
  --accent-glow: rgba(196, 30, 58, 0.18);
  --amber:      #c9a84c;
  --green:      #3adb61;

  --mono:    'JetBrains Mono', 'Courier New', monospace;
  --serif:   'Source Serif 4', Georgia, 'Times New Roman', serif;
  --display: 'Playfair Display', Georgia, serif;

  --body-width: 680px;
  --wide-width: 1080px;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── BASE ─── */
html {
  scroll-behavior: smooth;
  font-size: 18px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  line-height: 1.8;
  overflow-x: hidden;
}

/* ─── UTILITIES ─── */
.mono   { font-family: var(--mono); font-size: 0.72em; letter-spacing: 0.06em; }
.muted  { color: var(--muted); }
.accent { color: var(--accent); }
.amber  { color: var(--amber); }

/* ════════════════════════════════════════════════
   TERMINAL OVERLAY
   ════════════════════════════════════════════════ */
#terminal-overlay {
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity 1s var(--ease-out), visibility 1s;
}

#terminal-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.terminal-window {
  width: min(680px, 90vw);
  background: #0a0a0a;
  border: 1px solid #222;
  border-radius: 10px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px #000,
    0 40px 80px rgba(0,0,0,0.9),
    0 0 120px rgba(58, 219, 97, 0.04);
}

.terminal-header {
  background: #161616;
  border-bottom: 1px solid #1e1e1e;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.t-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}
.t-red    { background: #ff5f57; }
.t-yellow { background: #febc2e; }
.t-green  { background: #28c840; }

.t-title {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  color: #444;
  margin-left: 6px;
}

#terminal-output {
  padding: 20px 24px 8px;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
  color: var(--green);
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
  scrollbar-width: none;
}

#terminal-output::-webkit-scrollbar { display: none; }

.t-line       { display: block; white-space: pre; }
.t-line.dim   { color: #2d6640; }
.t-line.warn  { color: #febc2e; }
.t-line.err   { color: #ff5f57; }
.t-line.white { color: var(--text); }
.t-line.blank { user-select: none; }

#t-cursor {
  display: block;
  padding: 0 24px 16px;
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--green);
}

.t-blink { animation: t-blink 1.1s step-end infinite; }
@keyframes t-blink { 50% { opacity: 0; } }

#skip-intro {
  position: absolute;
  bottom: clamp(20px, 4vh, 48px);
  right: clamp(20px, 4vw, 48px);
  background: none;
  border: 1px solid #2a2a2a;
  color: #444;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  padding: 8px 18px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

#skip-intro:hover {
  border-color: #555;
  color: #888;
}

/* ════════════════════════════════════════════════
   PROGRESS BAR
   ════════════════════════════════════════════════ */
#progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  z-index: 500;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ════════════════════════════════════════════════
   MAIN ARTICLE WRAPPER
   ════════════════════════════════════════════════ */
#article.hidden { opacity: 0; }
#article { transition: opacity 0.5s ease 0.2s; }

/* ════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════ */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 80px clamp(24px, 7vw, 140px) 72px;
  position: relative;
  background:
    radial-gradient(ellipse 70% 50% at 80% 20%, rgba(196,30,58,0.06) 0%, transparent 70%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, #1e1e1e, transparent);
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.eyebrow-dot { color: #2a2a2a; }

.headline {
  font-family: var(--display);
  font-size: clamp(72px, 13vw, 172px);
  font-weight: 900;
  line-height: 0.88;
  letter-spacing: -0.02em;
  margin-bottom: 36px;
  color: var(--text);
}

.headline em {
  font-style: italic;
  color: var(--accent);
}

.deck {
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 22px);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 560px;
  margin-bottom: 56px;
}

.scroll-hint {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  animation: nudge 3s ease-in-out infinite;
}

@keyframes nudge {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(6px); opacity: 0.9; }
}

/* ════════════════════════════════════════════════
   STATS BAR
   ════════════════════════════════════════════════ */
.stats-bar {
  display: flex;
  align-items: stretch;
  justify-content: center;
  background: var(--bg-surface);
  border-bottom: 1px solid #161616;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px clamp(20px, 4vw, 56px);
  text-align: center;
  flex: 1 1 150px;
}

.stat-num-wrap {
  display: flex;
  align-items: baseline;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-num {
  font-family: var(--display);
  font-size: clamp(38px, 6vw, 68px);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
}

.stat-plus {
  font-family: var(--display);
  font-size: clamp(22px, 3.5vw, 40px);
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

.stat-divider {
  width: 1px;
  background: #1a1a1a;
  align-self: stretch;
}

/* ════════════════════════════════════════════════
   ARTICLE BODY (constrained column)
   ════════════════════════════════════════════════ */
.body {
  max-width: var(--body-width);
  margin: 0 auto;
  padding: 72px clamp(20px, 4vw, 32px);
}

/* ─── SCROLL REVEAL ─── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease-out), transform 0.75s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ─── SECTION ─── */
.section {
  margin-bottom: 56px;
}

.section p {
  font-size: 1.05rem;
  line-height: 1.85;
  margin-bottom: 24px;
  color: var(--text-dim);
}

.section p:last-child { margin-bottom: 0; }
.section strong { color: var(--text); }
.section em { font-style: italic; }

.section-head {
  font-family: var(--display);
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  letter-spacing: -0.01em;
}

/* Drop cap */
.drop-cap::first-letter {
  font-family: var(--display);
  font-size: 5.2em;
  font-weight: 900;
  color: var(--accent);
  float: left;
  line-height: 0.72;
  margin: 6px 6px 0 0;
}

/* ════════════════════════════════════════════════
   SCHOOL INTERLUDE (full-width breakout)
   ════════════════════════════════════════════════ */
.school-interlude {
  width: 100%;
  background: #0c0808;
  border-top: 1px solid rgba(196,30,58,0.3);
  border-bottom: 1px solid rgba(196,30,58,0.3);
  padding: clamp(56px, 8vw, 100px) clamp(24px, 8vw, 80px);
  text-align: center;
}

.interlude-eyebrow {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
  margin-bottom: 28px;
}

.school-name {
  font-family: var(--display);
  font-size: clamp(30px, 5.5vw, 60px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-bottom: 12px;
}

.school-location {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
}

.school-facts {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.school-fact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 clamp(24px, 5vw, 64px);
}

.school-fact-divider {
  width: 1px;
  height: 80px;
  background: #2a1a1e;
}

.big-num {
  font-family: var(--display);
  font-size: clamp(64px, 10vw, 110px);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 10px;
}

.big-num.ages {
  color: var(--text-dim);
  font-size: clamp(40px, 6vw, 72px);
}

.fact-label {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.source-note {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  opacity: 0.6;
}

/* ════════════════════════════════════════════════
   PULL QUOTES
   ════════════════════════════════════════════════ */
.pull-quote {
  border: none;
  border-left: 2px solid var(--accent);
  margin: 0 0 56px -32px;
  padding: 8px 0 8px 32px;
}

.pull-quote p {
  font-family: var(--display);
  font-size: clamp(17px, 2.2vw, 22px);
  font-style: italic;
  line-height: 1.6;
  color: var(--text);
  margin-bottom: 14px;
}

.pull-quote cite {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-style: normal;
  line-height: 1.6;
}

/* ─── HIGHLIGHTED QUOTE ─── */
.highlighted-quote {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px 0;
  margin-bottom: 48px;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}

.hq-bar {
  width: 3px;
  background: var(--accent);
  align-self: stretch;
  border-radius: 2px;
  flex-shrink: 0;
  opacity: 0.7;
}

.hq-text {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-dim);
}

/* ════════════════════════════════════════════════
   CALLOUT (full-width breakout)
   ════════════════════════════════════════════════ */
.callout {
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  background: var(--accent-glow);
  border-top: 1px solid rgba(196,30,58,0.15);
  border-bottom: 1px solid rgba(196,30,58,0.15);
  padding: clamp(32px, 5vw, 56px) clamp(24px, 8vw, 120px);
}

.callout-num {
  font-family: var(--display);
  font-size: clamp(56px, 8vw, 96px);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
}

.callout p {
  font-size: clamp(16px, 1.8vw, 20px);
  line-height: 1.65;
  color: var(--text-dim);
  max-width: 500px;
}

/* ════════════════════════════════════════════════
   DOCTRINE QUOTE (full-width breakout)
   ════════════════════════════════════════════════ */
.doctrine-quote {
  background: #0a0707;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  padding: clamp(56px, 8vw, 100px) clamp(24px, 8vw, 80px);
  text-align: center;
}

.dq-inner {
  max-width: 720px;
  margin: 0 auto;
}

.dq-text {
  font-family: var(--display);
  font-size: clamp(22px, 3.5vw, 38px);
  font-style: italic;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 24px;
}

.dq-attribution {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─── CLOSING SECTION ─── */
.closing-section p {
  color: var(--text);
  font-size: 1.1rem;
}

.closing-section p:last-child {
  font-weight: 300;
  color: var(--accent);
  font-size: 1.2rem;
}

/* ════════════════════════════════════════════════
   TIMELINE
   ════════════════════════════════════════════════ */
.timeline-section {
  max-width: var(--wide-width);
  margin: 0 auto;
  padding: 80px clamp(24px, 6vw, 80px);
  border-top: 1px solid #141414;
}

.timeline-heading {
  font-family: var(--display);
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 56px;
  letter-spacing: -0.01em;
}

.timeline {
  position: relative;
  padding-left: clamp(100px, 16vw, 180px);
}

.timeline::before {
  content: '';
  position: absolute;
  left: calc(clamp(80px, 14vw, 155px) + 10px);
  top: 8px;
  bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, var(--accent) 0%, #1a1a1a 100%);
}

.tl-item {
  position: relative;
  margin-bottom: 36px;
  padding-bottom: 4px;
}

.tl-date {
  position: absolute;
  right: calc(100% - clamp(80px, 14vw, 155px) + 16px);
  top: 3px;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
}

.tl-dot {
  position: absolute;
  left: calc(-1 * clamp(100px, 16vw, 180px) + clamp(80px, 14vw, 155px) + 5px);
  top: 8px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #1e1e1e;
  border: 2px solid #333;
  z-index: 1;
}

.tl-dot-red {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 14px rgba(196,30,58,0.6);
}

.tl-content {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--text-dim);
  padding-bottom: 32px;
  border-bottom: 1px solid #111;
}

.tl-content strong { color: var(--text); }
.tl-content em { font-style: italic; }

.tl-red .tl-date { color: var(--accent); }
.tl-red .tl-content { color: var(--text); }

.tl-item:last-child .tl-content { border-bottom: none; }

/* ════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid #141414;
  padding: 56px clamp(24px, 6vw, 80px);
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-title {
  font-size: 0.58rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.footer-sources {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-bottom: 20px;
  line-height: 1.6;
}

.footer-note {
  font-family: var(--serif);
  font-size: 0.8rem;
  line-height: 1.7;
  color: var(--muted);
}

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */
@media (max-width: 720px) {
  .pull-quote {
    margin-left: 0;
  }

  .school-fact-divider {
    width: 60px;
    height: 1px;
  }

  .school-facts {
    flex-direction: column;
    gap: 32px;
  }

  .callout {
    flex-direction: column;
    text-align: center;
    padding: 40px 24px;
  }

  .stat-divider {
    display: none;
  }

  .stats-bar {
    gap: 0;
  }

  .stat {
    padding: 28px 16px;
    flex: 1 1 120px;
  }

  .timeline {
    padding-left: 32px;
  }

  .timeline::before {
    left: 11px;
  }

  .tl-date {
    position: static;
    display: block;
    text-align: left;
    margin-bottom: 4px;
  }

  .tl-dot {
    left: -21px;
  }

  .doctrine-quote,
  .school-interlude {
    padding: 56px 24px;
  }
}

@media (max-width: 480px) {
  .headline {
    font-size: clamp(54px, 16vw, 72px);
  }

  .hero {
    padding: 48px 20px 56px;
  }
}
