:root {
  --bg: #080d18;
  --bg-2: #0d1424;
  --surface: #111a2d;
  --surface-2: #162139;
  --paper: #f4f6f8;
  --paper-2: #e9edf2;
  --ink: #111827;
  --muted: #657086;
  --muted-light: #9ca9bf;
  --line: rgba(255,255,255,.11);
  --line-light: #d8dee7;
  --accent: #77e2c2;
  --accent-2: #8bb8ff;
  --danger: #ff8d8d;
  --unknown: #f0cf75;
  --pass: #77e2c2;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0,0,0,.22);
  --shell: min(1180px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); line-height: 1.6; }
a { color: inherit; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; }
section[id] { scroll-margin-top: 82px; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: 10px; transform: translateY(-150%); background: white; color: black; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(8,13,24,.88); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); color: white; }
.nav-wrap { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; gap: 11px; align-items: center; text-decoration: none; letter-spacing: .01em; white-space: nowrap; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(119,226,194,.45); background: rgba(119,226,194,.1); border-radius: 9px; color: var(--accent); font-weight: 800; }
.site-nav { display: flex; align-items: center; gap: 18px; font-size: .9rem; color: #cad2e0; }
.site-nav a { text-decoration: none; }
.site-nav a:hover, .site-nav a:focus-visible { color: white; }
.nav-toggle { display: none; font: inherit; color: white; background: transparent; border: 1px solid var(--line); border-radius: 9px; padding: 7px 11px; }

.hero { background: radial-gradient(circle at 82% 20%, rgba(139,184,255,.15), transparent 30%), radial-gradient(circle at 12% 75%, rgba(119,226,194,.11), transparent 34%), var(--bg); color: white; padding: 106px 0 92px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .75fr); gap: 72px; align-items: center; }
.eyebrow { margin: 0 0 14px; font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .17em; color: #3a7b6e; }
.hero .eyebrow, .section-dark .eyebrow { color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.8rem, 6.2vw, 5.8rem); line-height: .98; letter-spacing: -.055em; margin-bottom: 26px; max-width: 900px; }
h1 span { color: #b7c9e9; }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; letter-spacing: -.04em; margin-bottom: 18px; }
h3 { line-height: 1.2; }
.lede { font-size: clamp(1.06rem, 1.8vw, 1.28rem); color: #b8c1d2; max-width: 790px; }
.lede-small { font-size: 1.12rem; color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 17px; border-radius: 11px; font-weight: 750; text-decoration: none; border: 1px solid transparent; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { background: var(--accent); color: #07120f; }
.button.ghost { border-color: var(--line); color: white; background: rgba(255,255,255,.035); }
.button.dark { background: var(--bg-2); color: white; margin-top: 28px; }
.principle-card { background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.035)); border: 1px solid var(--line); border-radius: 24px; padding: 30px; box-shadow: var(--shadow); }
.card-kicker { margin-bottom: 12px; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); }
.big-quote { font-size: 2rem; line-height: 1.1; font-weight: 800; letter-spacing: -.04em; margin-bottom: 18px; }
.principle-card > p:not(.card-kicker):not(.big-quote) { color: #bac4d6; }
.status-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 20px; font-family: ui-monospace, monospace; font-size: .86rem; }
.status-row span:nth-of-type(1) { color: var(--danger); }
.status-row span:nth-of-type(2) { color: var(--unknown); }
.status-row span:nth-of-type(3) { color: var(--pass); }
.status-row b { color: #66748c; }

.section { padding: 92px 0; }
.section-dark { background: var(--bg-2); color: white; }
.section-soft { background: var(--paper-2); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.intro-grid .prose { font-size: 1.08rem; color: #3d4758; }
.prose .muted, .muted { color: var(--muted); }
.section-heading { max-width: 820px; margin-bottom: 48px; }
.section-heading > p:last-child { color: var(--muted-light); font-size: 1.07rem; }
.section-heading.compact { margin-bottom: 36px; }
.section:not(.section-dark) .section-heading > p:last-child { color: var(--muted); }
.text-link { color: #205f55; font-weight: 750; }

.principle-strip { margin-top: 52px; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; border-top: 1px solid #d9dee6; }
.principle-strip span { display: inline-flex; padding: 7px 11px; border-radius: 999px; background: white; border: 1px solid #d8dee7; color: #48566a; font: 700 .78rem/1.2 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.entry-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.entry-card { min-height: 280px; padding: 23px; background: white; border: 1px solid var(--line-light); border-radius: var(--radius); display: flex; flex-direction: column; position: relative; overflow: hidden; }
.entry-card::after { content: ""; position: absolute; width: 110px; height: 110px; border-radius: 50%; right: -48px; top: -58px; background: rgba(119,226,194,.08); }
.entry-index { color: #9aa6b7; font: 700 .74rem/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; margin-bottom: 18px; }
.entry-card .project-type { margin: 0 0 9px; }
.entry-card h3 { margin: 0 0 10px; font-size: 1.18rem; }
.entry-card > p:not(.project-type) { color: var(--muted); font-size: .94rem; }
.entry-card .text-link { margin-top: auto; padding-top: 15px; }
.entry-links { margin-top: auto; padding-top: 15px; display: flex; flex-wrap: wrap; gap: 14px; }
.machine-entry { border-color: #a9cfc5; background: linear-gradient(155deg, #f7fffc, white 65%); }

.architecture-map { position: relative; display: grid; gap: 10px; margin: 38px 0 58px; }
.arch-layer { display: grid; grid-template-columns: 180px repeat(4, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
.layer-label { display: flex; align-items: center; color: #75839a; font-size: .78rem; text-transform: uppercase; letter-spacing: .11em; font-weight: 800; }
.arch-card { min-height: 94px; padding: 17px; border-radius: 14px; background: rgba(255,255,255,.035); border: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; }
.arch-card.featured { border-color: rgba(119,226,194,.4); background: rgba(119,226,194,.07); }
.arch-card strong { font-size: 1.03rem; }
.arch-card small { margin-top: 6px; color: #8795aa; line-height: 1.35; }
.flow-arrow { margin-left: 180px; color: #617087; height: 16px; line-height: 16px; }
.boundary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.boundary-grid article { padding: 22px; background: #10192a; border: 1px solid var(--line); border-radius: 15px; }
.boundary-grid article > span { color: var(--accent); font-family: ui-monospace, monospace; font-size: .8rem; }
.boundary-grid h3 { margin: 12px 0 10px; font-size: 1.05rem; }
.boundary-grid p { color: #8997ab; font-size: .93rem; margin-bottom: 0; }

.runtime-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.runtime-flow li { position: relative; min-height: 250px; padding: 20px 16px 18px; background: white; border: 1px solid var(--line-light); border-radius: 15px; }
.runtime-flow li:not(:last-child)::after { content: "→"; position: absolute; right: -13px; top: 34px; z-index: 2; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); color: #7d899a; font-weight: 800; }
.runtime-flow li > span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #e5f5f0; border: 1px solid #bfdcd4; color: #2f6f63; font: 800 .76rem/1 ui-monospace, monospace; margin-bottom: 18px; }
.runtime-flow strong { display: block; margin-bottom: 8px; font-size: .98rem; }
.runtime-flow p { margin: 0; color: var(--muted); font-size: .84rem; line-height: 1.48; }
.runtime-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; }
.runtime-notes article { padding: 24px; background: #eef2f6; border: 1px solid #d9e0e8; border-radius: var(--radius); }
.runtime-notes .card-kicker { color: #3a7b6e; margin-bottom: 10px; }
.runtime-notes h3 { margin: 0 0 9px; }
.runtime-notes p:last-child { color: var(--muted); margin: 0; }

.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 17px; }
.project-card { min-height: 260px; padding: 25px; border: 1px solid var(--line-light); border-radius: var(--radius); text-decoration: none; background: white; display: flex; flex-direction: column; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
a.project-card:hover, a.project-card:focus-visible { transform: translateY(-3px); border-color: #a9b8c9; box-shadow: 0 14px 36px rgba(31,45,67,.09); }
.project-type { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; color: #477c72; }
.project-card h3 { font-size: 1.35rem; margin: 15px 0 9px; }
.project-card p { color: var(--muted); font-size: .95rem; }
.repo-link { margin-top: auto; padding-top: 18px; font-family: ui-monospace, monospace; font-size: .76rem; color: #4a5d75; }
.operator-projects { margin-top: 52px; padding-top: 36px; border-top: 1px solid #d2d9e2; }
.operator-project-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 22px; }
.operator-project-heading .eyebrow { margin-bottom: 8px; }
.operator-project-heading h3 { margin: 0; font-size: 1.35rem; }
.operator-grid { grid-template-columns: repeat(2, 1fr); }
.operator-card { min-height: 220px; border-style: dashed; background: rgba(255,255,255,.65); }

.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.status-card { padding: 22px 24px; background: white; border: 1px solid var(--line-light); border-radius: var(--radius); }
.status-badge { display: inline-flex; align-items: center; min-height: 24px; padding: 0 10px; border-radius: 999px; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 12px; }
.status-badge.experimental { background: #f3e8d2; color: #7a5a12; }
.status-badge.research { background: #e4ecfb; color: #2f4f8f; }
.status-badge.active { background: #e5f5f0; color: #2f6f63; }
.status-badge.orientation { background: #eceff4; color: #4a5568; }
.status-card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.status-card p { margin: 0; color: var(--muted); font-size: .94rem; }
.status-footnote { margin: 28px 0 0; color: var(--muted); font-size: .9rem; max-width: 860px; }

.terminology-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: start; }
.term-list { margin: 0; background: white; border: 1px solid var(--line-light); border-radius: var(--radius); overflow: hidden; }
.term-list div { display: grid; grid-template-columns: 150px 1fr; gap: 20px; padding: 21px 23px; border-bottom: 1px solid #e3e7ed; }
.term-list div:last-child { border-bottom: 0; }
.term-list dt { font-weight: 800; }
.term-list dd { margin: 0; color: var(--muted); }

.contribute-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 80px; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.steps li { display: grid; grid-template-columns: 48px 1fr; gap: 18px; padding: 0 0 24px; position: relative; }
.steps li:not(:last-child)::before { content: ""; position: absolute; left: 23px; top: 42px; bottom: 2px; width: 1px; background: #d3d9e2; }
.steps li > span { width: 48px; height: 48px; display: grid; place-items: center; background: #e5f5f0; border: 1px solid #bfdcd4; color: #2f6f63; border-radius: 50%; font-family: ui-monospace, monospace; font-weight: 800; }
.steps strong { display: block; margin: 3px 0 4px; }
.steps p { color: var(--muted); margin-bottom: 0; }
.pathway-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 48px; }
.pathway-card { padding: 24px; background: white; border: 1px solid var(--line-light); border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.pathway-card .card-kicker { color: #3a7b6e; margin: 0; }
.pathway-card h3 { margin: 0; font-size: 1.15rem; }
.pathway-card p { margin: 0; color: var(--muted); font-size: .95rem; flex: 1; }
.pathway-card .text-link { margin-top: 10px; }
.callout { margin-top: 62px; display: flex; align-items: center; justify-content: space-between; gap: 28px; background: var(--bg-2); color: white; padding: 30px 34px; border-radius: 20px; }
.callout h3 { margin-bottom: 8px; }
.callout p { color: #a9b5c7; margin-bottom: 0; }
.callout-actions { display: flex; flex-wrap: wrap; gap: 10px; flex: 0 0 auto; }

.site-footer { background: var(--bg); color: white; padding: 42px 0; border-top: 1px solid var(--line); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.footer-grid p { color: #8190a8; margin: 7px 0 0; font-size: .88rem; }
.footer-grid > div:last-child { text-align: right; }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px !important; }
.footer-links a { color: #c5d0e0; text-decoration: none; font-size: .88rem; }
.footer-links a:hover, .footer-links a:focus-visible { color: white; }

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

@media (max-width: 1100px) {
  .site-nav { gap: 13px; font-size: .84rem; }
  .entry-grid { grid-template-columns: repeat(2, 1fr); }
  .runtime-flow { grid-template-columns: repeat(4, 1fr); }
  .runtime-flow li:not(:last-child)::after { display: none; }
}

@media (max-width: 980px) {
  .hero-grid, .two-col, .terminology-layout, .contribute-grid { grid-template-columns: 1fr; gap: 42px; }
  .project-grid, .status-grid, .pathway-grid, .runtime-notes { grid-template-columns: repeat(2, 1fr); }
  .operator-grid { grid-template-columns: 1fr 1fr; }
  .boundary-grid { grid-template-columns: repeat(2, 1fr); }
  .arch-layer { grid-template-columns: repeat(2, 1fr); }
  .layer-label { grid-column: 1 / -1; }
  .flow-arrow { margin-left: 0; text-align: center; }
  .runtime-flow { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav-wrap { position: relative; }
  .site-nav { display: none; position: absolute; top: 62px; right: 0; left: 0; padding: 14px; background: #111a2d; border: 1px solid var(--line); border-radius: 13px; flex-direction: column; align-items: stretch; gap: 0; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 10px 8px; }
}

@media (max-width: 720px) {
  :root { --shell: min(100% - 28px, 1180px); }
  section[id] { scroll-margin-top: 18px; }
  .site-header { position: static; }
  .hero { padding: 70px 0 62px; }
  h1 { font-size: clamp(2.6rem, 13vw, 4.4rem); }
  .section { padding: 68px 0; }
  .entry-grid, .project-grid, .operator-grid, .boundary-grid, .footer-grid, .status-grid, .pathway-grid, .runtime-notes, .runtime-flow { grid-template-columns: 1fr; }
  .entry-card, .project-card { min-height: 0; }
  .arch-layer { grid-template-columns: 1fr; }
  .term-list div { grid-template-columns: 1fr; gap: 5px; }
  .callout, .operator-project-heading { align-items: flex-start; flex-direction: column; }
  .callout-actions { width: 100%; }
  .callout-actions .button { flex: 1 1 auto; }
  .footer-grid > div:last-child { text-align: left; }
  .principle-strip span { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .hero-actions, .nav-toggle, .callout, .site-footer { display: none !important; }
  .hero, .section-dark { background: white !important; color: black !important; }
  .hero { padding: 30px 0; }
  .section { padding: 28px 0; }
  .arch-card, .boundary-grid article { color: black; background: white; border-color: #999; }
  .arch-card small, .boundary-grid p, .hero .lede { color: #333; }
  a { text-decoration: underline; }
}
