:root {
  --bg: #ffffff; --ink: #111; --mute: #6f6f6f; --faint: #a6a6a6;
  --line: #e6e6e4; --soft: #f4f4f2; --down: #9a9a98;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--ink); font-family: Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-size: 13.5px; }
body { overflow-x: hidden; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
.mono { font-family: var(--mono); }
.mute { color: var(--mute); }
.faint { color: var(--faint); }
main { flex: 1 0 auto; }

/* header */
.hd { display: flex; align-items: center; gap: 22px; height: 52px; padding: 0 50px; border-bottom: 1px solid var(--line); background: #fff; position: sticky; top: 0; z-index: 10; }
.br { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; letter-spacing: -.02em; }
.glyph { width: 13px; height: 13px; flex: 0 0 auto; }
.hd nav { display: flex; gap: 16px; font-size: 11.5px; color: var(--mute); }
.hd nav a { padding: 4px 0; position: relative; white-space: nowrap; }
.hd nav a:hover { color: var(--ink); }
.hd nav a.on { color: var(--ink); }
.hd nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -15px; height: 1px; background: var(--ink); }
.hd .rt { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.xl { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; font-weight: 600; }
.xl:hover { border-color: #c9c9c6; }
.tok { font-family: var(--mono); font-size: 9.5px; color: #333; display: flex; align-items: center; gap: 6px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; color: var(--mute); }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink); animation: blink 2s infinite; }
.live.off i { background: var(--faint); animation: none; }
@keyframes blink { 50% { opacity: .25; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 12px; font-size: 11.5px; font-weight: 500; border-radius: 3px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #2a2a2a; }
.btn.light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.light:hover { border-color: #c9c9c6; }
.btn.sm { height: 24px; padding: 0 9px; font-size: 11px; }
.btn.wide { width: 100%; height: 36px; font-size: 12.5px; }

/* page head with art */
.ph { position: relative; border-bottom: 1px solid var(--line); overflow: hidden; }
.ph canvas.art { position: absolute; right: 0; top: 0; width: 58%; height: 100%; display: block; }
.ph .in { position: relative; z-index: 2; padding: 34px 50px 30px; max-width: 620px; }
.ph.big .in { padding: 84px 50px 80px; }
.eyebrow { font-family: var(--mono); font-size: 9.5px; color: var(--mute); letter-spacing: .02em; text-transform: uppercase; }
h1 { font-size: 34px; line-height: 1; letter-spacing: -.055em; font-weight: 600; margin: 12px 0 10px; }
.ph.big h1 { font-size: 52px; line-height: .98; margin: 14px 0 14px; }
h2 { font-size: 17px; letter-spacing: -.035em; font-weight: 500; }
.lede { font-size: 13.5px; line-height: 1.42; color: var(--mute); max-width: 460px; }
.lede b { color: var(--ink); font-weight: 500; }
.cta { display: flex; gap: 8px; margin-top: 20px; flex-wrap: wrap; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.stats > div { padding: 14px 18px 15px; border-right: 1px solid var(--line); min-width: 0; }
.stats > div:first-child { padding-left: 50px; }
.stats > div:last-child { border-right: 0; }
.k { font-family: var(--mono); font-size: 9px; color: var(--faint); text-transform: uppercase; letter-spacing: .03em; }
.stats .v { font-size: 19px; letter-spacing: -.04em; font-weight: 500; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats .v small { font-family: var(--mono); font-size: 9.5px; color: var(--mute); letter-spacing: 0; font-weight: 400; margin-left: 4px; }

/* tab bar */
.bar { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding: 0 50px; height: 44px; font-size: 11.5px; color: var(--mute); }
.bar a, .bar button.t { background: none; border: 0; cursor: pointer; color: inherit; position: relative; padding: 4px 0; }
.bar a:hover, .bar button.t:hover { color: var(--ink); }
.bar .on { color: var(--ink); }
.bar .on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -14px; height: 1px; background: var(--ink); }
.bar .ct { font-family: var(--mono); font-size: 9px; color: var(--faint); margin-left: 3px; }
.bar .sp { margin-left: auto; }
.note { font-family: var(--mono); font-size: 9.5px; color: var(--mute); }
.note b { color: var(--ink); font-weight: 500; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.seg button { background: #fff; border: 0; border-right: 1px solid var(--line); height: 28px; padding: 0 12px; font-size: 11.5px; cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: #fff; }
.seg.tall button { height: 38px; font-size: 12px; }
.seg button small { display: block; font-family: var(--mono); font-size: 8.5px; opacity: .6; margin-top: 1px; }

/* feature: chart + side panel */
.mk { display: grid; grid-template-columns: minmax(0, 1fr) 340px; border-bottom: 1px solid var(--line); }
.mk .l { padding: 26px 40px 30px 50px; border-right: 1px solid var(--line); min-width: 0; }
.mk .r { padding: 24px; min-width: 0; }
.q { font-size: 26px; line-height: 1.08; letter-spacing: -.05em; font-weight: 600; margin: 10px 0 14px; }
.q .d { font-family: var(--mono); font-size: 12px; letter-spacing: 0; font-weight: 400; margin-left: 8px; }
.chips { display: flex; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 3px; width: max-content; max-width: 100%; margin-bottom: 18px; }
.chips > div { padding: 8px 12px; border-right: 1px solid var(--line); min-width: 0; }
.chips > div:last-child { border-right: 0; }
.chips .v { font-size: 13px; font-weight: 500; letter-spacing: -.02em; margin-top: 3px; white-space: nowrap; }
.chart { height: 300px; border: 1px solid var(--line); }
.chart canvas { width: 100%; height: 100%; display: block; }
.panel-h { font-size: 15px; font-weight: 500; letter-spacing: -.03em; }
.sub { font-size: 11.5px; color: var(--mute); margin: 4px 0 14px; line-height: 1.4; }
.lbl2 { font-family: var(--mono); font-size: 9px; color: var(--faint); text-transform: uppercase; margin: 14px 0 6px; display: block; }
.row { display: flex; justify-content: space-between; font-size: 11.5px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.row span:last-child { font-family: var(--mono); font-size: 10.5px; }
.odds { display: flex; height: 6px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; margin-top: 8px; background: #fff; }
.odds i { display: block; height: 100%; background: var(--ink); }
.odds i + i { background: #c8c8c6; border-left: 1px solid #fff; }
.msg { font-size: 11.5px; color: var(--mute); margin-top: 10px; line-height: 1.4; }

/* round grid */
.mgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--line); margin: 22px 50px 40px; }
.mcell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 10px 12px; min-width: 0; display: block; cursor: pointer; }
.mgrid .mcell:nth-child(-n+3) { border-top: 1px solid var(--line); }
.mcell:hover { background: #fcfcfb; }
.mcell.sel { background: var(--soft); }
.th { height: 96px; border: 1px solid var(--line); overflow: hidden; background: #fff; }
.th canvas { width: 100%; height: 100%; display: block; }
.mcell .t { font-size: 12px; margin-top: 8px; line-height: 1.3; letter-spacing: -.01em; display: flex; justify-content: space-between; gap: 8px; }
.mcell .t b { font-weight: 500; }
.mcell .s { font-family: var(--mono); font-size: 9px; color: var(--faint); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; white-space: nowrap; }
.mcell .s span:last-child { color: var(--mute); }
.mcell .bt { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px; }
.up { color: var(--ink); } .dn { color: var(--down); }

/* landing blocks */
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 3px; }
.steps > div { padding: 14px 14px 16px; border-right: 1px solid var(--line); font-size: 12px; min-width: 0; }
.steps > div:last-child { border-right: 0; }
.steps .v { margin-top: 6px; font-weight: 500; font-size: 13px; letter-spacing: -.02em; }
.steps p { color: var(--mute); margin-top: 4px; line-height: 1.45; font-size: 12px; }
.blk { padding: 30px 50px; border-bottom: 1px solid var(--line); }
.blk h2 { margin: 8px 0 16px; }
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.cols3 > div { padding: 16px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cols3 h3 { font-size: 13px; font-weight: 600; margin-bottom: 6px; letter-spacing: -.01em; }
.cols3 p { font-size: 12px; color: var(--mute); line-height: 1.45; }
.demo { border: 1px solid var(--line); border-radius: 3px; display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.demo canvas { width: 100%; height: 260px; display: block; border-right: 1px solid var(--line); }
.demo .tx { padding: 20px; }
.demo .tx p { font-size: 12px; color: var(--mute); line-height: 1.45; margin-top: 6px; }

/* docs */
.doc { max-width: 760px; padding: 30px 50px 50px; }
.doc h2 { margin: 30px 0 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.doc p, .doc li { font-size: 13px; line-height: 1.55; color: #333; }
.doc p { margin: 8px 0; }
.doc ul, .doc ol { padding-left: 16px; margin: 8px 0; }
.doc code { font-family: var(--mono); font-size: 11px; background: var(--soft); padding: 0 3px; border-radius: 2px; }
.doc table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 8px 10px 8px 0; text-align: left; vertical-align: top; }
.doc th { font-family: var(--mono); font-size: 9px; font-weight: 400; color: var(--faint); text-transform: uppercase; }
.diagram { border: 1px solid var(--line); border-radius: 3px; padding: 14px; margin: 18px 0 6px; }
.diagram svg { width: 100%; height: auto; display: block; }
.callout { border-left: 2px solid var(--ink); padding: 4px 0 4px 10px; margin: 12px 0; font-size: 13px; }

/* footer */
.ft { display: grid; grid-template-columns: 305px repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line); padding-left: 32px; font-size: 11.5px; color: var(--mute); margin-top: 40px; }
.ft > div { padding: 18px 18px 26px; border-left: 1px solid var(--line); }
.ft > div:last-child { border-right: 1px solid var(--line); }
.ft b { color: var(--ink); font-weight: 500; display: block; margin-bottom: 6px; }
.ft a { display: block; padding: 2px 0; }
.ft a:hover { color: var(--ink); }
.ft .mono { font-size: 9.5px; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 11.5px; padding: 9px 14px; border-radius: 3px; z-index: 60; display: none; max-width: calc(100% - 32px); }
.toast.on { display: block; }

@media (max-width: 900px) {
  .hd { padding: 0 16px; gap: 12px; }
  .hd nav { gap: 12px; }
  .tok, .live { display: none; }
  .ph .in, .ph.big .in { padding-left: 16px; padding-right: 16px; }
  .ph.big .in { padding-top: 48px; padding-bottom: 44px; }
  .ph.big h1 { font-size: 38px; }
  .ph canvas.art { width: 100%; opacity: .3; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats > div:first-child, .stats > div:nth-child(3) { padding-left: 16px; }
  .stats > div:nth-child(2) { border-right: 0; }
  .stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .bar { padding: 0 16px; gap: 10px; overflow-x: auto; }
  .bar .note { display: none; }
  .mk { grid-template-columns: 1fr; }
  .mk .l { padding: 22px 16px 24px; border-right: 0; border-bottom: 1px solid var(--line); }
  .mk .r { padding: 16px; }
  .chart { height: 240px; }
  .mgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px; }
  .mgrid .mcell:nth-child(-n+3) { border-top: 0; }
  .mgrid .mcell:nth-child(-n+2) { border-top: 1px solid var(--line); }
  .blk { padding: 24px 16px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps > div:nth-child(2) { border-right: 0; }
  .steps > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .cols3 { grid-template-columns: 1fr; }
  .demo { grid-template-columns: 1fr; }
  .demo canvas { border-right: 0; border-bottom: 1px solid var(--line); height: 200px; }
  .doc { padding: 22px 16px 40px; }
  .doc table { display: block; overflow-x: auto; }
  .ft { grid-template-columns: 1fr 1fr; padding-left: 0; }
  .ft > div { border-left: 0; border-top: 1px solid var(--line); border-right: 0 !important; }
  .ft > div:first-child { grid-column: 1 / -1; border-top: 0; }
  h1 { font-size: 28px; }
  .q { font-size: 21px; }
}
@media (max-width: 520px) {
  .mgrid { grid-template-columns: 1fr; }
  .mgrid .mcell:nth-child(2) { border-top: 0; }
  .hd nav a.hide-s, .hd .rt .btn { display: none; }
}
