:root {
  --paper: #f3efe6;
  --paper-2: #ebe5d8;
  --ink: #17191d;
  --ink-2: #2c2f35;
  --muted: #6a6d73;
  --line: #d3ccbc;
  --line-strong: #b7ae9a;
  --dark-line: #3a3d42;
  --accent: #c8471f;
  --accent-soft: #e2622f;
  --sage: #7fa89a;
  --sand: #d9c48a;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "SimSun", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1200px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: var(--paper);
}

a {
  color: inherit;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 4px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}

.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 64px);
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

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

.brand {
  display: flex;
  align-items: baseline;
  gap: 14px;
  text-decoration: none;
}

.brand-mark,
.footer-brand {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.brand-mark span,
.footer-brand span { color: var(--accent); }

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 28px);
  font-size: 13px;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav a:hover,
.nav a[aria-current="true"] {
  border-bottom-color: var(--accent);
  color: var(--ink);
}

.issue {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
}

/* ---------- hero ---------- */

.hero {
  padding-top: clamp(56px, 9vw, 112px);
  padding-bottom: clamp(56px, 8vw, 96px);
  border-bottom: 1px solid var(--line);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: end;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(42px, 6.2vw, 86px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
}

.lede {
  max-width: 36em;
  font-size: clamp(15px, 1.2vw, 17px);
  color: var(--ink-2);
  margin: 0;
}

.hero-meta {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  margin: 40px 0 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.hero-meta div { margin: 0; }

.hero-meta dt {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}

.hero-meta dd {
  margin: 4px 0 0;
  font-family: var(--mono);
  font-size: 18px;
}

.hero-figure {
  margin: 0;
  padding-left: clamp(20px, 3vw, 40px);
  border-left: 1px solid var(--line);
}

.chart { width: 100%; height: auto; display: block; }

.chart-grid line {
  stroke: var(--line);
  stroke-dasharray: 3 5;
}

.chart-axis { stroke: var(--ink); stroke-width: 1; }

.chart-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
}

.hero-figure.in .chart-line {
  animation: draw 1.8s cubic-bezier(.2,.7,.2,1) forwards;
}

.chart-dot { fill: var(--accent); }

.chart-notes text {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--muted);
}

.chart-notes .note-strong { fill: var(--accent); font-size: 10.5px; }
.chart-notes .note-dim { fill: var(--line-strong); }

.hero-figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 14px;
  max-width: 40ch;
}

@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- sections ---------- */

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

.section-alt { background: var(--paper-2); }

.section-head {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: clamp(16px, 2.5vw, 32px);
  align-items: start;
}

.section-head .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  padding-top: 12px;
}

.section-head h2 {
  grid-column: 2;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 3.6vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.015em;
  margin: 0;
}

.section-lede {
  grid-column: 2;
  max-width: 44em;
  margin: 18px 0 0;
  color: var(--ink-2);
  font-size: clamp(15px, 1.1vw, 16.5px);
}

/* ---------- timeline ---------- */

.timeline {
  position: relative;
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
}

.timeline-rail {
  position: absolute;
  left: 121px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 100%;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
}

.timeline-item {
  display: grid;
  grid-template-columns: 110px 22px minmax(0, 1fr);
  column-gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.timeline-item:first-of-type { border-top: 0; }

.timeline-item .year {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-top: 5px;
  white-space: nowrap;
}

.timeline-item .dot {
  width: 9px;
  height: 9px;
  margin-top: 9px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  position: relative;
  z-index: 1;
}

.entry h3 {
  font-family: var(--serif);
  font-size: clamp(21px, 1.8vw, 25px);
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.entry p {
  margin: 0;
  max-width: 60ch;
  color: var(--ink-2);
  font-size: 15.5px;
}

.footnote {
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.8;
  color: var(--muted);
  border-left: 2px solid var(--line-strong);
  padding-left: 16px;
  margin: 40px 0 0;
  max-width: 72ch;
}

/* ---------- data pipeline ---------- */

.pipeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin: 56px 0 0;
}

.step {
  background: var(--paper-2);
  padding: 22px 18px 26px;
}

.step-no {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.step strong {
  display: block;
  font-size: 15px;
  margin: 10px 0 8px;
}

.step p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.explain-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 44px clamp(32px, 4vw, 64px);
  margin-top: 64px;
}

.explain {
  border-top: 2px solid var(--ink);
  padding-top: 18px;
}

.explain h3,
.concept h3,
.limit h3 {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  margin: 0 0 10px;
}

.explain p,
.concept p,
.limit p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

.glossary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px clamp(32px, 4vw, 64px);
  margin: 64px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.glossary div { margin: 0; }

.glossary dt {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}

.glossary dd {
  margin: 6px 0 0;
  font-size: 14px;
  color: var(--ink-2);
}

/* ---------- AI ---------- */

.ai-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  margin-top: 56px;
  align-items: start;
}

.ai-stages article {
  border-top: 1px solid var(--line);
  padding: 24px 0 26px;
}

.ai-stages article:first-child { border-top: 2px solid var(--ink); }

.stage-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.ai-stages h3 {
  font-family: var(--serif);
  font-size: clamp(22px, 2vw, 27px);
  font-weight: 600;
  margin: 8px 0 8px;
}

.ai-stages p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15.5px;
  max-width: 56ch;
}

.nn-figure {
  margin: 0;
  border: 1px solid var(--line);
  padding: 24px clamp(16px, 2vw, 28px);
  position: sticky;
  top: 96px;
}

.nn { width: 100%; height: auto; display: block; }

.nn-lines line {
  stroke: var(--line-strong);
  stroke-width: 1;
  opacity: 0.7;
}

.nn-nodes circle {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 1.5;
}

.nn-nodes circle:nth-child(4),
.nn-nodes circle:nth-child(5) { fill: var(--accent); stroke: var(--accent); }

.nn-labels text {
  font-family: var(--mono);
  font-size: 10.5px;
  fill: var(--muted);
  text-anchor: middle;
}

.nn-figure figcaption {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  margin-top: 14px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.concepts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px clamp(28px, 3.5vw, 48px);
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.concepts h3 { font-size: 19px; }
.concepts p { font-size: 14.5px; }

.table-wrap {
  margin-top: 64px;
  overflow-x: auto;
}

.compare {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
}

.compare caption {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-align: left;
  padding-bottom: 12px;
  text-transform: uppercase;
}

.compare th,
.compare td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
  vertical-align: top;
}

.compare thead th {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--muted);
  text-transform: uppercase;
  border-bottom: 2px solid var(--ink);
}

.compare tbody th {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- growth (dark) ---------- */

.section-dark {
  background: var(--ink);
  color: var(--paper);
  border-bottom: 0;
}

.section-dark .section-head .num { color: var(--accent-soft); }

.section-dark .section-lede { color: rgba(243, 239, 230, 0.72); }

.growth-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 72px);
  margin-top: 56px;
  align-items: start;
}

.growth-chart { margin: 0; }

.growth-chart svg { width: 100%; height: auto; display: block; }

.g-grid line {
  stroke: var(--dark-line);
  stroke-dasharray: 3 5;
}

.g-axis { stroke: #5a5d63; }

.g-line {
  fill: none;
  stroke-width: 2;
}

.g-data { stroke: var(--sage); }
.g-compute { stroke: var(--accent-soft); }
.g-params { stroke: var(--sand); }

.g-notes text {
  font-family: var(--mono);
  font-size: 10px;
  fill: rgba(243, 239, 230, 0.5);
}

.growth-chart figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(243, 239, 230, 0.7);
}

.legend { display: inline-flex; align-items: center; gap: 8px; }

.sw { width: 14px; height: 2px; display: inline-block; }
.sw-data { background: var(--sage); }
.sw-compute { background: var(--accent-soft); }
.sw-params { background: var(--sand); }

.growth-notes article {
  border-top: 1px solid var(--dark-line);
  padding: 18px 0 20px;
}

.growth-notes h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
}

.growth-notes p {
  margin: 0;
  font-size: 14.5px;
  color: rgba(243, 239, 230, 0.7);
}

.milestones {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  background: var(--dark-line);
  border: 1px solid var(--dark-line);
  margin: 64px 0 0;
  padding: 0;
}

.milestones li {
  flex: 1 1 160px;
  background: var(--ink);
  padding: 16px 18px;
  font-size: 13px;
  color: rgba(243, 239, 230, 0.85);
}

.milestones span {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent-soft);
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.footnote-dark {
  color: rgba(243, 239, 230, 0.5);
  border-color: var(--dark-line);
}

/* ---------- limits ---------- */

.limits-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 36px clamp(28px, 4vw, 56px);
  margin-top: 56px;
}

.limit {
  border-top: 1px solid var(--ink);
  padding-top: 16px;
}

.limit span {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
}

.limit h3 { margin-top: 6px; font-size: 20px; }
.limit p { font-size: 14.5px; }

.closing {
  font-family: var(--serif);
  font-size: clamp(25px, 3.2vw, 40px);
  line-height: 1.42;
  letter-spacing: -0.01em;
  margin: 80px 0 0;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}

/* ---------- footer ---------- */

.footer {
  padding: 32px 0;
  background: var(--paper);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.footer p {
  margin: 0;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}

.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.icp {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  text-decoration: none;
}

.icp:hover {
  color: var(--ink);
}

.to-top {
  font-family: var(--mono);
  font-size: 11px;
  text-decoration: none;
  color: var(--muted);
}

.to-top:hover { color: var(--ink); }

/* ---------- reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.75s ease, transform 0.75s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chart-line { stroke-dashoffset: 0; animation: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
  .pipeline { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .concepts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .limits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 28px;
  }
  .ai-layout { grid-template-columns: 1fr; }
  .nn-figure { position: static; order: -1; }
  .growth-grid { grid-template-columns: 1fr; }
  .brand-sub, .issue { display: none; }
  .section-head { grid-template-columns: 44px minmax(0, 1fr); }
  .timeline-rail { left: 93px; }
  .timeline-item { grid-template-columns: 82px 22px minmax(0, 1fr); column-gap: 20px; }
}

@media (max-width: 680px) {
  .topbar-inner { height: 56px; gap: 10px; }
  .brand { flex: 0 0 auto; }
  .nav {
    gap: 12px;
    font-size: 12px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: 0 0 auto; }
  .section-head { grid-template-columns: 1fr; }
  .section-head .num { padding-top: 0; margin-bottom: 8px; }
  .section-head h2,
  .section-lede { grid-column: 1; }
  .timeline-rail { display: none; }
  .timeline-item { grid-template-columns: 1fr; row-gap: 6px; padding: 26px 0; }
  .timeline-item .dot { display: none; }
  .timeline-item .year { padding-top: 0; }
  .pipeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .explain-grid,
  .glossary,
  .concepts,
  .limits-grid { grid-template-columns: 1fr; }
  .hero-meta { flex-wrap: wrap; gap: 20px 32px; }
  .milestones li { flex-basis: 50%; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
