:root {
  --bg: #061311;
  --panel: #0B1F1C;
  --grid: #18403A;
  --ink: #F4F6FA;
  --ink-2: #B4CCC6;
  --mint: #97FCE4;
  --glow: #2FD1B5;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --sans: "Geist", ui-sans-serif, system-ui, sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* 2 % grain on the background */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  opacity: .02;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.mono { font-family: var(--mono); font-weight: 500; font-variant-numeric: tabular-nums; }

/* ---------- header ---------- */
.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  background: rgba(6, 19, 17, .92);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--grid);
}
.top .wrap { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 18px; }
.brand img { width: 32px; height: 32px; border-radius: 50%; }
.top .spacer { flex: 1; }
.top-x { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--grid); border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; font: 500 14px/1 var(--sans); }
.top-x:hover { border-color: var(--mint); color: var(--mint); }
.ca-pending { padding: 0 12px; color: var(--ink-2); }
.top nav { display: flex; gap: 24px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--ink-2); }
.top nav a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 20px; border-radius: 8px;
  font: 600 15px/1 var(--sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--mint); color: var(--bg); }
.btn-primary:hover { background: #b8fdec; }
.btn-ghost { border-color: var(--ink-2); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-sm { height: 38px; padding: 0 16px; font-size: 14px; }

.ca {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  font: 500 13px/1 var(--mono); color: var(--ink);
  border: 1px solid var(--grid); border-radius: 8px; padding: 0 0 0 12px; height: 38px; background: var(--panel);
}
.ca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca button { height: 100%; border: 0; border-left: 1px solid var(--grid); background: none; color: var(--ink); font: 500 13px var(--sans); padding: 0 12px; cursor: pointer; border-radius: 0 8px 8px 0; }
.ca button:hover { color: var(--mint); }

/* ---------- hero ---------- */
.hero { padding-top: calc(64px + clamp(48px, 9vw, 112px)); }
h1 {
  font-weight: 700; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(46px, 8.2vw, 96px);
  margin: 0; max-width: 11ch;
}
.lede { font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); max-width: 46ch; margin: 28px 0 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .ca { margin-top: 20px; }

.chart-block { margin-top: clamp(48px, 7vw, 88px); }
.readout { display: flex; flex-wrap: wrap; gap: 12px 48px; align-items: flex-end; margin-bottom: 18px; }
.readout .k { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 4px; }
.readout .big { font-size: clamp(34px, 4.4vw, 52px); line-height: 1; letter-spacing: -.02em; }
.readout .mid { font-size: 20px; line-height: 1.2; }
.readout .note { margin-left: auto; font-size: 13px; color: var(--ink-2); text-align: right; }
.chart { position: relative; width: 100%; height: clamp(240px, 34vw, 400px); border-top: 1px solid var(--grid); border-bottom: 1px solid var(--grid); }
.chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart .msg { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-2); font-size: 15px; }
.axis-t { fill: var(--ink-2); font: 500 11px var(--mono); }
.price-line { fill: none; stroke: var(--ink); stroke-width: 1.25; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.trace { fill: none; stroke: var(--mint); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--glow)); }
.trace.draw { animation: draw 1.6s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.rail { stroke: var(--mint); stroke-width: 1; opacity: .55; }
.zone { fill: var(--mint); opacity: .06; }
.dot { fill: var(--mint); opacity: 0; }
.dot.on { opacity: 1; animation: breathe 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.45); opacity: .7; } }
.chart-legend { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.chart-legend i { display: inline-block; width: 18px; height: 0; border-top: 1.5px solid var(--ink); vertical-align: middle; margin-right: 8px; }
.chart-legend i.m { border-top: 2px solid var(--mint); }

/* ---------- sections ---------- */
section.block { padding: clamp(80px, 11vw, 140px) 0 0; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 24px 64px; align-items: start; }
h2 { font-size: clamp(32px, 4.4vw, 52px); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; margin: 0; }
.body p { margin: 0 0 1em; max-width: 58ch; font-size: clamp(17px, 1.5vw, 19px); }
.body p:last-child { margin-bottom: 0; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1px; background: var(--grid); border: 1px solid var(--grid); border-radius: 12px; overflow: hidden; margin-top: 40px; }
.fact { background: var(--panel); padding: 20px 22px; min-width: 0; }
.fact .k { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.fact .v { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.fact .v.grow { color: var(--mint); }
.fact .s { display: block; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.pending { margin-top: 40px; padding: 22px; border: 1px dashed var(--grid); border-radius: 12px; font-size: 18px; background: var(--panel); }
.stamp, .body p.stamp { font-size: 13px; color: var(--ink-2); margin-top: 12px; }

.split-bar { margin-top: 32px; }
.split-bar .bar { display: flex; height: 10px; border-radius: 5px; overflow: hidden; border: 1px solid var(--grid); }
.split-bar .a { width: 70%; background: var(--mint); }
.split-bar .b { width: 30%; background: var(--panel); }
.split-bar .labels { display: flex; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; }
.split-bar .labels span:last-child { text-align: right; }

.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--grid); }
.rules li { padding: 20px 0; border-bottom: 1px solid var(--grid); font-size: clamp(18px, 1.9vw, 23px); line-height: 1.35; letter-spacing: -.01em; }

table.contracts { width: 100%; border-collapse: collapse; }
.contracts th, .contracts td { text-align: left; padding: 18px 16px 18px 0; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.contracts thead th { font-size: 14px; font-weight: 500; color: var(--ink-2); border-bottom-color: var(--grid); padding-top: 0; }
.contracts tbody tr:first-child td, .contracts tbody tr:first-child th { border-top: 1px solid var(--grid); }
.contracts td.addr { font-size: 14px; overflow-wrap: anywhere; }
.contracts td.go { text-align: right; padding-right: 0; white-space: nowrap; }
.contracts .tlink { color: var(--ink); text-underline-offset: 4px; font-size: 15px; background: none; border: 0; cursor: pointer; font-family: var(--sans); padding: 0; text-decoration: underline; }
.contracts .tlink:hover { color: var(--mint); }
.code-link { margin-top: 24px; font-size: 17px; }
.code-link a { text-underline-offset: 4px; }

.ship { list-style: none; margin: 0; padding: 0; }
.ship li { display: flex; gap: 16px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--grid); font-size: clamp(18px, 1.9vw, 23px); letter-spacing: -.01em; }
.ship li:first-child { border-top: 1px solid var(--grid); }
.ship li::before { content: ""; flex: none; width: 10px; height: 10px; border: 1.5px solid var(--mint); border-radius: 50%; transform: translateY(-2px); }

footer.foot { margin-top: clamp(96px, 12vw, 160px); border-top: 1px solid var(--grid); padding: 32px 0 48px; }
footer.foot .wrap { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
footer.foot .spacer { flex: 1; }
footer.foot a.plain { color: var(--ink); font-size: 15px; text-underline-offset: 4px; }

/* ---------- app ---------- */
.app-head { padding-top: calc(64px + 40px); display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 24px; }
.app-head h1 { font-size: clamp(36px, 5vw, 56px); max-width: none; }
.app-head .stamp { margin: 0 0 6px auto; }
.cards { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; margin-top: 32px; }
.card { background: var(--panel); border: 1px solid var(--grid); border-radius: 14px; padding: 22px; min-width: 0; }
.card h3 { font-size: 15px; font-weight: 500; color: var(--ink-2); margin: 0 0 14px; letter-spacing: 0; }
.card .v { font-size: clamp(30px, 3.4vw, 42px); line-height: 1; letter-spacing: -.02em; overflow-wrap: anywhere; }
.card .s { font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.c4 { grid-column: span 4; } .c6 { grid-column: span 6; } .c12 { grid-column: span 12; }
.yes { color: var(--mint); } .no { color: var(--ink); }
.range-viz { position: relative; height: 34px; margin-top: 20px; }
.range-viz .track { position: absolute; left: 0; right: 0; top: 16px; height: 1px; background: var(--grid); }
.range-viz .band { position: absolute; top: 9px; height: 15px; border: 1px solid var(--mint); border-radius: 3px; background: rgba(151, 252, 228, .08); }
.range-viz .pin { position: absolute; top: 4px; width: 2px; height: 25px; background: var(--ink); transform: translateX(-1px); }
.range-viz .pin.hl { background: var(--mint); }
.range-legend { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13px; color: var(--ink-2); margin-top: 6px; }
.range-legend b { display: inline-block; width: 2px; height: 12px; background: var(--ink); vertical-align: -1px; margin-right: 8px; }
.range-legend b.m { background: var(--mint); }
.vault-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px 24px; }
.vault-grid .v { font-size: clamp(24px, 2.6vw, 32px); }
.vault-grid .k { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 8px; }
.tape { list-style: none; margin: 0; padding: 0; }
.tape li { display: grid; grid-template-columns: 124px 1fr auto; gap: 16px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--grid); font-size: 16px; }
.tape li .t { color: var(--ink-2); font-size: 13px; }
.tape li a { font-size: 13px; color: var(--ink); text-underline-offset: 3px; }
.tape li a:hover { color: var(--mint); }
.tape .empty { display: block; color: var(--ink); border-top: 1px solid var(--grid); padding-top: 16px; }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .c4, .c6 { grid-column: span 12; }
  .top nav { display: none; }
}
@media (max-width: 560px) {
  .readout .note { margin-left: 0; text-align: left; width: 100%; }
  .contracts thead { display: none; }
  .contracts tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 16px 0; border-bottom: 1px solid var(--grid); }
  .contracts tbody tr:first-child { border-top: 1px solid var(--grid); }
  .contracts th, .contracts td { border: 0 !important; padding: 0; }
  .contracts td.addr { grid-column: 1 / -1; grid-row: 2; }
  .contracts td.go { grid-column: 2; grid-row: 1; }
  .tape li { grid-template-columns: 1fr auto; }
  .tape li .t { grid-column: 1 / -1; }
  .top .ca { display: none; }
  .top-x span { display: none; }
  .top-x { padding: 0 11px; }
  .top .wrap { gap: 10px; }
  .btn-sm { padding: 0 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .trace.draw { animation: none; stroke-dashoffset: 0 !important; }
  .dot.on { animation: none; }
}
.ca [data-ticker] { flex: none; }
.ca button { flex: none; white-space: nowrap; }
.ca span[data-ca-text] { min-width: 0; }
