/* DF3F site styles: tokens, base, layout, landing sections, docs. */

:root {
  --bg: #FAF8F4;
  --surface: #FFFFFF;
  --ink: #101418;
  --muted: #5B6470;
  --line: #E6E1D8;
  --line-strong: #D5CEC1;
  --accent: #0F6E5C;
  --accent-strong: #0B5A4B;
  --accent-deep: #0C5E4F;
  --accent-soft: #E3F1EC;
  --highlight: #F2C66D;
  --placeholder: #F1EDE6;
  --focus: var(--accent);

  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --fs-h1: clamp(2.625rem, 1.35rem + 5.1vw, 5.5rem);
  --fs-h2: clamp(1.875rem, 1.2rem + 2.2vw, 2.75rem);
  --fs-h3: 1.1875rem;
  --fs-lead: clamp(1.0625rem, 0.95rem + 0.45vw, 1.25rem);
  --fs-small: 0.875rem;

  /* 8 px spacing scale */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 48px;
  --s-8: 64px;
  --s-10: 80px;
  --s-12: 96px;

  --radius: 12px;
  --radius-lg: 16px;
  --container: 1200px;
  --gutter: clamp(16px, 4.5vw, 32px);
  --section: clamp(72px, 9vw, 128px);
  --header-h: 72px;
  --shadow: 0 1px 2px rgb(16 20 24 / 0.04), 0 16px 40px -24px rgb(16 20 24 / 0.18);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- base */

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(1rem, 0.96rem + 0.18vw, 1.0625rem);
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
strong { font-weight: 600; }
img { display: block; max-width: 100%; height: auto; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
}
a:hover { text-decoration-thickness: 2px; }

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

::selection { background: #C9E4DA; color: var(--ink); }

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- banner and header */

.banner {
  background: var(--accent-soft);
  color: var(--ink);
  font-size: var(--fs-small);
  line-height: 1.45;
}
.banner__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-block: 10px;
  text-align: center;
}
.banner__dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--highlight);
  box-shadow: 0 0 0 3px rgb(242 198 109 / 0.35);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: var(--header-h);
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}
.wordmark__name {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-feature-settings: "cv09";
}
.wordmark__tag {
  font-size: var(--fs-small);
  color: var(--muted);
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.site-nav a:hover { background: rgb(15 110 92 / 0.07); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.site-nav__pages {
  margin-left: 10px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}
.menu-toggle__icon {
  display: grid;
  gap: 5px;
  width: 16px;
}
.menu-toggle__icon span {
  display: block;
  height: 1.5px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s var(--ease);
}
.menu-open .menu-toggle__icon span:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-open .menu-toggle__icon span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- buttons and links */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); }
.btn--secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn--secondary:hover { border-color: var(--ink); }

.text-link {
  align-self: flex-start;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}

/* ---------- sections */

.section { padding-block: var(--section); }
.section[id] { scroll-margin-top: calc(40px - var(--section)); }

/* A hairline at content width marks the start of a section on the plain ground. */
.section--ruled { padding-top: 0; }
.section--ruled > .container {
  padding-top: var(--section);
  background: linear-gradient(var(--line), var(--line)) no-repeat var(--gutter) 0 / calc(100% - 2 * var(--gutter)) 1px;
}

.section__title {
  font-size: var(--fs-h2);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.section__lead {
  max-width: 36em;
  margin-top: var(--s-2);
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.5;
}

/* Illustrations are drawn on the page ground (#FAF8F4), so they sit frameless on it.
   A section crops the empty ground around one by giving its .media a wider aspect ratio. */
.media {
  margin: 0;
  aspect-ratio: 3 / 2;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- hero */

.hero { padding-block: clamp(48px, 6.5vw, 96px) clamp(56px, 6.5vw, 96px); }
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--s-3);
  row-gap: clamp(32px, 4vw, 56px);
}
.hero__title {
  grid-column: 1 / -1;
  font-size: var(--fs-h1);
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.hero__title span { display: block; }
.hero__body {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  padding-right: var(--s-2);
}
.hero__lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__media { grid-column: 6 / -1; align-self: center; }

.facts {
  margin: auto 0 0;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
}
.facts > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: var(--s-2);
  padding-block: 11px;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; }

/* ---------- mechanism panel and payment chart */

.mechanism__panel {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-6) var(--s-3);
  padding: clamp(20px, 4.2vw, 56px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.mechanism__text {
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.mechanism__title {
  font-size: clamp(1.5rem, 1.1rem + 1.3vw, 2.125rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.mechanism__text > p:not(.formula) { color: var(--muted); }

.formula {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.formula__line {
  font-size: clamp(0.875rem, 0.8rem + 0.5vw, 1rem);
  font-weight: 600;
}
.formula__line > span { white-space: nowrap; }
.formula__note { color: var(--muted); font-size: var(--fs-small); }

.payplot {
  --axis: 56px;
  --plot-h: clamp(168px, 20vw, 248px);
  --kept: #BCDCCF;
  --grid: #EDE9E2;
  grid-column: 7 / -1;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  margin: 0;
  min-width: 0;
}
.payplot__caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.payplot__title { font-weight: 600; }
.payplot__terms { color: var(--muted); font-size: var(--fs-small); }

.payplot__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 0.8125rem;
}
.payplot__legend li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.payplot__key {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.payplot__key--kept { background: var(--kept); }
.payplot__key--paid { background: var(--accent); }
.payplot__key--hurdle {
  width: 18px;
  height: 2px;
  border-radius: 0;
  background: repeating-linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 8px);
}

.payplot__plot {
  position: relative;
  height: var(--plot-h);
  margin-top: 6px;
}
.payplot__tick {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(var(--at) / 300 * 100%);
  height: 0;
}
.payplot__tick::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--axis);
  right: 0;
  border-top: 1px solid var(--grid);
}
.payplot__tick > span {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(var(--axis) - 12px);
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: right;
}
.payplot__tick--base::before { border-top-color: var(--line-strong); }
.payplot__tick--hurdle { z-index: 2; }
.payplot__tick--hurdle::before {
  top: -1px;
  height: 2px;
  border: 0;
  background: repeating-linear-gradient(90deg, var(--ink) 0 6px, transparent 6px 11px);
}
.payplot__tick--hurdle > span { color: var(--ink); font-weight: 600; }

.payplot__bars {
  position: absolute;
  inset: 0 0 0 var(--axis);
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  justify-items: center;
}
.payplot__bar {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 24px;
  height: calc(var(--income) / 300 * 100%);
}
.payplot__bar::after {
  content: "";
  flex: 1 1 auto;
  background: var(--kept);
}
.payplot__bar--below::after { border-radius: 4px 4px 0 0; }
.payplot__paid {
  flex: 0 0 calc(var(--paid) / var(--income) * 100%);
  border-radius: 4px 4px 0 0;
  background: var(--accent);
}

.payplot__table {
  width: 100%;
  margin-top: -12px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}
.payplot__axis-col { width: var(--axis); }
.payplot__table th,
.payplot__table td {
  padding: 7px 0;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}
.payplot__table thead th { color: var(--muted); }
.payplot__table tbody tr { border-top: 1px solid var(--grid); }
.payplot__table tbody th {
  padding-right: 12px;
  color: var(--muted);
  font-weight: 500;
  text-align: right;
}
.payplot__paid-row td { font-weight: 600; }

/* ---------- how it works */

.how__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-2) var(--s-3);
  align-items: end;
}
.how__head .section__title { grid-column: 1 / span 5; }
.how__head .section__lead { grid-column: 7 / -1; margin-top: 0; }

/* Four stations of the illustration sit above the four step columns. */
.how__media {
  aspect-ratio: 10 / 3;
  margin-top: var(--s-6);
}
.how__media img { object-position: 50% 46%; }

.steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-6) var(--s-3);
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
}
.step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: var(--s-5);
  border-top: 1px solid var(--line-strong);
}
.step__num {
  position: absolute;
  top: -16px;
  left: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-size: var(--fs-small);
  font-weight: 600;
}
.step__title {
  font-size: var(--fs-h3);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.step p { color: var(--muted); }

/* ---------- founders and investors */

.split__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-3);
  align-items: start;
}
.split__text { grid-column: 1 / span 6; }
.split__media {
  grid-column: 7 / -1;
  align-self: center;
}
.split--reverse .split__text { grid-column: 7 / -1; }
.split--reverse .split__media { grid-column: 1 / span 6; grid-row: 1; }

.points {
  margin: var(--s-5) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}
.points li {
  padding-block: 15px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
.points strong { color: var(--ink); }

.fine-print {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: var(--fs-small);
}

/* ---------- engine: the one full field of colour */

.engine {
  --focus: var(--highlight);
  background: var(--accent);
  color: #fff;
}
.engine ::selection { background: var(--highlight); color: var(--ink); }
.engine__head {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-2) var(--s-3);
  align-items: end;
}
.engine__head .section__title { grid-column: 1 / span 5; }
.engine__head .section__lead {
  grid-column: 7 / -1;
  margin-top: 0;
  color: var(--accent-soft);
}

.engine__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-8);
}
.engine__block {
  padding: clamp(20px, 3vw, 40px);
  border: 1px solid rgb(255 255 255 / 0.2);
  border-radius: var(--radius-lg);
}
.engine__label {
  margin-bottom: var(--s-2);
  font-size: 1.25rem;
  letter-spacing: -0.015em;
}

.contracts { margin: 0; }
.contracts > div {
  display: grid;
  grid-template-columns: minmax(0, 12.5rem) minmax(0, 1fr);
  gap: 4px var(--s-3);
  padding-block: 14px;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}
.contracts dt { font-weight: 600; }
.contracts dd {
  margin: 0;
  color: var(--accent-soft);
  font-size: 0.9375rem;
}
.contracts__std {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-deep);
  color: var(--accent-soft);
  font-size: 0.75rem;
  font-weight: 500;
  vertical-align: 2px;
  white-space: nowrap;
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
}
.checks li {
  position: relative;
  padding: 14px 0 14px 34px;
  border-top: 1px solid rgb(255 255 255 / 0.16);
}
.checks li::before {
  content: "";
  position: absolute;
  top: 17px;
  left: 0;
  width: 20px;
  height: 20px;
  background: var(--highlight);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.engine__foot {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.engine__cell {
  padding: clamp(20px, 3vw, 32px) clamp(20px, 3vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--accent-deep);
}
.engine__cell .engine__label { margin-bottom: var(--s-1); }
.engine__cell p { color: var(--accent-soft); }

/* ---------- guardrails */

.guardrails__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-5) var(--s-3);
  align-items: start;
}
.guardrails__text { grid-column: 1 / span 4; }
.terms {
  grid-column: 6 / -1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.terms__table {
  width: 100%;
  border-collapse: collapse;
}
.terms__table th,
.terms__table td {
  padding: 17px 24px;
  text-align: left;
  vertical-align: top;
}
.terms__table thead th {
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}
.terms__table thead th:last-child { text-align: right; }
.terms__table tbody tr + tr { border-top: 1px solid var(--line); }
.terms__table tbody th { font-weight: 600; }
.terms__table tbody th span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: var(--fs-small);
  font-weight: 400;
}
.terms__table td {
  font-size: 1.0625rem;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

/* ---------- roadmap */

.roadmap__head { margin-bottom: var(--s-8); }
.timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--s-5) var(--s-3);
  margin: 0;
  padding: 0;
  list-style: none;
}
.timeline__item {
  position: relative;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line-strong);
}
.timeline__item::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 9px;
  height: 9px;
  border: 1px solid var(--muted);
  border-radius: 50%;
  background: var(--bg);
}
.timeline__item--now { border-top-color: var(--accent); }
.timeline__item--now::before {
  border-color: #D9A83E;
  background: var(--highlight);
  box-shadow: 0 0 0 4px rgb(242 198 109 / 0.35);
}
.timeline__when {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.timeline__badge {
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--highlight);
  color: var(--ink);
  font-size: 0.75rem;
  font-weight: 600;
}
.timeline__title {
  margin-top: var(--s-1);
  font-size: var(--fs-h3);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.timeline__item > p:last-child {
  margin-top: var(--s-1);
  color: var(--muted);
}

/* ---------- faq */

.faq__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-5) var(--s-3);
  align-items: start;
}
.faq__head { grid-column: 1 / span 4; }
.faq__list {
  grid-column: 6 / -1;
  border-top: 1px solid var(--line);
}
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding-block: 20px;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.35;
  list-style: none;
  cursor: pointer;
  transition: color 0.2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after {
  content: "";
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background:
    linear-gradient(currentColor, currentColor) center / 12px 1.5px no-repeat,
    linear-gradient(currentColor, currentColor) center / 1.5px 12px no-repeat;
  transition: transform 0.25s var(--ease);
}
.faq details[open] > summary::after { transform: rotate(45deg); }
.faq__answer {
  max-width: 62ch;
  padding-bottom: var(--s-3);
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  @supports selector(::details-content) {
    :root { interpolate-size: allow-keywords; }
    .faq details::details-content {
      height: 0;
      overflow: clip;
      transition: height 0.3s var(--ease), content-visibility 0.3s allow-discrete;
    }
    .faq details[open]::details-content { height: auto; }
  }
}

/* ---------- footer */

.site-footer {
  padding-block: var(--s-10) var(--s-5);
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.9375rem;
}
.site-footer__top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: var(--s-5) var(--s-4);
}
.site-footer__brand p {
  max-width: 32ch;
  margin-top: 12px;
  color: var(--muted);
}
.site-footer__col h2 {
  margin-bottom: 12px;
  font-size: var(--fs-small);
  letter-spacing: 0;
}
.site-footer__col ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer__col a {
  color: var(--muted);
  text-decoration: none;
  overflow-wrap: anywhere;
}
.site-footer__col a:hover {
  color: var(--ink);
  text-decoration: underline;
}
.site-footer__legal {
  margin-top: var(--s-8);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.site-footer__disclaimer {
  max-width: 92ch;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.6;
}

/* ---------- docs */

.docs {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
  padding-block: var(--s-8) var(--s-12);
}
.docs__sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--s-4));
}
.docs__nav-title {
  margin-bottom: 10px;
  padding-left: 12px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}
.docs__list {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs__list a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-size: 0.9375rem;
  line-height: 1.35;
  text-decoration: none;
}
.docs__list a:hover { background: rgb(15 110 92 / 0.07); }
.docs__list a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

.docs__menu {
  display: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.docs__menu summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  list-style: none;
  cursor: pointer;
}
.docs__menu summary::-webkit-details-marker { display: none; }
.docs__menu summary::after {
  content: "";
  flex: none;
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s var(--ease);
}
.docs__menu[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.docs__menu-label { color: var(--muted); font-size: var(--fs-small); }
.docs__menu-current { font-weight: 600; }
.docs__menu nav {
  padding: 4px 8px 8px;
  border-top: 1px solid var(--line);
}

.docs__article {
  min-width: 0;
  max-width: 44rem;
}
.docs__header h1 {
  font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}
.docs__lead {
  margin-top: 12px;
  color: var(--muted);
  font-size: var(--fs-lead);
  line-height: 1.5;
}
.docs__edited {
  margin-top: var(--s-6);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: var(--fs-small);
}

.pager {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-2);
  margin-top: var(--s-4);
}
.pager__link {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  transition: border-color 0.2s var(--ease);
}
.pager__link:hover { border-color: var(--accent); }
.pager__link--next {
  grid-column: 2;
  text-align: right;
}
.pager__label { color: var(--muted); font-size: 0.8125rem; }
.pager__title { color: var(--accent); font-weight: 600; }

.prose { margin-top: var(--s-5); }
.prose > * + * { margin-top: 1em; }
.prose h2 {
  margin-top: 2.2em;
  font-size: 1.5rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.prose h3 {
  margin-top: 1.8em;
  font-size: var(--fs-h3);
  line-height: 1.3;
}
.prose h2 + *,
.prose h3 + * { margin-top: 0.6em; }
.prose > :first-child { margin-top: 0; }
.prose ul,
.prose ol { padding-left: 1.25em; }
.prose li + li { margin-top: 0.4em; }
.prose li::marker { color: var(--muted); }
.prose code {
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: var(--placeholder);
  font-family: var(--mono);
  font-size: 0.875em;
}
.prose pre {
  overflow-x: auto;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.prose pre code {
  padding: 0;
  background: none;
  font-size: inherit;
}
.prose blockquote {
  margin-inline: 0;
  padding: 16px 20px;
  border-radius: var(--radius);
  background: var(--accent-soft);
}
.prose hr {
  margin-block: 2.5em;
  border: 0;
  border-top: 1px solid var(--line);
}
.prose img { border-radius: var(--radius); }
.prose__table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.prose th,
.prose td {
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.prose thead th {
  border-top: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
}

/* ---------- 404 */

.notfound { padding-block: var(--s-12) calc(var(--s-12) + var(--s-4)); }
.notfound__title {
  font-size: var(--fs-h2);
  letter-spacing: -0.03em;
}
.notfound__text {
  max-width: 40em;
  margin-block: var(--s-2) var(--s-4);
  color: var(--muted);
  font-size: var(--fs-lead);
}

/* ---------- responsive */

@media (max-width: 1099px) {
  .wordmark__tag { display: none; }
  .hero__body { grid-column: 1 / span 6; padding-right: 0; }
  .hero__media { grid-column: 7 / -1; }
  .mechanism__text { grid-column: 1 / span 6; }
  .payplot { grid-column: 7 / -1; }
  .contracts > div { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 959px) {
  :root { --header-h: 64px; }

  .js .menu-toggle { display: inline-flex; }
  .js .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: var(--s-1) var(--gutter) var(--s-3);
    border-bottom: 1px solid var(--line);
    background: var(--bg);
    box-shadow: 0 24px 32px -24px rgb(16 20 24 / 0.18);
  }
  .js.menu-open .site-nav { display: block; }
  .js .site-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .js .site-nav a {
    padding: 13px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.0625rem;
  }
  .js .site-nav__pages {
    margin: 0;
    padding: 0;
    border-left: 0;
  }
  .no-js .site-header__bar { flex-wrap: wrap; padding-block: 12px; }
  .no-js .site-nav__list { flex-wrap: wrap; }

  .hero__body,
  .hero__media,
  .mechanism__text,
  .payplot,
  .how__head .section__title,
  .how__head .section__lead,
  .split__text,
  .split--reverse .split__text,
  .split__media,
  .split--reverse .split__media,
  .engine__head .section__title,
  .engine__head .section__lead,
  .guardrails__text,
  .terms,
  .faq__head,
  .faq__list { grid-column: 1 / -1; }

  .hero__grid,
  .mechanism__panel,
  .how__head,
  .split__grid,
  .engine__head,
  .guardrails__grid,
  .faq__grid { grid-template-columns: minmax(0, 1fr); }

  .facts { margin-top: 0; }
  .hero__media { aspect-ratio: 9 / 4; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split__media,
  .split--reverse .split__media {
    grid-row: auto;
    order: -1;
    margin-bottom: var(--s-2);
  }
  .founders__media { aspect-ratio: 12 / 5; }
  .founders__media img { object-position: 50% 57%; }
  .investors__media { aspect-ratio: 15 / 8; }
  .engine__grid,
  .engine__foot { grid-template-columns: minmax(0, 1fr); }
  .engine__grid { margin-top: var(--s-6); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer__top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .site-footer__brand { grid-column: 1 / -1; }

  .docs {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s-4);
    padding-top: var(--s-3);
  }
  .docs__sidebar { display: none; }
  .docs__menu { display: block; }
}

@media (max-width: 599px) {
  .hero__actions .btn { flex: 1 1 auto; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .payplot { --axis: 50px; }
  .steps,
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .terms__table th,
  .terms__table td { padding-inline: 16px; }
  .terms__table td { padding-left: 8px; font-size: 1rem; }
  .terms__table tbody th span { font-size: 0.8125rem; }
  .site-footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager__link--next { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
