:root {
  --paper: #f5f1ea;
  --paper-2: #ece6dc;
  --ink: #1b1913;
  --ink-2: #4a463d;
  --ink-3: #7d7869;
  --rule: #d9d2c5;
  --accent: #b1471f;
  --accent-ink: #8a3616;
  --ok: #2f6b3a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --measure: 62ch;
  --gutter: 16px;
}


* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration-color: var(--rule); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.02; font-variation-settings: "opsz" 144; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); line-height: 1.12; }
h3 { font-size: 1.2rem; line-height: 1.3; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); font-size: 0.92em; }
code { background: var(--paper-2); padding: 0.05em 0.35em; border-radius: 3px; }
pre { background: var(--paper-2); border: 1px solid var(--rule); padding: 14px 16px; overflow-x: auto; border-radius: 4px; font-size: 0.86rem; line-height: 1.5; }
pre code { background: none; padding: 0; font-size: inherit; }
hr { border: 0; border-top: 1px solid var(--rule); margin: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }

/* labels */
.label {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.label .n { color: var(--accent); }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 20px; white-space: nowrap; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; letter-spacing: 0.04em; text-decoration: none; }
.brand small { font-family: var(--mono); font-weight: 400; font-size: 0.68rem; letter-spacing: 0.1em; color: var(--ink-3); margin-left: 10px; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; flex: 1; justify-content: center; min-width: 0; }
.nav li a { text-decoration: none; font-size: 0.9rem; color: var(--ink-2); padding-bottom: 2px; }
.nav li a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--accent); }
.nav li a:hover { color: var(--accent-ink); }
.nav .gh { border: 1px solid var(--rule); padding: 5px 11px; border-radius: 999px; font-family: var(--mono); font-size: 0.78rem; text-decoration: none; }
.nav .gh .long { display: inline; }
.nav .gh .short { display: none; }
@media (max-width: 1100px) { .nav .gh .long { display: none; } .nav .gh .short { display: inline; } }
@media (max-width: 820px) { .nav ul { display: none; } .subnav { display: flex; } }
.subnav { display: none; gap: 14px; overflow-x: auto; padding: 10px var(--gutter); border-bottom: 1px solid var(--rule); font-size: 0.85rem; white-space: nowrap; }
.subnav a { text-decoration: none; color: var(--ink-2); }
.subnav a[aria-current="page"] { color: var(--accent-ink); font-weight: 500; }
@media (max-width: 480px) { .brand small { display: none; } }

/* hero */
.hero { padding: 64px 0 40px; border-bottom: 1px solid var(--rule); }
.hero .grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; }
@media (max-width: 860px) { .hero .grid { grid-template-columns: 1fr; } }
.hero h1 em { font-style: italic; color: var(--accent-ink); }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; margin-top: 22px; }
.hero .ps { font-size: 0.92rem; color: var(--ink-3); margin-top: 18px; }
.figures { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.figures div { background: var(--paper); padding: 16px 18px; }
.figures b { display: block; font-family: var(--mono); font-weight: 500; font-size: 1.6rem; line-height: 1.1; }
.figures span { display: block; font-size: 0.82rem; color: var(--ink-3); margin-top: 6px; }
.figures .src { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); margin-top: 8px; overflow-wrap: anywhere; }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 4px; text-decoration: none; font-size: 0.95rem; border: 1px solid var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent-ink); }

/* sections */
section { padding: 64px 0; border-bottom: 1px solid var(--rule); }
section .head { display: grid; grid-template-columns: 200px 1fr; gap: 24px; margin-bottom: 32px; }
@media (max-width: 760px) { section .head { grid-template-columns: 1fr; gap: 8px; } }
section .head p { color: var(--ink-2); margin-top: 12px; max-width: var(--measure); }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 28px 40px; }
.cols h3 { margin-bottom: 8px; }
.cols p { color: var(--ink-2); font-size: 0.97rem; }

/* comparison table */
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; table-layout: auto; }
.table th, .table td { text-align: left; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
.table th { font-family: var(--mono); font-weight: 500; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); }
.table td.k { font-weight: 500; min-width: 11ch; }
.table td.n { font-family: var(--mono); min-width: 12ch; }
.table .src { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); display: block; margin-top: 3px; overflow-wrap: anywhere; white-space: normal; }
.table-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  .table thead { display: none; }
  .table tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .table td { display: block; border: 0; padding: 2px 0; min-width: 0; }
  .table td.n { margin-bottom: 4px; }
}

/* ledger */
.ledger { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); }
@media (max-width: 760px) { .ledger { grid-template-columns: 1fr; } }
.ledger > div { padding: 22px 24px; }
.ledger > div + div { border-left: 1px solid var(--rule); }
@media (max-width: 760px) { .ledger > div + div { border-left: 0; border-top: 1px solid var(--rule); } }
.ledger h3 { margin-bottom: 14px; }
.ledger ul { margin: 0; padding-left: 18px; font-size: 0.95rem; color: var(--ink-2); }
.ledger li { margin-bottom: 8px; }
.ledger li b { color: var(--ink); font-weight: 500; }

/* engines */
.engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.engines div { background: var(--paper); padding: 18px; }
.engines .label { margin-bottom: 8px; }
.engines h3 { margin-bottom: 6px; }
.engines p { font-size: 0.9rem; color: var(--ink-2); margin: 0; }

/* tree */
.tree { font-family: var(--mono); font-size: 0.82rem; line-height: 1.6; color: var(--ink-2); }
.tree b { color: var(--ink); font-weight: 500; }

/* deliverable */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; }
.steps li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.steps li::before { counter-increment: s; content: counter(s, decimal-leading-zero); font-family: var(--mono); color: var(--accent); font-size: 0.9rem; padding-top: 4px; }
.steps b { font-weight: 500; }
.steps p { margin: 4px 0 0; color: var(--ink-2); font-size: 0.95rem; }

/* team */
.team { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.card { border: 1px solid var(--rule); padding: 18px 20px; background: var(--paper); }
.card .name { font-family: var(--serif); font-size: 1.25rem; font-weight: 500; }
.card .handle { font-family: var(--mono); font-size: 0.8rem; color: var(--ink-3); margin: 4px 0 12px; }
.card .handle a { text-decoration: none; }
.card p { font-size: 0.92rem; color: var(--ink-2); margin: 0; }

/* footer */
footer { padding: 40px 0 60px; color: var(--ink-3); font-size: 0.88rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer a { text-decoration: none; }

.note { border-left: 3px solid var(--accent); padding: 4px 0 4px 16px; color: var(--ink-2); font-size: 0.95rem; max-width: var(--measure); }
.small { font-size: 0.85rem; color: var(--ink-3); }

/* page header */
.page { padding: 48px 0 24px; }
.page h1 { font-size: clamp(2rem, 4.5vw, 3.4rem); }
.page .lede { font-size: 1.15rem; color: var(--ink-2); max-width: 56ch; margin-top: 14px; }

/* icon cards */
.icons { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.icon-card { border: 1px solid var(--rule); padding: 20px; background: #fff; border-radius: 6px; }
.icon-card svg { width: 40px; height: 40px; stroke: var(--accent); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 12px; }
.icon-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.icon-card p { font-size: 0.92rem; color: var(--ink-2); margin: 0; }
.icon-card a.more { display: inline-block; margin-top: 10px; font-size: 0.85rem; color: var(--accent-ink); text-decoration: none; }

/* diagrams */
.diagram { width: 100%; height: auto; display: block; }
.diagram text { font-family: var(--sans); font-size: 13px; fill: var(--ink); }
.diagram .m { font-family: var(--mono); font-size: 11px; fill: var(--ink-3); }
.diagram .box { fill: #fff; stroke: var(--ink); stroke-width: 1.2; }
.diagram .soft { fill: var(--paper-2); stroke: var(--rule); }
.diagram .acc { fill: var(--accent); stroke: none; }
.diagram .accbox { fill: #fbe9df; stroke: var(--accent); stroke-width: 1.2; }
.diagram .line { stroke: var(--ink-2); stroke-width: 1.2; fill: none; }
.diagram .dash { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 3; fill: none; }
.diagram .t { font-weight: 500; }
.diagram .w { fill: #fff; }
.figure { border: 1px solid var(--rule); background: #fff; padding: 20px; border-radius: 6px; }
.figure .cap { font-size: 0.82rem; color: var(--ink-3); margin-top: 10px; }
.figure .cap code { font-size: 0.78rem; }

/* bars */
.bars { display: grid; gap: 14px; }
.bar { display: grid; grid-template-columns: 210px 1fr 90px; gap: 14px; align-items: center; font-size: 0.92rem; }
@media (max-width: 640px) { .bar { grid-template-columns: 1fr; gap: 4px; } }
.bar .track { height: 14px; background: var(--paper-2); border-radius: 3px; overflow: hidden; position: relative; }
.bar .fill { height: 100%; background: var(--accent); }
.bar .fill.dim { background: var(--ink-3); }
.bar .fill.ok { background: var(--ok); }
.bar .val { font-family: var(--mono); text-align: right; }
.bar .lab b { font-weight: 500; }
.bar .lab small { display: block; color: var(--ink-3); font-family: var(--mono); font-size: 0.72rem; overflow-wrap: anywhere; }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.tile { background: #fff; padding: 18px; }
.tile b { display: block; font-family: var(--mono); font-size: 1.5rem; font-weight: 500; }
.tile span { display: block; font-size: 0.85rem; color: var(--ink-2); margin-top: 6px; }
.tile small { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); margin-top: 8px; overflow-wrap: anywhere; }

/* status dots */
.status { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.status li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: start; font-size: 0.95rem; }
.status i { width: 12px; height: 12px; border-radius: 50%; margin-top: 6px; display: block; }
.status .done i { background: var(--ok); }
.status .part i { background: #d9a441; }
.status .no i { background: var(--rule); border: 1px solid var(--ink-3); }
.status b { font-weight: 500; }
.status span { color: var(--ink-2); }
.legend { display: flex; gap: 18px; font-size: 0.82rem; color: var(--ink-3); margin-bottom: 14px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

/* os steps */
.os { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.os .card { border-radius: 6px; background: #fff; }
.os h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.os h3 svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.6; }
.os pre { margin: 8px 0; }
.os .step { font-family: var(--mono); font-size: 0.72rem; color: var(--accent); letter-spacing: 0.1em; text-transform: uppercase; margin-top: 12px; }

/* team avatars */
.card img { width: 64px; height: 64px; border-radius: 50%; display: block; margin-bottom: 12px; background: var(--paper-2); }
.strip { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.strip img { width: 44px; height: 44px; border-radius: 50%; background: var(--paper-2); }
.strip a { text-decoration: none; }

/* stack */
.stack { display: grid; gap: 6px; }
.stack div { border: 1px solid var(--ink); padding: 10px 14px; background: #fff; display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: 0.92rem; align-items: center; }
.stack div b { font-weight: 500; }
.stack div span { color: var(--ink-2); }
.stack div.acc { background: #fbe9df; border-color: var(--accent); }
@media (max-width: 520px) { .stack div { grid-template-columns: 1fr; gap: 2px; } }

/* timeline */
.timeline { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0; position: relative; }
.timeline div { padding: 12px 12px 0 0; border-top: 3px solid var(--rule); font-size: 0.88rem; }
.timeline div.acc { border-top-color: var(--accent); }
.timeline div b { display: block; font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
.timeline div span { color: var(--ink-2); }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }
@media (max-width: 800px) { .two { grid-template-columns: 1fr; } }
.section-link { font-size: 0.9rem; color: var(--accent-ink); text-decoration: none; }

/* home hero with floating artifacts */
.hero.home { position: relative; padding: 80px 0 60px; overflow: hidden; min-height: 620px; }
.hero.home .wrap { position: relative; min-height: 520px; }
.hero.home .center { position: relative; z-index: 2; max-width: 720px; margin: 40px auto 0; text-align: center; }
.hero.home .center .lede { margin-left: auto; margin-right: auto; max-width: 54ch; }
.hero.home .center .cta { justify-content: center; }
.hero.home h1 { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
.float { position: absolute; z-index: 1; width: 250px; background: #fff; border: 1px solid var(--rule); border-radius: 8px; padding: 12px 14px; box-shadow: 0 12px 30px rgba(27,25,19,0.08); }
.float pre { margin: 8px 0 0; padding: 8px 10px; font-size: 0.72rem; line-height: 1.45; background: var(--paper); border: 0; }
.float .m { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); margin-top: 8px; }
.float .mini { height: 10px; background: var(--paper-2); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.float .mini div { height: 100%; background: var(--accent); }
.f1 { left: 0; top: 30px; transform: rotate(-3deg); }
.f2 { right: 0; top: 10px; transform: rotate(2.5deg); }
.f3 { left: 20px; bottom: 20px; transform: rotate(2deg); }
.f4 { right: 30px; bottom: 40px; transform: rotate(-2deg); }
@media (max-width: 1000px) { .float { display: none; } .hero.home { min-height: 0; } .hero.home .wrap { min-height: 0; } .hero.home .center { margin-top: 0; } }

/* logo-style strip */
.strip-section { padding: 28px 0; border-bottom: 1px solid var(--rule); background: #fff; }
.logos { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 36px; font-family: var(--serif); font-size: 1.15rem; color: var(--ink-2); }
.logos b { font-family: var(--mono); font-weight: 500; color: var(--ink); margin-left: 6px; font-size: 1rem; }
.icons a.icon-card { text-decoration: none; color: inherit; display: block; }
.icons a.icon-card:hover { border-color: var(--accent); }
.team-card { display: grid !important; grid-template-columns: 1fr auto; gap: 16px; align-items: center; }
.faces { display: grid; grid-template-columns: repeat(3, 40px); gap: 6px; }
.faces img { width: 40px; height: 40px; border-radius: 50%; background: var(--paper-2); }
.faces-cell { display: flex; flex-wrap: wrap; gap: 10px; align-content: center; align-items: center; padding: 10px 4px; }
.faces-cell a { display: block; line-height: 0; }
.faces-cell img { width: 56px; height: 56px; border-radius: 12px; background: var(--paper-2); }
@media (min-width: 700px) { .faces-cell { grid-column: span 2; } }

/* evaluator page and sources */
.steps { display: grid; gap: 14px; }
.stepcard { display: grid; grid-template-columns: 44px 1fr; gap: 16px; background: #fff; border: 1px solid var(--rule); padding: 20px; }
.stepcard .num { font-family: var(--serif); font-size: 1.6rem; color: var(--accent); line-height: 1; padding-top: 2px; }
.stepcard h3 { margin: 0 0 10px; font-size: 1.05rem; }
.stepcard h3 small { font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 400; }
.stepcard pre { margin: 0 0 10px; }
.stepcard p { margin: 0; }
.glossary { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 0; }
.glossary > div { background: #fff; padding: 16px 18px; }
.glossary dt { font-family: var(--serif); font-size: 1.05rem; font-weight: 500; margin-bottom: 6px; }
.glossary dd { margin: 0; font-size: 0.9rem; color: var(--ink-2); line-height: 1.5; }
sup.fn { font-size: 0.7em; line-height: 0; }
sup.fn a { color: var(--accent); text-decoration: none; font-family: var(--mono); }
.sources { padding-left: 1.4em; margin: 0; font-size: 0.9rem; color: var(--ink-2); line-height: 1.55; }
.sources li { margin-bottom: 8px; }
.sources a { font-family: var(--mono); font-size: 0.85em; overflow-wrap: anywhere; }
@media (max-width: 640px) { .stepcard { grid-template-columns: 1fr; gap: 6px; } }
