:root {
  --bg: #ebe8df;
  --surface: #f8f6ef;
  --surface-2: #efede5;
  --ink: #18231e;
  --muted: #69736d;
  --line: #c7c8bf;
  --line-dark: #9da39d;
  --green: #285c45;
  --green-dark: #193c2e;
  --accent: #e76f3c;
  --danger: #c53d36;
  --warning: #d99125;
  --glass: #2d8c8c;
  --metal: #6e7185;
  --paper: #d19a2c;
  --plastic: #d85c48;
  --trash: #4c4a43;
  --font-sans: "Manrope", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
  --shell: 1240px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 2px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection {
  color: var(--surface);
  background: var(--green);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  letter-spacing: -.045em;
  line-height: 1.04;
}

h1 {
  margin-bottom: 24px;
  font-size: clamp(3.4rem, 7.4vw, 7.3rem);
  font-weight: 700;
}

h2 {
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 4.6vw, 4.7rem);
  font-weight: 650;
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.2rem, 2vw, 1.65rem);
}

.shell {
  width: min(100% - (var(--gutter) * 2), var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 16px;
  color: var(--surface);
  background: var(--ink);
  transform: translateY(-160%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto;
  min-height: 72px;
  padding: 0 var(--gutter);
  border-bottom: 1px solid rgba(24, 35, 30, .18);
  background: rgba(235, 232, 223, .9);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .16em;
}

.site-nav {
  display: flex;
  align-items: stretch;
  height: 72px;
}

.site-nav a {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.site-nav a::after {
  position: absolute;
  right: 18px;
  bottom: -1px;
  left: 18px;
  height: 3px;
  content: "";
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--ink);
}

.site-nav a:hover::after,
.site-nav a.active::after {
  transform: scaleX(1);
}

.site-nav .nav-github {
  min-width: 118px;
  justify-content: center;
  gap: 8px;
  margin-left: 12px;
  color: var(--surface);
  background: var(--ink);
  transition: color .25s ease, background .25s ease;
}

.site-nav .nav-github::after {
  display: none;
}

.site-nav .nav-github:hover {
  color: var(--ink);
  background: var(--accent);
}

.menu-button {
  display: none;
}

.eyebrow {
  margin-bottom: 18px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero {
  display: grid;
  grid-template-columns: .94fr 1.06fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  min-height: calc(100dvh - 72px);
  padding-block: clamp(48px, 8vh, 88px);
}

.hero-copy h1 {
  max-width: 13ch;
  font-size: clamp(3.15rem, 4vw, 5rem);
}

.hero-lede {
  max-width: 540px;
  margin-bottom: 32px;
  color: #48534d;
  font-size: clamp(1rem, 1.5vw, 1.22rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 21px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .25s var(--ease), color .25s ease, background .25s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button-primary {
  color: var(--surface);
  background: var(--green);
  border-color: var(--green);
}

.button-primary:hover {
  background: var(--green-dark);
}

.button-secondary:hover {
  color: var(--surface);
  background: var(--ink);
}

.hero-visual {
  margin: 0;
}

.image-window {
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 10px 10px 0 rgba(40, 92, 69, .11);
}

.window-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  color: var(--surface);
  background: var(--green-dark);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.hero-visual figcaption,
.research-figure figcaption,
.doc-image figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.5;
}

.proof-strip {
  color: var(--surface);
  background: var(--green-dark);
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.proof-grid > div {
  padding: 28px 24px 25px;
  border-right: 1px solid rgba(248, 246, 239, .18);
}

.proof-grid > div:first-child {
  padding-left: 0;
}

.proof-grid > div:last-child {
  border: 0;
}

.proof-grid strong,
.proof-grid span {
  display: block;
}

.proof-grid strong {
  margin-bottom: 4px;
  font-size: clamp(1.3rem, 2vw, 2rem);
  letter-spacing: -.04em;
}

.proof-grid span {
  color: #aebbb3;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.section {
  padding-block: clamp(90px, 12vw, 160px);
}

.section-heading {
  max-width: 860px;
  margin-bottom: clamp(48px, 7vw, 84px);
}

.section-heading p,
.research-intro,
.exp019-lead > p:last-child {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-heading.compact {
  margin-bottom: 52px;
}

.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.process li {
  position: relative;
  min-height: 280px;
  padding: 24px 22px 24px 0;
  border-top: 1px solid var(--ink);
}

.process li:not(:last-child) {
  margin-right: 24px;
}

.process-number {
  display: block;
  margin-bottom: 72px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

.process h3 {
  font-size: 1.12rem;
}

.process p {
  color: var(--muted);
  font-size: 13px;
}

.process-future {
  opacity: .62;
}

.capabilities-section,
.figure-section {
  background: var(--surface);
}

.capability-grid {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.capability {
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: clamp(26px, 3vw, 42px);
  border: 0;
  background: transparent;
}

.capability-wide {
  grid-column: 1 / -1;
  min-height: 590px;
  padding-top: 52px;
  border-bottom: 1px solid var(--line-dark);
  background:
    linear-gradient(135deg, rgba(248, 246, 239, .94), rgba(248, 246, 239, .76)),
    url("assets/mira-dashboard.png") center / cover;
}

.capability-wide h3 {
  max-width: 9ch;
  font-size: clamp(2rem, 4vw, 4.5rem);
}

.capability-wide p {
  max-width: 430px;
}

.capability-orange {
  border-right: 1px solid var(--line-dark);
}

.capability-ink {
  grid-column: auto;
  color: var(--ink);
  background: transparent;
}

.capability-ink p {
  color: var(--muted);
}

.capability-deployment {
  grid-column: 1 / -1;
  min-height: 230px;
  border-top: 1px solid var(--line-dark);
}

.capability-kicker {
  margin-bottom: auto;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.capability p {
  color: inherit;
  opacity: .76;
  font-size: 14px;
}

.capability a {
  width: fit-content;
  margin-top: 18px;
  padding-bottom: 3px;
  border-bottom: 1px solid currentColor;
  font-size: 12px;
  font-weight: 700;
}

.large-stat {
  display: block;
  margin-top: 28px;
  font-size: clamp(5rem, 9vw, 8rem);
  letter-spacing: -.08em;
  line-height: .85;
}

.format-pair {
  display: flex;
  gap: 8px;
  margin: auto 0 24px;
}

.format-pair span {
  padding: 8px 12px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 11px;
}

.evidence-section {
  display: grid;
  grid-template-columns: .78fr 1.22fr;
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}

.evidence-copy h2 {
  font-size: clamp(2.5rem, 4.8vw, 5rem);
}

.evidence-copy > p:not(.eyebrow) {
  color: var(--muted);
}

.metric-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 36px 0;
  border-top: 1px solid var(--line-dark);
}

.metric-list div {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.metric-list dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.metric-list dd {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 750;
}

.text-link {
  display: inline-block;
  padding-bottom: 3px;
  border-bottom: 1px solid var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.research-figure {
  margin: 0;
}

.honesty-section {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(60px, 10vw, 150px);
  border-top: 1px solid var(--line-dark);
}

.honesty-title h2 {
  position: sticky;
  top: 120px;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
}

.honesty-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.honesty-columns article {
  padding-top: 12px;
}

.honesty-columns h3 {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--ink);
}

.check-list,
.open-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.check-list li,
.open-list li {
  position: relative;
  padding: 14px 0 14px 28px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.check-list li::before,
.open-list li::before {
  position: absolute;
  left: 0;
  font-family: var(--font-mono);
  font-weight: 700;
}

.check-list li::before {
  color: var(--green);
  content: "✓";
}

.open-list li::before {
  color: var(--accent);
  content: "+";
}

.closing {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 80px;
  padding: clamp(42px, 5vw, 64px);
  color: var(--surface);
  border-radius: var(--radius);
  background: var(--green-dark);
}

.closing .eyebrow {
  color: #9db7a8;
}

.closing h2 {
  margin: 0;
  font-size: clamp(2.2rem, 3.6vw, 4rem);
}

.closing-links {
  display: grid;
}

.closing-links a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(248, 246, 239, .2);
  transition: padding .3s var(--ease), color .2s ease;
}

.closing-links a:hover {
  padding-left: 10px;
  color: #f1a17f;
}

.closing-links span {
  color: #aebbb3;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.closing-links strong {
  font-size: 15px;
  text-align: right;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 48px;
  align-items: center;
  min-height: 110px;
  border-top: 1px solid var(--line-dark);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

/* Research */
.research-hero {
  padding-block: clamp(88px, 11vw, 145px) clamp(68px, 8vw, 105px);
}

.research-hero h1 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(3.4rem, 4.8vw, 5rem);
}

.research-intro {
  max-width: 720px;
  margin: 30px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
}

.result-banner {
  color: var(--surface);
  background: var(--green-dark);
}

.result-banner-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
}

.result-banner-grid div {
  padding: 28px 24px;
  border-right: 1px solid rgba(248, 246, 239, .18);
}

.result-banner-grid div:first-child {
  padding-left: 0;
}

.result-banner-grid div:last-child {
  border: 0;
}

.result-banner-grid span,
.result-banner-grid strong {
  display: block;
}

.result-banner-grid span {
  margin-bottom: 4px;
  color: #aebbb3;
  font-family: var(--font-mono);
  font-size: 9px;
  text-transform: uppercase;
}

.result-banner-grid strong {
  font-size: 1.4rem;
}

.research-story {
  display: grid;
  grid-template-columns: .75fr 1.25fr;
  gap: clamp(60px, 10vw, 150px);
}

.story-sticky {
  align-self: start;
  position: static;
}

.research-story .story-sticky {
  align-self: center;
}

.story-sticky p:last-child {
  color: var(--muted);
}

.story-steps {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line-dark);
}

.story-steps article {
  padding: clamp(38px, 5vw, 64px) 0;
  border: 0;
  border-top: 1px solid var(--line-dark);
  background: transparent;
}

.story-steps article > span,
.model-compare article > span,
.model-reference > div > span {
  display: block;
  margin-bottom: 40px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.story-steps article p {
  color: var(--muted);
}

.story-steps dl {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 38px 0 0;
}

.story-steps dl div {
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.story-steps dt,
.story-steps dd {
  margin: 0;
}

.story-steps dt {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}

.story-steps dd {
  margin-top: 3px;
  font-weight: 750;
}

.story-steps .story-breakthrough {
  margin-inline: -36px;
  padding-inline: 36px;
  color: var(--surface);
  background: var(--green-dark);
}

.story-steps .story-breakthrough > span {
  color: #f1a17f;
}

.story-steps .story-breakthrough p,
.story-steps .story-breakthrough dt {
  color: #aebbb3;
}

.story-steps .story-breakthrough dl div {
  border-color: rgba(248, 246, 239, .2);
}

.chart-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 68px 40px;
}

.chart-panel {
  margin: 0;
  padding: 30px 0 0;
  overflow: hidden;
  border: 0;
  border-top: 1px solid var(--line-dark);
  background: transparent;
}

.chart-wide {
  grid-column: 1 / -1;
}

.chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 26px;
}

.chart-heading span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.chart-heading h3 {
  margin: 0;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
}

.chart-heading > strong {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  white-space: nowrap;
}

.line-chart {
  min-height: 310px;
}

.line-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.compact-chart {
  min-height: 235px;
}

.chart-grid .compact-chart svg {
  margin-top: 18px;
}

.chart-grid figcaption,
.research-figure figcaption {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.bar-chart {
  display: grid;
  gap: 14px;
  min-height: 253px;
}

.bar-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  gap: 16px;
  align-items: center;
}

.bar-row span,
.bar-row strong {
  min-width: 0;
  font-family: var(--font-mono);
  font-size: 11px;
}

.bar-row strong {
  text-align: right;
}

.bar-track {
  display: flex;
  align-items: end;
  height: 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.bar-fill {
  height: 6px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ease);
}

.is-visible .bar-fill,
.bar-chart .bar-fill {
  transform: scaleX(var(--value));
}

.split-chart {
  display: grid;
  gap: 20px;
}

.split-track {
  display: flex;
  height: 52px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
}

.split-track span:nth-child(1) {
  background: var(--green-dark);
}

.split-track span:nth-child(2) {
  background: var(--accent);
}

.split-track span:nth-child(3) {
  background: #9ba69f;
}

.split-legend {
  display: flex;
  gap: 0;
}

.split-legend div {
  min-width: 0;
  flex: 0 0 var(--share);
  padding-top: 12px;
  padding-right: 16px;
  border-top: 3px solid var(--green-dark);
}

.split-legend div:nth-child(2) {
  border-color: var(--accent);
}

.split-legend div:nth-child(3) {
  border-color: #9ba69f;
}

.split-legend span,
.split-legend strong {
  display: block;
}

.split-legend span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
}

.split-legend strong {
  margin-top: 4px;
  font-size: 1.25rem;
}

.chart-table {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.exp019-section {
  display: grid;
  grid-template-columns: .7fr 1.3fr;
  gap: clamp(60px, 9vw, 130px);
  align-items: center;
}

.spec-clusters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.spec-clusters section {
  padding-top: 20px;
  border-top: 1px solid var(--ink);
}

.spec-clusters h3 {
  margin-bottom: 24px;
  font-size: 1rem;
}

.spec-clusters dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 0;
}

.spec-clusters dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.spec-clusters dt {
  color: var(--muted);
  font-size: 12px;
}

.spec-clusters dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.model-compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0;
  align-items: stretch;
}

.model-compare article {
  padding: clamp(30px, 4vw, 48px);
  border: 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  background: transparent;
}

.model-compare article > strong {
  display: block;
  font-size: clamp(3.4rem, 6vw, 6rem);
  letter-spacing: -.07em;
  line-height: 1;
}

.model-compare article > p {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
}

.model-compare ul {
  margin: 32px 0 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.model-compare li {
  margin: 8px 0;
  color: var(--muted);
  font-size: 13px;
}

.compare-gap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  color: var(--accent);
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.compare-gap strong {
  font-size: 1.7rem;
}

.compare-gap span {
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
}

.limitations {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: clamp(60px, 10vw, 150px);
  padding-top: clamp(56px, 8vw, 100px);
}

.limitation-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px 32px;
}

.limitation-list article {
  padding-top: 18px;
  border-top: 3px solid var(--accent);
}

.limitation-list p {
  color: var(--muted);
  font-size: 13px;
}

/* Readability pass */
.doc-section > p {
  font-size: 18px;
}

.docs-body .doc-section h3 {
  font-size: 20px;
}

.docs-body .tier-grid p,
.docs-body .reference-grid p {
  font-size: 14px;
}

.docs-body .tier-grid span {
  font-size: 11px;
}

.docs-body .model-reference dt,
.docs-body .model-reference dd,
.docs-body .command-groups dt,
.docs-body .command-groups dd {
  font-size: 13px;
}

.research-page .research-intro,
.research-page .story-sticky p:last-child,
.research-page .story-steps article p,
.research-page .exp019-lead > p:last-child,
.research-page .class-results-grid > div:first-child p,
.research-page .limitations p {
  font-size: 18px;
}

.research-page .result-banner-grid span,
.research-page .story-steps article > span,
.research-page .chart-heading span,
.research-page .model-compare article > span {
  font-size: 11px;
}

.research-page .story-steps dt,
.research-page .spec-clusters dt {
  font-size: 14px;
}
/* Docs */
.docs-body {
  background: var(--surface);
}

.docs-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 860px);
  gap: clamp(32px, 5vw, 72px);
  align-items: start;
}

.docs-sidebar,
.docs-toc {
  position: sticky;
  top: 104px;
  max-height: calc(100dvh - 124px);
  padding: 40px 0;
  overflow: auto;
}

.docs-search-wrap label,
.docs-nav p,
.docs-toc p {
  display: block;
  margin: 0 0 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.docs-search {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  color: var(--ink);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
}

.search-status {
  min-height: 16px;
  margin: 6px 0 22px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}

.docs-nav,
.docs-toc {
  display: grid;
}

.docs-nav p:not(:first-child) {
  margin-top: 28px;
}

.docs-nav a,
.docs-toc a {
  padding: 5px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.docs-nav a:hover,
.docs-toc a:hover,
.docs-nav a.active,
.docs-toc a.active {
  color: var(--green);
  font-weight: 700;
}

.docs-content {
  min-width: 0;
  padding: 86px 0 120px;
}

.docs-hero {
  padding-bottom: 72px;
  border-bottom: 1px solid var(--line);
}

.docs-hero h1 {
  max-width: 9ch;
  font-size: clamp(3.3rem, 5.2vw, 5.4rem);
}

.docs-hero > p:last-child {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.docs-paths {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 30px 0 80px;
}

.docs-paths a {
  min-height: 116px;
  padding: 18px 0;
  border: 0;
  border-top: 2px solid var(--line-dark);
  background: transparent;
  transition: border .2s ease, padding .25s var(--ease);
}

.docs-paths a:hover {
  padding-left: 8px;
  border-color: var(--green);
}

.docs-paths span,
.docs-paths strong {
  display: block;
}

.docs-paths span {
  margin-bottom: 20px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  text-transform: uppercase;
}

.docs-paths strong {
  font-size: 13px;
}

.doc-section {
  padding: 78px 0 30px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 90px;
}

.doc-section.is-filtered {
  display: none;
}

.doc-heading span {
  display: block;
  margin-bottom: 14px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.doc-heading h2 {
  margin-bottom: 24px;
  font-size: clamp(2.2rem, 4vw, 4rem);
}

.doc-section > p,
.doc-section > ul {
  max-width: 680px;
  color: #4c5650;
}

.doc-section h3 {
  margin-top: 42px;
  font-size: 1.12rem;
  letter-spacing: -.02em;
}

.doc-section code {
  font-family: var(--font-mono);
  font-size: .88em;
}

.doc-section p code,
.doc-section li code {
  padding: 2px 5px;
  color: var(--green-dark);
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--bg);
}

.doc-section li {
  margin: 9px 0;
}

.doc-section li a {
  color: var(--green);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.code-block {
  position: relative;
  overflow: hidden;
  margin: 24px 0 34px;
  color: #e4ece7;
  border-radius: var(--radius);
  background: var(--green-dark);
}

.code-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 38px;
  padding-left: 16px;
  border-bottom: 1px solid rgba(248, 246, 239, .15);
}

.code-top span {
  color: #9db0a4;
  font-family: var(--font-mono);
  font-size: 9px;
}

.copy-button {
  align-self: stretch;
  min-width: 72px;
  color: #dfe8e1;
  border: 0;
  border-left: 1px solid rgba(248, 246, 239, .15);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 9px;
  cursor: pointer;
}

.copy-button:hover {
  color: var(--ink);
  background: var(--accent);
}

.code-block pre {
  margin: 0;
  padding: 22px;
  overflow-x: auto;
  line-height: 1.7;
}

.code-block code {
  font-size: 12px;
}

.callout {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 20px;
  margin: 34px 0;
  padding: 22px;
  border-left: 4px solid var(--green);
  background: var(--bg);
}

.callout.warning {
  border-color: var(--accent);
}

.callout strong {
  font-size: 12px;
}

.callout p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.architecture-map {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  margin: 42px 0 48px;
}

.architecture-map > div {
  min-height: 138px;
  padding: 22px;
  border: 1px solid var(--line-dark);
  border-radius: 0;
  background: transparent;
}

.architecture-map strong,
.architecture-map span {
  display: block;
}

.architecture-map strong {
  margin-bottom: 20px;
  font-size: 15px;
}

.architecture-map span {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
}

.architecture-map b {
  color: var(--accent);
}

.reference-grid,
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.reference-grid > div,
.tier-grid > div {
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line-dark);
  background: transparent;
}

.reference-grid p,
.tier-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.tier-grid span {
  display: block;
  margin: 8px 0 18px;
  color: var(--green);
  font-family: var(--font-mono);
  font-size: 9px;
}

.doc-image {
  margin: 34px 0;
}

.doc-image img {
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
}

.model-reference {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 28px 0;
}

.model-reference > div {
  padding: 26px 0;
  border: 0;
  border-top: 1px solid var(--line-dark);
  background: transparent;
}

.model-reference h3 {
  margin-top: 0;
  overflow-wrap: anywhere;
}

.model-reference dl,
.command-groups dl {
  margin: 24px 0 0;
}

.model-reference dl div,
.command-groups dl div {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 18px;
  padding: 8px 0;
}

.model-reference dt,
.command-groups dt,
.model-reference dd,
.command-groups dd {
  margin: 0;
  font-size: 11px;
}

.model-reference dt,
.command-groups dt {
  color: var(--muted);
}

.command-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.command-groups section {
  padding: 22px 0;
  border: 0;
  border-top: 1px solid var(--line-dark);
  background: transparent;
}

.command-groups section h3 {
  margin-top: 0;
}

.api-list {
  margin: 28px 0;
  border-top: 1px solid var(--line-dark);
}

.api-list > div {
  display: grid;
  grid-template-columns: 54px minmax(180px, 1fr) 1.4fr;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.api-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.method {
  width: fit-content;
  padding: 3px 6px;
  color: var(--surface);
  border-radius: 4px;
  background: var(--green);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 600;
}

.method.post {
  background: var(--accent);
}

.method.ws {
  background: var(--metal);
}

.docs-empty {
  padding: 80px 0;
}

.docs-empty p {
  color: var(--muted);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.research-page [data-reveal] {
  transform: none;
  transition: opacity .35s ease;
}

.research-page [data-reveal].is-visible {
  transform: none;
}

@media (max-width: 1080px) {
  .proof-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .proof-grid > div:nth-child(3) {
    border-right: 0;
  }

  .process {
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 0;
  }

  .capability-grid {
    grid-template-columns: 1fr 1fr;
  }

  .capability-wide {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 520px;
  }

  .capability-ink {
    grid-column: auto;
  }

  .docs-layout {
    grid-template-columns: 190px minmax(0, 1fr);
  }

  .docs-toc {
    display: none;
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .menu-button {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 700;
  }

  .menu-lines,
  .menu-lines::before {
    display: block;
    width: 18px;
    height: 1px;
    content: "";
    background: var(--ink);
  }

  .menu-lines::before {
    transform: translateY(-5px);
  }

  .site-nav {
    position: absolute;
    top: 72px;
    right: 0;
    left: 0;
    display: none;
    height: auto;
    padding: 12px var(--gutter) 24px;
    border-bottom: 1px solid var(--line-dark);
    background: var(--bg);
  }

  .site-nav.is-open {
    display: grid;
  }

  .site-nav a {
    min-height: 48px;
    padding: 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .site-nav .nav-github {
    margin: 12px 0 0;
  }

  .hero,
  .evidence-section,
  .honesty-section,
  .research-story,
  .exp019-section,
  .class-results-grid,
  .limitations,
  .closing {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy h1 {
    max-width: 9ch;
  }

  .proof-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proof-grid > div,
  .proof-grid > div:first-child {
    padding-left: 0;
  }

  .process {
    grid-template-columns: 1fr 1fr;
  }

  .story-sticky,
  .honesty-title h2 {
    position: static;
  }

  .spec-clusters {
    grid-template-columns: 1fr;
  }

  .spec-clusters dl {
    grid-template-columns: 1fr 1fr;
  }

  .story-steps .story-breakthrough {
    margin-inline: 0;
    padding-inline: 28px;
  }

  .result-banner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-banner-grid div,
  .result-banner-grid div:first-child {
    padding-left: 0;
  }

  .chart-grid {
    grid-template-columns: 1fr;
  }

  .chart-grid figure,
  .chart-wide {
    grid-column: auto;
  }

  .docs-layout {
    grid-template-columns: 1fr;
  }

  .docs-sidebar {
    position: static;
    max-height: none;
    padding: 32px 0 0;
  }

  .docs-nav {
    display: none;
  }

  .docs-content {
    padding-top: 36px;
  }
}

@media (max-width: 560px) {
  h1 {
    font-size: clamp(3rem, 15vw, 4.6rem);
  }

  .hero {
    gap: 54px;
    padding-block: 64px 76px;
  }

  .button-row,
  .button {
    width: 100%;
  }

  .proof-grid {
    grid-template-columns: 1fr 1fr;
  }

  .proof-grid > div {
    min-height: 110px;
    padding-top: 22px;
  }

  .process,
  .capability-grid,
  .honesty-columns,
  .class-score-list,
  .spec-clusters dl,
  .limitation-list,
  .docs-paths,
  .reference-grid,
  .tier-grid,
  .model-reference,
  .command-groups {
    grid-template-columns: 1fr;
  }

  .process li {
    min-height: auto;
    margin-right: 0 !important;
    padding-bottom: 42px;
  }

  .process-number {
    margin-bottom: 34px;
  }

  .capability-wide {
    min-height: 460px;
  }

  .capability-ink {
    grid-column: auto;
  }

  .capability-orange {
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .capability-deployment {
    grid-column: auto;
  }

  .metric-list {
    grid-template-columns: 1fr;
  }

  .closing {
    gap: 44px;
    width: calc(100% - 28px);
    margin-bottom: 40px;
    padding: 32px 24px;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-block: 36px;
  }

  .story-steps dl {
    grid-template-columns: 1fr 1fr;
  }

  .result-banner-grid {
    grid-template-columns: 1fr 1fr;
  }

  .model-compare {
    grid-template-columns: 1fr;
  }

  .compare-gap {
    min-height: 90px;
  }

  .class-score-list div:nth-child(odd) {
    margin-right: 0;
  }

  .architecture-map {
    grid-template-columns: 1fr;
  }

  .architecture-map b {
    transform: rotate(90deg);
    text-align: center;
  }

  .callout {
    grid-template-columns: 1fr;
  }

  .api-list > div {
    grid-template-columns: 50px 1fr;
  }

  .api-list p {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

@media (forced-colors: active) {
  .button,
  .capability,
  .code-block,
  .closing {
    border: 1px solid CanvasText;
  }
}


/* Homepage refinement */
.home-page .section-heading p {
  font-size: 1.15rem;
  line-height: 1.6;
}

.home-page .process {
  gap: 12px;
}

.home-page .process li {
  min-height: 310px;
  padding: 28px 24px 28px 0;
}

.home-page .process li:not(:last-child) {
  margin-right: 12px;
}

.home-page .process-number {
  margin-bottom: 88px;
  font-size: 11px;
}

.home-page .process h3 {
  font-size: 1.28rem;
}

.home-page .process p {
  font-size: 15px;
  line-height: 1.55;
}

.home-page .proof-grid span {
  font-size: 10px;
}

.home-page .capability {
  min-height: 360px;
}

.home-page .capability:not(.capability-wide) h3 {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
}

.home-page .capability p,
.home-page .evidence-copy > p:not(.eyebrow),
.home-page .honesty-columns li {
  font-size: 15px;
  line-height: 1.6;
}

.home-page .metric-list {
  margin-block: 42px;
}

.home-page .honesty-columns {
  gap: 56px;
}


@media (max-width: 560px) {
  .home-page .process li {
    min-height: auto;
  }

  .home-page .process-number {
    margin-bottom: 34px;
  }

  .home-page .capability {
    min-height: auto;
  }
}

.bar-column-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 20px;
  align-items: end;
  min-height: 260px;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--line-dark);
}

.bar-column {
  display: grid;
  grid-template-rows: 24px 1fr 24px;
  gap: 10px;
  min-width: 0;
  height: 238px;
  align-items: end;
  text-align: center;
}

.bar-column strong,
.bar-column span {
  font-family: var(--font-mono);
  font-size: 11px;
}

.bar-column strong {
  color: var(--ink);
}

.bar-column span {
  color: var(--muted);
}

.bar-column .bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  width: 100%;
  height: 100%;
  border: 0;
  background: linear-gradient(to top, var(--line) 1px, transparent 1px);
}

.bar-column .bar-fill {
  width: min(54px, 58%);
  height: 100%;
  background: var(--green);
  transform: scaleY(var(--value));
  transform-origin: bottom;
  transition: transform .9s var(--ease);
}

.bar-column-grid + .data-table {
  margin-top: 18px;
}

.deployment-study {
  color: var(--surface);
  background: var(--green-dark);
}

.deployment-study h2,
.deployment-study h3,
.deployment-study .model-compare article > strong {
  color: var(--surface);
}

.deployment-study .section-heading p,
.deployment-study .model-compare article > span,
.deployment-study .model-compare article > p,
.deployment-study .model-compare li,
.deployment-study .compare-gap span {
  color: #aebbb3;
}

.deployment-study .model-compare article,
.deployment-study .compare-gap {
  border-color: rgba(248, 246, 239, .24);
}

.deployment-study .model-compare ul {
  border-top-color: rgba(248, 246, 239, .2);
}
.deployment-study > .shell {
  width: min(100%, var(--shell));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Final refinement pass */
:where(h1, h2, h3) {
  text-wrap: balance;
}

:where(main > section, .doc-section) {
  scroll-margin-top: 96px;
}

:where(a, button) {
  -webkit-tap-highlight-color: transparent;
}

.home-page .section-heading p,
.research-page .section-heading p,
.docs-body .doc-section > p {
  text-wrap: pretty;
}

.home-page .proof-grid > div {
  padding-inline: 18px;
}

.home-page .capability-grid,
.home-page .evidence-section,
.home-page .honesty-section {
  isolation: isolate;
}

.research-page .chart-grid {
  row-gap: clamp(48px, 6vw, 72px);
}

.research-page .chart-heading h3 {
  text-wrap: balance;
}

.docs-body .doc-section {
  scroll-margin-top: 96px;
}

@media (max-width: 1080px) {
  .section {
    padding-block: clamp(72px, 10vw, 120px);
  }

  .section-heading {
    margin-bottom: clamp(40px, 6vw, 64px);
  }

  .research-story,
  .exp019-section,
  .class-results-grid {
    gap: clamp(42px, 7vw, 86px);
  }

  .deployment-study > .shell {
    padding-inline: clamp(24px, 5vw, 56px);
  }
}

@media (max-width: 820px) {
  .home-page .proof-grid > div {
    padding-inline: 14px;
  }

  .research-page .chart-heading {
    gap: 16px;
  }

  .research-page .bar-column-grid {
    gap: 12px;
  }

  .docs-body .doc-section > p {
    max-width: 68ch;
  }
}

@media (max-width: 560px) {
  :where(main > section, .doc-section) {
    scroll-margin-top: 82px;
  }

  .home-page .proof-grid > div {
    padding-inline: 12px;
  }

  .research-page .chart-heading {
    align-items: end;
  }

  .research-page .bar-column-grid {
    gap: 8px;
  }

  .research-page .bar-column strong,
  .research-page .bar-column span {
    font-size: 10px;
  }

  .deployment-study > .shell {
    padding-inline: 20px;
  }
}
.doc-section-nav {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: clamp(48px, 7vw, 84px);
  padding-top: 18px;
  border-top: 1px solid var(--line-dark);
}

.doc-section-nav:has(a:only-child) {
  justify-content: flex-end;
}

.doc-section-nav a {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.doc-section-nav a:hover {
  color: var(--accent);
}