:root {
  --bg: #fbfaf7;
  --paper: #ffffff;
  --ink: #171923;
  --muted: #647084;
  --line: #e8e0d4;
  --blue: #254bd8;
  --blue-2: #e9efff;
  --gold: #b87319;
  --gold-2: #fff3de;
  --green: #11745f;
  --green-2: #e8f7f2;
  --rose: #9b2d56;
  --rose-2: #fff0f5;
  --shadow: 0 24px 70px rgba(21,31,48,.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(37,75,216,.12), transparent 32rem),
    radial-gradient(circle at 96% 8%, rgba(184,115,25,.12), transparent 30rem),
    linear-gradient(180deg, #fffdf8 0%, var(--bg) 52%, #f7f3ec 100%);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.56;
}
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(232,224,212,.8);
  background: rgba(251,250,247,.84);
  backdrop-filter: blur(18px);
}
.nav {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 850; letter-spacing: -.03em; }
.mark { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--gold)); box-shadow: 0 0 0 6px rgba(37,75,216,.08); }
.nav-links { display: flex; gap: 18px; font-size: 15px; color: #475467; font-weight: 600; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--blue); }
.section { max-width: 1180px; margin: 0 auto; padding: 88px 24px; }
.hero { padding-top: 92px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: center; }
.eyebrow, .kicker, .mini-label { font-size: 13px; font-weight: 850; color: var(--blue); text-transform: uppercase; letter-spacing: .12em; margin: 0 0 14px; }
h1, h2, h3 { margin: 0; letter-spacing: -.045em; line-height: 1.04; }
h1 { max-width: 880px; font-family: Newsreader, Georgia, serif; font-weight: 750; font-size: clamp(48px, 6.8vw, 86px); }
h2 { font-family: Newsreader, Georgia, serif; font-size: clamp(34px, 4.4vw, 60px); font-weight: 720; }
h3 { font-size: 22px; }
.hero-copy { max-width: 790px; margin: 24px 0 0; font-size: 22px; color: #303b4f; }
.hero-actions { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.button { padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-weight: 780; }
.button.primary { background: var(--ink); color: white; border-color: var(--ink); }
.button.secondary { background: rgba(255,255,255,.76); }
.hero-card { background: rgba(255,255,255,.84); border: 1px solid var(--line); border-radius: 34px; padding: 30px; box-shadow: var(--shadow); transform: rotate(1deg); align-self: start; margin-top: 18px; }
.hero-card p:nth-child(2) { margin: 0 0 20px; font-size: 26px; font-family: Newsreader, Georgia, serif; line-height: 1.15; }
.test-chip { display: inline-block; margin: 6px 6px 0 0; padding: 8px 11px; border-radius: 999px; font-family: "JetBrains Mono", monospace; font-size: 13px; font-weight: 700; }
.test-chip.pass { background: var(--green-2); color: var(--green); }
.test-chip.warn { background: var(--gold-2); color: var(--gold); }
.test-chip.fail { background: var(--rose-2); color: var(--rose); }
.stats-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-top: 58px; }
.stat { background: rgba(255,255,255,.75); border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 12px 34px rgba(21,31,48,.05); }
.stat span { display: block; font-size: 29px; font-weight: 900; letter-spacing: -.05em; color: var(--blue); }
.stat p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.two-col { display: grid; grid-template-columns: .88fr 1.12fr; gap: 56px; align-items: start; }
.prose p, .section-heading p, .card p, .metric p, .stack p { color: #414d60; }
.prose p { margin: 0 0 20px; font-size: 18px; }
.prose.essay { max-width: 820px; margin: 0 auto; }
.prose.essay p { font-family: Newsreader, Georgia, serif; font-size: 25px; line-height: 1.42; color: #253044; }
.section-heading { max-width: 860px; margin-bottom: 36px; }
.section-heading.narrow { max-width: 800px; margin-left: auto; margin-right: auto; text-align: center; }
.section-heading > p:last-child { font-size: 18px; }
.visual-section { padding-top: 72px; }
.diagram { background: white; border: 1px solid var(--line); border-radius: 32px; padding: 28px; box-shadow: var(--shadow); }
.memory-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: center; gap: 12px; }
.flow-box { min-height: 128px; border-radius: 24px; padding: 22px; border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.flow-box b { font-size: 20px; }
.flow-box span { color: var(--muted); margin-top: 8px; }
.flow-box.raw { background: #fffaf0; }
.flow-box.synth { background: #f4f7ff; }
.flow-box.compact { background: #eef8f4; }
.flow-box.tests { background: #fff0f6; }
.arrow { color: var(--blue); font-size: 30px; font-weight: 900; }
.caption { max-width: 780px; margin: 18px auto 0; color: var(--muted); text-align: center; }
.deep-section { border-radius: 40px; background: linear-gradient(180deg, rgba(233,239,255,.84), rgba(255,255,255,.28)); margin-top: 20px; }
.deep-section.amber { background: linear-gradient(180deg, rgba(255,243,222,.96), rgba(255,255,255,.28)); }
.cards { display: grid; gap: 18px; margin-top: 30px; }
.cards.three { grid-template-columns: repeat(3,1fr); }
.cards.four { grid-template-columns: repeat(4,1fr); }
.card { background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: 0 16px 45px rgba(21,31,48,.07); }
.card.small h3 { font-size: 19px; }
.card.small p { font-size: 15px; }
.table-wrap { margin-top: 38px; overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f8f6f1; color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; }
td:first-child { color: var(--blue); font-weight: 850; }
tr:last-child td { border-bottom: 0; }
.test-card { background: #101828; color: white; border-radius: 34px; overflow: hidden; box-shadow: var(--shadow); }
.test-header { display: flex; justify-content: space-between; gap: 18px; padding: 20px 24px; background: rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.12); }
.test-header span { font-weight: 850; }
.test-header b { font-family: "JetBrains Mono", monospace; color: #cbd5e1; font-size: 12px; }
.test-body { display: grid; grid-template-columns: repeat(2,1fr); gap: 1px; background: rgba(255,255,255,.12); }
.test-body div { background: #101828; padding: 24px; }
.test-body label { display: block; color: #93c5fd; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; font-size: 12px; margin-bottom: 8px; }
.test-body p { margin: 0; color: #e5e7eb; }
.loop-diagram { position: relative; min-height: 380px; background: white; border: 1px solid var(--line); border-radius: 36px; box-shadow: var(--shadow); overflow: hidden; }
.loop-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.loop-svg path { fill: none; stroke: rgba(37,75,216,.25); stroke-width: 4; stroke-linecap: round; }
.loop-node { position: absolute; z-index: 2; width: 168px; min-height: 104px; padding: 16px; border-radius: 24px; background: #fff; border: 1px solid var(--line); box-shadow: 0 14px 34px rgba(21,31,48,.08); }
.loop-node b { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue-2); color: var(--blue); margin-bottom: 8px; }
.loop-node span { display: block; font-weight: 750; line-height: 1.25; }
.n1 { left: 6%; top: 16%; } .n2 { left: 28%; top: 8%; } .n3 { left: 52%; top: 8%; } .n4 { right: 6%; top: 28%; } .n5 { left: 50%; bottom: 10%; } .n6 { left: 20%; bottom: 12%; }
.metric-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.metric { background: rgba(255,255,255,.86); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: 0 14px 38px rgba(21,31,48,.06); }
.metric b { font-family: "JetBrains Mono", monospace; color: var(--gold); }
.stack { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; }
.stack div { background: white; border: 1px solid var(--line); border-radius: 24px; padding: 22px; }
.stack b { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-2); color: var(--blue); margin-bottom: 14px; }
.callout { margin-top: 24px; padding: 24px 26px; border-radius: 24px; background: #101828; color: white; font-size: 20px; font-weight: 700; }
.callout.soft { background: #fff; color: #253044; border: 1px solid var(--line); box-shadow: 0 14px 38px rgba(21,31,48,.06); }
.sample-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 18px; margin-top: 34px; }
.sample-card { background: rgba(255,255,255,.9); border: 1px solid var(--line); border-radius: 28px; padding: 24px; box-shadow: 0 16px 45px rgba(21,31,48,.07); }
.sample-card h3 { margin-bottom: 16px; }
.sample-card p { color: #414d60; margin: 0 0 12px; }
.sample-card .answer { margin-bottom: 0; padding-top: 12px; border-top: 1px solid var(--line); color: #263143; }
.sample-label { display: inline-block; margin-bottom: 12px; padding: 6px 10px; border-radius: 999px; background: var(--blue-2); color: var(--blue); font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 800; }
.lifecycle { display: grid; grid-template-columns: repeat(5,1fr); gap: 12px; margin: 34px 0 8px; }
.lifecycle div { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 24px; padding: 22px; box-shadow: 0 14px 38px rgba(21,31,48,.06); }
.lifecycle div:not(:last-child)::after { content: "→"; position: absolute; right: -14px; top: 50%; transform: translateY(-50%); z-index: 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: white; font-weight: 900; }
.lifecycle b { display: block; font-size: 19px; letter-spacing: -.03em; }
.lifecycle span { display: block; margin-top: 4px; color: var(--gold); font-family: "JetBrains Mono", monospace; font-size: 12px; font-weight: 800; }
.lifecycle p { margin: 12px 0 0; color: #414d60; font-size: 14px; }
.essay-section { padding-top: 40px; }
.source-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.source-grid a { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 16px; text-decoration: none; color: var(--blue); font-weight: 780; transition: transform .18s ease, box-shadow .18s ease; }
.source-grid a:hover { transform: translateY(-2px); box-shadow: 0 14px 35px rgba(21,31,48,.08); }
.note { color: var(--muted); margin-top: 22px; max-width: 860px; }
footer { max-width: 1180px; margin: 0 auto; padding: 36px 24px 70px; color: var(--muted); border-top: 1px solid var(--line); }
@media (max-width: 960px) {
  .nav { align-items: flex-start; flex-direction: column; }
  .nav-links { flex-wrap: wrap; }
  .hero-grid, .two-col { grid-template-columns: 1fr; }
  .stats-grid, .cards.three, .cards.four, .metric-grid, .source-grid { grid-template-columns: repeat(2,1fr); }
  .memory-flow { grid-template-columns: 1fr; }
  .arrow { text-align: center; transform: rotate(90deg); }
  .stack, .lifecycle { grid-template-columns: repeat(2,1fr); }
  .lifecycle div:not(:last-child)::after { display: none; }
  .loop-diagram { min-height: auto; display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; padding: 18px; }
  .loop-node { position: static; width: auto; }
  .loop-svg { display: none; }
}
@media (max-width: 580px) {
  .section { padding: 62px 18px; }
  .hero { padding-top: 84px; }
  .stats-grid, .cards.three, .cards.four, .metric-grid, .source-grid, .stack, .sample-grid, .lifecycle, .test-body, .loop-diagram { grid-template-columns: 1fr; }
  h1 { font-size: 46px; }
  .hero-copy { font-size: 19px; }
  .prose.essay p { font-size: 22px; }
  .test-header { flex-direction: column; }
}
