/* =============================================================================
   合流 MergePad · components.css — every shared component (spec §3)
   ---------------------------------------------------------------------------
    1. Buttons · icon buttons · kbd · links
    2. Chips · tags · phase pills
    3. Progress bar
    4. Inputs (field · paste · amount · switch)
    5. Segmented · underline tabs · trade side switch
    6. Panels · wells · notes · kv lists
    7. Tables
    8. Avatars (candidate · letter tile · author · stacked)
    9. Countdown · stat cells · KPI strip
   10. Skeleton · empty · error row · pre-launch
   11. Popover · menu · tooltip
   12. Toasts
   13. Modal · bottom sheet
   14. Banners
   15. Curve chart
   16. Version race (share bar · candidate row)
   17. Coin address card
   18. Pool representations (table cells · card · phone row)
   19. Lifecycle strip · trust cards
   20. Phone touch targets
   ============================================================================= */

/* 1. BUTTONS ================================================================ */
.btn {
  --h: var(--ctl);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--h); min-width: 0; padding: 0 var(--s-3);
  border: 1px solid transparent; border-radius: var(--r-2);
  font-size: var(--t-13); line-height: 1; font-weight: var(--w-5); white-space: nowrap; user-select: none;
  cursor: pointer;
  transition: background-color var(--t-1) var(--ease-out), border-color var(--t-1) var(--ease-out),
    color var(--t-1) var(--ease-out), transform var(--t-1) var(--ease-out), opacity var(--t-1) var(--ease-out);
}
.btn:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] > .i:not(.spin) { display: none; }
.btn .lbl { overflow: hidden; text-overflow: ellipsis; }
.btn-sm { --h: var(--ctl-sm); padding: 0 var(--s-2); font-size: var(--t-12); gap: var(--s-1); }
.btn-sm .i { width: 14px; height: 14px; }
.btn-md { --h: var(--ctl-md); padding: 0 var(--s-4); font-size: var(--t-14); }
.btn-lg { --h: var(--ctl-lg); padding: 0 var(--s-5); font-size: var(--t-14); font-weight: var(--w-6); }
.btn-block { width: 100%; }
.btn-icon { width: var(--h); padding: 0; }

.btn-accent { background: var(--accent); color: var(--accent-ink); font-weight: var(--w-6); }
.btn-accent:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--accent-hi); }
.btn-accent:active:not(:disabled) { background: var(--accent-lo); }
.btn-up { background: var(--up); color: var(--up-ink); font-weight: var(--w-6); }
.btn-up:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--up-hi); }
.btn-down { background: var(--down); color: var(--down-ink); font-weight: var(--w-6); }
.btn-down:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--down-hi); }
.btn-ghost { background: var(--bg-1); border-color: var(--line-2); color: var(--fg-1); }
.btn-ghost:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--bg-2); border-color: var(--line-3); }
.btn-ghost:active:not(:disabled) { background: var(--bg-3); }
.btn-quiet { background: transparent; color: var(--fg-2); }
.btn-quiet:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--bg-2); color: var(--fg-1); }
.btn-quiet:active:not(:disabled) { background: var(--bg-3); }
.btn-line-up { background: var(--up-a12); border-color: var(--up-a24); color: var(--up); font-weight: var(--w-6); }
.btn-line-up:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--up); }
.btn-line-down { background: var(--down-a12); border-color: var(--down-a24); color: var(--down); font-weight: var(--w-6); }
.btn-line-down:hover:not(:disabled):not([aria-disabled="true"]) { border-color: var(--down); }
.btn-backed { background: transparent; border-color: var(--accent-a32); color: var(--accent); cursor: default; }
.btn-backed:active { transform: none !important; }

.iconbtn {
  --h: 24px;
  position: relative; display: inline-grid; place-items: center; flex: none;
  width: var(--h); height: var(--h); border-radius: var(--r-1); color: var(--fg-3); background: transparent;
  transition: background-color var(--t-1) var(--ease-out), color var(--t-1) var(--ease-out);
}
.iconbtn .i { width: 14px; height: 14px; }
.iconbtn:hover { background: var(--bg-3); color: var(--fg-1); }
.iconbtn:active { transform: translateY(1px); }
.iconbtn.is-done { color: var(--up); }
.iconbtn-32 { --h: 32px; border-radius: var(--r-2); }
.iconbtn-32 .i { width: 16px; height: 16px; }
.iconbtn-40 { --h: 40px; border-radius: var(--r-2); }
.iconbtn-40 .i { width: 20px; height: 20px; }

.kbd {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  min-width: 20px; height: 20px; padding: 0 var(--s-1);
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-1);
  background: var(--bg-1); color: var(--fg-3); font: var(--w-5) var(--t-11)/1 var(--font-mono);
}

.link { display: inline-flex; align-items: center; gap: var(--s-1); color: var(--fg-2); white-space: nowrap; transition: color var(--t-1) var(--ease-out); }
.link:hover { color: var(--fg-1); }
.link .i { width: 12px; height: 12px; }
.link-acc { color: var(--accent); } .link-acc:hover { color: var(--accent-hi); }
.link-u { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.link-u:hover { text-decoration-color: currentColor; }

/* 2. CHIPS · TAGS · PILLS ==================================================== */
.chip {
  display: inline-flex; align-items: center; gap: var(--s-1); flex: none;
  height: 20px; padding: 0 6px; border-radius: var(--r-1);
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--fg-2);
  font: var(--w-5) var(--t-11)/1 var(--font-mono); white-space: nowrap;
}
.chip .i { width: 12px; height: 12px; }
.chip.merge { font-family: var(--font-sans); font-size: var(--t-12); }
.chip.merge .i { color: var(--accent); }
.chip.acc { color: var(--accent); background: var(--accent-a08); border-color: var(--accent-a32); }
.chip.up { color: var(--up); background: var(--up-a12); border-color: var(--up-a24); }
.chip.sans { font-family: var(--font-sans); font-size: var(--t-12); }

.tag {
  display: inline-flex; align-items: center; flex: none;
  height: 18px; padding: 0 6px; border-radius: 3px;
  font-size: var(--t-11); line-height: 1; font-weight: var(--w-5); white-space: nowrap;
  background: var(--bg-3); color: var(--fg-2);
}
.tag.lead, .tag.win { background: var(--accent); color: var(--accent-ink); font-weight: var(--w-6); }
.tag.mine { background: transparent; color: var(--fg-1); box-shadow: inset 0 0 0 1px var(--line-3); }
.tag.creator { background: var(--bg-3); color: var(--fg-2); }
.tag.similar { background: var(--accent-a08); color: var(--accent); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 22px; padding: 0 var(--s-2); border-radius: var(--r-1);
  font-size: var(--t-12); line-height: 1; font-weight: var(--w-5); white-space: nowrap;
  background: var(--bg-2); color: var(--fg-2); border: 1px solid var(--line-2);
}
.pill .dot { width: 6px; height: 6px; }
.pill .i { width: 12px; height: 12px; }
.pill.ph-1 { color: var(--fg-1); }
.pill.ph-1 .dot { position: relative; background: var(--fg-1); }
.pill.ph-1 .dot::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 1px solid var(--fg-1); opacity: 0; animation: ping 2000ms var(--ease-out) infinite; }
.pill.ph-2 { color: var(--up); background: var(--up-a12); border-color: var(--up-a24); }
.pill.ph-2 .dot { background: var(--up); }
.pill.ph-3, .pill.ph-4 { color: var(--accent); background: var(--accent-a08); border-color: var(--accent-a32); }
.pill.ph-3 .dot { background: var(--accent); }
.pill.ph-5 { color: var(--fg-2); }
.pill.ph-6 { color: var(--fg-3); background: transparent; }
.pill.ph-6 .dot { background: var(--fg-4); }
.pill.ph-0 { color: var(--fg-3); background: transparent; }
.pill.st-up { color: var(--up); background: var(--up-a12); border-color: var(--up-a24); }
.pill.st-acc { color: var(--accent); background: var(--accent-a08); border-color: var(--accent-a32); }
.pill.st-dim { color: var(--fg-3); background: transparent; }

/* 3. PROGRESS BAR ============================================================ */
.bar { --h: 4px; position: relative; height: var(--h); border-radius: calc(var(--h) / 2); background: var(--bg-3); overflow: hidden; flex: none; min-width: 0; }
.bar > i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit; background: var(--accent); transition: width var(--t-3) var(--ease-out); }
.bar.b-2 { --h: 2px; } .bar.b-6 { --h: 6px; }
.bar.is-batch > i { background: repeating-linear-gradient(135deg, var(--fg-2) 0 3px, var(--fg-3) 3px 6px); }
.bar.is-full > i { background: var(--accent-hi); }
.bar.is-exp > i { background: var(--fg-4); }
.bar.is-pre > i { width: 0 !important; }

/* 4. INPUTS ================================================================== */
.field {
  --h: var(--ctl-md);
  display: flex; align-items: center; gap: var(--s-2); min-width: 0;
  height: var(--h); padding: 0 var(--s-3);
  background: var(--bg-0); border: 1px solid var(--line-2); border-radius: var(--r-2);
  transition: border-color var(--t-1) var(--ease-out), box-shadow var(--t-1) var(--ease-out);
}
.field.on-page { background: var(--bg-1); }
.field:hover { border-color: var(--line-3); }
.field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-a16); }
.field.is-err { border-color: var(--down); box-shadow: 0 0 0 3px var(--down-a12); }
.field.is-disabled { background: var(--bg-2); color: var(--fg-3); pointer-events: none; }
.field > .i { color: var(--fg-3); }
.field input, .field textarea {
  flex: 1 1 auto; min-width: 0; height: 100%; padding: 0; border: 0; outline: 0; background: transparent;
  font-size: var(--t-14); color: var(--fg-1);
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); opacity: 1; }
.field input:focus-visible { outline: none; }
.field-32 { --h: var(--ctl); } .field-32 input { font-size: var(--t-13); }
.field-48 { --h: var(--ctl-lg); }
.field .pre { font-family: var(--font-mono); color: var(--fg-3); }
.field-help { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); }
.field-help .num { font-size: var(--t-12); }
.field-err { display: flex; align-items: flex-start; gap: 6px; margin-top: var(--s-2); font-size: var(--t-12); line-height: var(--lh-12); color: var(--down); }
.field-err .i { width: 12px; height: 12px; margin-top: 2px; }
.field-label { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-2); font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); }
.field-label .num { font-size: var(--t-12); }
.field-label button.num:hover { color: var(--fg-1); }

/* paste field (hero, launch): 48 high, radius 8, leading link icon, trailing paste + action */
.field-paste { --h: var(--ctl-lg); padding: 0 var(--s-1) 0 var(--s-4); border-radius: var(--r-3); }
.field-paste .btn-accent { --h: 40px; border-radius: var(--r-2); }
.field-paste .btn-quiet { --h: 28px; }

/* amount field */
.field-amt { --h: var(--ctl-lg); padding-right: var(--s-2); }
.field-amt input { font: var(--w-5) var(--t-20)/var(--lh-20) var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.unit-chip { display: inline-flex; align-items: center; height: 28px; padding: 0 var(--s-2); border-radius: var(--r-1); background: var(--bg-2); color: var(--fg-2); font: var(--w-6) var(--t-12)/1 var(--font-sans); flex: none; }

/* toggle switch ("只看我参与的") */
.switch { display: inline-flex; align-items: center; gap: var(--s-2); height: var(--ctl); padding: 0 var(--s-2); border-radius: var(--r-2); color: var(--fg-2); font-size: var(--t-13); font-weight: var(--w-5); cursor: pointer; white-space: nowrap; }
.switch:hover { background: var(--bg-2); color: var(--fg-1); }
.switch .trk { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-3); transition: background-color var(--t-2) var(--ease-out); flex: none; }
.switch .trk::after { content: ""; position: absolute; left: 2px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: var(--fg-1); transition: transform var(--t-2) var(--ease-out); }
.switch[aria-checked="true"] { color: var(--fg-1); }
.switch[aria-checked="true"] .trk { background: var(--accent); box-shadow: none; }
.switch[aria-checked="true"] .trk::after { transform: translateX(12px); background: var(--accent-ink); }

/* 5. SEGMENTED · TABS · SIDE SWITCH ========================================== */
.seg { display: inline-flex; flex: none; padding: 2px; gap: 2px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-2); }
.seg > button {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-1);
  height: 24px; padding: 0 var(--s-2); border-radius: var(--r-1);
  font-size: var(--t-12); line-height: 1; font-weight: var(--w-5); color: var(--fg-3); white-space: nowrap;
  transition: background-color var(--t-2) var(--ease-out), color var(--t-1) var(--ease-out);
}
.seg > button .i { width: 14px; height: 14px; }
.seg > button:hover { color: var(--fg-1); }
.seg > button[aria-checked="true"], .seg > button[aria-selected="true"], .seg > button.on { background: var(--bg-4); color: var(--fg-1); }
.seg > button:disabled { opacity: .4; }
.seg.seg-md > button { height: 28px; }
.seg.mono > button { font-family: var(--font-mono); }

.tabs { display: flex; align-items: stretch; gap: var(--s-5); height: 44px; min-width: 0; }
.tabs [role="tab"] {
  position: relative; display: inline-flex; align-items: center; gap: 6px; flex: none;
  font-size: var(--t-13); font-weight: var(--w-5); color: var(--fg-3); white-space: nowrap;
  transition: color var(--t-1) var(--ease-out);
}
.tabs [role="tab"]:hover { color: var(--fg-1); }
.tabs [role="tab"][aria-selected="true"] { color: var(--fg-1); }
.tabs [role="tab"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform var(--t-2) var(--ease-out); }
.tabs [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
.tabs [role="tab"]:focus-visible { outline-offset: -2px; }
.tabs .count { font: var(--w-5) var(--t-11)/1 var(--font-mono); color: var(--fg-3); }
.tabs.tabs-48 { height: 48px; }
.tabs.scroll { overflow-x: auto; scrollbar-width: none; }
.tabs.scroll::-webkit-scrollbar { display: none; }

.sides { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 2px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--r-2); }
.sides > button { height: 36px; border: 1px solid transparent; border-radius: var(--r-1); font-size: var(--t-13); font-weight: var(--w-5); color: var(--fg-3); text-align: center; transition: color var(--t-1) var(--ease-out), background-color var(--t-2) var(--ease-out); }
.sides > button:hover:not(:disabled) { color: var(--fg-1); }
.sides > button:disabled { opacity: .4; }
.sides > .buy[aria-selected="true"] { background: var(--up-a12); border-color: var(--up-a24); color: var(--up); font-weight: var(--w-6); }
.sides > .sell[aria-selected="true"] { background: var(--down-a12); border-color: var(--down-a24); color: var(--down); font-weight: var(--w-6); }

/* 6. PANELS · WELLS · NOTES · KV ============================================ */
.panel { position: relative; background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-3); min-width: 0; }
.panel-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 44px; padding: 0 var(--s-4); border-bottom: 1px solid var(--line-1); }
.panel-h.tabs-h { padding-right: var(--s-2); }
.panel-t { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-13); line-height: var(--lh-13); font-weight: var(--w-6); color: var(--fg-1); white-space: nowrap; min-width: 0; }
.panel-t .i { width: 14px; height: 14px; color: var(--fg-3); }
.panel-t .i.acc { color: var(--accent); }
.panel-aside { display: flex; align-items: center; gap: var(--s-2); font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); white-space: nowrap; min-width: 0; }
.panel-aside .i { width: 12px; height: 12px; }
.panel-b { padding: var(--s-4); }
.panel-f { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 40px; padding: 0 var(--s-4); border-top: 1px solid var(--line-1); font-size: var(--t-12); color: var(--fg-3); }
.panel-f .l { display: flex; align-items: center; gap: var(--s-2); min-width: 0; }

.well { background: var(--bg-0); border: 1px solid var(--line-1); border-radius: var(--r-2); padding: var(--s-3); }
.callout { display: flex; gap: var(--s-2); padding: var(--s-2) var(--s-3); border-radius: var(--r-2); background: var(--accent-a08); border: 1px solid var(--accent-a16); color: var(--fg-1); font-size: var(--t-12); line-height: 20px; }
.callout > .i { width: 14px; height: 14px; margin-top: 3px; color: var(--accent); }
.callout.down { background: var(--down-a12); border-color: var(--down-a24); }
.callout.down > .i { color: var(--down); }
.note { display: flex; gap: var(--s-2); font-size: var(--t-12); line-height: 20px; color: var(--fg-3); }
.note > .i { width: 14px; height: 14px; margin-top: 3px; color: var(--fg-3); }
.note b { color: var(--fg-2); font-weight: var(--w-5); }

.kv { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s-3); min-height: 24px; font-size: var(--t-12); line-height: var(--lh-12); }
.kv > :first-child { color: var(--fg-3); white-space: nowrap; flex: none; }
.kv > :last-child { color: var(--fg-1); text-align: right; min-width: 0; }
.kv .num { font-size: var(--t-12); }
.kv.hr { border-top: 1px solid var(--line-1); margin-top: var(--s-2); padding-top: var(--s-2); }
.kvl { border: 1px solid var(--line-2); border-radius: var(--r-3); background: var(--bg-1); }
.kvl .kv, .kv-rules .kv { min-height: 36px; align-items: center; padding: 0 var(--s-4); border-bottom: 1px solid var(--line-1); }
.kvl .kv:last-child, .kv-rules .kv:last-child { border-bottom: 0; }

/* 7. TABLES ================================================================= */
.tbl-wrap { position: relative; overflow-x: auto; min-width: 0; }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th {
  height: 36px; padding: 0 var(--s-3); text-align: left; white-space: nowrap;
  font-size: var(--t-12); line-height: var(--lh-12); font-weight: var(--w-5); color: var(--fg-3);
  background: var(--bg-1); border-bottom: 1px solid var(--line-2);
  position: sticky; top: 0; z-index: var(--z-sticky);
}
.tbl th .u { font-size: var(--t-11); }
.tbl th button { display: inline-flex; align-items: center; gap: 2px; font-weight: var(--w-5); color: inherit; white-space: nowrap; }
.tbl th button:hover, .tbl th[aria-sort] button { color: var(--fg-1); }
.tbl th button .i { width: 12px; height: 12px; transition: transform var(--t-2) var(--ease-out); }
.tbl th[aria-sort="ascending"] button .i { transform: rotate(180deg); }
.tbl th:not([aria-sort]) button .i { opacity: 0; }
.tbl th:not([aria-sort]) button:hover .i { opacity: .6; }
.tbl td { height: 56px; padding: 0 var(--s-3); vertical-align: middle; white-space: nowrap; border-bottom: 1px solid var(--line-1); }
.tbl td:first-child, .tbl th:first-child { padding-left: var(--s-4); }
.tbl td:last-child, .tbl th:last-child { padding-right: var(--s-4); }
.tbl tbody tr { transition: background-color var(--t-1) var(--ease-out); }
.tbl tbody tr:hover { background: var(--bg-2); }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl th.r button { justify-content: flex-end; }
.tbl .num { font-size: var(--t-13); }
.tbl .sub { display: block; margin-top: 2px; font-size: var(--t-11); line-height: var(--lh-11); color: var(--fg-3); font-family: var(--font-sans); }
.tbl .sub .num { font-size: var(--t-11); }
.tbl.compact td { height: 40px; }
.tbl .skel-row td { height: 56px; }
.tbl-empty td { height: auto !important; padding: 0 !important; }
.tbl-empty:hover { background: transparent !important; }

/* 8. AVATARS ================================================================ */
.cav {
  --sz: 32px;
  position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: var(--sz); height: var(--sz); border-radius: var(--r-1);
  background: var(--bg-3); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06);
  font-family: var(--font-sans); font-weight: var(--w-6); font-size: calc(var(--sz) / 2); line-height: 1; color: #fff;
  user-select: none;
}
.cav.s-20 { --sz: 20px; } .cav.s-24 { --sz: 24px; } .cav.s-40 { --sz: 40px; border-radius: var(--r-2); }
.cav.s-48 { --sz: 48px; border-radius: var(--r-2); }
.cav.tile { background: linear-gradient(135deg, var(--hue, var(--st-1)), color-mix(in oklab, var(--hue, var(--st-1)) 55%, #000)); text-shadow: 0 1px 1px rgb(0 0 0 / .25); }
.cav > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cav::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); pointer-events: none; }
.cav.is-empty { background: var(--bg-3); color: var(--fg-4); }

.aav {
  --sz: 32px;
  display: inline-grid; place-items: center; flex: none;
  width: var(--sz); height: var(--sz); border-radius: 50%;
  background: var(--bg-3); box-shadow: inset 0 0 0 1px var(--line-2);
  color: var(--fg-2); font: var(--w-6) calc(var(--sz) * .42)/1 var(--font-mono); text-transform: uppercase;
}
.aav.s-20 { --sz: 20px; } .aav.s-24 { --sz: 24px; } .aav.s-40 { --sz: 40px; }

.stack { display: inline-flex; align-items: center; flex: none; }
.stack > .cav { box-shadow: 0 0 0 2px var(--bg-0); }
.stack > .cav + .cav { margin-left: -8px; }

/* 9. COUNTDOWN · STATS · KPI ================================================= */
.cd { font-family: var(--font-mono); font-variant-numeric: tabular-nums slashed-zero; white-space: nowrap; color: var(--fg-1); }
.cd.is-soon { color: var(--accent); }
.cd-block { display: inline-flex; flex-direction: column; gap: var(--s-1); }
.cd-block .lbl { display: flex; align-items: center; gap: 6px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); }
.cd-block .lbl .i { width: 12px; height: 12px; }
.cd-lg { font: var(--w-5) var(--t-32)/var(--lh-32) var(--font-mono); letter-spacing: var(--track-tight); }
.cd-lg .c { color: var(--fg-3); }

.istat { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.istat .l { font-size: var(--t-11); line-height: var(--lh-11); color: var(--fg-3); }
.istat .v { font-size: var(--t-13); line-height: var(--lh-13); color: var(--fg-1); }
.istat .v .u { font-size: var(--t-11); }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-3); overflow: hidden; }
.kpis.n-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: var(--s-4) var(--s-5); min-width: 0; box-shadow: -1px 0 0 var(--line-1), 0 -1px 0 var(--line-1); }
.kpi .l { display: flex; align-items: center; gap: 6px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); white-space: nowrap; }
.kpi .l .i { width: 14px; height: 14px; color: var(--fg-4); }
.kpi .v { display: block; margin-top: var(--s-2); font: var(--w-5) var(--t-24)/var(--lh-24) var(--font-mono); letter-spacing: var(--track-tight); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .v .u { font-size: var(--t-12); letter-spacing: 0; }
.kpi .v.is-pre { display: flex; align-items: center; height: var(--lh-24); font-size: var(--t-12); letter-spacing: 0; }
.kpi .v .skel { height: 24px; margin-top: 4px; }
.kpi .s { margin-top: 2px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi .s .num { font-family: var(--font-sans); font-variant-numeric: tabular-nums; font-size: var(--t-12); font-weight: var(--w-5); color: var(--fg-2); }
.kpi .s .acc { color: var(--accent); }

/* 10. SKELETON · EMPTY · ERROR ============================================== */
.skel {
  display: block; height: 12px; border-radius: 3px;
  background: linear-gradient(90deg, var(--bg-2) 0%, var(--bg-4) 50%, var(--bg-2) 100%); background-size: 200% 100%;
  animation: shimmer 1400ms linear infinite;
}
.skel.inl { display: inline-block; vertical-align: middle; }
.skel.fig { height: 20px; }
.skel.fig-24 { height: 24px; }
.skel.cav { background-size: 200% 100%; box-shadow: none; }
.skel.round { border-radius: 50%; }
.skel + .skel { margin-top: 6px; }
.skel-gap > .skel + .skel { margin-top: var(--s-2); }

.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--s-10) var(--s-4); }
.empty .ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-3); background: var(--bg-2); color: var(--fg-3); }
.empty .ic .i { width: 20px; height: 20px; }
.empty h3 { margin-top: var(--s-4); font-size: var(--t-14); line-height: var(--lh-14); font-weight: var(--w-6); }
.empty p { margin-top: var(--s-1); max-width: 320px; font-size: var(--t-13); line-height: var(--lh-13); color: var(--fg-3); }
.empty .acts { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-2); margin-top: var(--s-4); }
.empty.compact { padding: var(--s-6) var(--s-4); }
.errrow { display: inline-flex; align-items: center; gap: 6px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-2); }
.errrow .i { width: 12px; height: 12px; color: var(--accent); }
.errrow-block { display: flex; justify-content: center; padding: var(--s-6) var(--s-4); }

/* 11. POPOVER · MENU · TOOLTIP =============================================== */
.pop {
  position: fixed; z-index: var(--z-pop); min-width: 200px; max-width: calc(100vw - 16px);
  padding: var(--s-1); background: var(--bg-1); border: 1px solid var(--line-3); border-radius: var(--r-3); box-shadow: var(--shadow-pop);
  opacity: 0; transform: translateY(-4px);
  transition: opacity var(--t-1) var(--ease-in), transform var(--t-1) var(--ease-in);
}
.pop.is-open { opacity: 1; transform: none; transition: opacity var(--t-2) var(--ease-out), transform var(--t-2) var(--ease-out); }
.menu-item {
  display: flex; align-items: center; gap: var(--s-2); width: 100%; min-height: 36px; padding: 0 var(--s-2);
  border-radius: var(--r-2); color: var(--fg-2); font-size: var(--t-13); line-height: var(--lh-13); text-align: left; white-space: nowrap;
  transition: background-color var(--t-1) var(--ease-out), color var(--t-1) var(--ease-out);
}
.menu-item .i { color: var(--fg-3); }
.menu-item:hover, .menu-item:focus-visible, .menu-item.is-active { background: var(--bg-2); color: var(--fg-1); outline: none; }
.menu-item:hover .i { color: var(--fg-2); }
.menu-item .r { margin-left: auto; color: var(--fg-3); font-size: var(--t-12); }
.menu-item.acc, .menu-item.acc .i, .menu-item.acc .r { color: var(--accent); }
.menu-item[aria-checked="true"] { color: var(--fg-1); }
.menu-item[aria-checked="true"]::after { content: ""; margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.menu-sep { height: 1px; margin: var(--s-1) 0; background: var(--line-1); }
.menu-head { padding: var(--s-2) var(--s-2) var(--s-1); font-size: var(--t-11); line-height: var(--lh-11); color: var(--fg-3); }

.tooltip {
  position: fixed; z-index: var(--z-tooltip); max-width: 240px; padding: 6px var(--s-2);
  background: var(--bg-3); border: 1px solid var(--line-3); border-radius: var(--r-2);
  color: var(--fg-1); font-size: var(--t-12); line-height: var(--lh-12); pointer-events: none;
  opacity: 0; transition: opacity var(--t-1) var(--ease-out);
}
.tooltip.is-open { opacity: 1; }

/* 12. TOASTS ================================================================ */
.toasts { position: fixed; right: var(--s-6); bottom: var(--s-6); z-index: var(--z-toast); display: flex; flex-direction: column-reverse; gap: var(--s-2); width: 360px; max-width: calc(100vw - 32px); pointer-events: none; }
.toast {
  display: grid; grid-template-columns: 16px minmax(0, 1fr) auto; gap: var(--s-3); align-items: start;
  padding: var(--s-3) var(--s-4); background: var(--bg-1); border: 1px solid var(--line-3); border-radius: var(--r-4); box-shadow: var(--shadow-modal);
  pointer-events: auto;
  animation: toast-in var(--t-3) var(--ease-out);
}
.toast.is-out { opacity: 0; transform: translateY(8px); transition: opacity var(--t-1) var(--ease-in), transform var(--t-1) var(--ease-in); }
.toast > .i { margin-top: 2px; color: var(--fg-2); }
.toast.ok > .i { color: var(--up); } .toast.err > .i { color: var(--down); } .toast.pending > .i { color: var(--accent); }
.toast .tt { font-size: var(--t-13); line-height: var(--lh-13); font-weight: var(--w-6); color: var(--fg-1); overflow-wrap: anywhere; }
.toast .ts { margin-top: 2px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); overflow-wrap: anywhere; }
.toast .ts .link { font-size: var(--t-12); }
.toast .ta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-2); }
.toast .iconbtn { margin: -2px -6px 0 0; }

/* 13. MODAL · SHEET ========================================================= */
.scrim { position: fixed; inset: 0; z-index: var(--z-scrim); background: var(--scrim); opacity: 0; transition: opacity var(--t-2) var(--ease-out); }
.scrim.is-open { opacity: 1; }
.modal {
  position: fixed; z-index: var(--z-modal); left: 50%; top: 50%;
  width: 440px; max-width: calc(100vw - 32px); max-height: calc(100vh - 64px); max-height: calc(100dvh - 64px);
  display: flex; flex-direction: column;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-4); box-shadow: var(--shadow-modal);
  opacity: 0; transform: translate(-50%, -50%) scale(.98);
  transition: opacity var(--t-3) var(--ease-out), transform var(--t-3) var(--ease-out);
}
.modal.md { width: 560px; }
.modal.is-open { opacity: 1; transform: translate(-50%, -50%); }
.modal.is-top { top: 64px; transform: translate(-50%, 0) scale(.98); }
.modal.is-top.is-open { transform: translate(-50%, 0); }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); min-height: 52px; padding: 0 var(--s-3) 0 var(--s-5); border-bottom: 1px solid var(--line-1); flex: none; }
.modal-h h2 { font-size: var(--t-16); line-height: var(--lh-16); font-weight: var(--w-6); }
.modal-b { padding: var(--s-5); overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.modal-f { display: flex; justify-content: flex-end; gap: var(--s-2); padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line-1); flex: none; }
.modal .grab { display: none; }
.modal-lead { font-size: var(--t-13); line-height: var(--lh-13); color: var(--fg-2); }
html.is-locked, html.is-locked body { overflow: hidden; }

/* wallet list (wallet picker) */
.wlist { display: flex; flex-direction: column; gap: var(--s-1); margin-top: var(--s-4); }
.wlist > li > a, .wlist > li > button {
  display: flex; align-items: center; gap: var(--s-3); width: 100%; min-height: 48px; padding: 0 var(--s-3);
  border: 1px solid var(--line-2); border-radius: var(--r-2); background: var(--bg-0); color: var(--fg-1);
  font-size: var(--t-14); font-weight: var(--w-5); text-align: left;
  transition: background-color var(--t-1) var(--ease-out), border-color var(--t-1) var(--ease-out);
}
.wlist > li > :hover { background: var(--bg-2); border-color: var(--line-3); }
.wlist img, .wlist .wl-i { width: 28px; height: 28px; border-radius: var(--r-2); flex: none; }
.wlist .wl-i { display: grid; place-items: center; background: var(--bg-3); color: var(--fg-2); font: var(--w-6) var(--t-12)/1 var(--font-mono); }
.wlist .chip { margin-left: auto; }
.wlist .i-go { margin-left: auto; color: var(--fg-3); }

/* 14. BANNERS =============================================================== */
.banner { border-bottom: 1px solid var(--line-1); background: var(--bg-1); }
.banner-in { display: flex; align-items: center; gap: var(--s-3); min-height: 40px; padding-block: var(--s-2); font-size: var(--t-12); line-height: 20px; color: var(--fg-2); }
.banner-in > .i { color: var(--fg-3); }
.banner-in .txt { flex: 1 1 auto; min-width: 0; }
.banner-in .num { color: var(--fg-1); }
.banner-in .btn { flex: none; }
.banner.err { background: var(--accent-a08); border-bottom-color: var(--accent-a16); }
.banner.err .banner-in { color: var(--fg-1); }
.banner.err .banner-in > .i { color: var(--accent); }
.banner.wrong { background: var(--down-a12); border-bottom-color: var(--down-a24); }
.banner.wrong .banner-in { color: var(--fg-1); }
.banner.wrong .banner-in > .i { color: var(--down); }
.banner.treasury { background: var(--accent-a08); border-bottom-color: var(--accent-a16); }
.banner.treasury .banner-in { color: var(--fg-1); }
.banner.treasury .banner-in > .i { color: var(--accent); }
.banner.off .banner-in > .i { color: var(--fg-2); }

/* 15. CURVE CHART =========================================================== */
.curve { position: relative; display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
.curve-box { position: relative; height: 360px; min-width: 0; }
.curve.is-mini .curve-box { height: 132px; }
.curve.is-mini .curve-chip { right: auto; bottom: auto; left: var(--s-4); top: var(--s-2); }
.curve-box > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.curve-box:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: var(--r-2); }
.curve .ax { font: var(--w-4) 11px/1 var(--font-mono); fill: var(--fg-3); }
.curve .ax-s { font: var(--w-4) 11px/1 var(--font-sans); fill: var(--fg-3); }
.curve .ax-s2 { font: var(--w-4) 11px/1 var(--font-sans); fill: var(--fg-2); }
.curve .cur-lbl { font: var(--w-5) 12px/1 var(--font-mono); fill: var(--fg-1); }
.curve .pulse { transform-box: fill-box; transform-origin: center; animation: halo 2400ms var(--ease-out) infinite; }
.curve-chip { position: absolute; right: var(--s-4); bottom: 40px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 var(--s-2); border-radius: var(--r-1); background: var(--bg-1); border: 1px solid var(--accent-a32); color: var(--accent); font-size: var(--t-12); font-weight: var(--w-5); }
.curve-chip .i { width: 12px; height: 12px; }
.curve-tip { position: absolute; z-index: 5; min-width: 176px; padding: var(--s-2) var(--s-3); pointer-events: none;
  background: rgb(20 20 24 / .96); border: 1px solid var(--line-3); border-radius: var(--r-2); box-shadow: var(--shadow-pop);
  opacity: 0; transition: opacity var(--t-1) var(--ease-out); }
.curve-tip.is-on { opacity: 1; }
.curve-tip .kv { min-height: 20px; }
.curve-tip .hint { margin-top: var(--s-1); padding-top: var(--s-1); border-top: 1px solid var(--line-1); font-size: var(--t-11); line-height: var(--lh-11); color: var(--accent); white-space: normal; max-width: 220px; }
.curve-foot { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line-1); }
.curve-foot > div { padding: var(--s-3) var(--s-4); min-width: 0; box-shadow: -1px 0 0 var(--line-1); }
.curve-foot > div:first-child { box-shadow: none; }
.curve-foot .l { font-size: var(--t-11); line-height: var(--lh-11); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.curve-foot .v { display: block; margin-top: 2px; font-size: var(--t-13); line-height: var(--lh-13); color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; }
.curve-foot .v .u { font-size: var(--t-11); }
.curve-foot .v.acc { color: var(--accent); }
.curve-legend { display: flex; align-items: center; gap: var(--s-4); font-size: var(--t-12); color: var(--fg-3); white-space: nowrap; }
.curve-legend span { display: inline-flex; align-items: center; gap: 6px; }
.curve-legend .ln { width: 12px; height: 2px; border-radius: 1px; background: var(--accent); }
.curve-legend .ln.fut { background: repeating-linear-gradient(90deg, var(--fg-4) 0 4px, transparent 4px 6px); }
.curve-legend .ln.grad { height: 0; border-top: 1px dashed var(--fg-3); background: none; }

/* 16. VERSION RACE ========================================================== */
.race { display: flex; flex-direction: column; min-width: 0; container-type: inline-size; }
.race-share { padding: var(--s-4); border-bottom: 1px solid var(--line-1); }
.share-bar { display: flex; gap: 2px; height: 6px; border-radius: 3px; overflow: hidden; background: var(--bg-1); }
.share-bar > i { display: block; height: 100%; min-width: 2px; background: var(--d-other); transition: flex-grow var(--t-3) var(--ease-out); }
.share-bar > i.lead { background: var(--d-lead); }
.share-bar > i.mine { background: var(--d-mine); }
.share-bar > i.rest { background: var(--d-rest); }
.share-bar.is-empty > i { background: var(--bg-3); }
.share-legend { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-2); min-width: 0; }
.share-legend .items { display: flex; gap: var(--s-3); min-width: 0; overflow: hidden; }
.share-legend .it { display: inline-flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
.share-legend .it .nm { overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.share-legend .it .dot { background: var(--d-other); }
.share-legend .it.lead .dot { background: var(--d-lead); }
.share-legend .it.mine .dot { background: var(--d-mine); }
.share-legend .it .num { color: var(--fg-1); font-size: var(--t-12); }
.share-legend .tot { flex: none; color: var(--fg-3); }
.share-legend .tot .num { color: var(--fg-3); font-size: var(--t-12); }
@container (max-width: 560px) {
  .curve-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .curve-foot > div:nth-child(3) { box-shadow: 0 -1px 0 var(--line-1); }
  .curve-foot > div:nth-child(4) { box-shadow: -1px 0 0 var(--line-1), 0 -1px 0 var(--line-1); }
}
@container (max-width: 520px) {
  .share-legend { flex-wrap: wrap; row-gap: var(--s-1); }
  .share-legend .items { flex: 1 1 100%; }
}
.race-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

.cand {
  position: relative; display: grid; grid-template-columns: 20px 32px minmax(0, 1fr) auto auto; align-items: center;
  column-gap: var(--s-3); row-gap: var(--s-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--line-1);
  transition: background-color var(--t-1) var(--ease-out);
}
.cand:last-child { border-bottom: 0; }
.cand:hover { background: var(--bg-2); }
.cand.is-sel { box-shadow: inset 2px 0 0 var(--accent); }
.cand.is-dim { opacity: .6; }
.cand .rk { font: var(--w-5) var(--t-12)/1 var(--font-mono); color: var(--fg-3); text-align: center; }
.cand.is-lead .rk { color: var(--accent); }
.cand .who { min-width: 0; }
.cand .nm { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-13); line-height: var(--lh-13); font-weight: var(--w-6); color: var(--fg-1); }
.cand .nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 1 auto; }
.cand .sy { display: flex; gap: var(--s-2); margin-top: 2px; font: var(--w-4) var(--t-12)/var(--lh-12) var(--font-mono); color: var(--fg-3); min-width: 0; }
.cand .sy .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cand .sy .cid { color: var(--fg-4); flex: none; }
.cand .met { text-align: right; }
.cand .met .num { font-size: var(--t-13); line-height: var(--lh-13); font-weight: var(--w-5); color: var(--fg-1); }
.cand .met .sub { display: block; margin-top: 2px; font: var(--w-4) var(--t-11)/var(--lh-11) var(--font-mono); color: var(--fg-3); white-space: nowrap; }
.cand .act { display: flex; justify-content: flex-end; }
.cand .act .btn { min-width: 64px; }
.cand .vb { grid-column: 3 / 5; height: 2px; border-radius: 1px; background: var(--bg-3); overflow: hidden; }
.cand .vb > i { display: block; height: 100%; width: 0; background: var(--d-other); transition: width var(--t-3) var(--ease-out); }
.cand.is-lead .vb > i { background: var(--d-lead); }
.cand.is-mine:not(.is-lead) .vb > i { background: var(--d-mine); }
.cand.no-act { grid-template-columns: 20px 32px minmax(0, 1fr) auto; }
.cand.no-act .vb { grid-column: 3 / 5; }
@container (max-width: 420px) {
  .cand { grid-template-columns: 20px 32px minmax(0, 1fr) auto; row-gap: var(--s-2); }
  .cand .act { grid-column: 4; grid-row: 2; }
  .cand .vb { grid-column: 3; grid-row: 2; align-self: center; }
  .cand.no-act .vb { grid-column: 3 / 5; }
  .cand .nm { flex-wrap: wrap; row-gap: 2px; }
}

/* 17. COIN ADDRESS CARD ===================================================== */
.coin .panel-b { display: flex; flex-direction: column; gap: var(--s-3); }
.coin-t { display: flex; align-items: flex-start; gap: var(--s-2); }
.coin-t > .i { color: var(--accent); margin-top: 2px; }
.coin-t b { display: block; font-size: var(--t-13); line-height: var(--lh-13); font-weight: var(--w-6); color: var(--fg-1); }
.coin-t span { display: block; margin-top: 2px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); }
.coin-box { display: flex; align-items: center; gap: var(--s-2); padding: var(--s-3); background: var(--accent-a08); border: 1px solid var(--accent-a32); border-radius: var(--r-3); }
.coin-box .addr { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; column-gap: 4px; font: var(--w-4) var(--t-13)/20px var(--font-mono); color: var(--fg-1); letter-spacing: 0; }
.coin-box .addr .g { white-space: nowrap; }
.coin-box .addr .hl { color: var(--accent); }
.coin-box.plain { background: var(--bg-0); border-color: var(--line-2); }
.coin-box.plain .addr .hl { color: var(--fg-1); }
.coin-box .is-pre { flex: 1; }
.coin-acts { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2); }
.coin-verify { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); font-size: var(--t-12); }
.coin-verify .res { display: inline-flex; align-items: center; gap: 6px; }
.coin-verify .res .i { width: 12px; height: 12px; }
.coin-foot { font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); }

/* 18. POOL REPRESENTATIONS ================================================== */
/* (a) table cells */
.c-pid { color: var(--fg-3); font-size: var(--t-13); }
.c-lead { display: flex; align-items: center; gap: var(--s-3); min-width: 200px; }
.c-lead .who { min-width: 0; }
.c-lead .t { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-13); line-height: var(--lh-13); font-weight: var(--w-6); color: var(--fg-1); }
.c-lead .t a { overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.c-lead .t a:hover { text-decoration: underline; text-decoration-color: var(--line-3); text-underline-offset: 3px; }
.c-lead .s { margin-top: 2px; font: var(--w-4) var(--t-12)/var(--lh-12) var(--font-mono); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.c-tw { max-width: 280px; }
.c-tw .h { display: flex; align-items: center; gap: 6px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-2); }
.c-tw .h .i { width: 12px; height: 12px; color: var(--accent); }
.c-tw .x { margin-top: 2px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 280px; }
.c-prog { width: 176px; }
.c-prog .r1 { display: flex; align-items: center; gap: var(--s-2); }
.c-prog .bar { width: 96px; }
.c-prog .r1 .num { font-size: var(--t-12); }
.c-prog .sub { white-space: nowrap; }
.c-cd .cd { font-size: var(--t-13); }
.c-cd .sub { text-align: right; }
.c-na { font-family: var(--font-sans); font-size: var(--t-12); color: var(--fg-3); }

/* (b) pool card */
.pcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.pcard {
  position: relative; display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-4); min-width: 0;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-3); color: var(--fg-1);
  transition: border-color var(--t-1) var(--ease-out), background-color var(--t-1) var(--ease-out);
}
.pcard:hover { border-color: var(--line-3); }
.pcard:focus-visible { outline-offset: 2px; }
.pcard-h { display: flex; align-items: center; gap: var(--s-2); min-height: 24px; min-width: 0; }
.pcard-h .hd { font-size: var(--t-13); font-weight: var(--w-5); color: var(--fg-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pcard-h .ago { font-size: var(--t-12); color: var(--fg-3); white-space: nowrap; }
.pcard-h .pill { margin-left: auto; }
.pcard-x { min-height: 40px; font-size: var(--t-13); line-height: 20px; color: var(--fg-2); overflow-wrap: anywhere; }
.pcard-lead { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: center; column-gap: var(--s-3); padding: var(--s-3); background: var(--bg-0); border-radius: var(--r-2); }
.pcard-lead .nm { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-14); line-height: var(--lh-14); font-weight: var(--w-6); }
.pcard-lead .nm .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pcard-lead .nm .sym { font: var(--w-4) var(--t-12)/1 var(--font-mono); color: var(--fg-3); white-space: nowrap; }
.pcard-lead .s { margin-top: 2px; font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard-lead .share-bar { width: 64px; height: 4px; }
.pcard-prog .r { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-2); margin-bottom: var(--s-2); font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); }
.pcard-prog .r .num { font-size: var(--t-12); color: var(--fg-1); }
.pcard-f { display: flex; align-items: center; gap: var(--s-4); padding-top: var(--s-3); border-top: 1px solid var(--line-1); font-size: var(--t-12); line-height: var(--lh-12); color: var(--fg-3); white-space: nowrap; min-width: 0; }
.pcard-f > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.pcard-f .i { width: 12px; height: 12px; }
.pcard-f .num { font-size: var(--t-12); color: var(--fg-1); }
.pcard-f > span:last-child { margin-left: auto; }
.pcard .stretch { position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.pcard .stretch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pcard > :not(.stretch) { position: relative; z-index: 1; pointer-events: none; }
.pcard .pe { pointer-events: auto; }

/* (c) phone row */
.mrows { display: flex; flex-direction: column; }
.mrow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; column-gap: var(--s-3); row-gap: var(--s-2); padding: var(--s-3); border-bottom: 1px solid var(--line-1); color: var(--fg-1); transition: background-color var(--t-1) var(--ease-out); }
.mrow:last-child { border-bottom: 0; }
.mrow:active { background: var(--bg-2); }
.mrow .t { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: var(--t-14); line-height: var(--lh-14); font-weight: var(--w-6); }
.mrow .t .n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mrow .s { display: flex; gap: 6px; margin-top: 2px; min-width: 0; font: var(--w-4) var(--t-12)/var(--lh-12) var(--font-mono); color: var(--fg-3); }
.mrow .s .h { font-family: var(--font-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mrow .r { text-align: right; }
.mrow .r .num { font-size: var(--t-14); line-height: var(--lh-14); }
.mrow .r .d { margin-top: 2px; font: var(--w-4) var(--t-12)/var(--lh-12) var(--font-mono); color: var(--fg-3); }
.mrow .pr { grid-column: 2 / 4; display: flex; align-items: center; gap: var(--s-3); font-size: var(--t-12); color: var(--fg-3); min-width: 0; }
.mrow .pr .bar { flex: 1 1 auto; }
.mrow .pr .num { font-size: var(--t-12); }

/* 19. LIFECYCLE STRIP · TRUST CARDS ========================================= */
.life { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-3); overflow: hidden; }
.life-step { position: relative; padding: var(--s-6) var(--s-5); min-width: 0; box-shadow: -1px 0 0 var(--line-1); }
.life-step:first-child { box-shadow: none; }
.life-top { display: flex; align-items: center; gap: var(--s-2); }
.life-ic { display: grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-2); background: var(--bg-2); color: var(--fg-2); flex: none; }
.life-ic .i { width: 16px; height: 16px; }
.life-step.is-hot .life-ic { background: var(--accent); color: var(--accent-ink); }
.life-top .ln { flex: 1 1 auto; height: 1px; background: var(--line-2); }
.life-top .chip { flex: none; }
.life-k { display: block; margin-top: var(--s-4); font: var(--w-5) var(--t-11)/var(--lh-11) var(--font-mono); color: var(--fg-3); }
.life-t { margin-top: var(--s-1); font-size: var(--t-16); line-height: var(--lh-16); font-weight: var(--w-6); }
.life-p { margin-top: var(--s-2); font-size: var(--t-13); line-height: 20px; color: var(--fg-2); }
.life-foot { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s-3); padding: var(--s-3) var(--s-5); background: var(--bg-0); border-top: 1px solid var(--line-1); font-size: var(--t-12); line-height: 20px; color: var(--fg-2); }
.life.compact .life-step { padding: var(--s-4); }
.life.compact .life-p { font-size: var(--t-12); }

.trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-4); }
.trust.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.trust-card { padding: var(--s-6); background: var(--bg-1); border: 1px solid var(--line-2); border-radius: var(--r-3); min-width: 0; }
.trust-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-3); background: var(--bg-2); border: 1px solid var(--line-2); color: var(--accent); }
.trust-ic .i { width: 18px; height: 18px; }
.trust-ic.up { color: var(--up); }
.trust-ic.warn { color: var(--accent); }
.trust-card h3 { margin-top: var(--s-4); font-size: var(--t-16); line-height: var(--lh-16); font-weight: var(--w-6); }
.trust-card p { margin-top: var(--s-2); font-size: var(--t-13); line-height: 20px; color: var(--fg-2); }

/* Responsive for shared components ------------------------------------------ */
@media (max-width: 1279px) {
  .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1439px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .life { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .life-step { box-shadow: -1px 0 0 var(--line-1), 0 -1px 0 var(--line-1); }
  .life-step:last-of-type { grid-column: 1 / -1; }
  .trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: var(--s-3) var(--s-4); }
  .kpi .v { font-size: var(--t-20); line-height: var(--lh-20); }
  .pcards { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .curve-box { height: 240px; }
  .curve-foot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .curve-foot > div:nth-child(3) { box-shadow: 0 -1px 0 var(--line-1); }
  .curve-foot > div:nth-child(4) { box-shadow: -1px 0 0 var(--line-1), 0 -1px 0 var(--line-1); }
  .curve-legend .opt { display: none; }
  .life { grid-template-columns: minmax(0, 1fr); }
  .life-step, .life-step:first-child { box-shadow: 0 -1px 0 var(--line-1); padding: var(--s-4); }
  .life-step:first-child { box-shadow: none; }
  .trust { grid-template-columns: minmax(0, 1fr); gap: var(--s-3); }
  .trust-card { padding: var(--s-5); }
  .toasts { left: var(--s-4); right: var(--s-4); top: calc(var(--topbar-h) + var(--s-2)); bottom: auto; width: auto; max-width: none; }
  .toast { animation-name: toast-in-top; }
  .toast.is-out { transform: translateY(-8px); }
  .share-legend .tot { display: none; }

  /* every modal becomes a bottom sheet */
  .modal, .modal.md, .modal.is-top {
    left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; max-height: 88vh; max-height: 88dvh;
    border-radius: var(--r-4) var(--r-4) 0 0; border-bottom: 0;
    transform: translateY(100%); padding-bottom: var(--safe-b);
  }
  .modal.is-open, .modal.is-top.is-open { transform: none; }
  .modal .grab { display: block; position: absolute; left: 50%; top: var(--s-2); width: 32px; height: 4px; margin-left: -16px; border-radius: 2px; background: var(--fg-4); }
  .modal-h { padding-top: var(--s-2); }
  .modal-b { padding: var(--s-4); }
  .modal-f { flex-direction: column-reverse; padding: var(--s-3) var(--s-4) var(--s-4); }
  .modal-f .btn { width: 100%; --h: var(--ctl-lg); }
  .modal.is-full { top: 0; max-height: none; height: 100%; border-radius: 0; border: 0; padding-top: env(safe-area-inset-top, 0px); }
  .modal.is-full .grab { display: none; }
}

/* 20. PHONE TOUCH TARGETS (≥ 40px hit areas) ================================ */
@media (max-width: 760px) {
  .btn::after, .iconbtn::after, .seg > button::after, .tabs [role="tab"]::before, .switch::after {
    content: ""; position: absolute; left: 50%; top: 50%; min-width: 100%; min-height: 100%;
    width: 40px; height: 40px; transform: translate(-50%, -50%);
  }
  .btn::after, .seg > button::after { width: 100%; }
  .seg > button, .switch { position: relative; }
}

/* 21. HERO ART (home hero, OG render — js/ui/hero-streams.js; spec §5) ======= */
.hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: var(--z-canvas); pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 38%, #000 52%); mask-image: linear-gradient(90deg, transparent 38%, #000 52%); }
.hero-canvas.no-mask { -webkit-mask-image: none; mask-image: none; }
.hero-tags { position: absolute; inset: 0; z-index: var(--z-canvas); pointer-events: none; overflow: hidden; }
.htag { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 6px;
  border-radius: var(--r-1); background: rgb(14 14 17 / .8); border: 1px solid var(--line-2);
  font: var(--w-5) var(--t-11)/1 var(--font-mono); color: var(--fg-2); white-space: nowrap; will-change: transform; }
.htag i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.htag.merge { height: 24px; padding: 0 var(--s-2); border-color: var(--accent-a32); font-family: var(--font-sans); font-size: var(--t-12); color: var(--fg-1); }
.htag.merge b { color: var(--accent); font-weight: var(--w-6); }
.hero-band { position: relative; height: 144px; overflow: hidden; }

/* =============================================================================
   COMPONENTS v2 · GLASS OCEAN (shell agent, 2026-09-28) — buttons, inputs, tabs, badges, panels, popovers, toasts,
   modals and sheets in the home page's material. "body" prefix so these win over brand-ocean.css (loaded later);
   page stylesheets that need something else use a page-scoped selector.
   ============================================================================= */
:root { --gl-bg: linear-gradient(180deg, rgb(14 34 48 / .78), rgb(6 16 24 / .86)); --gl-line: rgb(159 219 255 / .14); --gl-line-2: rgb(159 219 255 / .26);
  --gl-glow: 0 0 40px -16px rgb(70 224 210 / .45); --gl-hi: inset 0 1px 0 rgb(221 244 255 / .07); --amber-grad: linear-gradient(180deg, #FFDA8A 0%, #F9B23C 48%, #E8900F 100%); }

/* buttons ---------------------------------------------------------------------- */
body .btn { border-radius: 12px; transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease, box-shadow .3s ease, filter .2s ease; }
body .btn-sm { border-radius: 10px; }
body .btn-lg { border-radius: 14px; }
body .btn:focus-visible { outline: 2px solid #9FDBFF; outline-offset: 2px; }
body .btn-accent { overflow: hidden; border: 0; color: #1B1002; background: var(--amber-grad); font-weight: 700;
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), inset 0 -2px 0 rgb(120 60 0 / .22), 0 8px 26px -10px rgb(245 165 36 / .8), 0 0 0 1px rgb(255 200 110 / .35); }
body .btn-accent::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgb(255 255 255 / .6) 48%, transparent 62%); transform: translateX(-120%); }
body .btn-accent:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--amber-grad); color: #1B1002; transform: translateY(-1px); filter: brightness(1.06) saturate(1.05);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .6), inset 0 -2px 0 rgb(120 60 0 / .22), 0 12px 34px -8px rgb(245 165 36 / .95), 0 0 0 1px rgb(255 210 130 / .6); }
body .btn-accent:hover:not(:disabled):not([aria-disabled="true"])::after { transform: translateX(120%); transition: transform .8s ease; }
body .btn-accent:active:not(:disabled) { background: var(--amber-grad); transform: translateY(0); filter: brightness(.96); }
body .btn-accent:disabled, body .btn-accent[aria-disabled="true"] { opacity: 1; filter: grayscale(.85) brightness(.55); box-shadow: none; }
body .btn-ghost { color: #E6F2F6; background: linear-gradient(180deg, rgb(159 219 255 / .08), rgb(159 219 255 / .03)); border: 1px solid rgb(159 219 255 / .2); box-shadow: var(--gl-hi); }
body .btn-ghost:hover:not(:disabled):not([aria-disabled="true"]) { color: #fff; background: linear-gradient(180deg, rgb(159 219 255 / .14), rgb(159 219 255 / .05)); border-color: rgb(159 219 255 / .4); box-shadow: var(--gl-hi), 0 0 24px -8px rgb(70 224 210 / .55); }
body .btn-ghost:active:not(:disabled) { background: rgb(159 219 255 / .1); }
body .btn-ghost:disabled, body .btn-ghost[aria-disabled="true"] { opacity: .55; }
body .btn-quiet { color: #AFC4CF; }
body .btn-quiet:hover:not(:disabled):not([aria-disabled="true"]) { color: #fff; background: rgb(159 219 255 / .08); }
body .btn-up { border: 0; color: #02140B; background: linear-gradient(180deg, #5BE6A6, #22C47F 60%, #17A86A); box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 8px 24px -10px rgb(34 196 127 / .9); }
body .btn-up:hover:not(:disabled):not([aria-disabled="true"]) { background: linear-gradient(180deg, #6FF0B4, #34D68F 60%, #1DB574); box-shadow: inset 0 1px 0 rgb(255 255 255 / .5), 0 10px 30px -8px rgb(34 196 127 / 1); transform: translateY(-1px); }
body .btn-down { border: 0; color: #1A0306; background: linear-gradient(180deg, #FF8A98, #F0495E 60%, #D83349); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 8px 24px -10px rgb(240 73 94 / .9); }
body .btn-down:hover:not(:disabled):not([aria-disabled="true"]) { background: linear-gradient(180deg, #FF9BA7, #FF5D71 60%, #E23C52); box-shadow: inset 0 1px 0 rgb(255 255 255 / .45), 0 10px 30px -8px rgb(240 73 94 / 1); transform: translateY(-1px); }
body .btn-line-up:hover:not(:disabled):not([aria-disabled="true"]) { box-shadow: 0 0 22px -8px rgb(34 196 127 / .9); }
body .btn-line-down:hover:not(:disabled):not([aria-disabled="true"]) { box-shadow: 0 0 22px -8px rgb(240 73 94 / .9); }
body .iconbtn { border-radius: 8px; }
body .iconbtn:hover { background: rgb(159 219 255 / .1); color: #fff; }
body .iconbtn.is-done { color: #46E0D2; }
body .iconbtn.is-done .i { animation: copy-pop .32s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes copy-pop { from { transform: scale(.4); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { body .iconbtn.is-done .i { animation: none; } }
body .kbd { border-radius: 6px; border-color: rgb(159 219 255 / .18); background: rgb(159 219 255 / .05); color: #9FB6C3; }
body .link-acc { color: #9FDBFF; } body .link-acc:hover { color: #fff; }

/* chips · tags · pills ------------------------------------------------------------ */
body .chip { border-radius: 7px; background: rgb(159 219 255 / .06); border-color: rgb(159 219 255 / .14); color: #BFD3DC; }
body .chip.acc { color: #FFC766; background: rgb(245 165 36 / .1); border-color: rgb(255 199 102 / .35); }
body .chip.up { color: #46E0D2; background: rgb(70 224 210 / .08); border-color: rgb(70 224 210 / .3); }
body .tag { border-radius: 6px; background: rgb(159 219 255 / .08); color: #BFD3DC; }
body .tag.lead, body .tag.win { color: #1A1206; background: linear-gradient(100deg, #FFE7BC, #F5A524); box-shadow: 0 0 14px -2px rgb(245 165 36 / .6); font-weight: 700; }
body .tag.mine { color: #DDF4FF; box-shadow: inset 0 0 0 1px rgb(159 219 255 / .4); }
body .tag.similar { color: #9FDBFF; background: rgb(159 219 255 / .1); }
body .pill { border-radius: 999px; padding: 0 10px; background: rgb(159 219 255 / .05); border-color: rgb(159 219 255 / .14); color: #AFC4CF; }
body .pill.ph-1 { color: #DDF4FF; border-color: rgb(159 219 255 / .35); background: rgb(159 219 255 / .08); box-shadow: 0 0 16px -6px rgb(159 219 255 / .7); }
body .pill.ph-1 .dot { background: #DDF4FF; box-shadow: 0 0 8px #9FDBFF; }
body .pill.ph-2 { color: #46E0D2; background: rgb(70 224 210 / .08); border-color: rgb(70 224 210 / .32); box-shadow: 0 0 16px -6px rgb(70 224 210 / .7); }
body .pill.ph-2 .dot { background: #46E0D2; box-shadow: 0 0 8px #46E0D2; }
body .pill.ph-3, body .pill.ph-4 { color: #FFC766; background: rgb(245 165 36 / .1); border-color: rgb(255 199 102 / .38); box-shadow: 0 0 16px -6px rgb(245 165 36 / .7); }
body .pill.ph-3 .dot { background: #FFC766; box-shadow: 0 0 8px #F5A524; }
body .pill.ph-5 { color: #1A1206; background: linear-gradient(100deg, #FFE7BC, #F5A524); border-color: transparent; font-weight: 700; }
body .pill.ph-5 .dot { background: #7A2E00; }
body .pill.st-up { color: #46E0D2; background: rgb(70 224 210 / .08); border-color: rgb(70 224 210 / .32); }
body .pill.st-acc { color: #FFC766; background: rgb(245 165 36 / .1); border-color: rgb(255 199 102 / .38); }

/* progress ------------------------------------------------------------------------ */
body .bar { background: rgb(159 219 255 / .08); box-shadow: inset 0 1px 2px rgb(0 0 0 / .45); }
body .bar > i { background: linear-gradient(90deg, rgb(70 224 210 / .55), #46E0D2 55%, #DDF4FF); box-shadow: 0 0 12px rgb(70 224 210 / .6); }
body .bar.is-full > i { background: linear-gradient(90deg, #FFE7BC, #F5A524); box-shadow: 0 0 12px rgb(245 165 36 / .7); }
body .bar.is-exp > i { background: #3A5563; box-shadow: none; }

/* inputs -------------------------------------------------------------------------- */
body .field { border-radius: 12px; background: linear-gradient(180deg, rgb(3 12 19 / .7), rgb(6 18 27 / .6)); border: 1px solid rgb(159 219 255 / .16); box-shadow: inset 0 1px 2px rgb(0 0 0 / .35); }
body .field.on-page { background: linear-gradient(180deg, rgb(3 12 19 / .7), rgb(6 18 27 / .6)); }
body .field:hover { border-color: rgb(159 219 255 / .3); }
body .field:focus-within { border-color: rgb(70 224 210 / .7); box-shadow: inset 0 1px 2px rgb(0 0 0 / .35), 0 0 0 4px rgb(70 224 210 / .13), 0 0 30px -10px rgb(70 224 210 / .6); }
body .field.is-err { border-color: rgb(240 73 94 / .8); box-shadow: 0 0 0 4px rgb(240 73 94 / .12); }
body .field > .i { color: #7FA3B4; }
body .field:focus-within > .i { color: #46E0D2; }
body .field input, body .field textarea { caret-color: #46E0D2; }
body .field input::placeholder, body .field textarea::placeholder { color: #6F8896; }
body .field-paste { border-radius: 16px; }
body .field-amt input { font-family: "Geist", var(--font-sans); font-weight: 600; font-size: 22px; letter-spacing: -.02em; }
body .unit-chip { border-radius: 8px; background: rgb(159 219 255 / .08); color: #DDEFF6; }
body .switch .trk { background: rgb(159 219 255 / .1); box-shadow: inset 0 0 0 1px rgb(159 219 255 / .2); }
body .switch[aria-checked="true"] .trk { background: linear-gradient(90deg, #46E0D2, #9FDBFF); box-shadow: 0 0 12px rgb(70 224 210 / .6); }

/* segmented · tabs · sides ------------------------------------------------------------ */
body .seg { padding: 3px; gap: 3px; border-radius: 12px; background: rgb(3 12 19 / .6); border: 1px solid rgb(159 219 255 / .12); }
body .seg > button { border-radius: 9px; color: #8FA7B5; transition: background-color .25s, color .2s, box-shadow .3s; }
body .seg > button:hover { color: #F2FAFC; }
body .seg > button[aria-checked="true"], body .seg > button[aria-selected="true"], body .seg > button.on { color: #fff; background: linear-gradient(180deg, rgb(159 219 255 / .18), rgb(159 219 255 / .07));
  box-shadow: inset 0 0 0 1px rgb(159 219 255 / .28), 0 0 18px -6px rgb(70 224 210 / .6); }
body .tabs [role="tab"] { color: #8FA7B5; transition: color .2s, text-shadow .3s; }
body .tabs [role="tab"]:hover { color: #F2FAFC; }
body .tabs [role="tab"][aria-selected="true"] { color: #fff; text-shadow: 0 0 14px rgb(159 219 255 / .55); }
body .tabs [role="tab"]::after { height: 2px; border-radius: 2px; background: linear-gradient(90deg, #46E0D2, #DDF4FF 55%, #FFC766); box-shadow: 0 0 12px rgb(70 224 210 / .8); transition: transform .35s var(--ease-out-expo, ease); }
body .tabs .count { color: #6F8896; }
body .sides { border-radius: 14px; padding: 3px; gap: 3px; background: rgb(3 12 19 / .6); border-color: rgb(159 219 255 / .12); }
body .sides > button { border-radius: 11px; }
body .sides > .buy[aria-selected="true"] { color: #34D68F; background: rgb(34 196 127 / .14); border-color: rgb(34 196 127 / .4); box-shadow: 0 0 20px -6px rgb(34 196 127 / .7); }
body .sides > .sell[aria-selected="true"] { color: #FF5D71; background: rgb(240 73 94 / .14); border-color: rgb(240 73 94 / .4); box-shadow: 0 0 20px -6px rgb(240 73 94 / .7); }

/* panels · wells · notes -------------------------------------------------------------- */
body .panel { border-radius: 22px; background: var(--gl-bg); border: 1px solid var(--gl-line); box-shadow: var(--gl-hi), 0 30px 80px -50px rgb(0 0 0 / .95); }
body .panel::before { content: ""; position: absolute; left: 24px; right: 24px; top: -1px; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgb(159 219 255 / .55), transparent); }
body .panel-h { border-bottom-color: rgb(159 219 255 / .08); }
body .panel-t { color: #F2FAFC; }
body .panel-t .i { color: #9FDBFF; }
body .panel-t .i.acc { color: #FFC766; }
body .panel-f { border-top-color: rgb(159 219 255 / .08); }
body .well { border-radius: 14px; background: rgb(3 12 19 / .5); border-color: rgb(159 219 255 / .1); }
body .callout { border-radius: 14px; background: rgb(245 165 36 / .08); border-color: rgb(255 199 102 / .25); }
body .callout > .i { color: #FFC766; }
body .kvl { border-radius: 18px; background: rgb(3 12 19 / .4); border-color: rgb(159 219 255 / .1); }

/* KPI strip + stats: display numbers ------------------------------------------------- */
body .kpis { border-radius: 22px; background: var(--gl-bg); border-color: var(--gl-line); box-shadow: var(--gl-hi), 0 30px 80px -40px rgb(70 224 210 / .25); }
body .kpi { box-shadow: -1px 0 0 rgb(159 219 255 / .08), 0 -1px 0 rgb(159 219 255 / .08); }
body .kpi .l .i { color: #46E0D2; }
body .kpi .v:not(.is-pre):not(.is-na) { font-family: "Geist", var(--font-sans); font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums;
  background: linear-gradient(180deg, #fff 10%, #DDF4FF 45%, #9FDBFF); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body .kpi .v .u { -webkit-text-fill-color: #8FA7B5; }
body .cd-lg { font-family: "Geist", var(--font-sans); font-weight: 700; letter-spacing: -.035em; }

/* tables ---------------------------------------------------------------------------- */
body .tbl th { background: rgb(6 18 27 / .95); border-bottom-color: rgb(159 219 255 / .1); color: #8FA7B5; }
body .tbl td { border-bottom-color: rgb(159 219 255 / .06); }
body .tbl tbody tr:hover { background: linear-gradient(90deg, rgb(159 219 255 / .06), rgb(159 219 255 / .02)); }

/* skeleton · empty ------------------------------------------------------------------- */
body .skel { background: linear-gradient(90deg, rgb(159 219 255 / .05) 0%, rgb(159 219 255 / .14) 50%, rgb(159 219 255 / .05) 100%); background-size: 200% 100%; }
body .empty .ic { position: relative; width: 56px; height: 56px; border-radius: 50%; color: #DDF4FF; background: radial-gradient(circle at 40% 35%, rgb(70 224 210 / .35), rgb(10 40 56 / .9) 70%);
  border: 1px solid rgb(159 219 255 / .4); box-shadow: 0 0 30px rgb(70 224 210 / .3); }
body .empty .ic::after { content: ""; position: absolute; inset: -1px; border-radius: 50%; border: 1px solid rgb(159 219 255 / .45); animation: gl-halo 2.8s ease-out infinite; }
@keyframes gl-halo { from { transform: scale(1); opacity: .9; } to { transform: scale(1.5); opacity: 0; } }
body .empty h3 { margin-top: 18px; font-family: var(--ff-display, var(--font-sans)); font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -.005em;
  background: linear-gradient(100deg, #9FDBFF, #fff 50%, #FFE7BC); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-block: .05em; }
body .empty p { color: #8FA7B5; font-size: 13.5px; line-height: 1.6; }

/* popover · menu · tooltip ------------------------------------------------------------ */
body .pop { border-radius: 18px; padding: 6px; background: linear-gradient(180deg, rgb(12 30 42 / .94), rgb(5 14 22 / .96)); border: 1px solid rgb(159 219 255 / .2);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgb(221 244 255 / .08), 0 30px 70px -20px rgb(0 0 0 / .9), 0 0 50px -20px rgb(70 224 210 / .45); transform: translateY(-6px) scale(.98); transform-origin: 50% 0; }
body .pop.is-open { transform: none; }
body .menu-item { border-radius: 11px; color: #BFD3DC; }
body .menu-item:hover, body .menu-item:focus-visible, body .menu-item.is-active { background: rgb(159 219 255 / .08); color: #fff; }
body .menu-item .i { color: #7FA3B4; }
body .menu-item:hover .i { color: #9FDBFF; }
body .menu-item.acc, body .menu-item.acc .i, body .menu-item.acc .r { color: #FFC766; }
body .menu-sep { background: rgb(159 219 255 / .08); }
body .wmenu-bal { border-radius: 14px; background: linear-gradient(120deg, rgb(70 224 210 / .08), rgb(3 12 19 / .5)); border-color: rgb(70 224 210 / .22); }
body .wmenu-bal .num { font-family: "Geist", var(--font-sans); font-weight: 700; font-size: 20px; background: linear-gradient(180deg, #fff, #9FDBFF); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
body .tooltip { border-radius: 10px; background: rgb(10 26 37 / .96); border-color: rgb(159 219 255 / .24); color: #E6F2F6; box-shadow: 0 10px 30px -10px rgb(0 0 0 / .8), 0 0 20px -8px rgb(70 224 210 / .5); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }

/* toasts ---------------------------------------------------------------------------- */
body .toasts { gap: 10px; }
body .toast { position: relative; overflow: hidden; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 18px;
  background: linear-gradient(180deg, rgb(14 34 48 / .92), rgb(5 14 22 / .95)); border: 1px solid rgb(159 219 255 / .2);
  -webkit-backdrop-filter: blur(20px) saturate(150%); backdrop-filter: blur(20px) saturate(150%);
  box-shadow: inset 0 1px 0 rgb(221 244 255 / .08), 0 24px 60px -20px rgb(0 0 0 / .9), 0 0 40px -18px rgb(70 224 210 / .5);
  animation: gl-toast .5s var(--ease-out-expo, ease) both; }
@keyframes gl-toast { from { opacity: 0; transform: translate3d(24px, 0, 0) scale(.96); filter: blur(6px); } }
body .toast::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: #9FDBFF; box-shadow: 0 0 12px #9FDBFF; }
body .toast > .i { box-sizing: content-box; width: 16px; height: 16px; margin: 0; padding: 8px; border-radius: 50%; color: #9FDBFF; background: rgb(159 219 255 / .1); box-shadow: inset 0 0 0 1px rgb(159 219 255 / .25); }
body .toast.ok::before { background: #46E0D2; box-shadow: 0 0 12px #46E0D2; }
body .toast.ok > .i { color: #46E0D2; background: rgb(70 224 210 / .12); box-shadow: inset 0 0 0 1px rgb(70 224 210 / .35), 0 0 16px -4px rgb(70 224 210 / .7); }
body .toast.err { border-color: rgb(240 73 94 / .35); }
body .toast.err::before { background: #FF5D71; box-shadow: 0 0 12px #FF5D71; }
body .toast.err > .i { color: #FF8595; background: rgb(240 73 94 / .12); box-shadow: inset 0 0 0 1px rgb(240 73 94 / .35); }
body .toast.pending::before { background: #FFC766; box-shadow: 0 0 12px #F5A524; }
body .toast.pending > .i { color: #FFC766; background: rgb(245 165 36 / .12); box-shadow: inset 0 0 0 1px rgb(255 199 102 / .35); }
body .toast.pending::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, #FFC766, transparent); background-size: 50% 100%; background-repeat: no-repeat; animation: gl-run 1.6s linear infinite; }
@keyframes gl-run { from { background-position: -50% 0; } to { background-position: 150% 0; } }
body .toast .tt { font-size: 13.5px; color: #F5FBFD; }
body .toast .ts { color: #9FB6C3; }
body .toast .ts .link { color: #9FDBFF; }
body .toast .iconbtn { margin: 0; }
body .toast.is-out { opacity: 0; transform: translate3d(24px, 0, 0) scale(.97); transition: opacity .18s ease, transform .18s ease; }

/* modal · sheet ------------------------------------------------------------------------ */
body .scrim { background: rgb(1 6 10 / .62); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); }
body .modal { border-radius: 26px; background: linear-gradient(180deg, rgb(14 34 48 / .96), rgb(5 14 22 / .98)); border: 1px solid rgb(159 219 255 / .2);
  -webkit-backdrop-filter: blur(24px) saturate(150%); backdrop-filter: blur(24px) saturate(150%);
  box-shadow: inset 0 1px 0 rgb(221 244 255 / .09), 0 50px 120px -30px rgb(0 0 0 / .95), 0 0 80px -30px rgb(70 224 210 / .45); overflow: hidden; }
body .modal::before { content: ""; position: absolute; left: 32px; right: 32px; top: 0; height: 1px; pointer-events: none; background: linear-gradient(90deg, transparent, rgb(159 219 255 / .8), transparent); }
body .modal::after { content: ""; position: absolute; z-index: -1; width: 360px; aspect-ratio: 1; right: -140px; top: -200px; border-radius: 50%; pointer-events: none; background: radial-gradient(closest-side, rgb(70 224 210 / .16), transparent); }
body .modal-h { min-height: 60px; padding: 0 12px 0 24px; border-bottom-color: rgb(159 219 255 / .08); }
body .modal-h h2 { font-family: var(--ff-display, var(--font-sans)); font-weight: 800; font-size: 22px; line-height: 1.2; letter-spacing: -.005em;
  background: linear-gradient(100deg, #DDF4FF, #fff 50%, #FFE7BC); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; padding-block: .05em; }
body .modal-h .iconbtn-32 { border-radius: 10px; }
body .modal-b { padding: 22px 24px; }
body .modal-f { padding: 16px 24px 20px; border-top-color: rgb(159 219 255 / .08); }
body .modal-lead { font-size: 14px; line-height: 1.65; color: #AFC4CF; }
body .modal .note { color: #8FA7B5; }
body .modal .note > .i { color: #46E0D2; }
body .wlist > li > a, body .wlist > li > button { min-height: 56px; border-radius: 16px; border: 1px solid rgb(159 219 255 / .14); background: linear-gradient(120deg, rgb(159 219 255 / .06), rgb(255 255 255 / .01));
  transition: border-color .25s, box-shadow .3s, transform .3s var(--ease-out-expo, ease); }
body .wlist > li > :hover { background: linear-gradient(120deg, rgb(159 219 255 / .1), rgb(255 255 255 / .02)); border-color: rgb(159 219 255 / .38); box-shadow: 0 0 26px -10px rgb(70 224 210 / .6); transform: translateY(-1px); }
body .wlist img, body .wlist .wl-i { width: 32px; height: 32px; border-radius: 10px; }
body .wlist .wl-i { color: #9FDBFF; background: rgb(159 219 255 / .1); }
@media (max-width: 760px) {
  body .modal:not(.is-full) { border-radius: 26px 26px 0 0; }
  body .modal .grab { background: rgb(159 219 255 / .35); }
  body .toast { border-radius: 16px; }
  body .modal-h { padding: 8px 10px 0 18px; min-height: 56px; }
  body .modal-b { padding: 16px 18px; }
  body .modal-f { padding: 12px 18px calc(16px + var(--safe-b)); }
}
@media (prefers-reduced-motion: reduce) {
  body .toast { animation: none; }
  body .empty .ic::after, body .toast.pending::after { animation: none; }
  body .btn-accent:hover::after { transition: none; }
}

/* ticker scrolls continuously; it still pauses while hovered — no visible pause button (user request 2026-09-29) */
.ticker-pause { display: none !important; }
