/* NianNian (年年) — 岁岁有今朝，年年有币安.
   Binance black and yellow over a drifting diamond lattice. The diamond is the
   one geometric unit: marks, keys, dial ticks, the today calendar, panel nodes.
   Meaning, not decoration: light = ordinary NFT and LP; solid yellow = VIP / BNB
   dividend; hollow yellow = tokens and staking; grey = treasury. */
:root {
  --night: #0b0e11;
  --layer: rgba(24, 26, 32, 0.48);
  --layer-strong: rgba(24, 26, 32, 0.96);
  --line: rgba(234, 236, 239, 0.09);
  --line-2: rgba(234, 236, 239, 0.2);
  --fg: #eaecef;
  --fg-2: #b7bdc6;
  --fg-3: #848e9c;
  --y: #f0b90b;        /* Binance yellow: VIP, BNB, primary action */
  --y-hi: #fcd535;     /* hover / focus */
  --y-line: rgba(240, 185, 11, 0.4);
  --grey: #5e6673;     /* treasury */
  --ink: #0b0e11;      /* text on yellow */
  --focus: #fcd535;

  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, "Roboto Mono", monospace;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --top-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
/* Components set display:grid/flex; hidden must still win. */
[hidden] { display: none !important; }
html { background: var(--night); color: var(--fg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  font: 400 15px/1.6 var(--sans);
  background:
    radial-gradient(70% 55% at 78% -8%, rgba(240, 185, 11, 0.13) 0%, rgba(240, 185, 11, 0) 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(240, 185, 11, 0.05) 0%, rgba(240, 185, 11, 0) 70%),
    var(--night);
  background-attachment: fixed;
  overflow-x: hidden;
}
::selection { background: var(--y); color: var(--ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
dl, dd { margin: 0; }
html { scrollbar-color: #2b3139 var(--night); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.dim { color: var(--fg-3); }
.lbl { display: block; font-size: 13px; color: var(--fg-2); }
.note { font-size: 13px; color: var(--fg-3); line-height: 1.55; }
.lede { color: var(--fg-2); max-width: 60ch; }
[data-unknown] { color: var(--fg-3); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--y); color: var(--ink); padding: 8px 12px; font-weight: 600; }
.skip-link:focus { left: 8px; }

/* ---------- layers: translucent sheets, each pinned to the lattice by one node ---------- */
/* No backdrop blur: even 2px smeared the 1px lattice lines out of sight and
   left the sheets reading as solid cards. */
.layer {
  position: relative;
  background: var(--layer);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.layer::before {
  content: ""; position: absolute; top: -5px; left: 24px; width: 9px; height: 9px;
  background: var(--y); transform: rotate(45deg); pointer-events: none;
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--s5);
  height: var(--top-h); padding: 0 var(--s5);
  background: rgba(11, 14, 17, 0.78);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-word { font: 700 19px/1 var(--display); letter-spacing: 0.04em; color: var(--fg); }
.brand-latin { font: 600 12px/1 var(--sans); color: var(--fg-3); letter-spacing: 0.08em; }

.tabs { display: flex; gap: 2px; margin: 0 auto; }
.tabs a {
  display: flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 var(--s4);
  text-decoration: none; color: var(--fg-2); font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color .18s; /* current-tab marker switches instantly */
}
.tabs a svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.tabs a:hover { color: var(--fg); }
.tabs a[aria-current="page"] { color: var(--fg); border-bottom-color: var(--y); }
.tabs a[aria-current="page"] svg { stroke: var(--y); }

.tools { display: flex; align-items: center; gap: var(--s2); flex: none; }
.tool {
  display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer;
  transition: border-color .18s, background .18s;
}
.tool:hover { border-color: var(--y-line); background: rgba(240, 185, 11, 0.06); }
.tool svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.tool .i-play { display: none; fill: currentColor; stroke: none; }
.tool[aria-pressed="true"] .i-pause { display: none; }
.tool[aria-pressed="true"] .i-play { display: block; }
.tool-text { font: 600 13px/1 var(--sans); }

.wallet { position: relative; }
.btn-wallet {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 var(--s4);
  background: var(--y); color: var(--ink); border: 0; border-radius: 6px;
  font-weight: 600; cursor: pointer; transition: background .18s;
}
.btn-wallet:hover { background: var(--y-hi); }
.btn-wallet .wl-short { display: none; }
.btn-wallet .dot { width: 8px; height: 8px; border: 1.5px solid currentColor; transform: rotate(45deg) scale(.9); }
.btn-wallet[data-state="connected"], .btn-wallet[data-state="wrong"] { background: transparent; color: var(--fg); border: 1px solid var(--line-2); font-family: var(--mono); font-weight: 500; }
.btn-wallet[data-state="connected"] .dot { background: var(--y); border-color: var(--y); }
.btn-wallet[data-state="wrong"] .dot { background: transparent; border-color: var(--fg-3); }
.wallet-pop {
  position: absolute; right: 0; top: calc(100% + 8px); width: 280px; z-index: 30;
  background: var(--layer-strong); border: 1px solid var(--line-2); border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55);
  padding: var(--s4); display: grid; gap: var(--s3);
}
.pop-title { font-weight: 600; }
.wallet-pop ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.wallet-pop li button {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; text-align: left;
}
.wallet-pop li button:hover { border-color: var(--y); }
.wallet-pop li img { width: 22px; height: 22px; }
.pop-msg:empty { display: none; }
.pop-msg { font-size: 13px; color: var(--fg); line-height: 1.55; }
.pop-note { font-size: 12px; color: var(--fg-3); }
.link { background: none; border: 0; padding: 0; color: var(--fg-2); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 3px; cursor: pointer; font-size: 13px; justify-self: start; }
.link:hover { color: var(--fg); text-decoration-color: var(--y); }

/* ---------- status line ---------- */
.statusline {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3);
  padding: var(--s3) var(--s5);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 14, 17, 0.45);
}
.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 14px; font-size: 13px; color: var(--fg-2); }
.chip-phase .pulse { width: 7px; height: 7px; background: var(--fg-3); transform: rotate(45deg); }
.chip-phase[data-phase="not_deployed"] { color: var(--fg); border-color: var(--y-line); }
.chip-phase[data-phase="not_deployed"] .pulse { background: var(--y); }
.chip-phase[data-phase="live"] .pulse { background: var(--y); box-shadow: 0 0 8px var(--y); }
.status-msg { font-size: 13px; color: var(--fg-2); }

/* ---------- main / views ---------- */
main { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: var(--s6) var(--s5) var(--s8); outline: none; }
.view[hidden] { display: none; }
.view { animation: view-in .32s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
.page-head { margin-bottom: var(--s5); display: grid; gap: var(--s2); }
.page-head h1 { font-size: 36px; line-height: 1.15; }

/* ---------- hero: the line itself, and today in its year ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 432px); align-items: end;
  gap: var(--s5) var(--s7); margin: var(--s3) 0 var(--s7);
}
.hero-copy { display: grid; gap: var(--s3); }
.hero-title { font: 700 clamp(44px, 5.4vw, 68px)/1.08 var(--display); letter-spacing: 0.02em; color: var(--fg); }
.hero-title > span { display: block; }
.ht-a { color: var(--fg-2); font-weight: 600; }
.hero-title em { font-style: normal; color: var(--y); }
html[lang="en"] .hero-title { font-size: clamp(34px, 4vw, 52px); letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
.hero-alt { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--fg-2); letter-spacing: 0.01em; }
.hero-alt::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--y); transform: rotate(45deg); }
.hero-sub { color: var(--fg-3); font-size: 14px; max-width: 62ch; margin-top: var(--s2); }

.today { margin: 0; display: grid; gap: var(--s3); }
.today figcaption { display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap; font-size: 13px; color: var(--fg-2); }
.today-k { font: 700 15px/1 var(--display); color: var(--y); letter-spacing: 0.04em; }
.today-date { font-size: 15px; color: var(--fg); }
.today-n { color: var(--fg-3); }
.today-grid { width: 100%; height: auto; display: block; overflow: visible; }
.today-grid .d-past { fill: rgba(240, 185, 11, 0.32); }
.today-grid .d-next { fill: none; stroke: rgba(234, 236, 239, 0.18); stroke-width: 0.8; }
.today-grid .d-now { fill: var(--y); filter: drop-shadow(0 0 4px rgba(240, 185, 11, 0.9)); }

/* ---------- mint ---------- */
.mint-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.85fr); gap: var(--s5); align-items: start; }
.instrument { padding: var(--s6); display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 0.72fr); gap: var(--s5) var(--s6); }
.instrument-head { grid-column: 1 / -1; display: grid; gap: var(--s2); }
.instrument-head h1 { font-size: 32px; line-height: 1.15; }

/* Progress dial: 100 diamonds, one per 100 NFTs. */
.dial-wrap { position: relative; aspect-ratio: 1; max-width: 400px; width: 100%; justify-self: center; }
.dial { width: 100%; height: 100%; display: block; }
.dial .t-unk { fill: none; stroke: rgba(132, 142, 156, 0.4); stroke-width: 1; }
.dial .t-empty { fill: rgba(234, 236, 239, 0.1); }
.dial .t-free { fill: var(--fg); }
.dial .t-paid { fill: var(--y); }
.dial .cap-track { fill: none; stroke: rgba(234, 236, 239, 0.12); stroke-width: 2; }
.dial .cap-fill { fill: none; stroke: var(--fg); stroke-width: 2; }
.dial-center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  text-align: center; pointer-events: none;
}
.dial-label { font-size: 13px; color: var(--fg-2); }
.dial-num { font-size: clamp(40px, 6vw, 64px); line-height: 1.05; font-weight: 500; color: var(--fg); }
.dial-num[data-unknown] { color: var(--fg-3); }
.dial-of { font: 14px var(--mono); color: var(--fg-3); }
.unk-tag { margin-top: 6px; font-size: 12px; padding: 1px 10px; border: 1px dashed var(--line-2); color: var(--fg-2); border-radius: 12px; }
.unk-tag[hidden] { display: none; }

.readouts { display: grid; align-content: center; gap: 0; }
.ro { padding: var(--s4) 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.ro:last-child { border-bottom: 1px solid var(--line); }
.ro dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.ro dd { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
.ro dd .num { font-size: 24px; color: var(--fg); }
.ro dd .num[data-unknown] { color: var(--fg-3); }
.ro small { font-size: 12px; color: var(--fg-3); }
/* Keys are diamonds: hollow light = ordinary, solid yellow = VIP, hollow yellow = staking. */
.key { display: inline-block; width: 9px; height: 9px; flex: none; transform: rotate(45deg); margin: 0 1px; }
.key-free { border: 1.5px solid var(--fg); }
.key-paid { background: var(--y); }
.key-stake { border: 1.5px solid var(--y); }

.tier { grid-column: 1 / -1; display: grid; gap: var(--s3); padding-top: var(--s5); border-top: 1px solid var(--line); }
.tier-read { display: flex; gap: var(--s7); flex-wrap: wrap; }
.tier-read p { font-size: 15px; }
.tier-read strong { font-size: 28px; font-weight: 500; }
.tier-rail { width: 100%; height: 28px; display: block; }
.tier-rail rect { fill: rgba(234, 236, 239, 0.13); }
.tier-rail .r-past { fill: rgba(240, 185, 11, 0.45); }
.tier-rail .r-now { fill: var(--y); }
.tier-rail .r-unk { fill: rgba(132, 142, 156, 0.18); }

/* console */
.console { padding: var(--s5); display: grid; gap: var(--s5); position: sticky; top: calc(var(--top-h) + var(--s4)); }
.console h2 { font-size: 24px; line-height: 1.2; }
.quota { display: grid; gap: var(--s2); }
.quota-row { display: grid; grid-template-columns: 96px 1fr auto; align-items: center; gap: var(--s3); }
.quota-row .lbl { font-size: 13px; }
.slots { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.slots i { aspect-ratio: 1; border: 1px solid var(--line-2); max-width: 15px; transform: rotate(45deg) scale(.82); }
.slots[data-state="unknown"] i { border-style: dashed; border-color: var(--line-2); }
.slots i.used { background: var(--fg-2); border-color: var(--fg-2); }
.quota-n { font-size: 13px; color: var(--fg-2); min-width: 52px; text-align: right; }

.qty { border: 0; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.qty legend { margin-bottom: var(--s2); }
.qty-chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.qty-chips label { position: relative; }
.qty-chips input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.qty-chips span {
  display: grid; place-items: center; height: 44px;
  border: 1px solid var(--line-2); border-radius: 6px; font: 500 15px var(--mono);
  transition: background .15s, border-color .15s, color .15s;
}
.qty-chips input:checked + span { background: var(--y); color: var(--ink); border-color: var(--y); }
.qty-chips input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.qty:disabled .qty-chips span { color: var(--fg-3); border-color: var(--line-2); border-style: dashed; cursor: not-allowed; }
.qty:disabled .qty-chips input { cursor: not-allowed; }

.quote { display: grid; gap: 0; border-top: 1px solid var(--line); }
.quote > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.quote dt { font-size: 13px; color: var(--fg-2); }
.quote dd { text-align: right; font-family: var(--mono); }
.quote-total dd .num { font-size: 26px; color: var(--fg); }
.quote-total dd .num[data-unknown] { color: var(--fg-3); }

.split { display: grid; gap: var(--s2); }
.split-row { display: grid; grid-template-columns: 92px 1fr auto; align-items: center; gap: var(--s3); opacity: 1; transition: opacity .2s; }
.split-row[data-dim] { opacity: 0.45; }
.split-cap { font-size: 12px; color: var(--fg-2); }
.split-nums { font-size: 12px; color: var(--fg-2); }
.bar { display: flex; height: 10px; gap: 2px; }
.bar i { flex: var(--w) 0 0; }
.bar i:first-child { border-radius: 3px 0 0 3px; }
.bar i:last-child { border-radius: 0 3px 3px 0; }
.s-lp { background: var(--fg); }
.s-vip { background: var(--y); }
.s-stake { background: transparent; box-shadow: inset 0 0 0 1.5px var(--y); }
.s-tre { background: var(--grey); }
.legend { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--fg-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.act { display: grid; gap: var(--s2); }
.btn-primary {
  height: 52px; border: 0; border-radius: 6px; background: var(--y); color: var(--ink);
  font: 700 16px var(--sans); letter-spacing: 0.04em; cursor: pointer;
  box-shadow: 0 8px 22px rgba(240, 185, 11, 0.22);
  transition: background .18s;
}
.btn-primary:hover:not(:disabled) { background: var(--y-hi); }
.btn-primary:disabled {
  cursor: not-allowed; color: var(--fg-3); background: transparent; box-shadow: none;
  border: 1px dashed var(--line-2);
}
.reason { font-size: 13px; color: var(--fg-2); text-align: center; }
.reason:empty { display: none; }

.agent { border-top: 1px solid var(--line); padding-top: var(--s3); }
.agent summary {
  display: flex; justify-content: space-between; align-items: center; gap: var(--s3);
  min-height: 44px; cursor: pointer; list-style: none; font-weight: 600; font-size: 14px;
}
.agent summary::-webkit-details-marker { display: none; }
.agent summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid var(--fg-2); border-bottom: 1.5px solid var(--fg-2); transform: rotate(45deg); transition: transform .2s; margin-left: 4px; }
.agent[open] summary::after { transform: rotate(-135deg); }
.agent-state { margin-left: auto; font: 500 12px var(--mono); color: var(--fg-2); border: 1px solid var(--line-2); padding: 2px 8px; border-radius: 10px; }
.agent-state[data-s="off"] { color: var(--fg); border-color: var(--y-line); }
.agent p { font-size: 13px; color: var(--fg-2); padding-bottom: var(--s2); }

/* ---------- vault ---------- */
.vault { padding: var(--s5); display: grid; gap: var(--s5); }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tally > div { padding: var(--s4) var(--s4) var(--s4) 0; display: grid; gap: 4px; }
.tally > div + div { padding-left: var(--s4); border-left: 1px solid var(--line); }
.tally dt { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--fg-2); }
.tally dd { font: 400 24px var(--mono); font-variant-numeric: tabular-nums; }
.tally dd .dim, .pool-ro dd .dim, .quote dd .dim { font-size: 13px; }
.tally-note { font-size: 13px; color: var(--fg-3); margin-top: calc(var(--s3) * -1); }

.paths { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
.path { display: grid; grid-template-columns: 48px 1fr; gap: 4px var(--s4); align-items: start; padding: var(--s4) 0; border-top: 1px solid var(--line); }
.path svg { grid-row: span 2; width: 48px; height: 48px; }
.path b { font: 700 22px/1.2 var(--display); color: var(--fg); }
.path span { color: var(--fg-2); font-size: 14px; text-wrap: pretty; }
.vault-body { display: grid; gap: var(--s4); justify-items: start; min-height: 160px; align-content: center; }
.vault-msg { color: var(--fg-2); }
.btn-ghost {
  min-height: 44px; padding: 0 var(--s5); background: transparent; color: var(--fg);
  border: 1px solid var(--line-2); border-radius: 6px; font-weight: 600; cursor: pointer; transition: border-color .18s, background .18s;
}
.btn-ghost:hover:not(:disabled) { border-color: var(--y); background: rgba(240, 185, 11, 0.07); }
.btn-ghost:disabled { color: var(--fg-3); border-style: dashed; cursor: not-allowed; }
.btn-ghost[hidden] { display: none; }

.seals { list-style: none; margin: 0; padding: 0; width: 100%; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); }
.seal { position: relative; display: grid; gap: var(--s3); padding: var(--s4); border: 1px solid var(--line-2); border-radius: 6px; background: rgba(11, 14, 17, 0.55); }
.seal[data-kind="vip"] { border-color: var(--y-line); }
.seal-top { display: flex; justify-content: space-between; align-items: center; }
.seal-id { font: 500 14px var(--mono); }
.seal-kind { font-size: 12px; display: flex; align-items: center; gap: 6px; color: var(--fg-2); }
.seal dl { display: grid; gap: 6px; font-size: 13px; }
.seal dl div { display: flex; justify-content: space-between; gap: var(--s2); }
.seal dt { color: var(--fg-3); }
.seal dd { font-family: var(--mono); }
.seal-acts { display: flex; gap: 6px; }
.seal-acts .btn-ghost { flex: 1; min-height: 40px; padding: 0 10px; font-size: 13px; }

/* ---------- pools ---------- */
.flow { margin: 0 0 var(--s5); padding: var(--s5); display: grid; gap: var(--s3); }
.flow-svg { width: 100%; height: auto; max-height: 240px; }
.flow-svg path { fill: none; stroke-linecap: butt; transition: opacity .3s; }
.flow-svg .f-src { fill: var(--y); stroke: none; }
.f-t { fill: var(--ink); font: 700 15px var(--mono); }
.f-lp { stroke: rgba(234, 236, 239, 0.85); }
.f-vip { stroke: var(--y); }
/* Staking is drawn hollow: a yellow rail with a dark core. */
.f-stake { stroke: var(--y); }
.f-stake-in { stroke: var(--night); }
.f-tre { stroke: var(--grey); }
.f-l { fill: var(--fg-2); font: 13px var(--sans); }
.f-p { fill: var(--fg); font: 13px var(--mono); }
.flow[data-branch="prior"] .f-alt { opacity: 0; }
.flow[data-branch="none"] .f-vip { opacity: 0.08; }
.flow[data-branch="none"] .f-stake:not(.f-alt),
.flow[data-branch="none"] .f-stake-in:not(.f-alt) { opacity: 0; }
.flow-list { display: none; list-style: none; margin: 0; padding: 0; }
.flow-list li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--fg-2); }
.flow-list li i { width: 10px; height: 10px; border-radius: 2px; flex: none; }
.flow-list li .num { margin-left: auto; color: var(--fg); }
.flow[data-branch="none"] .flow-list .fl-vip { opacity: 0.45; }
.flow-toggle { display: flex; gap: 6px; flex-wrap: wrap; }
.flow-toggle button {
  min-height: 40px; padding: 0 14px; background: transparent; border: 1px solid var(--line-2); border-radius: 20px; color: var(--fg-2); cursor: pointer; font-size: 13px;
}
.flow-toggle button[aria-checked="true"] { color: var(--ink); border-color: var(--y); background: var(--y); font-weight: 600; }

.pools { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s5); }
.pool { padding: var(--s5); display: grid; gap: var(--s4); align-content: start; }
.pool h2 { font-size: 24px; line-height: 1.2; display: flex; align-items: center; gap: 10px; }
.pool-icon { width: 30px; height: 30px; flex: none; }
.pool > p { color: var(--fg-2); font-size: 14px; }
/* The panel node names the pool: solid for VIP dividend, hollow for staking. */
.pool-stake::before { background: var(--night); box-shadow: inset 0 0 0 1.5px var(--y); }
.pool-ro { display: grid; border-top: 1px solid var(--line); }
.pool-ro > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: 10px 0; border-bottom: 1px solid var(--line); }
.pool-ro dt { font-size: 13px; color: var(--fg-2); }
.pool-ro dd { font-family: var(--mono); font-size: 18px; }
.pool-acts { display: flex; gap: var(--s2); }

/* ---------- guide ---------- */
.guide { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s7); padding: var(--s6); }
.guide-toc { position: sticky; top: calc(var(--top-h) + var(--s5)); align-self: start; display: grid; gap: var(--s4); }
.guide-toc h1 { font-size: 30px; line-height: 1.2; }
.guide-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.guide-toc a { display: block; padding: 8px 0 8px 12px; border-left: 1px solid var(--line-2); text-decoration: none; color: var(--fg-2); font-size: 14px; }
.guide-toc a:hover, .guide-toc a[aria-current="true"] { color: var(--fg); border-left-color: var(--y); }
.guide-body { display: grid; gap: var(--s7); max-width: 68ch; }
.guide-body section { display: grid; gap: var(--s3); scroll-margin-top: calc(var(--top-h) + var(--s5)); }
.guide-body h2 { font-size: 24px; line-height: 1.3; }
.guide-body section:first-child h2 { font-size: 30px; }
.guide-body p { color: var(--fg-2); line-height: 1.75; }
.guide-body b { color: var(--fg); font-weight: 600; }

/* ---------- footer ---------- */
.foot { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s7); display: grid; gap: 4px; font-size: 12px; color: var(--fg-3); border-top: 1px solid var(--line); }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--fg-2); }
.foot-mark { width: 18px; height: 18px; flex: none; }

/* ---------- intro (~1.6s): the diamond draws, fills, and the line arrives ---------- */
#intro {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(60% 50% at 50% 42%, #1c1a10 0%, var(--night) 70%);
  transition: opacity .35s ease, visibility .35s;
}
#intro.done { opacity: 0; visibility: hidden; }
.intro-inner { display: grid; justify-items: center; gap: var(--s2); text-align: center; padding: 0 var(--s5); }
.intro-mark { width: min(120px, 30vw); height: auto; overflow: visible; margin-bottom: var(--s4); }
.im-out { fill: none; stroke: var(--y); stroke-width: 2; stroke-dasharray: 318; stroke-dashoffset: 318; animation: draw .55s cubic-bezier(.3, .6, .4, 1) forwards; }
.im-fill { fill: var(--y); transform-box: fill-box; transform-origin: center; transform: scale(0); animation: pop .45s .4s var(--ease) forwards; }
.intro-a, .intro-b { font: 700 clamp(26px, 5vw, 44px)/1.15 var(--display); letter-spacing: 0.04em; opacity: 0; transform: translateY(8px); }
.intro-a { color: var(--fg-2); font-weight: 600; animation: rise .5s .6s var(--ease) forwards; }
.intro-b { color: var(--fg); animation: rise .5s .78s var(--ease) forwards; }
.intro-b em { font-style: normal; color: var(--y); }
html[lang="en"] .intro-a, html[lang="en"] .intro-b { letter-spacing: -0.01em; font-size: clamp(22px, 4vw, 36px); }
.intro-skip { position: absolute; right: 24px; bottom: 24px; min-height: 40px; padding: 0 14px; background: none; border: 1px solid var(--line-2); color: var(--fg-2); border-radius: 6px; cursor: pointer; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { transform: scale(1); } }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- motion preferences ---------- */
html[data-motion="off"] .view { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .view { animation: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .mint-grid { grid-template-columns: 1fr; }
  .console { position: relative; top: 0; }
  .tabs a { padding: 0 10px; }
  .brand-latin { display: none; }
  .hero { grid-template-columns: 1fr; align-items: start; gap: var(--s5); }
  .today { max-width: 432px; }
}
@media (max-width: 760px) {
  :root { --top-h: 56px; }
  body { font-size: 15px; padding-bottom: 72px; }
  /* backdrop-filter would make .top the containing block of the fixed tab bar */
  .top { padding: 0 var(--s4); gap: var(--s3); backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 14, 17, 0.95); }
  /* Header must fit 375px in both languages: brand yields first, wallet uses a short label. */
  .brand { min-width: 0; flex: 0 1 auto; overflow: hidden; gap: 8px; }
  .brand-mark { width: 28px; height: 28px; }
  .brand-word { font-size: 17px; }
  .btn-wallet { white-space: nowrap; }
  .btn-wallet .wl-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .btn-wallet .wl-short { display: inline; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; margin: 0;
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
    background: rgba(11, 14, 17, 0.94); border-top: 1px solid var(--line);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabs a { flex-direction: column; justify-content: center; gap: 2px; min-height: 60px; padding: 0 4px; font-size: 12px; border-bottom: 0; border-top: 2px solid transparent; }
  .tabs a[aria-current="page"] { border-top-color: var(--y); }
  .tools { margin-left: auto; gap: 6px; }
  .btn-wallet { padding: 0 12px; font-size: 14px; }
  .statusline { padding: var(--s2) var(--s4); gap: var(--s2); }
  main { padding: var(--s5) var(--s4) var(--s7); }
  .hero { margin: 0 0 var(--s6); gap: var(--s4); }
  .hero-copy { gap: var(--s2); }
  .hero-title { font-size: 36px; letter-spacing: 0.01em; }
  html[lang="en"] .hero-title { font-size: 28px; }
  .hero-alt { font-size: 13px; }
  .hero-sub { font-size: 13px; }
  .today { max-width: none; gap: var(--s2); }
  .instrument { grid-template-columns: 1fr; padding: var(--s5) var(--s4); }
  .instrument-head h1, .page-head h1 { font-size: 28px; }
  .dial-wrap { max-width: 320px; }
  .readouts { grid-template-columns: 1fr 1fr; column-gap: var(--s4); }
  .ro:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .ro dd { flex-direction: column; gap: 0; }
  .tier-read { gap: var(--s5); }
  .console { padding: var(--s5) var(--s4); }
  .quota-row { grid-template-columns: 1fr auto; }
  .quota-row .slots { grid-column: 1 / -1; grid-row: 2; }
  .split-row { grid-template-columns: 1fr auto; }
  .split-row .bar { grid-column: 1 / -1; grid-row: 2; }
  .tally { grid-template-columns: 1fr 1fr; }
  .tally > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .tally > div:nth-child(n+3) { border-top: 1px solid var(--line); }
  .pools { grid-template-columns: 1fr; }
  .flow { padding: var(--s4); }
  .flow-svg .f-l, .flow-svg .f-p { display: none; }
  .flow-svg { max-height: 140px; }
  .flow-list { display: block; }
  .paths { grid-template-columns: 1fr; gap: 0; }
  .guide { grid-template-columns: 1fr; padding: var(--s5) var(--s4); gap: var(--s5); }
  .guide-toc { position: static; }
  .guide-body section:first-child h2 { font-size: 24px; }
  .foot { padding-bottom: calc(var(--s7) + 72px); }
}
@media (max-width: 380px) {
  .tool { min-width: 38px; padding: 0 6px; }
}
@media (max-width: 340px) {
  .brand-word { display: none; }
}
