/* Swarm: dark night-sky base, ember and pollen-gold light accents. Colours mirror shared/brand.ts. */
:root {
  --bg: #0c0a17; --bg2: #120e22; --surface: #151126; --card: rgba(27, 21, 51, .78); --card-hi: rgba(38, 30, 70, .9);
  --line: rgba(255, 255, 255, .08); --line-hi: rgba(255, 255, 255, .16);
  --ember: #ff7a3d; --ember-d: #f0632a; --gold: #ffc657; --bone: #f6f1e7; --mute: #a79fbd; --faint: #6f6788;
  --ok: #6ee7b7; --warn: #ffd166; --bad: #ff6b81;
  --lane-core: #e85d22; --lane-summit: #3b8fd6; --lane-rising: #b08e10;
  --r: 16px; --r-sm: 10px;
  --glow: 0 0 0 1px rgba(255, 122, 61, .35), 0 8px 30px -8px rgba(255, 122, 61, .45);
}
* { box-sizing: border-box; }
html { color-scheme: dark; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--bone); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: radial-gradient(1200px 600px at 85% -10%, rgba(255, 122, 61, .14), transparent 60%), radial-gradient(900px 700px at -10% 30%, rgba(90, 60, 200, .16), transparent 60%), var(--bg);
  background-attachment: fixed; display: flex; flex-direction: column; font-variant-numeric: tabular-nums;
}
#flock { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; opacity: .5; }
header, main, footer { position: relative; z-index: 1; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ember); color: #000; padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
a { color: var(--gold); text-underline-offset: 3px; }
a:hover { color: #ffe0a0; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 18px; }
::selection { background: rgba(255, 122, 61, .35); }

/* header */
.top { background: rgba(12, 10, 23, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.top-in { max-width: 1080px; margin: 0 auto; padding: 0 14px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "logo . wallet" "tabs tabs tabs"; align-items: center; min-height: 56px; }
.logo { grid-area: logo; display: flex; align-items: center; gap: 9px; color: var(--bone); text-decoration: none; font-weight: 800; letter-spacing: .02em; font-size: 21px; }
.logo:hover { color: var(--bone); }
.logo .mark svg { display: block; width: 30px; height: 30px; transition: transform .8s cubic-bezier(.2, .8, .2, 1); }
.logo:hover .mark svg { transform: rotate(120deg); }
.logo.sm { font-size: 18px; } .logo.sm .mark svg { width: 24px; height: 24px; }
.wallet { grid-area: wallet; }
.tabs { grid-area: tabs; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 8px; mask-image: linear-gradient(90deg, #000 85%, transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { color: var(--mute); text-decoration: none; padding: 9px 12px 11px; white-space: nowrap; font-size: 15px; font-weight: 600; position: relative; }
.tabs a:hover { color: var(--bone); }
.tabs a[aria-current="page"] { color: var(--bone); }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 4px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--ember), var(--gold)); }
@media (min-width: 900px) {
  .top-in { grid-template-areas: "logo tabs wallet"; grid-template-columns: auto 1fr auto; gap: 18px; height: 64px; }
  .tabs { margin: 0; mask-image: none; justify-content: center; }
  .tabs a { padding: 8px 11px; }
  .tabs a[aria-current="page"]::after { bottom: -2px; }
}

/* type */
main { flex: 1; padding: 22px 0 56px; }
main > .wrap { animation: rise .35s ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.08; margin: 6px 0 10px; letter-spacing: -.02em; font-weight: 800; }
h2 { font-size: 22px; margin: 34px 0 10px; letter-spacing: -.01em; }
h3 { font-size: 17px; margin: 0 0 4px; }
.lead { color: var(--mute); font-size: 18px; margin: 0 0 18px; max-width: 64ch; }
.mute { color: var(--mute); } .faint { color: var(--faint); }
.small { font-size: 13px; }
.grad { background: linear-gradient(90deg, var(--ember), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--gold); margin: 0; }

/* buttons */
.btn { background: linear-gradient(135deg, var(--ember), #ff9a4a); color: #1a0d05; border: 0; border-radius: 999px; padding: 12px 22px; font: inherit; font-weight: 800; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, box-shadow .2s, filter .2s; box-shadow: 0 6px 24px -10px rgba(255, 122, 61, .8); }
.btn:hover { color: #1a0d05; filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: none; }
.btn:disabled { opacity: .5; cursor: default; transform: none; filter: none; }
.btn.sm { padding: 7px 14px; font-size: 14px; }
.btn.ghost { background: rgba(255, 255, 255, .04); color: var(--bone); border: 1px solid var(--line-hi); box-shadow: none; }
.btn.ghost:hover { background: rgba(255, 255, 255, .09); color: var(--bone); }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid rgba(255, 107, 129, .5); box-shadow: none; }
.btn svg, .ic { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; color: var(--gold); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

/* surfaces */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); margin: 16px 0; }
@media (min-width: 760px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat { padding: 14px 16px; position: relative; overflow: hidden; }
.stat b { display: block; font-size: clamp(19px, 4.6vw, 26px); letter-spacing: -.01em; }
.stat span { color: var(--mute); font-size: 13px; display: block; }
.stat .src { display: inline-flex; font-size: 11px; color: var(--faint); }
.src { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--faint); margin-top: 6px; letter-spacing: .02em; }
.src::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.src.chain::before { background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.src.market::before { background: #7cc4ff; }
.src.ledger::before { background: var(--gold); }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrapx { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* hero */
.hero { display: grid; gap: 18px; align-items: center; padding: 8px 0 6px; }
@media (min-width: 860px) { .hero { grid-template-columns: 1.1fr .9fr; gap: 36px; padding: 26px 0 12px; } }
.hero h1 { font-size: clamp(36px, 9vw, 64px); }
.hero .cta { margin: 20px 0 8px; }
.wheel { width: 100%; max-width: 440px; margin: 0 auto; display: block; overflow: visible; }
.wheel .node circle { fill: var(--surface); stroke: var(--line-hi); stroke-width: 1.2; }
.wheel .node text { fill: var(--bone); font-size: 13px; font-weight: 700; text-anchor: middle; }
.wheel .node .sub { fill: var(--mute); font-size: 9.8px; font-weight: 500; }
.wheel .orbit { fill: none; stroke: rgba(255, 198, 87, .22); stroke-width: 1.2; stroke-dasharray: 3 6; }
.wheel .spin { transform-origin: 200px 200px; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wheel .spin { animation: none; } main > .wrap { animation: none; } }

/* coin cards */
.coin { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; text-decoration: none; color: inherit; transition: border-color .2s, transform .2s, background .2s; }
.coin:hover { border-color: rgba(255, 122, 61, .45); background: var(--card-hi); transform: translateY(-2px); color: inherit; }
.coin img, .art { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--surface); display: block; }
.coin .nm { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin .tk { color: var(--mute); font-size: 13px; }
.coin .mc { text-align: right; white-space: nowrap; font-weight: 700; }
.coin .rank { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--mute); }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line-hi); color: var(--mute); white-space: nowrap; }
.pill.ok { color: var(--ok); border-color: rgba(110, 231, 183, .45); }
.pill.warn { color: var(--warn); border-color: rgba(255, 209, 102, .5); }
.pill.hot { color: #1a0d05; background: linear-gradient(90deg, var(--ember), var(--gold)); border: 0; font-weight: 800; }
.up { color: var(--ok); } .down { color: var(--bad); } .flat { color: var(--mute); }
.podium { border-color: rgba(255, 198, 87, .4); box-shadow: 0 10px 40px -20px rgba(255, 198, 87, .6); }

/* coin page */
.coinhead { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; }
.coinhead img, .coinhead .art { width: 84px; height: 84px; border-radius: 20px; object-fit: cover; }
.coinhead h1 { margin: 0; font-size: clamp(26px, 6vw, 38px); overflow-wrap: anywhere; }
.bar { height: 10px; border-radius: 6px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--ember), var(--gold)); transition: width .6s ease; }
.addr { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--mute); }
code { background: rgba(255, 255, 255, .06); padding: 2px 6px; border-radius: 6px; word-break: break-all; font-size: .92em; }

/* forms */
form label, .lbl { display: block; margin: 14px 0 6px; font-weight: 700; font-size: 14px; }
.hint { color: var(--faint); font-size: 12.5px; margin: 5px 0 0; }
input, textarea, select { width: 100%; background: rgba(8, 6, 18, .7); border: 1px solid var(--line-hi); color: var(--bone); border-radius: var(--r-sm); padding: 12px 13px; font: inherit; transition: border-color .15s, box-shadow .15s; }
input:hover, textarea:hover, select:hover { border-color: rgba(255, 255, 255, .26); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--ember); box-shadow: 0 0 0 3px rgba(255, 122, 61, .2); }
input[aria-invalid="true"] { border-color: var(--bad); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--ember); flex: none; margin: 2px 0 0; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14px; color: var(--mute); margin: 10px 0; }
.btn:focus-visible, a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.drop { display: grid; grid-template-columns: 72px 1fr; gap: 14px; align-items: center; border: 1px dashed var(--line-hi); border-radius: var(--r); padding: 12px; cursor: pointer; }
.drop:hover { border-color: var(--ember); }
.drop img, .drop .art { width: 72px; height: 72px; border-radius: 16px; object-fit: cover; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.err { color: var(--bad); } .okmsg { color: var(--ok); }
.fielderr { color: var(--bad); font-size: 13px; margin: 5px 0 0; }

/* launch wizard */
.launch { display: grid; gap: 18px; }
@media (min-width: 900px) { .launch { grid-template-columns: 1.25fr .75fr; align-items: start; } .launch aside { position: sticky; top: 84px; } }
.stepper { display: flex; gap: 6px; list-style: none; padding: 0; margin: 4px 0 16px; counter-reset: st; }
.stepper li { counter-increment: st; flex: 1; font-size: 12.5px; color: var(--faint); border-top: 3px solid rgba(255, 255, 255, .1); padding-top: 7px; font-weight: 700; }
.stepper li::before { content: counter(st) ". "; }
.stepper li.on { color: var(--bone); border-color: var(--ember); }
.stepper li.done { color: var(--mute); border-color: rgba(255, 122, 61, .5); }
.review dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 14px; margin: 10px 0; font-size: 14px; }
.review dt { color: var(--mute); }
.review dd { margin: 0; overflow-wrap: anywhere; }
.split { display: flex; height: 14px; border-radius: 8px; overflow: hidden; gap: 2px; margin: 8px 0 6px; }
.split i { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--mute); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.progress { display: grid; gap: 8px; margin: 12px 0; padding: 0; list-style: none; }
.progress li { display: flex; gap: 10px; align-items: center; color: var(--faint); font-size: 14px; }
.progress li.on { color: var(--bone); } .progress li.done { color: var(--ok); } .progress li.fail { color: var(--bad); }
.progress li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.progress li.on::before { border-color: var(--ember); border-top-color: transparent; animation: spin .8s linear infinite; }
.progress li.done::before { background: var(--ok); }
.summary { white-space: pre-wrap; font-size: 12.5px; background: rgba(8, 6, 18, .7); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; color: var(--mute); overflow-wrap: anywhere; }

/* notices */
.notice { border: 1px solid rgba(255, 209, 102, .45); background: rgba(255, 209, 102, .06); color: var(--warn); border-radius: var(--r); padding: 12px 16px; margin: 14px 0; }
.notice.info { border-color: rgba(124, 196, 255, .4); background: rgba(124, 196, 255, .06); color: #cfe7ff; }
.notice.bad { border-color: rgba(255, 107, 129, .5); background: rgba(255, 107, 129, .07); color: #ffc2cc; }
.empty { text-align: center; padding: 34px 18px; color: var(--mute); }
.empty svg { width: 64px; height: 64px; margin: 0 auto 10px; display: block; opacity: .9; }
.soon { text-align: center; padding: 28px 20px; }
.soon .mark svg { width: 84px; height: 84px; margin: 0 auto; display: block; animation: spin 24s linear infinite; }
.checklist { list-style: none; padding: 0; margin: 16px auto; max-width: 420px; text-align: left; display: grid; gap: 8px; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist .ic { color: var(--faint); } .checklist li.ok .ic { color: var(--ok); }

/* lists, tables, details */
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; padding: 14px 16px 14px 60px; }
.steps li::before { content: counter(s); position: absolute; left: 14px; top: 14px; width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--ember), var(--gold)); color: #1a0d05; font-weight: 900; display: grid; place-items: center; }
.facts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); padding: 0; list-style: none; }
.facts li { display: flex; gap: 10px; align-items: flex-start; }
.facts .ic { color: var(--ok); margin-top: 3px; }
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; white-space: nowrap; }
th { color: var(--mute); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; }
details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 16px; margin: 8px 0; }
details[open] { border-color: var(--line-hi); }
summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--ember); font-weight: 900; }
details[open] summary::after { content: "–"; }
.prose { max-width: 72ch; }
.prose li { margin: 6px 0; }
.toolbar { display: grid; gap: 10px; grid-template-columns: 1fr; margin: 10px 0 14px; }
@media (min-width: 640px) { .toolbar { grid-template-columns: 1fr 200px; } }
.seg { display: inline-flex; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { background: none; border: 0; color: var(--mute); font: inherit; font-size: 14px; font-weight: 700; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--bone); color: #140f22; }

/* charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid-l { stroke: rgba(255, 255, 255, .07); }
.chart .axis { fill: var(--mute); font-size: 12px; }
.chart .line { fill: none; stroke: var(--ember); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: url(#burnfill); }
.chart .dot { fill: var(--ember); stroke: var(--surface); stroke-width: 2; }
.chart .hair { stroke: var(--line-hi); }
.chartbox { position: relative; }
.tip { position: absolute; pointer-events: none; background: #0b0816; border: 1px solid var(--line-hi); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -110%); box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }

/* skeletons */
.sk { background: linear-gradient(90deg, rgba(255, 255, 255, .05) 25%, rgba(255, 255, 255, .1) 37%, rgba(255, 255, 255, .05) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px; }
.sk-h1 { height: 40px; width: min(420px, 80%); margin: 10px 0 16px; }
.sk-line { height: 16px; width: min(640px, 95%); margin: 8px 0; }
.sk-line.short { width: min(360px, 60%); }
.sk-card { height: 84px; border-radius: var(--r); }
.sk-stat { height: 76px; border-radius: var(--r); }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .sk, .soon .mark svg, .progress li.on::before { animation: none; } }

/* dialogs and toasts */
dialog { background: #140f24; color: var(--bone); border: 1px solid var(--line-hi); border-radius: 20px; padding: 20px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
dialog::backdrop { background: rgba(5, 3, 12, .7); backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 6px; }
.wlist { display: grid; gap: 8px; margin: 14px 0; }
.wlist button, .wlist a { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); color: var(--bone); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.wlist button:hover, .wlist a:hover { border-color: var(--ember); color: var(--bone); }
.wlist img { width: 28px; height: 28px; border-radius: 8px; }
.toasts { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(440px, calc(100vw - 28px)); pointer-events: none; }
.toast { background: #1b1533; border: 1px solid var(--line-hi); border-radius: 14px; padding: 12px 14px; font-size: 14px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: rise .25s ease-out both; pointer-events: auto; }
.toast.err { border-color: rgba(255, 107, 129, .55); color: #ffd0d7; }
.toast.ok { border-color: rgba(110, 231, 183, .5); }

/* footer */
.foot { border-top: 1px solid var(--line); background: rgba(9, 7, 18, .85); padding: 28px 0 34px; color: var(--mute); font-size: 13.5px; }
.foot-in { display: grid; gap: 18px; }
@media (min-width: 760px) { .foot-in { grid-template-columns: 1.2fr 1fr; } .foot-risk { grid-column: 1 / -1; } }
.foot-brand p { margin: 10px 0 0; max-width: 52ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 18px; align-content: start; }
.foot-links a { color: var(--bone); text-decoration: none; }
.foot-links a:hover { color: var(--gold); }
#foot-ext { display: contents; }
.foot-risk { margin: 0; color: var(--faint); font-size: 12.5px; border-top: 1px solid var(--line); padding-top: 14px; }
