:root {
  color-scheme: dark;
  --ink: oklch(0.94 0.008 210);
  --muted: oklch(0.69 0.017 205);
  --dim: oklch(0.49 0.018 205);
  --base: oklch(0.135 0.012 215);
  --surface: oklch(0.17 0.014 215);
  --surface-2: oklch(0.205 0.016 215);
  --line: oklch(0.30 0.018 215);
  --blue: oklch(0.68 0.20 255);
  --green: oklch(0.74 0.15 165);
  --amber: oklch(0.80 0.14 78);
  --red: oklch(0.70 0.17 24);
  --display: "Bricolage Grotesque", "Avenir Next", sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--base);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.5;
}
button, input { font: inherit; }
a { color: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -64px;
  z-index: 20;
  padding: 12px 16px;
  background: var(--ink);
  color: var(--base);
}
.skip-link:focus { top: 16px; }
.protocol-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
  background: color-mix(in oklch, var(--base) 88%, transparent);
  backdrop-filter: blur(18px);
  padding: 0 28px;
}
.wordmark, .manifest-link {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
}
.wordmark span { color: var(--blue); margin: 0 5px; }
.manifest-link { justify-self: end; color: var(--blue); }
.network-state {
  display: flex;
  gap: 20px;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
}
.network-state strong { color: var(--amber); font-weight: 500; }
.network-state i, .not-live span {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 7px;
}
main { width: min(1460px, calc(100% - 56px)); margin: 0 auto; }
.intro {
  min-height: 560px;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  grid-template-rows: auto 1fr auto;
  gap: 20px 56px;
  padding: 96px 0 52px;
}
.eyebrow, .label {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .11em;
}
.intro > .eyebrow { grid-column: 1 / -1; }
h1, h2, p { text-wrap: pretty; }
h1 {
  align-self: end;
  margin: 0;
  max-width: 920px;
  font-size: clamp(74px, 9vw, 148px);
  font-weight: 600;
  line-height: .80;
  letter-spacing: -.065em;
}
.intro-copy {
  align-self: end;
  max-width: 500px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(19px, 1.7vw, 26px);
  line-height: 1.35;
}
.build-facts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(8, auto);
  gap: 9px 18px;
  align-items: baseline;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-family: var(--mono);
}
.build-facts span { font-size: 20px; color: var(--ink); }
.build-facts small { font-size: 10px; color: var(--dim); letter-spacing: .08em; }
.terminal {
  border: 1px solid var(--line);
  background: var(--surface);
}
.terminal-head {
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.terminal-head h2 { margin: 3px 0 0; font-size: 24px; font-weight: 550; }
.not-live {
  margin: 0;
  color: var(--amber);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .08em;
}
.terminal-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .65fr); }
.curve-panel { padding: 26px 28px 30px; border-right: 1px solid var(--line); }
.spot-row { display: flex; justify-content: space-between; gap: 24px; }
.spot-row output {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: clamp(24px, 3.4vw, 48px);
  letter-spacing: -.04em;
}
.spot-row .align-right { text-align: right; }
#supply-output { color: var(--muted); font-size: clamp(18px, 2.2vw, 30px); }
#curve-chart { width: 100%; height: auto; margin: 26px 0 8px; overflow: visible; }
.grid-lines line { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 8; }
.curve-path { fill: none; stroke: var(--blue); stroke-width: 4; vector-effect: non-scaling-stroke; }
.area-path { fill: color-mix(in oklch, var(--blue) 15%, transparent); }
.cursor-line { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 5; }
.cursor-point { fill: var(--blue); stroke: var(--surface); stroke-width: 4; }
.axis-label { fill: var(--dim); font-family: var(--mono); font-size: 10px; }
.range-label { display: block; margin-top: 8px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
input[type="range"] { width: 100%; height: 44px; accent-color: var(--blue); }
.quote-panel { padding: 28px; }
.trade-switch { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 32px; border-bottom: 1px solid var(--line); }
.trade-switch button {
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
}
.trade-switch button.is-active { color: var(--ink); border-color: var(--blue); }
.quote-panel > label { color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.amount-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.amount-field input {
  width: 100%;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: clamp(28px, 3vw, 44px);
}
.amount-field span { padding-bottom: 13px; color: var(--muted); font-family: var(--mono); font-size: 12px; }
#amount-help, .execution-note { margin: 8px 0 0; color: var(--dim); font-family: var(--mono); font-size: 10px; }
.quote-ledger { margin: 44px 0 28px; }
.quote-ledger div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.quote-ledger dt, .quote-ledger dd { margin: 0; font-family: var(--mono); font-size: 11px; }
.quote-ledger dt { color: var(--muted); }
.quote-total { padding-top: 20px !important; border-bottom: 0 !important; }
.quote-total dd { color: var(--green); font-size: 20px; }
.primary-action {
  width: 100%;
  min-height: 54px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--dim);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .08em;
}
.machine-strip {
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  gap: 68px;
  padding: 112px 0;
  border-bottom: 1px solid var(--line);
}
.machine-copy h2, .integrity h2 {
  margin: 12px 0 22px;
  font-size: clamp(42px, 5vw, 76px);
  line-height: .95;
  letter-spacing: -.045em;
}
.machine-copy > p:last-child { max-width: 530px; margin: 0; color: var(--muted); font-size: 19px; }
.method-list { border-top: 1px solid var(--line); }
.method-list button {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 62px 1fr auto;
  align-items: center;
  gap: 20px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.method-list button:hover { background: var(--surface); }
.method-list span, .method-list b { color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.method-list code { overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); font-size: 12px; }
.integrity { display: grid; grid-template-columns: .7fr 1.3fr; gap: 68px; padding: 112px 0; }
.integrity-table { border-top: 1px solid var(--line); }
.integrity-table div { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 11px; }
.integrity-table span { color: var(--muted); }
.integrity-table strong { color: var(--green); font-weight: 500; }
.integrity-table .warning strong { color: var(--amber); }
.formula { padding: 90px 0 110px; border-top: 1px solid var(--line); text-align: center; }
.formula h2 { margin: 30px 0 18px; font-family: var(--mono); font-size: clamp(30px, 5vw, 72px); font-weight: 500; letter-spacing: -.045em; }
.formula p:last-child { max-width: 760px; margin: 0 auto; color: var(--muted); font-size: 18px; }
footer {
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 24px 28px;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
}
footer nav { display: flex; flex-wrap: wrap; gap: 22px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--blue); }
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
  padding: 12px 16px;
  border: 1px solid var(--line);
  background: var(--ink);
  color: var(--base);
  font-family: var(--mono);
  font-size: 11px;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 900px) {
  .protocol-bar { grid-template-columns: 1fr auto; padding: 0 18px; }
  .network-state { display: none; }
  main { width: min(100% - 32px, 760px); }
  .intro { min-height: auto; grid-template-columns: 1fr; padding: 72px 0 38px; }
  .intro > .eyebrow, .build-facts { grid-column: 1; }
  h1 { font-size: clamp(66px, 18vw, 112px); }
  .intro-copy { max-width: 620px; }
  .build-facts { grid-template-columns: repeat(4, auto); }
  .terminal-grid { grid-template-columns: 1fr; }
  .curve-panel { border-right: 0; border-bottom: 1px solid var(--line); }
  .machine-strip, .integrity { grid-template-columns: 1fr; gap: 46px; padding: 84px 0; }
}

@media (max-width: 560px) {
  main { width: calc(100% - 20px); }
  .protocol-bar { min-height: 58px; padding: 0 12px; }
  .wordmark, .manifest-link { font-size: 10px; }
  .intro { padding-top: 52px; gap: 28px; }
  h1 { font-size: clamp(58px, 19vw, 84px); }
  .intro-copy { font-size: 18px; }
  .build-facts { grid-template-columns: auto 1fr; }
  .terminal-head, .curve-panel, .quote-panel { padding-left: 18px; padding-right: 18px; }
  .terminal-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .spot-row { flex-direction: column; }
  .spot-row .align-right { text-align: left; }
  .quote-ledger div { align-items: flex-end; }
  .method-list button { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 10px; }
  .method-list code { font-size: 10px; }
  .machine-copy h2, .integrity h2 { font-size: 45px; }
  .integrity-table div { align-items: flex-end; }
  footer { align-items: flex-start; flex-direction: column; }
}

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

