:root {
  --bg: #16111e;
  --bg-deep: #110c19;
  --surface: #1e1927;
  --surface-high: #221d2b;
  --surface-higher: #2d2836;
  --surface-highest: #383241;
  --primary: #00dce5;
  --primary-dim: rgba(0, 220, 229, 0.55);
  --accent: #ffba20;
  --accent-dim: rgba(255, 186, 32, 0.45);
  --text: #e9dff2;
  --muted: #cac5cc;
  --muted-2: #ccc3d6;
  --line: rgba(73, 69, 75, 0.35);
  --line-soft: rgba(73, 69, 75, 0.18);
  --f-heading: 'Newsreader', 'Playfair Display', Georgia, serif;
  --f-body: 'Inter', 'Segoe UI', sans-serif;
  --f-label: 'Space Grotesk', 'JetBrains Mono', monospace;
  --content-max: 980px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.018) 1px, transparent 1px),
    radial-gradient(ellipse at 20% 0%, rgba(0,220,229,0.05), transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(255,186,32,0.035), transparent 60%);
  background-size: 32px 32px, 32px 32px, auto, auto;
  background-attachment: fixed;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

code {
  font-family: var(--f-label);
  background: var(--bg-deep);
  color: var(--primary);
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  border-radius: 0;
}

strong { color: #ffffff; font-weight: 600; }
em { color: var(--muted-2); font-style: italic; }

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s ease-out, transform 0.75s ease-out;
  will-change: opacity, transform;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition-duration: 0s; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  padding: 6rem 2rem 7rem;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.75;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(0,220,229,0.18), transparent 60%),
    linear-gradient(180deg, rgba(22,17,30,0.55) 0%, rgba(22,17,30,0.88) 55%, var(--bg) 100%);
  z-index: -1;
}
.hero-content {
  max-width: 880px;
  margin: 0 auto;
  text-align: left;
  animation: heroFade 1s ease-out both;
}
@keyframes heroFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
.eyebrow, .section-eyebrow, .card-eyebrow {
  font-family: var(--f-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.25rem;
  display: block;
}
.hero h1 {
  font-family: var(--f-heading);
  font-size: clamp(2.4rem, 5.2vw, 4rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.75rem;
  color: #ffffff;
  text-shadow: 0 2px 40px rgba(0,220,229,0.15);
}
.hero-teaser {
  font-family: var(--f-heading);
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 760px;
  margin: 0 0 2rem;
  font-weight: 400;
}
.hero-authors {
  font-family: var(--f-label);
  font-size: 0.85rem;
  color: var(--muted-2);
  margin: 0 0 0.5rem;
  letter-spacing: 0.01em;
  line-height: 1.6;
}
.hero-correspondence {
  font-family: var(--f-label);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
}
.metric-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 0 0 2.5rem;
}
.metric-chip {
  background: rgba(17, 12, 25, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1.25rem 0.85rem 1.1rem;
  min-width: 150px;
  animation: chipPulse 2.4s ease-out 0.4s 1;
}
@keyframes chipPulse {
  0% { box-shadow: 0 0 0 0 rgba(255,186,32,0.0); }
  30% { box-shadow: 0 0 0 6px rgba(255,186,32,0.22); }
  100% { box-shadow: 0 0 0 0 rgba(255,186,32,0.0); }
}
.metric-number {
  display: block;
  font-family: var(--f-label);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.metric-label {
  display: block;
  margin-top: 0.35rem;
  font-family: var(--f-label);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-family: var(--f-label);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  transition: all 0.25s ease;
}
.btn-primary {
  background: var(--primary);
  color: #00353a;
}
.btn-primary:hover {
  box-shadow: 0 0 22px rgba(0,220,229,0.6);
  text-decoration: none;
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  color: var(--muted-2);
  border: 1px solid var(--line);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
  transform: translateY(-1px);
}

/* ---------- Article ---------- */
.article {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 2rem 4rem;
}
section {
  padding: 4.5rem 0 2rem;
  position: relative;
}
section + section::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--primary);
  opacity: 0.35;
  margin: -3rem 0 3rem;
}
h2 {
  font-family: var(--f-heading);
  font-size: clamp(1.85rem, 3vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #ffffff;
  margin: 0 0 2rem;
}
h3 {
  font-family: var(--f-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: -0.005em;
  margin: 0 0 0.6rem;
}
p {
  margin: 0 0 1.25rem;
  color: var(--text);
}
.article p,
.article li {
  max-width: 72ch;
}

/* ---------- Insight callout ---------- */
.insight-callout {
  background: var(--surface);
  border-left: 4px solid var(--primary);
  padding: 2rem 2rem 1.25rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.5);
}
.insight-callout.amber {
  border-left-color: var(--accent);
}
.insight-callout p {
  margin-bottom: 0.75rem;
  font-size: 1.06rem;
  line-height: 1.8;
}
.insight-callout .card-eyebrow {
  color: var(--accent);
  margin-bottom: 1rem;
}

/* ---------- Two col ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
.col-main p { max-width: none; }
.col-aside { display: flex; flex-direction: column; gap: 1.25rem; }
@media (max-width: 820px) {
  .two-col { grid-template-columns: 1fr; gap: 2rem; }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  padding: 1.75rem 1.85rem;
  border-left: 4px solid var(--primary);
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 28px 90px rgba(8, 4, 18, 0.5);
}
.card.accent-amber {
  border-left-color: var(--accent);
}
.card p { margin-bottom: 0; max-width: none; }
.card h3 { margin-top: 0.25rem; margin-bottom: 0.75rem; }

.card-grid {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}
.card-grid.two { grid-template-columns: repeat(2, 1fr); }
.card-grid.three { grid-template-columns: repeat(3, 1fr); }
.card-grid.five { grid-template-columns: repeat(5, 1fr); }
.card-grid.five .card { padding: 1.35rem 1.25rem; }
.card-grid.five .card h3 { font-size: 1rem; }
.card-grid.five .card p { font-size: 0.9rem; line-height: 1.55; color: var(--muted); }
@media (max-width: 980px) {
  .card-grid.five { grid-template-columns: repeat(2, 1fr); }
  .card-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .card-grid.two, .card-grid.five { grid-template-columns: 1fr; }
}

.stacked-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.stacked-cards.full .card { width: 100%; }

/* ---------- Numbered list ---------- */
.numbered-list {
  list-style: none;
  counter-reset: contrib;
  padding: 0;
  margin: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.numbered-list li {
  counter-increment: contrib;
  background: var(--surface);
  padding: 1.75rem 2rem 1.5rem 5rem;
  position: relative;
  border-left: 4px solid var(--primary);
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.35);
}
.numbered-list li::before {
  content: counter(contrib, decimal-leading-zero);
  position: absolute;
  left: 1.5rem;
  top: 1.4rem;
  font-family: var(--f-label);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
  text-shadow: 0 0 18px rgba(0,220,229,0.35);
}
.numbered-list li h3 { margin: 0 0 0.4rem; font-size: 1.1rem; }
.numbered-list li p { margin: 0; max-width: none; color: var(--muted); }

/* ---------- Pipeline card ---------- */
.pipeline-card {
  background: var(--surface);
  padding: 1.75rem 2rem;
  border-left: 4px solid var(--accent);
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.35);
}
.pipeline {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0.5rem 0 1.25rem;
}
.pipeline li {
  counter-increment: step;
  position: relative;
  padding: 0.75rem 0 0.75rem 2.5rem;
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.6;
}
.pipeline li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.7rem;
  font-family: var(--f-label);
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 700;
}
.pipeline li + li::after {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: -0.5rem;
  width: 1px;
  height: 1rem;
  background: var(--primary);
  opacity: 0.4;
}
.pipeline-tagline {
  font-family: var(--f-label);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0;
}

/* ---------- Chips ---------- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin: 2rem 0;
}
.chip {
  background: var(--surface);
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--primary);
  font-size: 0.9rem;
  max-width: 400px;
  transition: border-color 0.25s ease;
}
.chip:hover { border-left-color: var(--accent); }
.chip code {
  display: inline-block;
  margin-right: 0.5rem;
  color: var(--accent);
  background: transparent;
  font-weight: 600;
  padding: 0;
}
.chip span { color: var(--muted); }

/* ---------- Stat row ---------- */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}
.stat-chip {
  background: var(--surface);
  padding: 1.75rem 1.5rem;
  border-left: 4px solid var(--accent);
  text-align: left;
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.35);
}
.stat-chip .metric-number {
  font-size: 2.2rem;
  color: var(--primary);
  margin-bottom: 0.35rem;
  text-shadow: 0 0 24px rgba(0,220,229,0.3);
}
.stat-chip .metric-label { color: var(--muted); }
@media (max-width: 720px) {
  .stat-row { grid-template-columns: 1fr; }
}

/* ---------- Figures ---------- */
figure {
  margin: 2.5rem 0;
  background: var(--bg-deep);
  padding: 1.25rem 1.25rem 1rem;
  border: 1px solid var(--line-soft);
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.45);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
figure:hover {
  border-color: rgba(0,220,229,0.25);
  box-shadow: 0 26px 90px rgba(8, 4, 18, 0.6), 0 0 30px rgba(0,220,229,0.08);
}
figure img {
  width: 100%;
  height: auto;
  display: block;
}
figcaption {
  font-family: var(--f-body);
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
}

/* ---------- Tables ---------- */
.table-wrapper {
  margin: 2.5rem 0;
  background: var(--surface);
  padding: 1.5rem 1.25rem 1rem;
  box-shadow: 0 20px 80px rgba(8, 4, 18, 0.45);
  overflow-x: auto;
}
.table-label {
  font-family: var(--f-label);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--primary);
  margin-bottom: 0.85rem;
}
table.results-table,
table.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--f-body);
  font-size: 0.88rem;
  color: var(--text);
}
table.results-table th,
table.results-table td,
table.comparison-table th,
table.comparison-table td {
  padding: 0.6rem 0.7rem;
  text-align: center;
  border-bottom: 1px solid var(--line-soft);
  font-variant-numeric: tabular-nums;
}
table.results-table th {
  font-family: var(--f-label);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  font-weight: 600;
  background: rgba(0,220,229,0.04);
}
table.results-table td { color: var(--muted); }
table.results-table tr.highlight td {
  background: rgba(255,186,32,0.07);
  color: var(--text);
}
table.results-table tr.highlight td strong { color: var(--accent); }
table.results-table th.model-row {
  text-align: left;
  padding-left: 1rem;
  font-family: var(--f-heading);
  font-size: 0.95rem;
  color: var(--muted-2);
  text-transform: none;
  letter-spacing: 0;
  background: transparent;
}

table.comparison-table { font-size: 0.85rem; }
table.comparison-table th {
  font-family: var(--f-label);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.02);
}
table.comparison-table th.highlight-col {
  color: var(--accent);
  border-left: 3px solid var(--accent);
}
table.comparison-table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  color: var(--muted);
  vertical-align: top;
}
table.comparison-table td.highlight-col {
  color: var(--text);
  background: rgba(255,186,32,0.05);
  border-left: 3px solid var(--accent);
}
table.comparison-table td.highlight-col strong { color: var(--accent); }

.table-note {
  font-family: var(--f-label);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Accordions ---------- */
.accordion {
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  margin: 2rem 0;
  border-left: 3px solid var(--line);
}
.accordion > summary {
  cursor: pointer;
  font-family: var(--f-label);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  list-style: none;
  padding-right: 2rem;
  position: relative;
}
.accordion > summary::after {
  content: '+';
  position: absolute;
  right: 0;
  top: 0;
  font-family: var(--f-label);
  color: var(--primary);
  font-weight: 400;
  font-size: 1.3rem;
  line-height: 1;
}
.accordion[open] > summary::after { content: '−'; }
.accordion > summary::-webkit-details-marker { display: none; }
.accordion p { margin-top: 1rem; color: var(--muted); }

.refs-list {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
  margin-top: 1rem;
  padding-left: 1.25rem;
}
.refs-list li { margin-bottom: 0.5rem; }
.refs-note {
  margin-top: 1.25rem;
  font-family: var(--f-label);
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---------- Section eyebrows ---------- */
.section-eyebrow { margin-bottom: 0.85rem; }

/* ---------- Explanation UI ---------- */
.flecto-note,
.flecto-callout,
.flecto-card,
.flecto-panel {
  position: relative;
  background: var(--surface-high);
  padding: 1.5rem 1.75rem 1.25rem;
  margin: 1.75rem 0;
  box-shadow: 0 18px 60px rgba(8, 4, 18, 0.4);
  color: var(--text);
}
.flecto-note::before,
.flecto-callout::before,
.flecto-card::before,
.flecto-panel::before {
  content: '🤖 AI explanation';
  font-family: var(--f-label);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #60a5fa;
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 0.5em;
}
.flecto-note {
  border-left: 3px solid #60a5fa;
  padding: 1rem 1.25rem 0.85rem;
  font-size: 0.92rem;
  margin: 1rem 0;
}
.flecto-callout {
  border-left: 4px solid #60a5fa;
}
.flecto-card {
  border-left: 4px solid var(--primary);
}
.flecto-card h4,
.flecto-panel h4 {
  font-family: var(--f-heading);
  font-size: 1.15rem;
  font-weight: 600;
  color: #ffffff;
  margin: 0 0 0.6rem;
}
.flecto-panel {
  border-left: 5px solid var(--accent);
  padding: 1.75rem 2rem;
}
.flecto-panel ul,
.flecto-card ul {
  margin: 0.5rem 0 0.5rem 1.25rem;
  padding: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.flecto-panel ul li,
.flecto-card ul li { margin-bottom: 0.35rem; }

/* ---------- Footer ---------- */
.site-footer {
  max-width: var(--content-max);
  margin: 3rem auto 0;
  padding: 2.5rem 2rem 3rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--f-label);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}
.site-footer p { max-width: none; }
.site-footer a { color: var(--primary); }

/* ---------- Mobile ---------- */
@media (max-width: 680px) {
  html, body { font-size: 16px; }
  .hero { padding: 4rem 1.25rem 5rem; min-height: auto; }
  .hero h1 { font-size: 2.1rem; }
  .hero-teaser { font-size: 1.1rem; }
  .article { padding: 0 1.25rem 3rem; }
  section { padding: 3rem 0 1.25rem; }
  h2 { font-size: 1.7rem; }
  .metric-chip { min-width: 140px; padding: 0.75rem 1rem; }
  .metric-number { font-size: 1.4rem; }
  .btn { width: 100%; justify-content: center; }
  .hero-actions { flex-direction: column; }
  .numbered-list li { padding: 1.25rem 1.25rem 1rem 4rem; }
  .numbered-list li::before { left: 1rem; font-size: 1.8rem; }
  table.results-table, table.comparison-table { font-size: 0.78rem; }
  table.results-table th, table.results-table td,
  table.comparison-table th, table.comparison-table td { padding: 0.45rem 0.4rem; }
}
