/*
 * HOODACHI app (app.html, js/app/*). Builds on css/base.css; app-chain pages add css/app-chain.css.
 *   frame    .app .side (.side-brand .side-nav .side-link .side-label .side-foot .clock) .main-col .topbar (.top-head
 *            .top-title .top-sub .top-actions .search .session-chip .wallet-slot) .main .app-foot .tabbar .more-sheet
 *   wallet   .wallet-btn .wallet-menu .wm-* .btn-warn .modal-wallet .wp-* .gate
 *   pages    .page .sec (.sec-head .sec-title .sec-sub .sec-link) .kpis .kpi-tile .split .list-row .live-stamp
 *   charts   .chart .chart-tip .spark .ribbon .legend
 *   signals  .sig (.sig-head .sig-title .sig-why .sig-foot) .sig-row .sev .chips .fchip
 *   routes   .ov-* (overview) .radar-* .tk-* (token) .nw-* (night watch) .scan-*
 * Breakpoints: phone < 768 (tab bar), rail 768 to 1279 (icon sidebar), full sidebar >= 1280.
 */

:root {
  --side-w: 240px;
  --top-h: 68px;
  --tab-h: 64px;
  --ph-regular: #57c980;
  --ph-ext: #2f7351;
  --ph-overnight: #2b4f75;
  --ph-closed: #2a322e;
  --surface: #111713;
}

/* ================================================================== frame */
body.page-app {
  min-height: 100vh;
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(0, 104, 55, .20), transparent 62%),
    radial-gradient(700px 480px at -6% 104%, rgba(0, 104, 55, .10), transparent 60%),
    var(--bg);
  background-attachment: fixed;
}
.app { display: grid; grid-template-columns: minmax(0, 1fr); min-height: 100vh; }
.main-col { display: flex; flex-direction: column; min-width: 0; min-height: 100vh; }
.main { flex: 1 0 auto; width: 100%; max-width: 1560px; margin-inline: auto; padding: 22px var(--gutter) 28px; outline: none; }
.noscript { padding: 24px; text-align: center; color: var(--muted); }

/* ---------------------------------------------------------------- sidebar */
.side { display: none; }
@media (min-width: 768px) {
  .app { grid-template-columns: 76px minmax(0, 1fr); }
  .side {
    position: sticky; top: 0; height: 100vh; z-index: 60;
    display: flex; flex-direction: column; gap: 6px;
    padding: 16px 12px 16px;
    border-right: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(14, 19, 16, .86), rgba(10, 13, 11, .9));
    -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  }
}
@media (min-width: 1280px) {
  .app { grid-template-columns: var(--side-w) minmax(0, 1fr); }
  .side { padding: 18px 14px 16px; }
}
.side-brand { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 8px; margin-bottom: 10px; border-radius: 10px; }
.side-brand .brand-mark { width: 32px; height: 32px; filter: drop-shadow(0 2px 8px rgba(0, 0, 0, .45)); }
.side-brand .brand-word { height: 15px; width: auto; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-label { padding: 14px 10px 6px; font-family: var(--font-label); font-weight: 600; font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.side-rule { height: 1px; margin: 12px 8px; background: var(--line); }
.side-link {
  position: relative; display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 12px;
  border-radius: 10px; color: rgba(233, 239, 233, .7); font-weight: 500; font-size: .94rem;
  transition: color var(--t-fast), background-color var(--t-fast);
}
.side-link svg { width: 20px; height: 20px; flex: none; }
.side-link:hover { color: var(--text); background: rgba(255, 255, 255, .045); }
.side-link[aria-current='page'] { color: var(--text); background: linear-gradient(90deg, rgba(87, 201, 128, .16), rgba(87, 201, 128, .04)); box-shadow: inset 0 0 0 1px rgba(87, 201, 128, .16); }
.side-link[aria-current='page'] svg { color: var(--green); }
.side-link[aria-current='page']::before { content: ''; position: absolute; left: -12px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--green); box-shadow: 0 0 12px rgba(87, 201, 128, .7); }
.side-foot { margin-top: auto; }

/* rail mode (768 to 1279): icons only, labels as tooltips */
@media (min-width: 768px) and (max-width: 1279px) {
  .side-brand { justify-content: center; padding: 0; }
  .side-brand .brand-word { display: none; }
  .side-label { height: 1px; padding: 0; margin: 10px 12px; background: var(--line); font-size: 0; overflow: hidden; }
  .side-nav .side-label:first-child { display: none; }
  .side-link { justify-content: center; padding: 0; height: 46px; }
  .side-link span { position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); opacity: 0; pointer-events: none; white-space: nowrap; padding: 6px 10px; border-radius: 8px; background: #1b231f; border: 1px solid var(--line-2); box-shadow: var(--shadow-2); font-size: .84rem; color: var(--text); transition: opacity var(--t-fast), transform var(--t-fast); z-index: 5; }
  .side-link:hover span, .side-link:focus-visible span { opacity: 1; transform: translate(0, -50%); }
  .side-link[aria-current='page']::before { left: -12px; }
  .side-foot { display: none; }
}

/* session clock */
.clock { display: grid; gap: 8px; padding: 14px 14px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(6, 9, 8, .45); }
.clock-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.clock-top .label { font-size: .64rem; }
.clock-phase { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--text); font-weight: 500; }
.clock-phase .dot { width: 7px; height: 7px; }
.clock-time { font-family: var(--font-label); font-weight: 700; font-size: 1.7rem; letter-spacing: .02em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock-sec { color: var(--faint); font-size: .9rem; margin-left: 1px; }
.clock-next { font-size: .78rem; color: var(--muted); }
.clock-ribbon { margin-top: 2px; }
.dot-night { background: #7fb8ff; box-shadow: 0 0 10px rgba(127, 184, 255, .55); }
.dot-live.dot-night::after { border-color: #7fb8ff; }

/* session ribbon (a New York day) */
.ribbon { position: relative; display: flex; height: 8px; border-radius: 999px; overflow: visible; background: var(--ph-closed); }
.ribbon-seg { position: relative; height: 100%; }
.ribbon-lg .ribbon-seg { container-type: inline-size; }
@container (max-width: 80px) { .ribbon-lg .ph-overnight .ribbon-tag, .ribbon-lg .ph-closed .ribbon-tag { display: none; } }
@container (max-width: 48px) { .ribbon-lg .ribbon-tag { display: none; } }
.ribbon-seg + .ribbon-seg { box-shadow: -1px 0 0 var(--surface); }
.ribbon-seg:first-child { border-radius: 999px 0 0 999px; }
.ribbon-seg:last-child { border-radius: 0 999px 999px 0; }
.ph-regular { background: var(--ph-regular); }
.ph-pre, .ph-after { background: var(--ph-ext); }
.ph-overnight { background: var(--ph-overnight); }
.ph-closed { background: var(--ph-closed); }
.ribbon-now { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; border-radius: 2px; background: var(--cream); box-shadow: 0 0 0 2px rgba(11, 13, 12, .85), 0 0 12px rgba(238, 228, 207, .6); }
.ribbon-axis { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: .62rem; color: var(--faint); margin-top: -2px; }
.ribbon-lg { height: 30px; border-radius: 9px; }
.ribbon-lg .ribbon-seg:first-child { border-radius: 9px 0 0 9px; }
.ribbon-lg .ribbon-seg:last-child { border-radius: 0 9px 9px 0; }
.ribbon-lg .ribbon-now { top: -9px; bottom: -9px; width: 0; margin: 0; background: none; box-shadow: none; }
.ribbon-lg .ribbon-now::before, .ribbon-lg .ribbon-now::after { content: ''; position: absolute; left: -6px; border-left: 6px solid transparent; border-right: 6px solid transparent; filter: drop-shadow(0 0 6px rgba(238, 228, 207, .6)); }
.ribbon-lg .ribbon-now::before { top: 0; border-top: 7px solid var(--cream); }
.ribbon-lg .ribbon-now::after { bottom: 0; border-bottom: 7px solid var(--cream); }
.ribbon-tag { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-label); font-weight: 600; font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .82); white-space: nowrap; overflow: hidden; }
.ph-regular .ribbon-tag { color: var(--green-ink); }
.ribbon-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .76rem; color: var(--muted); }
.ribbon-legend span { display: inline-flex; align-items: center; gap: 7px; }
.ribbon-legend i { width: 14px; height: 8px; border-radius: 3px; }

/* ----------------------------------------------------------------- top bar */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  height: var(--top-h); padding: 0 var(--gutter);
  background: rgba(10, 13, 11, .76); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}
.topbar-mark { display: grid; place-items: center; flex: none; }
.topbar-mark img { width: 30px; height: 30px; }
@media (min-width: 768px) { .topbar-mark { display: none; } }
.top-head { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.top-title { font-size: 1.22rem; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; outline: none; }
.top-sub { font-size: .8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.top-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.session-chip { display: none; flex: none; min-height: 34px; font-size: .8rem; }
@media (min-width: 1100px) and (max-width: 1279px), (min-width: 1360px) { .session-chip { display: inline-flex; } }
.wallet-slot { position: relative; display: flex; align-items: center; gap: 8px; flex: none; }
@media (max-width: 767px) {
  .topbar { gap: 8px; height: 60px; --top-h: 60px; }
  .top-title { font-size: 1.05rem; }
  .top-sub { display: none; }
  .top-actions { display: none; }
}

/* quick search */
.search { position: relative; flex: 0 1 300px; min-width: 0; }
.search-input { height: 40px; min-height: 40px; padding-right: 34px; background-color: rgba(6, 9, 8, .6); font-size: .9rem; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.search-input:focus ~ .search-kbd, .search-input:not(:placeholder-shown) ~ .search-kbd { opacity: 0; }
.search-close { display: none; }
.search-open { display: none; }
.search-pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 70; min-width: 320px;
  max-height: min(440px, calc(100vh - 120px)); overflow: auto; padding: 6px;
  background: rgba(16, 21, 18, .97); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-2);
}
.search-list { list-style: none; margin: 0; padding: 0; }
.search-head { padding: 8px 10px 6px; font-family: var(--font-label); font-weight: 600; font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.search-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; cursor: pointer; }
.search-opt[aria-selected='true'] { background: rgba(87, 201, 128, .1); box-shadow: inset 0 0 0 1px rgba(87, 201, 128, .18); }
.search-px { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; font-size: .8rem; }
.search-px .chg { font-size: .72rem; }
.search-empty { padding: 14px 12px; color: var(--muted); font-size: .88rem; }
@media (min-width: 768px) and (max-width: 1099px) { .search { flex-basis: 240px; } }
@media (max-width: 767px) {
  .search { display: none; }
  .search-open { display: inline-flex; }
  html.search-open .search {
    display: block; position: fixed; left: 0; right: 0; top: 0; z-index: 120; padding: 10px 56px 10px 12px;
    background: rgba(10, 13, 11, .98); border-bottom: 1px solid var(--line-2);
  }
  html.search-open .search-close { display: inline-flex; position: absolute; right: 10px; top: 13px; }
  html.search-open .search-kbd { display: none; }
  html.search-open .search-pop { position: fixed; top: 62px; left: 8px; right: 8px; min-width: 0; max-height: calc(100dvh - 140px); }
}

/* ------------------------------------------------------------ app footer */
.app-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
  width: 100%; max-width: 1560px; margin-inline: auto;
  padding: 14px var(--gutter) 22px; border-top: 1px solid var(--line); color: var(--faint); font-size: .8rem;
}
.app-foot-line { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.app-foot-actions { display: flex; align-items: center; gap: 4px; }
.app-foot .btn-sm { --btn-h: 30px; font-size: .78rem; color: var(--muted); }
.app-foot .icon-link { width: 32px; height: 32px; }
@media (max-width: 767px) {
  .app-foot { padding-bottom: calc(var(--tab-h) + 20px + env(safe-area-inset-bottom)); }
  .app-foot-line { flex-direction: column; gap: 2px; }
  .app-foot-line .sep { display: none; }
}

/* ---------------------------------------------------------------- tab bar */
.tabbar { display: none; }
@media (max-width: 767px) {
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 0 4px env(safe-area-inset-bottom);
    background: rgba(10, 13, 11, .9); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur);
    border-top: 1px solid var(--line-2);
  }
}
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  border: 0; background: transparent; color: var(--faint); font-size: .68rem; font-weight: 600; letter-spacing: .01em;
  transition: color var(--t-fast);
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current='page'], .tab.is-current { color: var(--text); }
.tab[aria-current='page'] svg, .tab.is-current svg { color: var(--green); }
.tab[aria-current='page']::before, .tab.is-current::before { content: ''; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 0 0 2px 2px; background: var(--green); box-shadow: 0 0 10px rgba(87, 201, 128, .7); }

.more-sheet { position: fixed; inset: 0; z-index: 140; display: flex; align-items: flex-end; background: rgba(3, 5, 4, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); animation: fade-in .2s var(--ease) both; }
.more-sheet.is-closing { animation: fade-out .18s var(--ease) both; }
.more-panel { width: 100%; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 20px 20px 0 0; background: rgba(15, 20, 17, .98); border-top: 1px solid var(--line-2); animation: sheet-up .3s var(--ease-out) both; }
.more-sheet.is-closing .more-panel { animation: sheet-down .18s var(--ease) both; }
.more-head { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 14px 2px 6px; }
.more-grip { position: absolute; top: 2px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 4px; background: rgba(255, 255, 255, .16); }
.more-nav { display: flex; flex-direction: column; }
.more-nav a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 15px 4px; border-bottom: 1px solid var(--line); font-size: 1.05rem; font-weight: 600; }
.more-nav a:last-child { border-bottom: 0; }
.more-nav a svg:first-child { width: 22px; height: 22px; color: var(--muted); }
.more-nav a svg:last-child { color: var(--faint); }
.more-nav a[aria-current='page'] svg:first-child { color: var(--green); }
@keyframes sheet-up { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes sheet-down { to { transform: translateY(24px); opacity: 0; } }

/* ================================================================== wallet */
.only-narrow { display: none; }
@media (max-width: 767px) { .only-wide { display: none; } .only-narrow { display: inline; } }
.btn-warn { background: rgba(242, 184, 75, .12); border-color: rgba(242, 184, 75, .45); color: #ffd690; }
.btn-warn:hover { background: rgba(242, 184, 75, .2); border-color: rgba(242, 184, 75, .7); }
.btn-warn svg { color: var(--watch); }
.wallet-btn {
  display: inline-flex; align-items: center; gap: 9px; height: 40px; padding: 0 10px 0 7px;
  border: 1px solid var(--line-2); border-radius: 999px; background: rgba(6, 9, 8, .55); color: var(--text);
  transition: border-color var(--t-fast), background-color var(--t-fast);
}
.wallet-btn:hover { border-color: var(--line-3); background: rgba(255, 255, 255, .05); }
.wallet-btn[aria-expanded='true'] { border-color: rgba(87, 201, 128, .45); }
.wallet-btn.is-wrong { border-color: rgba(242, 184, 75, .4); }
.wallet-addr { font-size: .84rem; }
.wallet-bal { font-size: .8rem; color: var(--muted); padding-left: 9px; border-left: 1px solid var(--line-2); }
.wallet-bal:empty { display: none; }
.wallet-chev { color: var(--faint); width: 16px; height: 16px; }
@media (max-width: 1499px) { .wallet-bal { display: none; } }
@media (max-width: 767px) {
  .wallet-addr { display: none; }
  .wallet-btn { padding: 0 6px 0 6px; gap: 4px; height: 38px; }
  .wallet-switch { padding: 0 10px; }
  .wallet-switch svg { display: none; }
}
.wallet-menu {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 80; width: 300px; max-width: calc(100vw - 20px);
  padding: 14px; border-radius: 16px; border: 1px solid var(--line-2);
  background: rgba(16, 21, 18, .98); box-shadow: var(--shadow-2);
  display: grid; gap: 12px; animation: pop-in .2s var(--ease-out) both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
.wm-head { display: flex; align-items: center; gap: 12px; }
.wm-id { min-width: 0; }
.wm-addr { font-size: .95rem; font-weight: 600; }
.wm-net { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); }
.wm-net .dot { width: 7px; height: 7px; }
.wm-kv { padding: 10px 12px; border-radius: 10px; background: rgba(255, 255, 255, .035); }
.wm-actions { display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 8px; }
.wm-item { display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: .9rem; text-align: left; }
.wm-item svg { color: var(--muted); }
.wm-item:hover { background: rgba(255, 255, 255, .05); }
.wm-danger, .wm-danger svg { color: #ff8f88; }

/* picker */
.modal-wallet .modal-body { display: grid; gap: 14px; }
.wp-lede { color: var(--muted); font-size: .9rem; }
.wp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wp-skel { display: block; height: 56px; border-radius: 12px; }
.wp-opt {
  position: relative; display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; width: 100%;
  height: 58px; padding: 0 14px 0 12px; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025);
  text-align: left; transition: border-color var(--t-fast), background-color var(--t-fast);
}
.wp-opt:hover:not(:disabled) { border-color: rgba(87, 201, 128, .45); background: rgba(87, 201, 128, .06); }
.wp-opt:disabled { opacity: .45; cursor: default; }
.wp-opt[aria-busy='true'] { border-color: rgba(87, 201, 128, .5); }
.wp-opt[aria-busy='true'] .wp-go { animation: spin .8s linear infinite; }
.wp-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .06); overflow: hidden; color: var(--green); }
.wp-icon img { width: 32px; height: 32px; }
.wp-name { font-weight: 600; }
.wp-tag { font-size: .74rem; color: var(--muted); }
.wp-go { color: var(--faint); }
.wp-none { display: grid; justify-items: center; gap: 8px; padding: 18px 8px; text-align: center; color: var(--muted); font-size: .9rem; }
.wp-none svg { color: var(--faint); }
.wp-error { padding: 10px 12px; border-radius: 10px; background: var(--down-bg); color: #ffb3ae; font-size: .86rem; }
.wp-note { display: flex; gap: 9px; align-items: flex-start; font-size: .78rem; color: var(--faint); }
.wp-note svg { flex: none; margin-top: 2px; color: var(--muted); }

/* connect gate */
.gate { display: grid; justify-items: center; gap: 12px; max-width: 560px; margin: 6vh auto; padding: 40px 28px 34px; text-align: center; }
.gate-art { position: relative; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; background: radial-gradient(circle at 50% 40%, rgba(87, 201, 128, .22), rgba(87, 201, 128, .04)); color: var(--green); margin-bottom: 6px; }
.gate-ring { position: absolute; inset: -8px; border-radius: 50%; border: 1px solid rgba(87, 201, 128, .3); animation: live-ring 2.6s var(--ease-out) infinite; }
.gate-title { font-size: 1.4rem; }
.gate-reason { color: var(--muted); max-width: 44ch; }
.gate .btn { margin-top: 6px; }
.gate-note { font-size: .82rem; color: var(--faint); }

/* =================================================================== pages */
.page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; min-width: 0; animation: page-in .38s var(--ease-out) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-loading { display: grid; gap: 16px; }
.page-loading-block { height: 320px; border-radius: var(--r-panel); }
.page-missing { padding: 40px 20px; }
.state-text { max-width: 52ch; }
.state .btn svg, .state-error .btn svg { width: 16px; height: 16px; margin: 0; color: currentColor; }
.state-act { margin-top: 8px; }

.sec { min-width: 0; }
.sec-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 16px 18px 0; min-height: 46px; }
.sec-title { display: flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 600; letter-spacing: -.005em; }
.sec-title svg { width: 18px; height: 18px; color: var(--green); }
.sec-sub { font-size: .8rem; color: var(--muted); }
.sec-link { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .84rem; color: var(--muted); padding: 4px 2px; transition: color var(--t-fast); }
.sec-link:hover { color: var(--green); }
.sec-link svg { width: 15px; height: 15px; transition: transform var(--t) var(--ease); }
.sec-link:hover svg { transform: translateX(2px); }
.sec-body { padding: 12px 18px 18px; }
.sec-body-flush { padding: 8px 8px 10px; }

.split { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .split { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } }
.split-even { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: stretch; }
@media (min-width: 900px) { .split-even { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stack-18 { display: grid; gap: 18px; min-width: 0; align-content: start; }

.live-stamp { display: inline-flex; align-items: center; gap: 8px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.live-stamp .dot { width: 7px; height: 7px; }
.live-stamp.is-stale .dot { background: var(--watch); box-shadow: none; }
.live-stamp.is-stale .dot::after { display: none; }

/* KPI tiles */
.kpis { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi-tile { display: grid; gap: 8px; align-content: start; padding: 16px 18px; min-width: 0; }
.kpi-tile .label { display: flex; align-items: center; gap: 8px; }
.kpi-tile .label svg { width: 15px; height: 15px; color: var(--green); }
.kpi-tile .kpi-value { font-size: clamp(1.45rem, 2.2vw, 1.95rem); font-variant-numeric: normal; }
.kpi-tile .kpi-sub { min-height: 1.2em; }
@media (max-width: 767px) { .kpi-tile { padding: 14px; } .kpi-tile .kpi-sub { font-size: .76rem; } }

/* list rows (movers, swaps) */
.list { display: grid; }
.list-row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 10px 10px; border-radius: 10px; transition: background-color var(--t-fast);
}
.list-row + .list-row { box-shadow: 0 -1px 0 var(--line); }
a.list-row:hover { background: rgba(160, 255, 200, .04); }
.list-row .num { font-family: var(--font-mono); font-size: .86rem; text-align: right; }
.list-row .chg { font-size: .84rem; text-align: right; min-width: 64px; }
.skel-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 10px; }
.skel-stack { display: grid; gap: 7px; }

/* filter chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fchip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 13px;
  border-radius: 999px; border: 1px solid var(--line-2); background: rgba(6, 9, 8, .45); color: var(--muted);
  font-size: .85rem; font-weight: 600; white-space: nowrap; transition: color var(--t-fast), border-color var(--t-fast), background-color var(--t-fast);
}
.fchip:hover { color: var(--text); border-color: var(--line-3); }
.fchip[aria-pressed='true'] { color: var(--text); border-color: rgba(87, 201, 128, .5); background: rgba(87, 201, 128, .12); }
.fchip .fchip-n { font-family: var(--font-mono); font-size: .74rem; font-weight: 500; color: var(--faint); min-width: 1.2em; text-align: center; }
.fchip[aria-pressed='true'] .fchip-n { color: var(--green); }
.fchip .dot { width: 7px; height: 7px; }
.fchip:disabled { opacity: .45; cursor: default; }
@media (max-width: 767px) {
  .chips-scroll { flex-wrap: nowrap; overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 2px var(--gutter); scrollbar-width: none; }
  .chips-scroll::-webkit-scrollbar { display: none; }
}

/* ================================================================== charts */
.chart { position: relative; width: 100%; outline: none; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.chart:focus-visible { box-shadow: 0 0 0 2px rgba(87, 201, 128, .5); border-radius: 10px; }
.chart-svg svg { display: block; overflow: visible; }
.chart .grid { stroke: rgba(160, 255, 200, .07); stroke-width: 1; shape-rendering: crispEdges; }
.chart .baseline { stroke: rgba(160, 255, 200, .16); stroke-width: 1; shape-rendering: crispEdges; }
.chart .tick { stroke: rgba(160, 255, 200, .18); stroke-width: 1; }
.chart .axis { fill: var(--faint); font-family: var(--font-mono); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.chart .band { fill: transparent; }
.chart .band-regular { fill: rgba(87, 201, 128, .07); }
.chart .band-pre, .chart .band-after { fill: rgba(87, 201, 128, .03); }
.chart .band-overnight { fill: rgba(90, 169, 255, .035); }
.chart .band-edge { stroke: rgba(160, 255, 200, .1); stroke-width: 1; shape-rendering: crispEdges; }
.chart .band-label { fill: var(--faint); font-family: var(--font-label); font-weight: 600; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; }
.chart .area.series-up { fill: rgba(87, 201, 128, .1); }
.chart .area.series-down { fill: rgba(255, 90, 82, .09); }
.chart .area.series-flat { fill: rgba(233, 239, 233, .06); }
.chart .line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.series-up { stroke: var(--up); }
.chart .line.series-down { stroke: var(--down); }
.chart .line.series-flat { stroke: #c9d4cd; }
.chart .end-dot, .chart .hover-dot { stroke: var(--surface); stroke-width: 2; }
.chart .series-up.end-dot, .chart .series-up.hover-dot { fill: var(--up); }
.chart .series-down.end-dot, .chart .series-down.hover-dot { fill: var(--down); }
.chart .series-flat.end-dot, .chart .series-flat.hover-dot { fill: #c9d4cd; }
.chart .ref-line { stroke: rgba(238, 228, 207, .42); stroke-width: 1; shape-rendering: crispEdges; }
.chart .ref-label { fill: rgba(238, 228, 207, .75); font-family: var(--font-mono); font-size: 10.5px; }
.chart .val-tag rect { fill: var(--up); }
.chart .val-tag.series-down rect { fill: var(--down); }
.chart .val-tag.series-flat rect { fill: #c9d4cd; }
.chart .val-tag text { fill: var(--green-ink); font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; }
.chart .val-tag.series-down text { fill: #1a0605; }
.chart .crosshair { stroke: rgba(233, 239, 233, .35); stroke-width: 1; shape-rendering: crispEdges; }
.chart .bar-buy { fill: var(--up); }
.chart .bar-sell { fill: var(--down); fill-opacity: .82; }
.chart .col { transition: opacity var(--t-fast); }
.chart .col.is-live { opacity: .55; }
.chart .col.is-hover { opacity: 1; filter: brightness(1.18); }
.chart .col-hover { fill: rgba(233, 239, 233, .05); pointer-events: none; }
.chart-tip {
  position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none;
  min-width: 150px; padding: 10px 12px; border-radius: 10px;
  background: rgba(14, 19, 16, .95); border: 1px solid var(--line-2); box-shadow: var(--shadow-2);
  font-size: .8rem; line-height: 1.35; opacity: 0; transition: opacity var(--t-fast);
  display: grid; gap: 3px;
}
.chart-tip.is-on { opacity: 1; }
.chart-tip strong { font-family: var(--font-mono); font-size: .95rem; font-weight: 700; color: var(--text); }
.chart-tip span { color: var(--muted); }
.tip-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.tip-row b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.tip-key { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.tip-key i { width: 10px; height: 2px; border-radius: 2px; }
.key-buy { background: var(--up); }
.key-sell { background: var(--down); }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: .76rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.legend i.key-line { width: 14px; height: 2px; border-radius: 2px; }
.legend .sw-buy { background: var(--up); }
.legend .sw-sell { background: var(--down); opacity: .82; }
.legend .sw-regular { background: rgba(87, 201, 128, .22); }
.legend .sw-overnight { background: rgba(90, 169, 255, .22); }
.legend .sw-close { background: rgba(238, 228, 207, .6); }

.spark { overflow: visible; }
.spark .spark-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark .spark-area { stroke: none; }
.spark-up .spark-line { stroke: var(--up); }
.spark-up .spark-area { fill: rgba(87, 201, 128, .1); }
.spark-down .spark-line { stroke: var(--down); }
.spark-down .spark-area { fill: rgba(255, 90, 82, .09); }
.spark-flat .spark-line, .spark-none .spark-line { stroke: #9aa8a0; }
.spark-flat .spark-area { fill: rgba(233, 239, 233, .05); }
.spark .spark-end { fill: currentColor; }
.spark-up .spark-end { fill: var(--up); }
.spark-down .spark-end { fill: var(--down); }
.spark-flat .spark-end { fill: #9aa8a0; }
.spark .spark-base { stroke: rgba(238, 228, 207, .22); stroke-width: 1; shape-rendering: crispEdges; }
.spark-none { display: inline-block; border-bottom: 1px solid var(--line-2); transform: translateY(-50%); }

/* ================================================================= signals */
.sev { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.sev i { width: 3px; border-radius: 2px; background: rgba(255, 255, 255, .14); }
.sev i:nth-child(1) { height: 5px; }
.sev i:nth-child(2) { height: 8px; }
.sev i:nth-child(3) { height: 12px; }
.sev i.on { background: var(--text); }
.sig {
  position: relative; display: grid; gap: 10px; align-content: start; padding: 16px 18px 14px; min-width: 0;
  border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--panel);
  -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); box-shadow: var(--shadow-1);
  transition: border-color var(--t) var(--ease), transform var(--t) var(--ease);
}
.sig::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 3px; border-radius: 0 3px 3px 0; background: var(--watch); opacity: .9; }
.sig-up::before { background: var(--up); }
.sig-down::before { background: var(--down); }
.sig-info::before { background: var(--info); }
.sig:hover { border-color: var(--line-2); }
.sig-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.sig-tok { min-width: 0; }
.sig-tok:hover .tok-sym { color: var(--green); }
.sig-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.sig-head > .sig-meta:first-child { margin-left: 0; }
.sig-title { font-size: 1.02rem; font-weight: 600; line-height: 1.3; letter-spacing: -.01em; }
.sig-why { font-size: .88rem; color: var(--muted); line-height: 1.5; }
.sig-why-label { display: block; margin-bottom: 3px; font-family: var(--font-label); font-weight: 600; font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.sig-foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--faint); }
.sig-val { font-family: var(--font-mono); font-weight: 600; font-size: .84rem; color: var(--text); }
.sig-val-up { color: var(--up); }
.sig-val-down { color: var(--down); }
.sig-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; transition: color var(--t-fast); }
.sig-link:hover { color: var(--green); }
.sig-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; transition: background-color var(--t-fast); }
.sig-row + .sig-row { box-shadow: 0 -1px 0 var(--line); }
.sig-row:hover { background: rgba(160, 255, 200, .04); }
.sig-row-main { display: grid; gap: 2px; min-width: 0; }
.sig-row-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sig-row-type { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--muted); white-space: nowrap; }
.sig-row-type .dot { width: 7px; height: 7px; }
.sig-row-title { font-size: .86rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sig-row-side { display: grid; justify-items: end; gap: 2px; }
.sig-row-side .sig-val { font-size: .8rem; }
.sig-row-time { font-family: var(--font-mono); font-size: .7rem; color: var(--faint); white-space: nowrap; }

/* ================================================================ overview */
.ov-hero { position: relative; overflow: hidden; display: grid; gap: 22px; padding: 24px 26px 22px; }
.ov-hero::after {
  content: ''; position: absolute; right: -80px; top: -120px; width: 420px; height: 420px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(87, 201, 128, .16), transparent 64%);
}
.ov-hero-top { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.ov-hero-copy { display: grid; gap: 8px; min-width: 0; }
.ov-phase { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.ov-phase h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.03em; }
.ov-clock { font-family: var(--font-label); font-weight: 700; font-size: 1.1rem; color: var(--muted); letter-spacing: .02em; }
.ov-line { color: var(--muted); max-width: 60ch; }
.ov-line strong { color: var(--text); font-weight: 600; }
.ov-mark { position: relative; width: 104px; height: 104px; display: grid; place-items: center; }
.ov-mark img { position: relative; z-index: 1; width: 84px; height: 84px; filter: drop-shadow(0 8px 22px rgba(0, 0, 0, .6)); }
.ov-mark::before, .ov-mark::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(87, 201, 128, .28); }
.ov-mark::after { inset: -14px; border-color: rgba(87, 201, 128, .12); animation: live-ring 3.2s var(--ease-out) infinite; }
.ov-ribbon { position: relative; z-index: 1; display: grid; gap: 10px; }
.ov-ribbon-axis { position: relative; height: 14px; font-family: var(--font-mono); font-size: .68rem; color: var(--faint); }
.ov-ribbon-axis > span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.ov-ribbon-axis > span:first-child { transform: none; }
.ov-ribbon-axis > span:last-child { transform: translateX(-100%); }
@media (max-width: 767px) { .ov-ribbon-axis .ax-min { display: none; } .ov-hero .sec-link, [data-nw-stamp] { display: none; } }
@media (max-width: 767px) {
  .ov-hero { padding: 18px 16px; gap: 16px; }
  .ov-mark { width: 64px; height: 64px; }
  .ov-mark img { width: 52px; height: 52px; }
  .ov-mark::after { inset: -8px; }
}
.mover-bar { position: relative; width: 70px; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.mover-bar i { position: absolute; top: 0; bottom: 0; border-radius: 999px; }
.mover-bar i.up { left: 0; background: var(--up); }
.mover-bar i.down { left: 0; background: var(--down); }
.ov-movers .list-row { grid-template-columns: minmax(0, 1fr) auto auto auto; }
@media (max-width: 479px) { .ov-movers .mover-bar { display: none; } .ov-movers .list-row { grid-template-columns: minmax(0, 1fr) auto auto; } }
.ov-night-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-bottom: 10px; }
.ov-night-total strong { font-family: var(--font-label); font-weight: 700; font-size: 1.5rem; }
.ov-night-total span { font-size: .82rem; color: var(--muted); }

/* =================================================================== radar */
.radar-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; }
.radar-bar .chips { flex: 1 1 auto; }
.radar-filter { flex: 0 1 240px; min-width: 180px; }
.radar-filter .input { height: 36px; min-height: 36px; font-size: .88rem; }
.radar-sort { display: none; }
@media (max-width: 767px) {
  .radar-bar { gap: 10px; }
  .radar-bar .chips { flex: 0 0 calc(100% + var(--gutter) * 2); }
  .radar-filter { flex: 1 1 0; min-width: 0; }
  .radar-panel { background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .radar-panel::before { display: none; }
  .radar-panel .sec-head { padding: 0 2px 2px; min-height: 0; }
  .radar-panel .radar-cards { padding: 8px 0 0; }
  .radar-sort { display: block; flex: 0 1 auto; max-width: 46%; }
  .radar-sort .select { height: 36px; min-height: 36px; font-size: .86rem; padding-top: 6px; padding-bottom: 6px; }
}
@media (min-width: 1100px) { .radar-table-wrap { overflow: visible; } .radar-table th { top: var(--top-h); } }
@media (max-width: 1399px) { .sig-mini-text { display: none; } }
@media (max-width: 1279px) { .radar-table .col-vol { display: none; } }
@media (max-width: 1099px) { .radar-table .spark { width: 88px; } }
.radar-table thead th:first-child { border-top-left-radius: 0; }
.radar-table { font-size: .9rem; }
.radar-table th { background: rgba(18, 24, 21, .97); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); padding-top: 12px; padding-bottom: 12px; }
.radar-table th, .radar-table td { padding-left: 10px; padding-right: 10px; }
.radar-table th:first-child, .radar-table td:first-child { padding-left: 18px; }
.radar-table th:last-child, .radar-table td:last-child { padding-right: 18px; }
.radar-table th .sort-ic { width: 12px; height: 12px; opacity: 0; transition: opacity var(--t-fast); }
.radar-table th[aria-sort] .sort-ic { opacity: 1; color: var(--green); }
.radar-table th button:hover .sort-ic { opacity: .6; }
.radar-table th.num button { flex-direction: row-reverse; }
.radar-table td { padding-top: 10px; padding-bottom: 10px; }
.radar-table .tok-link { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.radar-table .tok-link:hover .tok-sym { color: var(--green); }
.radar-table .tok-name { max-width: 15ch; }
.radar-table td.spark-cell { width: 100px; padding-top: 6px; padding-bottom: 6px; }
.radar-table tr.is-flash td { animation: row-flash 1.2s var(--ease) both; }
@keyframes row-flash { from { background: rgba(87, 201, 128, .08); } to { background: transparent; } }
.radar-table .muted-num { color: var(--faint); }
.sig-cell { width: 1%; }
.sig-cell .pill { font-size: .66rem; }
@media (max-width: 1499px) { .radar-table .col-depth { display: none; } }
.sig-mini { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; color: var(--muted); white-space: nowrap; }
.sig-mini .dot { width: 7px; height: 7px; }
.sig-mini .faint { font-family: var(--font-mono); font-size: .72rem; }
.radar-count { font-size: .8rem; color: var(--faint); }
/* phone cards */
.radar-cards { display: grid; gap: 10px; }
.rcard {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 14px;
  border-radius: 14px; border: 1px solid var(--line); background: var(--panel);
  transition: border-color var(--t-fast);
}
.rcard:active { border-color: var(--line-3); }
.rcard-price { text-align: right; display: grid; gap: 2px; justify-items: end; }
.rcard-price .mono { font-size: .98rem; }
.rcard-mid { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.rcard-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .76rem; color: var(--muted); }
.rcard-facts b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.rcard .spark { width: 110px; }

/* =================================================================== token */
.tk-back { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--muted); width: max-content; }
.tk-back:hover { color: var(--green); }
.tk-back svg { width: 16px; height: 16px; }
.tk-hero { display: grid; gap: 18px; padding: 22px 24px; }
.tk-id { display: flex; align-items: center; gap: 16px; min-width: 0; }
.tk-id .tok-logo { box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 8px 26px -8px rgba(0, 0, 0, .8); }
.tk-names { display: grid; gap: 2px; min-width: 0; }
.tk-names h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tk-price-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 18px; }
.tk-price { font-family: var(--font-label); font-weight: 700; font-size: clamp(2.2rem, 4.6vw, 3.3rem); line-height: .95; letter-spacing: .005em; }
.tk-change { display: flex; align-items: center; gap: 8px; padding-bottom: 5px; }
.tk-change .pill { height: 28px; font-size: .86rem; padding: 0 11px; }
.tk-ah { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; font-size: .92rem; color: var(--muted); }
.tk-ah .dot { width: 7px; height: 7px; }
.tk-ah strong { color: var(--text); font-weight: 600; }
.tk-ah .chg { font-size: .92rem; font-weight: 600; }
.tk-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.tk-stat { display: grid; gap: 4px; min-width: 0; }
.tk-stat .label { font-size: .64rem; }
.tk-stat b { font-family: var(--font-mono); font-weight: 500; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-stat-sub { display: block; margin-top: 2px; font-family: var(--font); font-size: .74rem; font-weight: 400; color: var(--faint); }
@media (max-width: 767px) { .tk-hero { padding: 18px 16px; } .tk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tk-chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 16px 18px 4px; }
.tk-chart { padding: 6px 8px 10px 10px; }
.tk-chart-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 0 18px 16px; font-size: .78rem; color: var(--faint); }
.gauge { position: relative; height: 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(255, 90, 82, .25), rgba(255, 255, 255, .06) 45%, rgba(255, 255, 255, .06) 55%, rgba(87, 201, 128, .25)); }
.gauge::before { content: ''; position: absolute; left: 50%; top: -4px; bottom: -4px; width: 1px; background: rgba(238, 228, 207, .45); }
.gauge-pin { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--surface), 0 0 14px rgba(233, 239, 233, .4); transition: left var(--t) var(--ease); }
.gauge-axis { display: flex; justify-content: space-between; margin-top: 7px; font-family: var(--font-mono); font-size: .68rem; color: var(--faint); }
.ref-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ref-box { display: grid; gap: 5px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); min-width: 0; }
.ref-box .label { font-size: .62rem; }
.ref-box b { font-family: var(--font-mono); font-size: 1.05rem; font-weight: 600; }
.ref-box span { font-size: .76rem; color: var(--muted); }
.ref-verdict { font-size: .88rem; color: var(--muted); }
.ref-verdict strong { color: var(--text); font-weight: 600; }
.flow-split { display: grid; gap: 8px; }
.flow-split-head { display: flex; justify-content: space-between; font-size: .8rem; color: var(--muted); }
.flow-split-head b { font-family: var(--font-mono); font-weight: 500; color: var(--text); }
.meter-lg { height: 8px; }
.swap-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; }
.swap-row + .swap-row { box-shadow: 0 -1px 0 var(--line); }
.swap-row .num { font-family: var(--font-mono); font-size: .84rem; text-align: right; }
.swap-row .t { font-family: var(--font-mono); font-size: .72rem; color: var(--faint); text-align: right; min-width: 56px; }
.swap-row .tx { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--faint); }
.swap-row .tx:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.swap-side { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 22px; border-radius: 999px; font-family: var(--font-label); font-weight: 700; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; }
.swap-side.buy { background: var(--up-bg); color: var(--up); }
.swap-side.sell { background: var(--down-bg); color: var(--down); }
.news-item { display: grid; gap: 4px; padding: 12px 10px; border-radius: 10px; transition: background-color var(--t-fast); }
.news-item + .news-item { box-shadow: 0 -1px 0 var(--line); }
.news-item:hover { background: rgba(160, 255, 200, .035); }
.news-item:hover .news-title { color: var(--green-2); }
.news-title { font-weight: 500; line-height: 1.4; transition: color var(--t-fast); }
.news-meta { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--faint); }
.news-meta svg { width: 13px; height: 13px; }
.tk-sigs { display: grid; gap: 12px; }
@media (max-width: 1099px) {
  .tk-split > .stack-18 { display: contents; }
  .tk-o1 { order: 1; } .tk-o2 { order: 2; } .tk-o3 { order: 3; } .tk-o4 { order: 4; }
  .tk-o5 { order: 5; } .tk-o6 { order: 6; } .tk-o7 { order: 7; } .tk-o8 { order: 8; }
}
.call-slot:empty { display: none; }
.tk-missing { display: grid; justify-items: center; gap: 12px; padding: 48px 20px; text-align: center; }
.tk-missing img { width: 88px; height: 88px; }
.tk-missing h2 { font-size: 1.5rem; }
.tk-missing p { color: var(--muted); max-width: 46ch; }
.tk-suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 6px; }
.tk-suggest a { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line-2); font-weight: 600; font-size: .88rem; }
.tk-suggest a:hover { border-color: rgba(87, 201, 128, .5); }

/* ============================================================= night watch */
.nw-city { position: relative; height: clamp(360px, 58vh, 620px); overflow: hidden; padding: 0; background: #070908; }
.nw-city-stage { position: absolute; inset: 0; }
.nw-city-stage canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.nw-city::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(120% 90% at 50% 50%, transparent 60%, rgba(4, 6, 5, .55) 100%); }
.nw-city-overlay { position: absolute; left: 18px; top: 16px; z-index: 2; pointer-events: none; }
.nw-city-hint { position: absolute; left: 18px; right: 18px; bottom: 14px; z-index: 2; pointer-events: none; font-size: .78rem; color: rgba(233, 239, 233, .62); text-shadow: 0 1px 8px rgba(0, 0, 0, .9); }
.nw-city-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: var(--muted); }
.nw-kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .nw-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.nw-feed { max-height: 470px; overflow: auto; overscroll-behavior: contain; }
.swap-row-tok { grid-template-columns: minmax(0, 1fr) auto auto auto auto; }
.whale-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 24px; }
@media (min-width: 1100px) { .whale-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .whale-grid .swap-row:nth-child(2) { box-shadow: none; } }
.swap-row.is-new { animation: swap-in .6s var(--ease-out) both; }
@keyframes swap-in { from { opacity: 0; transform: translateY(-6px); background: rgba(87, 201, 128, .1); } to { opacity: 1; transform: none; background: transparent; } }

/* ==================================================================== scan */
.scan-grid { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .scan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1500px) { .scan-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.scan-bar { display: grid; gap: 12px; }
.scan-bar-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.scan-note { font-size: .8rem; color: var(--faint); }

/* toasts sit above the phone tab bar */
@media (max-width: 767px) { .page-app .toasts { bottom: calc(var(--tab-h) + 12px + env(safe-area-inset-bottom)); } }
