:root {
  --bg: #eef0f3;
  --surface: #ffffff;
  --surface-soft: #f7f8fa;
  --ink: #16181c;
  --ink-soft: #4b5158;
  --ink-faint: #7d848d;
  --line: #dcdfe4;
  --graphite: #23262b;
  --graphite-2: #2e3238;
  --graphite-ink: #f0f2f4;
  --graphite-faint: #aeb4bc;
  --accent: #4d7659;
  --accent-strong: #365d42;
  --accent-soft: #edf4ef;
  --blue: #376f95;
  --success: #2f9e44;
  --warning: #d7a52b;
  --radius: 14px;
  --radius-sm: 9px;
  --shell: 1180px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shadow: 0 1px 2px rgb(22 24 28 / 5%), 0 10px 30px rgb(22 24 28 / 7%);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; background: var(--bg); -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font: 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
code, pre { font-family: var(--mono); }
code { overflow-wrap: anywhere; }
.shell { width: min(100% - 32px, var(--shell)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 200; padding: 10px 16px; border-radius: 0 0 8px 8px; background: #fff; color: var(--ink); }
.skip-link:focus { top: 0; }

.site-header { position: sticky; top: 0; z-index: 100; color: var(--graphite-ink); background: rgb(35 38 43 / 96%); border-bottom: 1px solid #111318; backdrop-filter: blur(12px); }
.site-header__row { min-height: 72px; display: flex; align-items: center; gap: 28px; }
.brand { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 2px 8px; color: inherit; text-decoration: none; line-height: 1.08; }
.brand strong { font-size: 1.17rem; letter-spacing: .09em; }
.brand .brand__family { color: #a9c4b0; font-size: .68rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.brand .brand__descriptor { grid-column: 1 / -1; color: var(--graphite-faint); font-size: .61rem; letter-spacing: .13em; text-transform: uppercase; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.site-nav a { color: var(--graphite-faint); text-decoration: none; font-size: .86rem; font-weight: 650; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: #fff; }
.site-nav .nav-primary { padding: 8px 14px; border: 1px solid rgb(255 255 255 / 22%); border-radius: 999px; color: var(--graphite-ink); }

.reconstruction-notice { margin-block: 18px; padding: 14px 17px; display: flex; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; color: #39311e; background: #fff8df; border: 1px solid #d7b24c; border-radius: 10px; }
.reconstruction-notice strong { color: #211d13; }
.reconstruction-notice span { font-size: .89rem; }

.hero { position: relative; overflow: hidden; color: var(--graphite-ink); background: var(--graphite); border-bottom: 1px solid #111318; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .2; background-image: linear-gradient(rgb(149 170 153 / 16%) 1px, transparent 1px), linear-gradient(90deg, rgb(149 170 153 / 16%) 1px, transparent 1px); background-size: 58px 58px; mask-image: linear-gradient(to right, #000, transparent 88%); }
.grid-node { position: absolute; z-index: 1; color: #75927c; font: 500 .8rem var(--mono); }
.grid-node--one { left: max(16px, calc((100% - var(--shell)) / 2)); top: 58px; }
.grid-node--two { left: 50%; bottom: 34px; }
.grid-node--three { right: max(16px, calc((100% - var(--shell)) / 2)); top: 42%; }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); align-items: center; gap: clamp(36px, 7vw, 96px); padding-block: clamp(54px, 8vw, 96px); }
.eyebrow { margin: 0 0 10px; color: var(--ink-faint); font-size: .72rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.hero .eyebrow { color: #a9c4b0; }
h1, h2, h3 { line-height: 1.17; letter-spacing: -.025em; }
.hero h1 { max-width: 720px; margin: 0; font-size: clamp(2.25rem, 5vw, 4.6rem); }
.hero__lead { max-width: 700px; margin: 22px 0 0; color: var(--graphite-faint); font-size: clamp(1rem, 1.5vw, 1.16rem); }
.hero__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid transparent; border-radius: 999px; text-decoration: none; font-size: .88rem; font-weight: 700; }
.button--light { color: var(--graphite); background: #fff; }
.button--ghost { color: var(--graphite-ink); border-color: rgb(255 255 255 / 25%); background: rgb(255 255 255 / 5%); }
.button:hover { transform: translateY(-1px); }
.release-console { position: relative; overflow: hidden; border: 1px solid rgb(255 255 255 / 14%); border-radius: var(--radius); background: rgb(255 255 255 / 5%); box-shadow: 0 22px 60px rgb(0 0 0 / 18%); }
.release-console__top { min-height: 44px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; color: var(--graphite-faint); border-bottom: 1px solid rgb(255 255 255 / 12%); font: 700 .63rem var(--mono); letter-spacing: .1em; }
.domain-map { padding: 27px 20px 25px; display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr; align-items: center; gap: 4px; background: linear-gradient(180deg, rgb(77 118 89 / 11%), transparent); }
.domain-map > div { min-width: 0; display: grid; justify-items: center; gap: 4px; text-align: center; }
.domain-map__node { width: 13px; height: 13px; margin-bottom: 6px; border: 2px solid #9ac2a4; border-radius: 50%; background: #4d7659; box-shadow: 0 0 0 6px rgb(77 118 89 / 16%), 0 0 24px rgb(113 169 128 / 28%); }
.domain-map small { color: #7f9a86; font: 650 .59rem var(--mono); }
.domain-map strong { max-width: 100%; color: var(--graphite-ink); font-size: .73rem; letter-spacing: .02em; }
.domain-map__link { height: 1px; background: linear-gradient(90deg, #587160, #91a797); }
.release-ledger { position: relative; padding: 19px 20px 21px; border-top: 1px solid rgb(255 255 255 / 12%); background: rgb(0 0 0 / 8%); }
.release-ledger__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid rgb(255 255 255 / 12%); }
.release-ledger__head strong { font-size: 1.15rem; }
.release-ledger__head > span { color: var(--graphite-faint); font: 650 .68rem var(--mono); }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border: 1px solid rgb(255 255 255 / 18%); border-radius: 999px; color: #d8f5df; font-size: .7rem; font-weight: 750; letter-spacing: .1em; }
.status-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #69db7c; box-shadow: 0 0 0 4px rgb(105 219 124 / 14%); }
.release-ledger dl { margin: 18px 0 0; display: grid; gap: 15px; }
.release-ledger dl > div { display: grid; gap: 2px; }
.release-ledger dt { color: var(--graphite-faint); font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; }
.release-ledger dd { margin: 0; font-family: var(--mono); font-size: .82rem; overflow-wrap: anywhere; }

.principle-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.principle-strip article { padding: 22px clamp(18px, 3vw, 34px); background: var(--surface); }
.principle-strip span { display: block; color: var(--accent); font-family: var(--mono); font-size: .72rem; }
.principle-strip strong { display: block; margin-top: 3px; font-size: .95rem; }

.section { padding-block: clamp(46px, 7vw, 78px); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 760px; margin-bottom: 28px; }
.section-head h2 { margin: 0; font-size: clamp(1.65rem, 3vw, 2.35rem); }
.section-head p { margin: 12px 0 0; color: var(--ink-soft); }
.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { padding: clamp(22px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card h3 { margin: 0 0 12px; font-size: 1.13rem; }
.card p { margin: 0; color: var(--ink-soft); }
.card ul { margin: 16px 0 0; padding-left: 20px; color: var(--ink-soft); }
.card li + li { margin-top: 8px; }
.boundary-card { border-top: 3px solid var(--accent); }
.boundary-card--quiet { border-top-color: var(--graphite); }

.flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 34px; counter-reset: flow; }
.flow article { position: relative; min-height: 180px; padding: 25px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.flow article::before { counter-increment: flow; content: "0" counter(flow); display: inline-grid; place-items: center; width: 36px; height: 36px; margin-bottom: 24px; border-radius: 50%; color: #fff; background: var(--graphite); font: 700 .75rem var(--mono); }
.flow article:not(:last-child)::after { content: "→"; position: absolute; right: -25px; top: 50%; color: var(--ink-faint); font-size: 1.5rem; }
.flow h3 { margin: 0 0 8px; font-size: 1.05rem; }
.flow p { margin: 0; color: var(--ink-soft); font-size: .9rem; }

.releases { display: grid; gap: 12px; }
.release-card { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 20px 22px; color: inherit; text-decoration: none; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.release-card:hover { transform: translateY(-2px); border-color: #aeb5bf; box-shadow: var(--shadow); }
.release-card__version { color: var(--accent); font: 750 1rem var(--mono); }
.release-card h3 { margin: 0 0 3px; font-size: 1rem; }
.release-card p { margin: 0; color: var(--ink-soft); font-size: .87rem; }
.release-card__state { padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink-soft); font-size: .7rem; font-weight: 750; letter-spacing: .08em; }

.machine-panel { padding: clamp(26px, 4vw, 42px); color: var(--graphite-ink); background: var(--graphite); border-radius: var(--radius); }
.machine-panel__grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 46px; align-items: start; }
.machine-panel h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.machine-panel p { color: var(--graphite-faint); }
.endpoint-list { display: grid; gap: 10px; }
.endpoint { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 15px; padding: 13px 15px; border: 1px solid rgb(255 255 255 / 12%); border-radius: var(--radius-sm); background: rgb(255 255 255 / 5%); text-decoration: none; }
.endpoint span { color: #a9c4b0; font: 700 .72rem var(--mono); }
.endpoint code { color: var(--graphite-ink); font-size: .79rem; }

.ecosystem { padding-top: 28px; }
.ecosystem-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.ecosystem-grid a { min-height: 172px; padding: 25px; display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: background-color .16s ease; }
.ecosystem-grid a + a { border-left: 1px solid var(--line); }
.ecosystem-grid a:hover { background: var(--surface-soft); }
.ecosystem-grid span { color: var(--accent-strong); font-size: .68rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.ecosystem-grid strong { margin-top: 18px; font-size: 1.12rem; letter-spacing: .06em; }
.ecosystem-grid small { margin-top: auto; color: var(--ink-soft); font-size: .8rem; line-height: 1.5; }

.site-footer { margin-top: 32px; color: var(--graphite-faint); background: var(--graphite); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; padding-block: 42px; }
.footer-grid strong { display: block; margin-bottom: 8px; color: var(--graphite-ink); }
.footer-grid p { max-width: 50ch; margin: 0; font-size: .86rem; }
.footer-grid nav { display: flex; flex-direction: column; gap: 7px; }
.footer-grid a { color: var(--graphite-faint); text-decoration: none; font-size: .86rem; }
.footer-grid a:hover { color: #fff; }
.footer-note { padding-block: 16px; border-top: 1px solid rgb(255 255 255 / 9%); font-size: .75rem; }

/* Versioned reference documents */
.reference-page { background: var(--bg); }
.reference-page > .reconstruction-notice,
.reference-page > .reference-hero,
.reference-page > section,
.reference-page > main,
.reference-page > footer:not(.site-footer) { width: min(100% - 32px, 980px); margin-inline: auto; }
.reference-page > .reconstruction-notice { margin-block: 18px; }
.reference-page > .reference-hero { margin-top: 28px; margin-bottom: 26px; padding: clamp(28px, 5vw, 48px); color: var(--graphite-ink); background: var(--graphite); border: 0; border-radius: var(--radius); }
.reference-page > .reference-hero h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.6rem); }
.reference-page > .reference-hero p { color: var(--graphite-faint); }
.reference-page .version-tag,
.reference-page .badge { display: inline-flex; margin-top: 12px; padding: 5px 11px; color: #d8f5df; background: rgb(255 255 255 / 7%); border: 1px solid rgb(255 255 255 / 16%); border-radius: 999px; font-size: .72rem; font-weight: 750; letter-spacing: .08em; }
.reference-page .topbar { display: flex; justify-content: space-between; align-items: center; gap: 18px; }
.reference-page .home-link { color: var(--graphite-ink); text-decoration: none; font-size: .84rem; }
.reference-page > section,
.reference-page > main { padding: 24px clamp(20px, 4vw, 34px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.reference-page > section { margin-bottom: 16px; }
.reference-page > main { margin-bottom: 24px; }
.reference-page section h2,
.reference-page main h2 { margin: 0 0 14px; padding-top: 0; color: var(--ink); font-size: 1.2rem; letter-spacing: -.01em; text-transform: none; border: 0; }
.reference-page section p,
.reference-page main p,
.reference-page section li,
.reference-page main li { color: var(--ink-soft); }
.reference-page .note { margin: 16px 0; padding: 14px 17px; border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-soft); font-style: normal; }
.reference-page table { display: table; width: 100%; margin: 18px 0; border-collapse: collapse; font-size: .88rem; }
.reference-page th, .reference-page td { padding: 12px 13px; vertical-align: top; text-align: left; border: 1px solid var(--line); overflow-wrap: anywhere; }
.reference-page th { background: var(--surface-soft); }
.reference-page code { padding: 2px 5px; border-radius: 4px; background: #edf0f4; }
.reference-page pre { max-width: 100%; padding: 18px; overflow-x: auto; color: #e7eaf0; background: var(--graphite); border-radius: var(--radius-sm); }
.reference-page pre code { padding: 0; color: inherit; background: transparent; }
.reference-page > footer:not(.site-footer) { margin-top: 34px; margin-bottom: 38px; padding-top: 20px; color: var(--ink-faint); border-top: 1px solid var(--line); font-size: .8rem; }
.reference-page > footer:not(.site-footer) p { margin: 4px 0; }

@media (max-width: 820px) {
  .site-header { position: static; }
  .site-header__row { align-items: flex-start; flex-direction: column; gap: 12px; padding-block: 14px; }
  .site-nav { width: 100%; margin-left: 0; gap: 15px; overflow-x: auto; padding-bottom: 2px; }
  .site-nav a { white-space: nowrap; }
  .hero__grid, .machine-panel__grid { grid-template-columns: 1fr; }
  .ecosystem-grid { grid-template-columns: 1fr; }
  .ecosystem-grid a { min-height: 145px; }
  .ecosystem-grid a + a { border-left: 0; border-top: 1px solid var(--line); }
  .principle-strip { grid-template-columns: repeat(2, 1fr); }
  .flow { grid-template-columns: 1fr; gap: 14px; }
  .flow article:not(:last-child)::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .content-grid, .principle-strip { grid-template-columns: 1fr; }
  .hero__grid { padding-block: 46px; }
  .hero h1 { font-size: 2.25rem; }
  .release-card { grid-template-columns: 1fr auto; gap: 8px 14px; }
  .release-card > div { grid-column: 1 / -1; }
  .endpoint { grid-template-columns: 1fr; gap: 3px; }
  .reference-page .topbar { align-items: flex-start; flex-direction: column; }
  .reference-page table { display: block; overflow-x: auto; white-space: normal; }
}
