.k-page {
  --ink: #17201c;
  --paper: #eee9dc;
  --acid: #d7ec75;
  --amber: #edae49;
  --blue: #5ca3a4;
  --red: #a44432;
  --night: #111a18;
  --line: rgba(23, 32, 28, .24);
  color: var(--ink);
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(23,32,28,.04) 50%, transparent 50.2%),
    linear-gradient(rgba(23,32,28,.035) 1px, transparent 1px),
    var(--paper);
  background-size: 48px 100%, 100% 34px, auto;
}

.k-hero {
  padding: 22px clamp(20px, 5vw, 72px) clamp(70px, 10vw, 136px);
  color: #f4f1e6;
  background:
    radial-gradient(circle at 83% 27%, rgba(215,236,117,.16), transparent 24%),
    repeating-radial-gradient(circle at 83% 27%, transparent 0 44px, rgba(255,255,255,.035) 45px 46px),
    linear-gradient(125deg, #101715 0 58%, #183c3c 82%, #4f3b25);
  border-bottom: 9px solid var(--acid);
}

.k-hero nav { display: flex; justify-content: space-between; gap: 20px; }
.k-hero nav a { color: var(--acid); font-size: 13px; font-weight: 780; text-decoration: none; }
.k-hero nav a:hover, .k-hero nav a:focus-visible { text-decoration: underline; text-underline-offset: 5px; }
.k-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, .62fr); gap: clamp(40px, 8vw, 120px); align-items: end; max-width: 1450px; margin: 0 auto; }
.k-page .project-status { margin-top: clamp(70px, 11vw, 145px); color: var(--amber); }
.k-page h1 { margin: 0; font-size: clamp(66px, 10.2vw, 148px); letter-spacing: -.067em; line-height: .76; }
.k-page .project-lede { max-width: 780px; margin-top: 40px; color: #d8e1da; font: clamp(22px, 2.2vw, 31px)/1.42 Georgia, serif; }

.hero-contract { padding: clamp(26px, 3vw, 44px); color: var(--ink); background: #f5f0df; border-top: 10px solid var(--amber); box-shadow: 16px 16px 0 rgba(0,0,0,.2); }
.hero-contract .contract-line { margin: 0; padding: 12px 0; border-bottom: 1px solid #6c746d; font: 700 clamp(21px, 2vw, 29px)/1.14 Georgia, serif; }
.hero-contract .fine-print { margin: 25px 0 0; color: #52605a; font-size: 12px; line-height: 1.55; }

.k-body { width: min(1380px, calc(100% - 32px)); }
.k-question { position: relative; z-index: 2; grid-template-columns: .42fr 1.58fr; margin-top: -66px; box-shadow: 12px 12px 0 rgba(23,32,28,.14); }
.k-question h2 { margin: 0; font-size: 15px; letter-spacing: .1em; text-transform: uppercase; }
.k-question p { max-width: none; }

.k-page .kicker, .k-page .eyebrow { margin: 0 0 12px; color: var(--red); font-size: 11px; font-weight: 860; letter-spacing: .16em; text-transform: uppercase; }
.k-page h2 { letter-spacing: -.045em; }
.k-page .section-index { color: var(--red); font: 800 17px/1 ui-monospace, SFMono-Regular, Menlo, monospace; }
.k-page .prose h2, .contract-copy h2, .identity-copy h2, .object-copy h2, .gates h2, .ledger h2 { max-width: 1030px; margin: 0 0 26px; font-size: clamp(43px, 6.5vw, 86px); line-height: .93; }
.k-page .prose p, .contract-copy p, .identity-copy p, .object-copy p, .gates > div > p, .ledger p { max-width: 810px; font-size: 18px; line-height: 1.7; }
.k-page .standfirst { font: clamp(22px, 2.3vw, 31px)/1.48 Georgia, serif !important; }

.essay { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(260px, .42fr); gap: clamp(22px, 4vw, 58px); padding: clamp(80px, 11vw, 145px) 0; }
.red-line { align-self: center; padding: 28px; background: #f6f0df; border-top: 7px solid var(--red); box-shadow: 10px 10px 0 rgba(164,68,50,.14); }
.red-line p:not(.eyebrow) { margin: 0; font: 20px/1.5 Georgia, serif; }
.red-line .second { margin-top: 34px; padding-top: 25px; border-top: 1px solid var(--line); }

.contract { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: clamp(22px, 4vw, 58px); padding: clamp(52px, 8vw, 96px); color: #edf2e9; background: var(--night); box-shadow: 18px 18px 0 rgba(164,68,50,.23); }
.contract .section-index, .contract .kicker { color: var(--acid); }
.contract-copy p { color: #cbd7ce; }
.pipeline { grid-column: 2; display: grid; grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr; align-items: stretch; gap: 12px; margin-top: 32px; }
.pipeline div { padding: 21px; background: #1a2925; border: 1px solid #4b625a; }
.pipeline .exact { color: var(--ink); background: var(--acid); border-color: var(--acid); }
.pipeline span { display: block; color: var(--amber); font: 800 11px/1 ui-monospace, monospace; }
.pipeline .exact span { color: var(--red); }
.pipeline b { display: block; margin: 16px 0 6px; font-size: 17px; }
.pipeline small { color: #aebdb5; font-size: 11px; }
.pipeline .exact small { color: #3a463e; }
.pipeline i { align-self: center; color: var(--acid); font-style: normal; font-size: 25px; }
.code-panel { grid-column: 2; margin-top: 26px; border: 1px solid #52665f; background: #090e0d; }
.code-heading { display: flex; justify-content: space-between; gap: 20px; padding: 12px 18px; color: #b9c8c0; background: #1a2925; border-bottom: 1px solid #52665f; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.code-panel pre { margin: 0; padding: clamp(20px, 4vw, 40px); overflow-x: auto; color: #dcebcf; font: 14px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace; }
.principles { grid-column: 2; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 26px; }
.principles article { padding: 24px; color: var(--ink); background: #e9edde; border-top: 6px solid var(--blue); }
.principles h3 { margin: 0 0 10px; font-size: 23px; }
.principles p { margin: 0; font-size: 14px; line-height: 1.55; }

.decomposition, .history, .tradeoff { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: clamp(22px, 4vw, 58px); padding: clamp(80px, 11vw, 145px) 0; }
.wide { max-width: 1080px; }
.axes { grid-column: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 32px; }
.axes article { min-height: 310px; padding: 26px; border: 1px solid var(--line); }
.axes article > p { margin: 0 0 54px; font: 850 11px/1 ui-monospace, monospace; letter-spacing: .16em; }
.axes h3 { margin: 0 0 18px; font: 700 30px/1 Georgia, serif; }
.axes ul { margin: 0; padding-left: 18px; }
.axes li { margin: 9px 0; font-size: 14px; line-height: 1.4; }
.axes .what { background: #d5e4d8; border-top: 8px solid #477b63; }
.axes .where { background: #d2e3e2; border-top: 8px solid var(--blue); }
.axes .when { background: #f0ddb9; border-top: 8px solid var(--amber); }
.axes .with { background: #ead2c7; border-top: 8px solid var(--red); }
.axis-note { grid-column: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; padding: 23px 26px; background: #f8f4e8; border-left: 7px solid var(--ink); }
.axis-note p { margin: 0; font-size: 14px; line-height: 1.58; }

.identity { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, .7fr); gap: clamp(38px, 7vw, 100px); margin: 0 calc(50% - 50vw); padding: clamp(75px, 10vw, 130px) max(20px, calc((100vw - 1380px) / 2)); color: #edf3e9; background: #183837; }
.identity-copy p { color: #d4dfd8; }
.identity .kicker { color: var(--acid); }
.neighborhood-map { position: relative; min-height: 520px; align-self: center; overflow: hidden; }
.orbit { position: absolute; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.65); border-radius: 50%; mix-blend-mode: screen; }
.orbit span { padding: 5px 8px; color: #101715; background: rgba(244,241,230,.8); font: 800 10px/1 ui-monospace, monospace; letter-spacing: .12em; }
.orbit-a { inset: 3% 19% 41% 5%; background: rgba(215,236,117,.17); }
.orbit-b { inset: 23% 3% 20% 35%; background: rgba(92,163,164,.22); }
.orbit-c { inset: 43% 31% 3% 2%; background: rgba(237,174,73,.18); }
.orbit-d { inset: 9% 2% 51% 42%; background: rgba(164,68,50,.22); }
.anchor { position: absolute; top: 45%; left: 48%; z-index: 2; display: grid; place-items: center; width: 118px; height: 118px; color: var(--ink); background: var(--acid); border-radius: 50%; box-shadow: 0 0 0 12px rgba(17,26,24,.55); transform: translate(-50%, -50%); }
.anchor b { font-size: 18px; letter-spacing: .08em; }
.anchor small { margin-top: -26px; font-size: 10px; }
.identity-types { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.identity-types article { padding: 26px; color: var(--ink); background: #eef0e5; border-top: 7px solid var(--acid); }
.identity-types span { color: var(--red); font: 850 11px/1 ui-monospace, monospace; }
.identity-types h3 { margin: 24px 0 10px; font-size: 23px; }
.identity-types p { margin: 0; font-size: 14px; line-height: 1.55; }

.tension-table { grid-column: 2; margin-top: 30px; overflow-x: auto; border: 1px solid var(--ink); background: #f8f4e8; }
.tension-table table { width: 100%; min-width: 760px; border-collapse: collapse; }
.tension-table th, .tension-table td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.45; }
.tension-table thead th { color: #f4f1e6; background: var(--ink); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.tension-table tbody td:first-child { font-weight: 800; }
.tradeoff blockquote { grid-column: 2; margin: 32px 0 0; padding: 30px 35px; color: #f5f1e3; background: var(--red); font: clamp(21px, 2vw, 29px)/1.45 Georgia, serif; }

.history { padding-top: 30px; }
.research-epochs { grid-column: 2; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 32px 0 0; padding: 1px; list-style: none; background: var(--ink); }
.research-epochs li { padding: 26px 24px; background: #f7f2e4; }
.research-epochs span { color: var(--red); font: 850 10px/1 ui-monospace, monospace; letter-spacing: .14em; }
.research-epochs h3 { margin: 25px 0 12px; font-size: 24px; }
.research-epochs p { margin: 0; font-size: 14px; line-height: 1.55; }

.current-object { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr); gap: clamp(36px, 7vw, 90px); margin: 0 calc(50% - 50vw); padding: clamp(75px, 10vw, 130px) max(20px, calc((100vw - 1380px) / 2)); color: #f1f3e8; background: var(--night); }
.current-object .kicker, .formula-card .eyebrow { color: var(--acid); }
.object-copy p { color: #cbd5ce; }
.formula-card { align-self: center; padding: clamp(26px, 4vw, 44px); color: var(--ink); background: var(--acid); box-shadow: 15px 15px 0 rgba(92,163,164,.3); }
.formula-card .eyebrow { color: var(--red); }
.formula-card > code { display: block; margin: 30px 0; font: 700 clamp(18px, 2.1vw, 28px)/1.4 ui-monospace, monospace; overflow-wrap: anywhere; }
.formula-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #758146; }
.formula-card dl div { padding: 13px; background: #e4f493; }
.formula-card dt { font-weight: 850; }
.formula-card dd { margin: 3px 0 0; font-size: 11px; }
.formula-card > p:last-child { margin: 22px 0 0; font-size: 12px; line-height: 1.5; }
.candidate-facts { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr 1.15fr; gap: 12px; }
.candidate-facts article { padding: 28px; color: var(--ink); background: #edf0e5; border-top: 7px solid var(--blue); }
.candidate-facts .failure { background: #f0d8cd; border-color: var(--red); }
.candidate-facts ul { margin: 0; padding-left: 18px; }
.candidate-facts li { margin: 10px 0; font-size: 14px; line-height: 1.48; }
.candidate-facts p:last-child { margin-bottom: 0; font-size: 14px; line-height: 1.6; }

.meaning { display: grid; grid-template-columns: 56px minmax(0, 1fr) minmax(280px, .46fr); gap: clamp(22px, 4vw, 58px); padding: clamp(90px, 11vw, 150px) 0; }
.meaning ol { max-width: 820px; margin: 30px 0; padding: 0; list-style: none; counter-reset: compromise; }
.meaning li { position: relative; margin: 0; padding: 20px 20px 20px 70px; border-top: 1px solid var(--line); font-size: 16px; line-height: 1.6; counter-increment: compromise; }
.meaning li::before { content: "0" counter(compromise); position: absolute; left: 12px; top: 24px; color: var(--red); font: 850 12px/1 ui-monospace, monospace; }
.not-theorem { align-self: center; padding: 30px; background: #d4e3e0; border-top: 8px solid var(--blue); }
.not-theorem p:not(.eyebrow) { margin: 0 0 18px; font: 18px/1.55 Georgia, serif; }
.not-theorem p:last-child { margin-bottom: 0; }

.gates { display: grid; grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr); gap: clamp(40px, 7vw, 90px); padding: clamp(55px, 8vw, 95px); background: #dfcfad; border: 1px solid #8a7959; }
.gates h2 { font-size: clamp(43px, 5.5vw, 76px); }
.gate-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.gate-grid article { padding: 24px; background: #f7f2e4; border-top: 6px solid var(--red); }
.gate-grid span { color: var(--red); font: 850 11px/1 ui-monospace, monospace; }
.gate-grid h3 { margin: 23px 0 10px; font-size: 21px; }
.gate-grid p { margin: 0; font-size: 13px; line-height: 1.55; }

.ledger { display: grid; grid-template-columns: minmax(0, .85fr) minmax(340px, 1.15fr); gap: clamp(40px, 8vw, 110px); margin: clamp(80px, 11vw, 145px) 0 36px; padding: clamp(45px, 7vw, 80px); color: #f4f1e6; background: #183837; }
.ledger h2 { font-size: clamp(40px, 5.2vw, 70px); }
.ledger p { color: #d6e2db; }
.ledger .kicker { color: var(--acid); }
.ledger-links { display: grid; align-content: center; }
.ledger-links a { display: grid; grid-template-columns: 35px 1fr; gap: 12px; padding: 15px 0; color: #f4f1e6; border-bottom: 1px solid rgba(255,255,255,.25); font-size: 14px; font-weight: 760; text-decoration: none; }
.ledger-links a:hover, .ledger-links a:focus-visible { color: var(--acid); }
.ledger-links span { color: var(--acid); font-family: ui-monospace, monospace; }

@media (max-width: 1020px) {
  .k-hero-grid, .identity, .current-object, .gates, .ledger { grid-template-columns: 1fr; }
  .hero-contract { max-width: 720px; }
  .essay, .meaning { grid-template-columns: 40px 1fr; }
  .red-line, .not-theorem { grid-column: 2; }
  .axes, .research-epochs { grid-template-columns: repeat(2, 1fr); }
  .pipeline { grid-template-columns: 1fr 1fr; }
  .pipeline i { display: none; }
  .candidate-facts { grid-template-columns: 1fr 1fr; }
  .candidate-facts .failure { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .k-hero nav { align-items: flex-start; flex-direction: column; }
  .k-page h1 { font-size: clamp(59px, 20vw, 91px); }
  .k-question { grid-template-columns: 1fr; margin-top: -38px; }
  .essay, .contract, .decomposition, .history, .tradeoff, .meaning { grid-template-columns: 1fr; padding-top: 64px; padding-bottom: 64px; }
  .red-line, .not-theorem, .pipeline, .code-panel, .principles, .axes, .axis-note, .tension-table, .tradeoff blockquote, .research-epochs { grid-column: 1; }
  .contract { margin: 0 -6px; padding: 42px 18px; box-shadow: 8px 8px 0 rgba(164,68,50,.23); }
  .principles, .axes, .axis-note, .research-epochs, .identity-types, .candidate-facts, .gate-grid { grid-template-columns: 1fr; }
  .candidate-facts .failure { grid-column: auto; }
  .identity { padding-right: 16px; padding-left: 16px; }
  .neighborhood-map { min-height: 420px; }
  .current-object { padding-right: 16px; padding-left: 16px; }
  .gates, .ledger { padding: 34px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .k-page *, .k-page *::before, .k-page *::after { scroll-behavior: auto !important; }
}
