/* CPI — surface measured against programmable.market.
   Tokens taken from its computed styles: Instrument Sans, black ground,
   #181818 cards on a 0.67px #323232 hairline, 16px radius, 16px gutter,
   88px header. No accent colour in the chrome — colour belongs to the
   artwork, which is what makes that reference read as clean. */

:root {
  color-scheme: dark;

  --black:  #000000;
  --card:   #181818;
  --card-2: #1f1f1f;
  --line:   #323232;
  --line-2: #414141;

  --ink:    #ffffff;
  --ink-2:  #f5f5f2;
  --ink-3:  #9a9a9a;
  --ink-4:  #6a6a6a;
  --ink-5:  #4a4a4a;

  --up:   #4ec27f;
  --down: #e4574f;

  --f-ui:   "Instrument Sans", -apple-system, "Segoe UI", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* measured: body 16/24 at -0.006em; display 104px/0.95 at -0.04em */
  --t-12: 12px; --t-13: 13px; --t-14: 14px; --t-16: 16px;
  --t-18: 18px; --t-20: 20px; --t-24: 24px; --t-30: 30px;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 72px; --s-9: 112px;

  --r-1: 6px; --r-2: 10px; --r-3: 12px; --r-4: 16px; --r-pill: 999px;

  --d-1: 120ms; --d-2: 200ms; --d-3: 320ms; --d-4: 560ms;
  --e-out: cubic-bezier(0.22, 1, 0.36, 1);

  --header: 88px;
  --gutter: clamp(20px, 4vw, 56px);
  --page: 1360px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--black); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--black);
  color: var(--ink);
  font-family: var(--f-ui);
  font-size: var(--t-16);
  line-height: 1.5;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: var(--r-1); }
::selection { background: var(--ink); color: var(--black); }

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.num  { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ── Header ──────────────────────────────────────────────────── */
.hdr {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: var(--header);
  display: flex; align-items: center;
  padding: 0 var(--gutter);
  transition: background var(--d-3) var(--e-out), border-color var(--d-3) var(--e-out);
  border-bottom: 1px solid transparent;
}
.hdr[data-solid="1"] {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(16px);
  border-bottom-color: var(--line);
}
.hdr .mark { display: flex; align-items: center; }
.hdr .mark .markimg { width: 26px; height: 26px; }

.hnav {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: var(--s-5);
}
.hnav a {
  position: relative;
  font-size: var(--t-16);
  color: var(--ink);
  padding: 4px 0;
  opacity: 0.72;
  transition: opacity var(--d-2) var(--e-out);
}
.hnav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: 50%;
  transition: transform var(--d-2) var(--e-out);
}
.hnav a:hover { opacity: 1; }
.hnav a[aria-current="page"] { opacity: 1; }
.hnav a[aria-current="page"]::after { transform: scaleX(0.42); }

.hend { margin-left: auto; display: flex; align-items: center; gap: var(--s-4); }
.chain {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: var(--t-13); color: var(--ink-3);
  font-family: var(--f-mono);
}
.chain svg { width: 13px; height: 13px; }
.iconlink {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: var(--r-2);
  color: var(--ink); opacity: 0.72;
  transition: opacity var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}
.iconlink svg { width: 15px; height: 15px; }
.iconlink:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }

.wbtn {
  height: 34px; padding: 0 var(--s-3);
  border-radius: var(--r-3);
  font-size: var(--t-14); font-weight: 600; letter-spacing: normal;
  color: #f8f0e9;
  transition: background var(--d-2) var(--e-out);
}
.wbtn:hover { background: rgba(255, 255, 255, 0.08); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: var(--header) var(--gutter) var(--s-8);
  overflow: hidden;
}
.hero-art { position: absolute; inset: 0; z-index: 0; background: var(--black); }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; }
.hero-art::after {
  /* The artwork is bright where the wordmark sits, so it takes three passes:
     a well behind the type, a scrim under the header, and a foot that lands
     the hero on the black page below without a seam. */
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(44% 34% at 50% 47%, rgba(0,0,0,0.46), rgba(0,0,0,0.16) 62%, rgba(0,0,0,0) 100%),
    linear-gradient(180deg, rgba(0,0,0,0.46) 0%, rgba(0,0,0,0.08) 16%, rgba(0,0,0,0) 32%),
    linear-gradient(0deg, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.32) 7%, rgba(0,0,0,0) 20%);
}
/* The type carries its own contrast so the artwork keeps its saturation. */
.hero-in .display, .hero-in .hero-sub { text-shadow: 0 2px 26px rgba(0,0,0,0.55), 0 1px 3px rgba(0,0,0,0.35); }
.hero-foot button { text-shadow: 0 1px 12px rgba(0,0,0,0.7); }
.hero-in { position: relative; z-index: 1; text-align: center; }
.hero-mark { display: flex; justify-content: center; margin-bottom: var(--s-5); }
.hero-mark .markimg { width: 66px; height: 66px; filter: drop-shadow(0 3px 18px rgba(0,0,0,0.5)); }

.display {
  margin: 0;
  font-size: clamp(52px, 8.2vw, 116px);
  font-weight: 560;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.hero-sub {
  margin: var(--s-3) 0 0;
  font-size: clamp(18px, 2vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.018em;
  color: var(--ink-2);
}
.hero-cta {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  margin-top: var(--s-7);
  padding: var(--s-3) var(--s-6);
  border-radius: var(--r-3);
  /* a dark plate, not a light one — the artwork underneath is bright, and a
     white scrim left the sub-line unreadable over the yellow dunes */
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(4px) saturate(0.5);
  transition: background var(--d-2) var(--e-out), transform var(--d-2) var(--e-out);
}
.hero-cta:hover { background: rgba(0, 0, 0, 0.62); }
.hero-cta:active { transform: translateY(1px); }
.hero-cta b { font-size: var(--t-20); font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.hero-cta span { font-family: var(--f-mono); font-size: var(--t-12); color: rgba(255,255,255,0.72); }

.hero-foot {
  position: absolute; bottom: var(--s-6); left: 0; right: 0; z-index: 1;
  display: flex; justify-content: center;
  font-size: var(--t-14); color: var(--ink-2);
}
.hero-foot button { display: inline-flex; align-items: center; gap: 8px; opacity: 0.8; transition: opacity var(--d-2) var(--e-out); }
.hero-foot button:hover { opacity: 1; }
.hero-foot .arrow { animation: nudge 2.4s var(--e-out) infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: translateY(0); } 82% { transform: translateY(3px); } }

/* ── Page ────────────────────────────────────────────────────── */
.page { padding: calc(var(--header) + var(--s-8)) var(--gutter) var(--s-9); max-width: var(--page); margin: 0 auto; }
.page-hero { padding-top: calc(var(--header) + var(--s-7)); }

.ptitle {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-6); flex-wrap: wrap;
  margin-bottom: var(--s-7);
}
.h-big {
  margin: 0;
  font-size: clamp(44px, 6.6vw, 96px);
  font-weight: 520;
  line-height: 0.92;
  letter-spacing: -0.062em;
}
.h-2 { margin: 0; font-size: var(--t-24); font-weight: 560; letter-spacing: -0.03em; }
.h-3 { margin: 0; font-size: var(--t-18); font-weight: 560; letter-spacing: -0.022em; }
.h-4 { margin: 0; font-size: var(--t-14); font-weight: 600; letter-spacing: -0.01em; }
.lead { margin: 0; font-size: var(--t-20); line-height: 1.4; letter-spacing: -0.018em; color: var(--ink-2); max-width: 46ch; }
.p { margin: 0; color: var(--ink-3); line-height: 1.6; max-width: 66ch; }
.p + .p { margin-top: var(--s-3); }
.eyebrow { font-family: var(--f-mono); font-size: var(--t-12); letter-spacing: 0.04em; color: var(--ink-4); text-transform: uppercase; }

.stack { display: flex; flex-direction: column; }
.stack-2 { gap: var(--s-2); } .stack-3 { gap: var(--s-3); } .stack-4 { gap: var(--s-4); }
.stack-5 { gap: var(--s-5); } .stack-6 { gap: var(--s-6); } .stack-7 { gap: var(--s-7); }
.row { display: flex; align-items: center; gap: var(--s-3); }
.grid { display: grid; gap: var(--s-4); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-split { grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: start; gap: var(--s-5); }

/* ── Card ────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 0.67px solid var(--line);
  border-radius: var(--r-4);
  overflow: hidden;
}
.card-h { display: flex; align-items: center; gap: var(--s-3); padding: var(--s-4) var(--s-4) var(--s-3); }
.card-h .h-3, .card-h .h-4 { margin-right: auto; }
.card-b { padding: var(--s-4); }
.card-b + .card-b { border-top: 0.67px solid var(--line); }

/* Program card: the artwork is a diagram of the mechanic, drawn in code.
   A stock image would say nothing; this says what the program does. */
.pcard { display: flex; flex-direction: column; transition: border-color var(--d-2) var(--e-out); }
.pcard:hover { border-color: var(--line-2); }
.pcard .art {
  aspect-ratio: 16 / 9;
  background: #0d0d0d;
  border-bottom: 0.67px solid var(--line);
  position: relative;
}
.pcard .art svg { width: 100%; height: 100%; }
.pcard .body { padding: var(--s-4); display: flex; align-items: baseline; gap: var(--s-2); }
.pcard .body .tk { font-family: var(--f-mono); font-size: var(--t-13); color: var(--ink-4); }
.pcard .one { padding: 0 var(--s-4) var(--s-4); color: var(--ink-3); font-size: var(--t-14); line-height: 1.45; }
.pcard .foot {
  margin-top: auto;
  border-top: 0.67px solid var(--line);
  padding: 11px var(--s-4);
  display: flex; align-items: center; gap: var(--s-3);
  font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4);
}
.pcard .foot .sp { margin-left: auto; display: inline-flex; align-items: center; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: var(--t-12);
  padding: 3px 9px; border-radius: var(--r-pill);
  border: 0.67px solid var(--line); color: var(--ink-3);
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); }
.pill[data-status="live"] i { background: var(--up); }
.pill[data-status="spec"] i { background: var(--ink-4); }

/* ── Fields, buttons ─────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: 44px; padding: 0 var(--s-5);
  border-radius: var(--r-3);
  background: var(--ink); color: var(--black);
  font-weight: 600; font-size: var(--t-15, 15px); letter-spacing: -0.01em;
  transition: background var(--d-2) var(--e-out), transform var(--d-1) var(--e-out), opacity var(--d-2) var(--e-out);
}
.btn:hover { background: #e6e6e6; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--card-2); color: var(--ink-5); cursor: not-allowed; }
.btn.w { width: 100%; }
.btn.ghost { background: none; color: var(--ink); border: 0.67px solid var(--line-2); }
.btn.ghost:hover { background: rgba(255,255,255,0.06); }
.btn .spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin 640ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field {
  border: 0.67px solid var(--line); border-radius: var(--r-3);
  background: #131313; padding: 11px var(--s-3) 13px;
  transition: border-color var(--d-2) var(--e-out);
}
.field:focus-within { border-color: var(--line-2); }
.field .k { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); }
.field .in { display: flex; align-items: baseline; gap: var(--s-2); margin-top: 5px; }
.field input {
  flex: 1; min-width: 0; background: none; border: 0; padding: 0;
  font-family: var(--f-mono); font-size: var(--t-24); font-weight: 500;
  letter-spacing: -0.03em; color: var(--ink);
}
.field input:focus { outline: none; }
.field input::-webkit-outer-spin-button, .field input::-webkit-inner-spin-button { appearance: none; margin: 0; }
.field input[type=number] { appearance: textfield; }
.field .unit { font-family: var(--f-mono); font-size: var(--t-14); color: var(--ink-4); }

.field .fixed { font-family: var(--f-mono); font-size: var(--t-24); font-weight: 500; letter-spacing: -0.03em; color: var(--ink-3); flex: 1; }
label.field { display: block; cursor: text; }

/* ── Launched token card ─────────────────────────────────────── */
.lcard { transition: border-color var(--d-2) var(--e-out); }
.lcard:hover { border-color: var(--line-2); }
.lcard-head { display: flex; align-items: flex-start; gap: var(--s-4); padding: var(--s-4); }
.lcard-art { width: 84px; height: 84px; border-radius: var(--r-3); flex: none; object-fit: cover; }
.lcard-id { min-width: 0; flex: 1; }
.lcard-id .tk { font-family: var(--f-mono); font-size: var(--t-14); color: var(--ink-4); }
.lcard-links { display: flex; gap: 8px; flex: none; }
.btn.sm { height: 30px; padding: 0 12px; font-size: var(--t-13); font-weight: 500; border-radius: var(--r-2); }

.carow { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.ca {
  font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  border: 0.67px solid var(--line); border-radius: var(--r-1);
  padding: 3px 7px; background: #131313;
}
.copybtn {
  font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-3);
  border: 0.67px solid var(--line); border-radius: var(--r-1); padding: 3px 9px;
  flex: none;
  transition: color var(--d-1) var(--e-out), border-color var(--d-1) var(--e-out);
}
.copybtn:hover { color: var(--ink); border-color: var(--line-2); }

.lstats {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.67px; background: var(--line);
  border-top: 0.67px solid var(--line);
}
.lstat { background: var(--card); padding: var(--s-3) var(--s-4) var(--s-4); }
.lstat .k { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); }
.lstat .v {
  font-size: var(--t-20); font-weight: 560; letter-spacing: -0.03em;
  margin-top: 5px; font-variant-numeric: tabular-nums;
}
.lstat .v.up { color: var(--up); }
.lstat .v.down { color: var(--down); }
/* before a pool exists every figure is a dash — dim the block so it reads as
   waiting rather than broken */
.lcard.pending .lstat .v { color: var(--ink-5); }

/* ── Token art ───────────────────────────────────────────────── */
.idrow { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: var(--s-3); align-items: start; }
.artcol { display: flex; flex-direction: column; gap: 9px; }
.artdrop {
  display: block; width: 104px; height: 104px;
  border: 1px dashed var(--line-2); border-radius: var(--r-3);
  background: #131313; cursor: pointer; overflow: hidden;
  transition: border-color var(--d-2) var(--e-out), background var(--d-2) var(--e-out);
}
.artdrop:hover, .artdrop.over { border-color: var(--ink-3); background: #171717; }
.artdrop .artbody { width: 100%; height: 100%; display: grid; place-items: center; gap: 2px; align-content: center; }
.artdrop img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.artdrop .plus { font-size: 20px; color: var(--ink-4); line-height: 1; }
.artdrop .hint { font-size: var(--t-12); color: var(--ink-5); }
.artside { display: flex; flex-direction: column; gap: 7px; }
.artside .hint { font-size: var(--t-12); color: var(--ink-5); line-height: 1.35; }
/* the size the art has to survive in a wallet list */
.proof { display: flex; align-items: center; gap: 7px; font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-5); }
.proof img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: none; }
.linkbtn {
  align-self: flex-start; font-size: var(--t-12); color: var(--ink-4);
  text-decoration: underline; text-underline-offset: 3px;
  transition: color var(--d-1) var(--e-out);
}
.linkbtn:hover { color: var(--ink); }

textarea {
  width: 100%; margin-top: 6px; background: none; border: 0; padding: 0; resize: vertical;
  font-family: inherit; font-size: var(--t-14); line-height: 1.5; color: var(--ink);
}
textarea:focus { outline: none; }
textarea::placeholder, input::placeholder { color: var(--ink-5); }

/* ── Launch panel ────────────────────────────────────────────── */
.launch { position: sticky; top: calc(var(--header) + var(--s-4)); }
.launch-id { display: flex; align-items: center; gap: var(--s-3); padding-bottom: var(--s-4); }
.launch-id .lart { width: 40px; height: 40px; min-height: 40px; max-height: 40px; border-radius: var(--r-2); object-fit: cover; flex: 0 0 40px; align-self: center; }
.launch-id .lart.empty {
  display: grid; place-items: center;
  background: #1f1f1f; border: 0.67px solid var(--line);
  font-family: var(--f-mono); font-size: var(--t-16); color: var(--ink-5);
}
.launch-id .lnames { display: flex; flex-direction: column; min-width: 0; }
.launch-id .lname { font-size: var(--t-18); font-weight: 560; letter-spacing: -0.025em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.launch-id .ltk { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); }
.launch .kv .v.neg { color: var(--down); }
.launch-note { margin: 10px 0 0; font-size: var(--t-12); color: var(--ink-4); line-height: 1.45; text-align: center; }

.chiplist { display: flex; flex-wrap: wrap; gap: 6px; }
.tagchip {
  font-size: var(--t-13); padding: 4px 10px; border-radius: var(--r-pill);
  border: 0.67px solid var(--line-2); color: var(--ink-2);
}

/* ── Review sheet ────────────────────────────────────────────── */
.sheet {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(6px);
  display: grid; place-items: center;
  padding: var(--s-5);
  animation: sheetin var(--d-2) var(--e-out);
}
@keyframes sheetin { from { opacity: 0; } to { opacity: 1; } }
.sheet-in {
  width: min(460px, 100%);
  max-height: 88vh; overflow-y: auto;
  animation: sheetup var(--d-3) var(--e-out);
}
@keyframes sheetup { from { transform: translateY(10px); } to { transform: translateY(0); } }
.sheet-x {
  margin-left: auto; width: 26px; height: 26px; border-radius: var(--r-1);
  color: var(--ink-4); font-size: var(--t-13);
  transition: color var(--d-1) var(--e-out), background var(--d-1) var(--e-out);
}
.sheet-x:hover { color: var(--ink); background: rgba(255,255,255,0.08); }

.chips { display: flex; gap: 6px; }
.chip {
  flex: 1; padding: 7px 0; border-radius: var(--r-2);
  border: 0.67px solid var(--line); background: none;
  font-family: var(--f-mono); font-size: var(--t-13); color: var(--ink-3);
  transition: border-color var(--d-1) var(--e-out), color var(--d-1) var(--e-out), background var(--d-1) var(--e-out);
}
.chip:hover { border-color: var(--line-2); color: var(--ink); }
.chip[aria-pressed="true"] { border-color: var(--ink); color: var(--ink); background: rgba(255,255,255,0.06); }

/* Toggle row used by Create */
/* a <button> centres its text by default, which broke the label column */
.toggle {
  text-align: left;
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4);
  border-bottom: 0.67px solid var(--line);
  cursor: pointer;
  transition: background var(--d-1) var(--e-out);
}
.toggle:last-child { border-bottom: 0; }
.toggle:hover { background: rgba(255,255,255,0.02); }
.toggle .box {
  width: 17px; height: 17px; flex: none; margin-top: 2px;
  border: 0.67px solid var(--line-2); border-radius: 5px;
  display: grid; place-items: center;
  transition: background var(--d-1) var(--e-out), border-color var(--d-1) var(--e-out);
}
.toggle .box svg { width: 11px; height: 11px; opacity: 0; transition: opacity var(--d-1) var(--e-out); }
.toggle[aria-pressed="true"] .box { background: var(--ink); border-color: var(--ink); }
.toggle[aria-pressed="true"] .box svg { opacity: 1; }
.toggle .t { min-width: 0; }
.toggle .t b { display: block; font-weight: 560; letter-spacing: -0.015em; }
.toggle .t span { display: block; margin-top: 2px; font-size: var(--t-13); color: var(--ink-4); line-height: 1.45; }

/* ── Band ────────────────────────────────────────────────────── */
.band {
  position: relative; height: 52px; display: flex;
  border-radius: var(--r-2); overflow: hidden;
  border: 0.67px solid var(--line);
  background: #101010;
}
.band-seg {
  position: relative; min-width: 0;
  border-right: 1px solid #0a0a0a;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--d-2) var(--e-out);
}
.band-seg:last-child { border-right: 0; }
.band-seg[data-tier="0"] { background: #1a1a1a; }
.band-seg[data-tier="1"] { background: #242424; }
.band-seg[data-tier="2"] { background: #2e2e2e; }
.band-seg[data-tier="3"] { background: #383838; }
.band-seg[data-tier="4"] { background: #454545; }
.band-seg[data-tier="5"] { background: #525252; }
.band-seg.hit { background: #6d6d6d; }
.band-seg.hit-up { background: var(--ink); }
.band-seg .sx { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); white-space: nowrap; overflow: hidden; }
.band-seg.hit .sx { color: var(--ink); }
.band-seg.hit-up .sx { color: var(--black); }

.needle {
  position: absolute; top: -4px; bottom: -4px; width: 2px;
  background: var(--ink); left: 0; transform: translateX(-1px);
  box-shadow: 0 0 0 3px var(--card);
  transition: left var(--d-4) var(--e-out);
  pointer-events: none;
}
.needle::before {
  content: ""; position: absolute; top: -4px; left: -3px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid var(--ink);
}
.legend { display: flex; flex-wrap: wrap; gap: 7px var(--s-4); margin-top: var(--s-3); font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 8px; height: 8px; border-radius: 2px; flex: none; }
.legend .sw[data-tier="0"] { background: #2e2e2e; }
.legend .sw[data-tier="1"] { background: #3a3a3a; }
.legend .sw[data-tier="2"] { background: #484848; }
.legend .sw[data-tier="3"] { background: #585858; }
.legend .sw[data-tier="4"] { background: #6d6d6d; }
.legend .sw[data-tier="5"] { background: var(--ink); }

.readout { display: flex; align-items: baseline; gap: var(--s-3); font-family: var(--f-mono); min-height: 40px; }
.readout .big { font-size: 30px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.readout .sub { font-size: var(--t-13); color: var(--ink-4); }
.readout.win .big { color: var(--ink); }

/* ── Rows ────────────────────────────────────────────────────── */
.rows { display: flex; flex-direction: column; }
.rows .r {
  display: grid; align-items: center; gap: var(--s-3);
  padding: 11px var(--s-4);
  border-bottom: 0.67px solid var(--line);
  font-size: var(--t-14);
}
.rows .r:last-child { border-bottom: 0; }
.rows .r.head { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); background: #131313; }
.rows.odds .r    { grid-template-columns: 72px 1fr 86px 92px; }
.rows.ledger .r  { grid-template-columns: 84px 1fr 92px 92px 74px; }
.rows.split .r   { grid-template-columns: 62px 1fr 110px; }
.rows.reasons .r { grid-template-columns: 30px 1fr; align-items: start; padding: var(--s-4); }
.rows.reasons .r span:last-child { color: var(--ink-3); line-height: 1.55; }
.r .x { font-family: var(--f-mono); letter-spacing: -0.02em; }
.r .muted { color: var(--ink-4); }
.r .right { text-align: right; font-family: var(--f-mono); }

.payout { display: flex; align-items: baseline; gap: 9px; font-family: var(--f-mono); }
.payout b { font-weight: 500; color: var(--ink-3); }
.payout em { font-style: normal; font-size: var(--t-12); color: var(--ink-5); }
.payout.pos b { color: var(--ink); }
.payout.pos em { color: var(--up); }

.bar { height: 5px; border-radius: 999px; background: #2a2a2a; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--ink-3); border-radius: 999px; }

.kv { display: flex; justify-content: space-between; gap: var(--s-4); padding: 9px 0; border-bottom: 0.67px solid var(--line); font-size: var(--t-14); }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-4); }
.kv .v { font-family: var(--f-mono); }

.stat { padding: var(--s-4) var(--s-4) var(--s-5); }
.stat .k { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); }
.stat .v { font-size: 32px; font-weight: 560; letter-spacing: -0.04em; margin-top: 9px; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .n { font-size: var(--t-13); color: var(--ink-4); margin-top: 9px; line-height: 1.45; }
.stat .v.neg { color: var(--down); }

/* ── Histogram ───────────────────────────────────────────────── */
.hist-wrap { position: relative; }
.hist { display: flex; align-items: flex-end; gap: 3px; height: 128px; }
.hist .b { flex: 1; background: #2c2c2c; border-radius: 2px 2px 0 0; height: 2px; transition: height var(--d-3) var(--e-out); }
.hist .b.pos { background: #6f6f6f; }
.hist-axis { position: relative; height: 20px; margin-top: 8px; font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-5); }
.hist-axis .r { position: absolute; right: 0; top: 0; }
.hist-axis .zero { position: absolute; top: 0; transform: translateX(-50%); color: var(--ink-4); padding-top: 6px; }
.hist-axis .zero::before { content: ""; position: absolute; left: 50%; top: -136px; height: 134px; border-left: 1px dashed #3a3a3a; }

.sim-out { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 0.67px; background: var(--line); border-top: 0.67px solid var(--line); }
.sim-out > div { background: var(--card); padding: var(--s-4); }
.sim-out .k { font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-4); }
.sim-out .v { font-size: var(--t-20); font-weight: 560; margin-top: 6px; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

/* ── Flow ────────────────────────────────────────────────────── */
.flow-step { display: grid; grid-template-columns: 30px 1fr; gap: var(--s-4); }
.flow-gut { display: flex; flex-direction: column; align-items: center; }
.flow-n { width: 24px; height: 24px; border-radius: 50%; flex: none; border: 0.67px solid var(--line-2); display: grid; place-items: center; font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-3); }
.flow-line { width: 1px; flex: 1; background: var(--line); min-height: 12px; }
.flow-step:last-child .flow-line { display: none; }
.flow-body { padding-bottom: var(--s-5); }
.flow-step:last-child .flow-body { padding-bottom: 0; }
.flow-body .h-4 { margin-bottom: 4px; }
.flow-body code { font-family: var(--f-mono); font-size: var(--t-13); color: var(--ink-2); }

/* ── Empty ───────────────────────────────────────────────────── */
.empty {
  padding: var(--s-8) var(--s-5); text-align: center;
  border: 1px dashed var(--line); border-radius: var(--r-4);
}
.empty .p { color: var(--ink-4); margin: 8px auto 0; max-width: 46ch; font-size: var(--t-14); }

.note { border-left: 1px solid var(--line-2); padding-left: var(--s-4); color: var(--ink-3); font-size: var(--t-14); line-height: 1.6; max-width: 64ch; }

/* ── Footer ──────────────────────────────────────────────────── */
.foot {
  border-top: 0.67px solid var(--line);
  padding: var(--s-6) var(--gutter);
  display: flex; align-items: center; gap: var(--s-5); flex-wrap: wrap;
  font-family: var(--f-mono); font-size: var(--t-12); color: var(--ink-5);
}
.foot .sp { margin-left: auto; }

.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  background: var(--card); border: 0.67px solid var(--line-2); color: var(--ink);
  padding: 11px 18px; border-radius: var(--r-3); font-size: var(--t-14); z-index: 60;
}

@media (max-width: 1080px) {
  .g-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .g-split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1080px) {
  .lstats { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .lcard-head { flex-wrap: wrap; }
  .lcard-links { width: 100%; }
  .lstats { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .hnav { position: static; transform: none; gap: var(--s-4); font-size: var(--t-14); margin-left: var(--s-5); }
  .hnav a { font-size: var(--t-14); }
  .chain { display: none; }
  .g-3, .g-2 { grid-template-columns: minmax(0,1fr); }
  .sim-out { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rows.ledger .r { grid-template-columns: 72px 1fr 84px; }
  .rows.ledger .r > :nth-child(4), .rows.ledger .r > :nth-child(5) { display: none; }
}
