/* Hadal: deep-water trading terminal. Near-black navy, thin cool borders, signal colours only where they mean something. */
:root {
  --bg0: #05070d;
  --bg1: #0a0e1b;
  --bg2: #0f1526;
  --panel: rgba(12, 17, 30, 0.86);
  --panel-solid: #0e1322;
  --raise: rgba(255, 255, 255, 0.035);
  --line: rgba(132, 152, 200, 0.14);
  --line-strong: rgba(132, 152, 200, 0.28);
  --text: #e9eef8;
  --mute: #8d9ab8;
  --dim: #5f6b88;
  --accent: #6c8cff;
  --accent-2: #4cc9f0;
  /* status: one green, one gold, one rose, used everywhere */
  --green: #3ecf8e;
  --amber: #e8b04b;
  --red: #ef4e6a;
  /* wallet categories, same values as the map */
  --c-pool: #4cc9f0;
  --c-holder: #6c8cff;
  --c-labeled: #9aa6c4;
  --c-dev: #e8b04b;
  --c-bundle: #ef5a84;
  --c-sniper: #f2895a;
  --c-insider: #a58bff;
  --bar-h: 60px;
  --panel-w: 360px;
  --left-w: 300px;
  --dock-h: 270px;
  --display: 'Unbounded', 'Figtree', system-ui, sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  margin: 0;
  color: var(--text);
  font: 15px/1.5 var(--body);
  font-variant-numeric: tabular-nums;
  background:
    radial-gradient(900px 600px at 50% 30%, rgba(44, 72, 170, 0.28) 0%, rgba(20, 32, 80, 0.12) 45%, rgba(5, 7, 13, 0) 100%),
    linear-gradient(180deg, #080c17 0%, var(--bg0) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }
::selection { background: rgba(93, 139, 255, 0.35); }

/* ---------- top bar */
.bar {
  position: fixed; inset: 0 0 auto 0; height: var(--bar-h); z-index: 30;
  display: grid; grid-template-columns: auto minmax(240px, 440px) minmax(0, 1fr) auto; align-items: center; gap: 16px;
  padding: 0 18px;
  background: rgba(6, 9, 17, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--text); font: 700 19px/1 var(--display); letter-spacing: -0.02em; }
.search { width: 100%; display: flex; gap: 6px; padding: 4px 4px 4px 6px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); transition: border-color 0.2s, box-shadow 0.2s; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93, 139, 255, 0.18); }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 0 10px; font-size: 14.5px; color: var(--text); }
.search input::placeholder { color: var(--dim); }
.btn-scan {
  border: 0; border-radius: 9px; padding: 8px 20px; font-weight: 700; color: #fff;
  background: linear-gradient(180deg, #6d97ff, #4f7cf0);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 4px 14px rgba(79, 124, 240, 0.3); transition: transform 0.12s, box-shadow 0.2s, filter 0.2s;
}
.btn-scan:hover { filter: brightness(1.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 20px rgba(79, 124, 240, 0.45); }
.btn-scan:active { transform: translateY(1px); }
.btn-scan:disabled { opacity: 0.6; cursor: progress; }
.bar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn, .text-btn { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px; border-radius: 9px; background: var(--bg2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; }
.icon-btn { width: 36px; padding: 0; justify-content: center; }
.icon-btn:hover, .text-btn:hover { border-color: var(--line-strong); background: #141b2f; }
.icon-btn .mute { display: none; }
.icon-btn[aria-pressed='false'] .wave { display: none; }
.icon-btn[aria-pressed='false'] .mute { display: inline; }
.icon-btn[aria-pressed='false'] { color: var(--mute); }

/* ---------- stage */
.stage { position: relative; height: 100vh; min-height: 640px; padding-top: var(--bar-h); overflow: hidden; scroll-snap-align: start; --dock: 0px; }
#map { position: absolute; inset: var(--bar-h) 0 0 0; width: 100%; height: calc(100% - var(--bar-h)); display: block; touch-action: none; cursor: grab; }
#map.grabbing { cursor: grabbing; }

.intro { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(760px, 92vw); text-align: center; pointer-events: none; }
.intro > * { pointer-events: auto; }
.intro h1 { font: 700 clamp(30px, 4.4vw, 52px) / 1.06 var(--display); letter-spacing: -0.035em; text-wrap: balance; text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8); }
.intro p { margin: 18px auto 0; max-width: 56ch; font-size: 16.5px; color: #b9c4dd; text-shadow: 0 2px 20px rgba(0, 0, 0, 0.9); }
.chips { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; }
.chips + .chips { margin-top: 10px; }
.chips-t { color: var(--mute); font-size: 13px; margin-right: 4px; }
.chips button { display: inline-flex; gap: 8px; align-items: baseline; padding: 7px 13px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(8px); transition: border-color 0.15s, transform 0.15s, background 0.15s; }
.chips button:hover { border-color: var(--line-strong); background: #141b2f; transform: translateY(-2px); }
.chips button span { color: var(--mute); font-size: 13px; }

.loading { position: absolute; left: 50%; bottom: 40px; transform: translateX(-50%); padding: 18px 22px; border-radius: 14px; background: rgba(10, 14, 26, 0.9); border: 1px solid var(--line); backdrop-filter: blur(14px); width: 320px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55); animation: rise 0.3s both; }
.loading ul { max-height: 230px; overflow: hidden; }
.ld-top { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.loading-title { font: 600 16px var(--display); letter-spacing: -0.02em; }
.ld-time { color: var(--mute); font-size: 13px; font-variant-numeric: tabular-nums; }
.ld-bar { position: relative; height: 3px; margin: 12px 0 14px; border-radius: 3px; background: rgba(132, 152, 200, 0.14); overflow: hidden; }
.ld-bar i { position: absolute; inset: 0 auto 0 0; width: 4%; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 0.35s ease; }
.ld-bar::after { content: ''; position: absolute; inset: 0; width: 30%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent); animation: scanline 1.2s linear infinite; }
.loading ul { list-style: none; margin: 0; padding: 0; text-align: left; display: grid; gap: 5px; }
.loading li { display: flex; align-items: center; gap: 10px; color: var(--mute); font-size: 14px; }
.loading li { animation: rise 0.25s both; }
.loading li::before { content: ''; width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; flex: none; }
.loading li.ok { color: var(--text); }
.loading li.ok::before { animation: pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.4); border: 0; width: 11px; height: 11px; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 6.2l2 2 4-4.4' fill='none' stroke='%2306080f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; }
.loading li.fail::before { animation: none; border-color: var(--red); background: none; }
.loading li.fail { text-decoration: line-through; }
@keyframes spin { to { transform: rotate(360deg); } }

/* overlays on the map */
.tokencard, .legend, .panel, .mapctl, .tip { background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.leftcol { overflow-x: hidden; position: absolute; z-index: 5; left: 16px; top: calc(var(--bar-h) + 16px); bottom: 16px; width: var(--left-w); display: flex; flex-direction: column; gap: 10px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.22) transparent; overscroll-behavior: contain; animation: rise 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.leftcol::-webkit-scrollbar { width: 5px; }
.leftcol::-webkit-scrollbar-thumb { background: rgba(132, 152, 200, 0.22); border-radius: 3px; }
.tokencard { padding: 11px 12px; border-radius: 14px; flex: none; }
.tk-head { display: flex; align-items: center; gap: 10px; }
.tk-id { min-width: 0; flex: 1; }
.tk-btns { display: flex; gap: 2px; align-self: flex-start; }
.tk-btn { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 7px; border: 0; background: none; color: var(--mute); }
.tk-btn:hover { background: var(--raise); color: var(--text); }
.tk-icon { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px var(--line-strong); background: var(--bg2); }
.tk-icon.ph { display: grid; place-items: center; background: #1a2340; font: 700 18px var(--display); }
.tk-sym { font: 700 15.5px/1.2 var(--display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.tk-name { color: var(--mute); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tk-nums { display: grid; grid-template-columns: 1.3fr 1fr 0.8fr; gap: 8px; margin-top: 9px; }
.tk-nums .k { display: block; color: var(--mute); font-size: 12px; }
.tk-nums .v { font-weight: 700; font-size: 15.5px; }
.up { color: var(--green); } .down { color: var(--red); }
.tk-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 8px; background: var(--raise); border: 1px solid var(--line); color: var(--text); font-size: 13px; font-weight: 600; text-decoration: none; }
.pill:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); }

.legend { position: absolute; z-index: 4; top: calc(var(--bar-h) + 14px); left: calc(var(--left-w) + 32px + (100% - var(--left-w) - var(--panel-w) - 64px) / 2); transform: translateX(-50%); max-width: calc(100% - var(--left-w) - var(--panel-w) - 80px); padding: 4px; border-radius: 11px; display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.legend button { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px; background: none; border: 1px solid transparent; font-size: 12.5px; color: #c7d0e6; white-space: nowrap; }
.legend button:hover, .legend button:focus-visible { border-color: var(--line); background: var(--raise); }
.legend i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.legend b { color: var(--mute); font-weight: 600; }
.lg-note { flex-basis: 100%; color: var(--mute); font-size: 12px; padding: 4px 9px 0; }

.mapctl { position: absolute; z-index: 4; right: calc(var(--panel-w) + 32px); bottom: calc(var(--dock) + 16px); display: grid; border-radius: 10px; overflow: hidden; }
.mapctl button { width: 38px; height: 36px; display: grid; place-items: center; background: none; border: 0; border-bottom: 1px solid var(--line); font-size: 19px; font-weight: 600; color: #c7d0e6; }
.mapctl button:last-child { border-bottom: 0; }
.mapctl button:hover { background: var(--raise); color: var(--text); }
.mapctl button[aria-pressed='false'] { color: var(--dim); }

.jump { position: absolute; z-index: 4; left: calc(var(--left-w) + 32px + (100% - var(--left-w) - var(--panel-w) - 64px) / 2); bottom: calc(var(--dock) + 18px); transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--panel); backdrop-filter: blur(12px); font-weight: 700; animation: bobble 2.4s ease-in-out infinite; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
.jump.v-buy { border-color: var(--green); color: var(--green); }
.jump.v-maybe { border-color: var(--amber); color: var(--amber); }
.jump.v-avoid { border-color: var(--red); color: var(--red); }
@keyframes bobble { 50% { transform: translate(-50%, 5px); } }
.hint { position: absolute; z-index: 3; left: calc(var(--left-w) + 32px + (100% - var(--left-w) - var(--panel-w) - 64px) / 2); top: calc(var(--bar-h) + 58px); transform: translateX(-50%); padding: 5px 14px; border-radius: 8px; background: rgba(6, 9, 17, 0.6); border: 1px solid var(--line); color: var(--mute); font-size: 12.5px; pointer-events: none; white-space: nowrap; animation: hintout 0.6s 7s forwards; }
@keyframes hintout { to { opacity: 0; visibility: hidden; } }

.panel { position: absolute; right: 16px; top: calc(var(--bar-h) + 16px); bottom: 16px; width: var(--panel-w); border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; animation: rise 0.5s 0.08s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); }
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } }
.panel-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--line); }
.ps { padding: 11px 9px 10px; border-right: 1px solid var(--line); min-width: 0; }
.ps span { white-space: nowrap; font-size: 11.5px; }
.ps:last-child { border-right: 0; }
.ps span, .tile span { display: flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12px; line-height: 1.25; }
.ps span::before, .tile span::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: rgba(141, 154, 184, 0.35); flex: none; }
.ps.good span::before, .tile.good span::before { background: var(--green); }
.ps.warn span::before, .tile.warn span::before { background: var(--amber); }
.ps.bad span::before, .tile.bad span::before { background: var(--red); }
.tile.chg span::before { display: none; }
.ps b { font-size: 16.5px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.tile.chg.good b { color: var(--green); }
.tile.chg.bad b { color: var(--red); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 6px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; padding: 11px 4px 10px; border: 0; background: none; color: var(--mute); font-weight: 600; font-size: 13.5px; white-space: nowrap; transition: color 0.15s; }
.tabs button i { font-style: normal; font-weight: 500; font-size: 12px; color: var(--dim); margin-left: 2px; }
.tabs button:hover { color: var(--text); }
.tabs button::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); transform: scaleX(0); transition: transform 0.2s; }
.tabs button[aria-selected='true'] { color: #fff; }
.tabs button[aria-selected='true']::after { transform: scaleX(1); }
.panel-body { flex: 1; overflow-y: auto; padding: 6px; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.3) transparent; overscroll-behavior: contain; }
.panel-body h3 { font: 600 12.5px var(--body); color: var(--mute); padding: 12px 8px 6px; letter-spacing: 0.01em; }
.p-lead { padding: 8px 8px 10px; font-size: 14.5px; line-height: 1.45; color: #d6deef; }
.p-note { padding: 10px 8px; color: var(--mute); font-size: 13px; }
.mini { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 6px; padding: 0 4px 10px; }
.mini div { padding: 8px 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); }
.mini span { display: block; color: var(--mute); font-size: 12px; }
.row { width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 0; border-radius: 10px; background: none; text-align: left; }
button.row:hover { background: var(--raise); }
.row.active { background: rgba(93, 139, 255, 0.14); box-shadow: inset 0 0 0 1px var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; }
.r-addr { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; font-weight: 600; font-size: 14px; }
.r-sub { color: var(--mute); font-size: 12.5px; }
.r-val { font-weight: 700; text-align: right; font-size: 14px; }
.r-val.st-warn { color: var(--c-dev); font-weight: 600; } .r-val.st-mid { color: var(--text); } .r-val.st-out { color: var(--mute); font-weight: 600; font-size: 12.5px; max-width: 96px; }
.chip { --cc: var(--mute); padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 600; line-height: 18px; color: color-mix(in srgb, var(--cc) 80%, #fff); background: color-mix(in srgb, var(--cc) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--cc) 30%, transparent); }
.c-dev { --cc: var(--c-dev); } .c-bundle { --cc: var(--c-bundle); } .c-sniper { --cc: var(--c-sniper); } .c-insider { --cc: var(--c-insider); }
.c-pool { --cc: var(--c-pool); } .c-labeled { --cc: var(--c-labeled); } .c-fresh { --cc: var(--mute); }
.cluster { border-radius: 10px; margin: 0 0 4px; background: var(--raise); border: 1px solid var(--line); }
.cluster summary { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 9px 12px; cursor: pointer; font-weight: 700; font-size: 14px; list-style: none; }
.cluster summary::-webkit-details-marker { display: none; }
.cluster summary em { font-style: normal; color: var(--mute); font-weight: 500; font-size: 13px; }
.cluster[open] summary { border-bottom: 1px solid var(--line); }
.selcard { margin: 0 0 8px; padding: 12px; border-radius: 12px; background: rgba(93, 139, 255, 0.1); box-shadow: inset 0 0 0 1px var(--accent); }
.sel-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.sel-top b { font: 600 15px var(--display); letter-spacing: -0.02em; }
.sel-top .x { width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, 0.08); font-size: 17px; line-height: 1; }
.sel-actions { display: flex; gap: 6px; margin-top: 10px; }
.selcard p, .tip p { font-size: 13.5px; line-height: 1.4; margin-top: 5px; color: #d6deef; }
.dim { color: var(--mute) !important; }
.tf-cat { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; }
.tf-cat i { width: 8px; height: 8px; border-radius: 50%; }

.tip { position: absolute; left: 0; top: 0; z-index: 20; width: 268px; padding: 12px 14px; border-radius: 12px; pointer-events: none; box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6); background: rgba(12, 17, 30, 0.95); }
.tip-h { font: 600 15px var(--display); letter-spacing: -0.02em; margin-bottom: 4px; }
.tip-f { margin-top: 8px; color: var(--dim); font-size: 12px; }

/* ---------- report */
.report { max-width: 1160px; margin: 0 auto; padding: calc(var(--bar-h) + 28px) 24px 56px; display: grid; gap: 22px; scroll-snap-align: start; min-height: 100vh; align-content: start; }
.page-head { display: flex; align-items: center; gap: 14px; }
.page-head h1 { font: 700 26px/1.1 var(--display); letter-spacing: -0.03em; }
.page-no { padding: 3px 9px; border-radius: 6px; border: 1px solid var(--line); color: var(--mute); font-size: 12.5px; font-weight: 600; }
.report h2 { font: 700 22px/1.15 var(--display); letter-spacing: -0.03em; }
.verdict { position: relative; display: grid; grid-template-columns: var(--verdict-l, 340px) minmax(0, 1fr); gap: 22px; align-items: start; --tone: var(--amber); }
.verdict.v-buy { --tone: var(--green); } .verdict.v-avoid { --tone: var(--red); }
.score-card, .why, .block { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; backdrop-filter: blur(12px); }
.score-card { padding: 24px; text-align: center; border-color: color-mix(in srgb, var(--tone) 40%, var(--line)); box-shadow: 0 0 60px -32px var(--tone); }
.verdict:not(.pending) .score-card { animation: land 0.9s ease-out; }
@keyframes land { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--tone) 55%, transparent); } 100% { box-shadow: 0 0 0 18px transparent, 0 0 60px -32px var(--tone); } }
.ring { position: relative; width: 206px; margin: 0 auto; }
.ring svg { display: block; width: 100%; }
.ring-bg { fill: none; stroke: rgba(132, 152, 200, 0.14); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--tone); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(0.2, 0.8, 0.2, 1); filter: drop-shadow(0 0 8px color-mix(in srgb, var(--tone) 70%, transparent)); }
.ring-num { position: absolute; inset: 0; display: grid; place-content: center; }
.ring-num b { font: 700 66px/1 var(--display); letter-spacing: -0.05em; color: var(--tone); }
.ring-num span { color: var(--mute); font-size: 13px; margin-top: 4px; }
.v-word { margin-top: 14px; font: 700 26px/1.1 var(--display); letter-spacing: -0.03em; color: var(--tone); }
.v-sub { margin-top: 6px; color: var(--mute); font-size: 14px; }
.verdict.pending .v-sub::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 8px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; vertical-align: -1px; }
.bars { margin-top: 18px; display: grid; gap: 8px; text-align: left; }
.bar-row { display: grid; grid-template-columns: 82px 1fr 46px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row span { color: var(--mute); }
.bar-row b { text-align: right; font-weight: 600; }
.track { height: 6px; border-radius: 99px; background: rgba(132, 152, 200, 0.14); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #4f7cf0, #38c6ff); }
.why { padding: 26px 28px; }
.reason { margin-top: 12px; font-size: 19px; line-height: 1.4; max-width: 62ch; text-wrap: pretty; color: #e3e9f6; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 22px; }
.col h3 { font: 600 14.5px var(--display); letter-spacing: -0.02em; margin-bottom: 8px; }
.col.yes h3 { color: var(--green); } .col.no h3 { color: var(--red); }
.col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.col li { position: relative; padding-left: 20px; line-height: 1.4; color: #d6deef; }
.col li::before { content: ''; position: absolute; left: 0; top: 7px; width: 8px; height: 8px; border-radius: 50%; }
.col.yes li::before { background: var(--green); box-shadow: 0 0 8px var(--green); }
.col.no li::before { background: var(--red); box-shadow: 0 0 8px var(--red); }
.col li.none { color: var(--mute); padding-left: 0; }
.col li.none::before { display: none; }
.watch { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: #c7d0e6; max-width: 70ch; }

.block { padding: 26px 28px; }
.callout { margin-top: 16px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px; border-radius: 12px; background: var(--raise); border: 1px dashed var(--line-strong); }
.callout p { max-width: 60ch; color: #d6deef; }
.callout.bad { border-color: var(--red); }
.shimmer { margin-top: 18px; display: grid; gap: 10px; }
.shimmer i { height: 14px; border-radius: 7px; background: linear-gradient(90deg, rgba(132, 152, 200, 0.12) 25%, rgba(93, 139, 255, 0.4) 50%, rgba(132, 152, 200, 0.12) 75%); background-size: 200% 100%; animation: sheen 1.2s linear infinite; }
.shimmer i:nth-child(2) { width: 86%; } .shimmer i:nth-child(3) { width: 58%; }
@keyframes sheen { to { background-position: -200% 0; } }
.n-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.nchip { --cc: var(--mute); padding: 4px 11px; border-radius: 7px; font-weight: 600; font-size: 12.5px; color: #d6deef; background: var(--raise); border: 1px solid var(--line); }
.nchip.good, .nchip.warn, .nchip.bad { color: color-mix(in srgb, var(--cc) 85%, #fff); background: color-mix(in srgb, var(--cc) 11%, transparent); border-color: color-mix(in srgb, var(--cc) 35%, transparent); }
.nchip.good { --cc: var(--green); } .nchip.warn { --cc: var(--amber); } .nchip.bad { --cc: var(--red); }
.n-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.prov { padding: 4px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--mute); border: 1px solid var(--line); }
.prov.x { color: #dfe6ff; border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.banner { margin-top: 14px; padding: 11px 14px; border-radius: 10px; font-size: 14px; color: #f1e2c2; background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 35%, transparent); }
.n-top { margin-top: 18px; display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: start; }
.n-score { --cc: var(--amber); padding: 16px; border-radius: 14px; background: var(--raise); border: 1px solid var(--line); }
.n-score.good { --cc: var(--green); } .n-score.bad { --cc: var(--red); }
.n-score b { display: block; font: 700 46px/1 var(--display); letter-spacing: -0.04em; color: var(--cc); }
.n-score span { display: block; margin-top: 6px; color: var(--mute); font-size: 12.5px; }
.n-score .track { margin-top: 10px; }
.n-score .track i { background: var(--cc); transition: width 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.n-subject { font: 600 14px var(--display); letter-spacing: -0.01em; color: var(--accent-2); }
.n-top .n-text { margin-top: 6px; }
.n-top .n-chips { margin-top: 12px; }
.n-text { margin-top: 16px; font-size: 17px; line-height: 1.5; max-width: 72ch; text-wrap: pretty; color: #e3e9f6; }
.n-meta { margin-top: 12px; color: var(--mute); font-size: 13px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent-2); text-decoration: underline; }
.n-facts { margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.fact, .tweet { display: block; padding: 14px 16px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.tweet:hover { border-color: var(--line-strong); }
.fact b { display: block; margin-bottom: 4px; }
.fact p, .tweet p { color: #c7d0e6; overflow-wrap: anywhere; }
.tw-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; margin-bottom: 6px; }
.tw-h span, .tw-f { color: var(--mute); font-size: 13px; }
.tw-f { margin-top: 8px; }
.xstats { margin-top: 16px; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.xstat { padding: 12px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); }
.xstat span { display: block; color: var(--mute); font-size: 12.5px; }
.xstat b { font-size: 17px; overflow-wrap: anywhere; }
.xposts { margin-top: 12px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.xpost { display: grid; gap: 2px; padding: 11px 13px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); color: var(--text); text-decoration: none; font-size: 13.5px; }
.xpost b { color: #c9d4ff; }
.xpost span { color: #c7d0e6; }
a.xpost:hover { border-color: var(--line-strong); }

/* live X scan console */
.xscan { position: relative; overflow: hidden; }
.xscan.live { border-color: color-mix(in srgb, var(--accent) 45%, transparent); box-shadow: 0 0 50px -26px var(--accent); }
.xscan.live::before { content: ''; position: absolute; left: 0; top: 0; height: 2px; width: 40%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: scanline 1.6s ease-in-out infinite; }
@keyframes scanline { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.xscan.live .xs-log::after { content: ''; width: 7px; height: 13px; margin-left: 54px; background: var(--accent); animation: pulse 0.9s steps(2) infinite; }
.xscan.done { border-color: color-mix(in srgb, var(--green) 40%, var(--line)); }
.xscan.failed { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); }
.xs-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.xs-state { font-size: 13px; color: var(--mute); display: inline-flex; align-items: center; gap: 8px; }
.xscan.live .xs-state { color: #c9d4ff; }
.xscan.live .xs-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: pulse 1s ease-in-out infinite; }
.xscan.done .xs-state { color: var(--green); }
.xscan.failed .xs-state { color: var(--red); }
@keyframes pulse { 50% { opacity: 0.35; } }
.xs-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--xs-r, 340px); gap: 14px; margin-top: 16px; }
.xs-log { list-style: none; margin: 0; padding: 10px 12px; border-radius: 12px; background: #070a13; border: 1px solid var(--line); min-height: 150px; max-height: 260px; overflow-y: auto; font-family: ui-monospace, 'Cascadia Mono', 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; display: grid; align-content: start; gap: 5px; scrollbar-width: thin; }
.xs-log li { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: baseline; color: #c7d0e6; animation: rise 0.25s both; }
.xs-t { color: var(--dim); }
.xs-search .xs-msg::before, .xs-thread .xs-msg::before, .xs-user .xs-msg::before, .xs-web .xs-msg::before { content: '›'; color: var(--accent); margin-right: 6px; }
.xs-start .xs-msg, .xs-fallback .xs-msg, .xs-think .xs-msg { color: var(--mute); }
.xs-write .xs-msg { color: #c9d4ff; }
.xs-done .xs-msg { color: var(--green); }
.xs-fail .xs-msg { color: var(--red); }
.xs-sub { color: var(--mute); font-size: 12.5px; margin-bottom: 8px; }
.xs-sources { display: flex; flex-wrap: wrap; gap: 6px; max-height: 220px; overflow-y: auto; scrollbar-width: thin; }
.xs-src { padding: 4px 9px; border-radius: 7px; background: var(--raise); border: 1px solid var(--line); color: #d6deef; font-size: 12.5px; font-weight: 600; text-decoration: none; animation: pop 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4) both; }
.xs-src:hover { border-color: var(--accent); color: #fff; }
@keyframes pop { from { opacity: 0; transform: scale(0.6); } }
.xs-src.web { color: var(--mute); font-weight: 500; }
.xs-none { color: var(--mute); font-size: 13px; }
.xs-text { margin-top: 14px; white-space: pre-wrap; color: #d6deef; font-size: 14.5px; line-height: 1.5; max-width: 80ch; min-height: 1.5em; }
.xs-text.typing::after { content: ''; display: inline-block; width: 8px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--accent-2); animation: pulse 0.8s steps(2) infinite; }

.chart { margin-top: 16px; padding: 14px 16px 6px; border-radius: 12px; background: #070a13; border: 1px solid var(--line); }
.chart-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.chart-h b { font: 700 19px var(--display); letter-spacing: -0.03em; }
.chart-h span { color: var(--mute); font-size: 13px; }
.spark { display: block; width: 100%; height: 130px; margin-top: 6px; }
.group { margin-top: 24px; }
.group h3 { font: 600 15px var(--display); letter-spacing: -0.02em; margin-bottom: 10px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 8px; }
.tile { padding: 12px 14px; border-radius: 12px; background: var(--raise); border: 1px solid var(--line); transition: border-color 0.15s, background 0.15s; }
.tile:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.05); }
.tile b { display: block; margin-top: 2px; font-size: 17.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; letter-spacing: -0.01em; }
.tile em { display: block; font-style: normal; color: var(--mute); font-size: 12.5px; line-height: 1.3; margin-top: 2px; }
.fineprint { color: var(--dim); font-size: 13px; max-width: 90ch; }

/* ---------- settings */
dialog { width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--panel-solid); color: var(--text); box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8); }
dialog::backdrop { background: rgba(3, 5, 10, 0.7); backdrop-filter: blur(4px); }
dialog[open] { animation: rise 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
dialog form { padding: 24px; display: grid; gap: 8px; }
dialog h2 { font: 700 21px var(--display); letter-spacing: -0.03em; margin-bottom: 4px; }
dialog label { font-weight: 600; font-size: 14px; margin-top: 8px; }
dialog input[type='password'], dialog input[type='text'], dialog select { width: 100%; padding: 10px 13px; border-radius: 9px; border: 1px solid var(--line); background: #070a13; color: var(--text); }
dialog input:focus, dialog select:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(93, 139, 255, 0.18); }
.set-group { padding: 14px 16px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); display: grid; gap: 6px; margin-top: 6px; }
.set-group.active { border-color: var(--accent); }
.set-head { display: flex; justify-content: space-between; align-items: center; }
.set-name { font: 600 14px var(--display); letter-spacing: -0.02em; }
.set-badge:not(:empty) { padding: 2px 9px; border-radius: 6px; background: rgba(34, 211, 138, 0.14); color: var(--green); font-size: 12px; font-weight: 700; }
.key-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.key-test { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.ghost-btn.sm { padding: 5px 12px; font-size: 13px; border-radius: 8px; }
.ghost-btn:disabled { opacity: 0.5; cursor: progress; }
.key-test-out { font-size: 13px; color: var(--mute); }
.key-test-out.good { color: var(--green); } .key-test-out.bad { color: var(--red); }
.ghost-btn { padding: 9px 16px; border-radius: 9px; background: none; border: 1px solid var(--line-strong); font-weight: 700; }
.ghost-btn:hover { border-color: var(--text); }
.help { color: var(--mute); font-size: 13px; }
label.check { display: flex; align-items: center; gap: 10px; font-weight: 500; }
label.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.set-status { min-height: 22px; font-size: 14px; color: var(--mute); margin-top: 6px; }
.set-status.good { color: var(--green); } .set-status.bad { color: var(--red); }
.set-actions { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; margin: 6px -24px -24px; padding: 14px 24px 18px; background: linear-gradient(transparent, var(--panel-solid) 30%); }
dialog { overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(132, 152, 200, 0.3) transparent; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; padding: 11px 18px; border-radius: 10px; background: var(--panel-solid); border: 1px solid var(--accent); font-weight: 600; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7); animation: rise 0.25s both; max-width: calc(100vw - 32px); }
.toast.bad { border-color: var(--red); }

/* ---------- small screens */
@media (max-width: 899px) {
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 0 12px; }
  .btn-scan { padding: 8px 14px; }
  .brand span, .text-btn { font-size: 0; gap: 0; }
  .text-btn { width: 36px; padding: 0; justify-content: center; }
  .stage { height: auto; min-height: 0; overflow: visible; }
  #map { position: relative; inset: auto; height: 68vh; min-height: 420px; }
  .hint { display: none; }
  .mapctl { right: 16px; bottom: auto; top: calc(var(--bar-h) + 68vh - 170px); }
  .jump { display: none; }
  .panel { position: relative; inset: auto; width: auto; margin: 12px; height: 70vh; }
  .intro { top: 40vh; }
  .verdict, .cols, .xs-grid, .n-top { grid-template-columns: 1fr; }
  .trend { display: none; }
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .leftcol { position: relative; left: auto; top: auto; bottom: auto; width: auto; margin: 12px; overflow: visible; }
  .chartdock { position: relative; left: auto; right: auto; bottom: auto; margin: 12px; height: 320px; }
  .legend { position: relative; left: auto; top: auto; transform: none; max-width: none; margin: 12px 12px 0; flex-wrap: wrap; }
  .pager { display: none !important; }
  .loading { bottom: auto; top: calc(var(--bar-h) + 30vh); width: calc(100% - 32px); }
  .report { padding: 28px 12px; }
  .why, .block { padding: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

.ver { font: 500 12px var(--body); color: var(--dim); margin-left: 8px; letter-spacing: 0; }

/* ---------- top bar: trending strip + page switch */
.trend { display: flex; gap: 2px; min-width: 0; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
.trend button { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 9px; border-radius: 8px; border: 0; background: none; white-space: nowrap; font-size: 13px; color: var(--text); transition: background 0.15s; }
.trend button:hover { background: var(--raise); }
.trend em { font-style: normal; color: var(--dim); font-size: 12px; }
.trend span { font-size: 12px; }
.pager { display: flex; padding: 3px; border-radius: 9px; background: var(--bg2); border: 1px solid var(--line); }
.pager button { padding: 5px 12px; border: 0; border-radius: 7px; background: none; color: var(--mute); font-weight: 600; font-size: 13px; transition: background 0.15s, color 0.15s; }
.pager button[aria-selected='true'] { background: #1b2440; color: #fff; }

/* ---------- trade panel */
.trade { flex: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; padding: 11px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.tr-wallet { display: flex; align-items: center; gap: 8px; padding: 7px 8px 7px 11px; border-radius: 10px; background: #070a13; border: 1px solid var(--line); min-height: 42px; }
.tw-none { flex: 1; color: var(--mute); font-size: 13px; }
.tw-connect { padding: 6px 14px; border: 0; border-radius: 8px; font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(180deg, #7f9bff, #5b79ee); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22); }
.tw-connect:hover { filter: brightness(1.1); }
.tw-icon { width: 20px; height: 20px; border-radius: 6px; flex: none; }
.tw-icon.ph { display: grid; place-items: center; background: #1b2440; font-size: 11px; font-weight: 700; }
.tw-addr { flex: 1; min-width: 0; text-align: left; padding: 0; border: 0; background: none; font: 600 13px ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; color: var(--text); }
.tw-bal { color: var(--mute); font-size: 12.5px; white-space: nowrap; }
.tw-x { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: none; color: var(--mute); font-size: 12px; }
.tw-x:hover { color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.tr-head { display: flex; gap: 8px; align-items: stretch; }
.tr-tabs { flex: 1; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 9px; background: #070a13; border: 1px solid var(--line); }
.tr-tabs button { padding: 7px; border: 0; border-radius: 7px; background: none; color: var(--mute); font-weight: 700; font-size: 13.5px; transition: background 0.15s, color 0.15s; }
.tr-tabs button[data-side='buy'][aria-selected='true'] { background: color-mix(in srgb, var(--green) 15%, transparent); color: var(--green); }
.tr-tabs button[data-side='sell'][aria-selected='true'] { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); }
.tr-gear { width: 38px; border-radius: 9px; border: 1px solid var(--line); background: #070a13; color: var(--mute); display: grid; place-items: center; }
.tr-gear:hover { color: var(--text); border-color: var(--line-strong); }
.tr-set { display: grid; gap: 8px; padding: 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); animation: rise 0.2s both; }
.ts-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--mute); }
.ts-opts { display: flex; gap: 4px; }
.ts-opts button { padding: 4px 8px; border-radius: 7px; border: 1px solid var(--line); background: none; font-size: 12px; font-weight: 600; color: #c7d0e6; }
.ts-opts button[aria-pressed='true'] { border-color: var(--accent); color: #fff; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ts-note { margin: 0; font-size: 11.5px; color: var(--dim); }
.tr-amount { display: flex; align-items: baseline; gap: 6px; padding: 8px 13px; border-radius: 12px; background: #070a13; border: 1px solid var(--line); cursor: text; transition: border-color 0.15s, box-shadow 0.15s; }
.tr-amount:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15); }
.tr-cur { font: 600 22px var(--display); color: var(--dim); }
#trAmt { flex: 1; width: 0; min-width: 0; padding: 0; background: none; border: 0; outline: 0; font: 700 26px/1.2 var(--display); letter-spacing: -0.03em; color: var(--text); }
#trAmt::placeholder { color: var(--dim); }
.tr-sym { font-size: 12.5px; font-weight: 600; color: var(--mute); }
.tr-est { min-height: 18px; margin-top: -3px; font-size: 12.5px; color: #c7d0e6; }
.tr-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.tr-quick button { padding: 7px 0; border-radius: 8px; border: 1px solid var(--line); background: var(--raise); font-weight: 600; font-size: 13px; color: #d6deef; transition: border-color 0.15s, background 0.15s; }
.tr-quick button:hover { border-color: var(--line-strong); }
.tr-quick button[aria-pressed='true'] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); color: #fff; }
.tr-route { font-size: 11.5px; color: var(--dim); min-height: 15px; }
.tr-route.hot { color: var(--amber); }
.tr-go { width: 100%; padding: 12px; border: 0; border-radius: 10px; font-weight: 800; font-size: 15px; letter-spacing: 0.01em; transition: filter 0.15s, transform 0.1s; }
.tr-go:active { transform: translateY(1px); }
.tr-go.buy { color: #04140c; background: linear-gradient(180deg, #5ce3a6, #34c482); box-shadow: 0 6px 20px -8px rgba(62, 207, 142, 0.6); }
.tr-go.sell { color: #fff; background: linear-gradient(180deg, #ff6f87, #e3465f); box-shadow: 0 6px 20px -8px rgba(239, 78, 106, 0.6); }
.tr-go.confirm { color: #1b1305; background: linear-gradient(180deg, #f2c66b, #e0a83c); }
.tr-go:hover { filter: brightness(1.07); }
.tr-go:disabled { filter: saturate(0.4) brightness(0.8); cursor: progress; }
.tr-status { padding: 9px 11px; border-radius: 9px; font-size: 12.5px; line-height: 1.4; background: var(--raise); border: 1px solid var(--line); color: #d6deef; animation: rise 0.2s both; }
.tr-status a { color: #c9d4ff; white-space: nowrap; }
.tr-status.good { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }
.tr-status.bad { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); }
.tr-status.warn { border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); }
.tr-status.work::before { content: ''; display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; border: 1.5px solid var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; vertical-align: -1px; }

/* ---------- live position (inside the trade panel) */
.pos { margin-top: -2px; padding: 8px 10px; border-radius: 10px; background: var(--raise); border: 1px solid var(--line); animation: rise 0.3s both; }
.pos-row { width: 100%; display: flex; align-items: baseline; gap: 8px; padding: 0; border: 0; background: none; text-align: left; }
.pos-live { display: inline-flex; align-items: center; gap: 5px; color: var(--mute); font-size: 12px; margin-right: auto; }
.pos-live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 1.4s ease-in-out infinite; align-self: center; }
.pos-pnl { font: 700 17px var(--display); letter-spacing: -0.02em; }
.pos-pct { font-size: 12.5px; font-weight: 700; }
.pos-pnl.up, .pos-pct.up { color: var(--green); }
.pos-pnl.down, .pos-pct.down { color: var(--red); }
.pos-caret { color: var(--dim); font-size: 11px; transition: transform 0.2s; }
.pos-row[aria-expanded='true'] .pos-caret { transform: rotate(180deg); }
.pos-sub { margin-top: 1px; font-size: 12px; color: var(--mute); }
.pos-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pos-grid span { display: block; color: var(--mute); font-size: 11px; }
.pos-grid b { font-size: 13px; font-weight: 600; }

/* ---------- chart dock */
.chartdock { position: absolute; z-index: 5; left: calc(var(--left-w) + 32px); right: calc(var(--panel-w) + 32px); container-type: inline-size; bottom: 16px; height: var(--dock-h); display: flex; flex-direction: column; border-radius: 14px; overflow: hidden; background: rgba(9, 12, 22, 0.92); border: 1px solid var(--line); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); transition: height 0.25s ease; animation: rise 0.45s 0.12s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
.chartdock.collapsed { height: 44px; }
.chartdock.collapsed .cd-body { visibility: hidden; }
.chartdock.collapsed .cd-toggle svg { transform: rotate(180deg); }
.cd-head { flex: none; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 10px; border-bottom: 1px solid var(--line); }
.cd-pair { padding: 4px 10px; border-radius: 8px; background: var(--raise); border: 1px solid var(--line); font-weight: 700; font-size: 13px; white-space: nowrap; }
.cd-iv { display: flex; gap: 1px; overflow-x: auto; scrollbar-width: none; }
.cd-iv button { padding: 5px 9px; border: 0; border-radius: 7px; background: none; color: var(--mute); font-weight: 600; font-size: 12.5px; }
.cd-iv button:hover { color: var(--text); }
.cd-iv button[aria-pressed='true'] { background: #1b2440; color: #fff; }
.cd-live { display: inline-flex; align-items: center; gap: 6px; color: var(--mute); font-size: 12px; }
.cd-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.cd-live.tick i { animation: blip 0.6s ease-out; }
@keyframes blip { 0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.7); } 100% { box-shadow: 0 0 0 8px rgba(62, 207, 142, 0); } }
.cd-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.seg { display: flex; padding: 2px; border-radius: 8px; background: #070a13; border: 1px solid var(--line); }
.seg button { padding: 4px 10px; border: 0; border-radius: 6px; background: none; color: var(--mute); font-weight: 600; font-size: 12.5px; }
.seg button[aria-pressed='true'] { background: #1b2440; color: #fff; }
.cd-toggle { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--mute); }
.cd-toggle svg { transition: transform 0.25s; }
.cd-body { position: relative; flex: 1; min-height: 0; }
.cd-chart { position: absolute; inset: 0; }
.cd-stats { position: absolute; z-index: 3; left: 10px; top: 7px; display: flex; align-items: baseline; gap: 14px; padding: 4px 10px; border-radius: 8px; background: rgba(7, 10, 19, 0.82); border: 1px solid var(--line); pointer-events: none; white-space: nowrap; }
.cd-stats span { color: var(--mute); font-size: 11px; margin-right: 5px; }
.cd-stats b { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cd-stats em { font-style: normal; font-size: 11.5px; font-weight: 700; margin-left: 3px; }
@container (max-width: 640px) { .cd-stats > div:nth-child(2), .cd-stats > div:nth-child(3) { display: none; } .cd-pair { display: none; } }
@container (max-width: 520px) { .cd-live { display: none; } .cd-iv button { padding-inline: 6px; } }
.cd-state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); font-size: 13px; pointer-events: none; }
.cd-state:empty { display: none; }

/* ---------- wallet picker */
#walletDlg { width: min(420px, calc(100vw - 32px)); }
.wd { padding: 22px; }
.wd-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.wd-head h2 { margin: 0; }
.wd-x { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: none; color: var(--mute); font-size: 18px; line-height: 1; }
.wd-list { display: grid; gap: 8px; }
.wd-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--line); background: var(--raise); text-align: left; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.wd-item:hover { border-color: var(--accent); background: rgba(255, 255, 255, 0.05); }
.wd-item:active { transform: translateY(1px); }
.wd-item img, .wd-ph { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.wd-ph { display: grid; place-items: center; background: #1b2440; font-weight: 700; }
.wd-name { flex: 1; font-weight: 700; }
.wd-tag { padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600; color: var(--mute); border: 1px solid var(--line); }
.wd-tag.ok { color: var(--green); border-color: color-mix(in srgb, var(--green) 35%, transparent); background: color-mix(in srgb, var(--green) 10%, transparent); }
.wd-note { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.45; background: var(--raise); border: 1px solid var(--line); color: #d6deef; }
.wd-note.warn { border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 9%, transparent); color: #f1e2c2; }
.wd-note.bad { border-color: color-mix(in srgb, var(--red) 40%, transparent); background: color-mix(in srgb, var(--red) 9%, transparent); }
.wd .help { margin-top: 14px; }

@media (max-height: 940px) { :root { --dock-h: 236px; } }
@media (max-height: 780px) { :root { --dock-h: 200px; } }

/* ---------- small screens (kept last so it wins over the desktop rules above) */
@media (max-width: 899px) {
  .trend, .pager { display: none !important; }
  .bar { grid-template-columns: auto minmax(0, 1fr) auto; }
  .stage { height: auto; min-height: 0; overflow: visible; }
  .leftcol { position: relative; left: auto; top: auto; bottom: auto; width: auto; margin: 12px; overflow: visible; animation: none; }
  .chartdock { position: relative; left: auto; right: auto; bottom: auto; margin: 12px; height: 320px; animation: none; }
  .legend { position: relative; left: auto; top: auto; transform: none; max-width: none; margin: 12px 12px 0; flex-wrap: wrap; }
  .mapctl { right: 16px; bottom: auto; top: calc(var(--bar-h) + 68vh - 170px); }
  .jump, .hint { display: none; }
  .report { padding-top: 28px; min-height: 0; }
}

.wd-note.good { border-color: color-mix(in srgb, var(--green) 40%, transparent); background: color-mix(in srgb, var(--green) 9%, transparent); }
.wd-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.wd-wait { display: inline-flex; align-items: center; gap: 8px; color: var(--mute); font-size: 12.5px; }
.wd-wait::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--amber); border-right-color: transparent; animation: spin 0.8s linear infinite; }
.btn-scan.sm { padding: 6px 14px; font-size: 13px; }
.wd-item img { object-fit: contain; }

/* instant trading */
.tr-instant { width: 38px; border-radius: 9px; border: 1px solid var(--line); background: #070a13; color: var(--dim); display: grid; place-items: center; transition: color 0.15s, border-color 0.15s, background 0.15s; }
.tr-instant[aria-pressed='true'] { color: var(--amber); border-color: color-mix(in srgb, var(--amber) 40%, transparent); background: color-mix(in srgb, var(--amber) 10%, transparent); }
.tr-quick.instant button { position: relative; }
.tr-quick.instant button::after { content: ''; position: absolute; top: 4px; right: 5px; width: 5px; height: 5px; border-radius: 50%; background: var(--amber); opacity: 0.8; }
.tr-route.bad { color: var(--red); }
.tr-route.ready::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); vertical-align: 1px; }

/* ---------- drag handles between boxes */
.split { position: absolute; z-index: 7; touch-action: none; outline: none; }
.split::after { content: ''; position: absolute; border-radius: 2px; background: transparent; transition: background 0.15s, box-shadow 0.15s; }
.split::before { content: ''; position: absolute; z-index: 1; border-radius: 3px; background: var(--accent); opacity: 0; transition: opacity 0.15s; }
.split-x { width: 12px; cursor: col-resize; }
.split-x::after { left: 5px; top: 0; bottom: 0; width: 2px; }
.split-x::before { left: 4px; top: 50%; width: 4px; height: 34px; margin-top: -17px; }
.split-y { height: 12px; cursor: row-resize; }
.split-y::after { top: 5px; left: 0; right: 0; height: 2px; }
.split-y::before { top: 4px; left: 50%; height: 4px; width: 34px; margin-left: -17px; }
.split:hover::after, .split:focus-visible::after, .split.dragging::after { background: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 60%, transparent); }
.split:hover::before, .split:focus-visible::before, .split.dragging::before { opacity: 1; }
body.resizing { user-select: none; }
body.resizing.rx, body.resizing.rx * { cursor: col-resize !important; }
body.resizing.ry, body.resizing.ry * { cursor: row-resize !important; }
body.resizing .chartdock, body.resizing .cd-toggle svg { transition: none; }
#splitLeft { left: calc(16px + var(--left-w) + 2px); top: calc(var(--bar-h) + 16px); bottom: 16px; }
#splitPanel { right: calc(16px + var(--panel-w) + 2px); top: calc(var(--bar-h) + 16px); bottom: 16px; }
#splitChart { left: calc(var(--left-w) + 32px); right: calc(var(--panel-w) + 32px); bottom: calc(16px + var(--dock-h) + 2px); }
.leftcol[hidden] ~ #splitLeft, .panel[hidden] ~ #splitPanel, .chartdock[hidden] ~ #splitChart, .chartdock.collapsed ~ #splitChart { display: none; }
#splitVerdict { top: 0; bottom: 0; left: calc(var(--verdict-l, 340px) + 5px); }
#splitXs { top: 0; bottom: 0; right: calc(var(--xs-r, 340px) + 1px); }
@media (max-width: 899px) { .split { display: none !important; } }

.cd-attr { color: var(--mute); font-size: 11px; text-decoration: none; white-space: nowrap; opacity: 0.7; }
.cd-attr:hover { color: var(--text); opacity: 1; }
@container (max-width: 860px) { .cd-attr { display: none; } }

@media (max-height: 800px) and (min-width: 900px) {
  .leftcol { gap: 8px; }
  .trade { gap: 6px; padding: 9px; }
  .tk-nums { margin-top: 6px; }
  .tk-nums .v { font-size: 14.5px; }
  .tr-amount { padding: 5px 12px; }
  .tr-go { padding: 10px; }
}

/* ---------- focus mode: one wallet selected, the rest dimmed */
.focusbar { position: absolute; z-index: 6; left: calc(var(--left-w) + 32px + (100% - var(--left-w) - var(--panel-w) - 64px) / 2); top: calc(var(--bar-h) + 60px); transform: translateX(-50%); display: flex; align-items: center; gap: 11px; padding: 7px 7px 7px 13px; border-radius: 12px; background: rgba(9, 13, 25, 0.88); border: 1px solid var(--line-strong); backdrop-filter: blur(12px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); max-width: calc(100% - var(--left-w) - var(--panel-w) - 96px); animation: fbin 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.15) both; }
.focusbar.out { animation: fbout 0.18s ease forwards; }
.fb-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.fb-text { min-width: 0; display: grid; line-height: 1.25; }
.fb-text b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-text span { color: var(--mute); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-btn { flex: none; padding: 7px 12px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--raise); color: var(--text); font-weight: 700; font-size: 12.5px; }
.fb-btn:hover { border-color: var(--accent); }
.hint.gone { display: none; }
@keyframes fbin { from { opacity: 0; transform: translate(-50%, -6px) scale(0.97); } }
@keyframes fbout { to { opacity: 0; transform: translate(-50%, -6px) scale(0.97); } }

/* ---------- budget and suggested buy */
.budget { flex: none; display: grid; gap: 9px; padding: 11px 12px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); backdrop-filter: blur(14px); }
.bd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bd-head label { font-weight: 700; font-size: 13.5px; cursor: help; }
.bd-input { display: flex; align-items: center; gap: 4px; width: 128px; padding: 5px 10px; border-radius: 9px; background: #070a13; border: 1px solid var(--line); transition: border-color 0.15s, box-shadow 0.15s; }
.bd-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(108, 140, 255, 0.15); }
.bd-input span { color: var(--dim); font-weight: 600; }
.bd-input input { width: 0; flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font: 700 14.5px var(--body); text-align: right; font-variant-numeric: tabular-nums; }
.bd-sug { display: grid; gap: 6px; padding-top: 9px; border-top: 1px solid var(--line); }
.bd-row { display: flex; align-items: center; gap: 10px; }
.bd-k { color: var(--mute); font-size: 12.5px; }
.bd-amt { font: 700 19px var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.bd-use { margin-left: auto; padding: 6px 11px; border-radius: 8px; border: 1px solid color-mix(in srgb, var(--green) 45%, transparent); background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); font-weight: 700; font-size: 12.5px; white-space: nowrap; transition: background 0.15s; }
.bd-use:hover { background: color-mix(in srgb, var(--green) 20%, transparent); }
.bd-tag { margin-left: auto; padding: 4px 9px; border-radius: 7px; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--red) 12%, transparent); }
.bd-why { margin: 0; font-size: 12.5px; line-height: 1.45; color: #c7d0e6; }
.bd-score { font-weight: 700; }
.bd-note { margin: 0; font-size: 11.5px; line-height: 1.4; color: var(--mute); }
.bd-note.wait { color: var(--dim); font-style: italic; }
.bd-empty { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--mute); }
.t-buy { color: var(--green); }
.t-maybe { color: var(--amber); }
.t-avoid { color: var(--red); }
.tr-amount.flash { animation: amtflash 0.9s ease; }
@keyframes amtflash { 0% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0.55); border-color: var(--green); } 100% { box-shadow: 0 0 0 10px rgba(62, 207, 142, 0); } }

.xs-cost { margin-left: 10px; padding: 3px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; color: var(--amber); background: color-mix(in srgb, var(--amber) 10%, transparent); border: 1px solid color-mix(in srgb, var(--amber) 30%, transparent); }

/* ---------- owner tools */
.set-group.owner { border-color: color-mix(in srgb, var(--amber) 35%, transparent); }
.set-badge.on { color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.owner-line { margin: 0 0 8px; font-size: 13px; line-height: 1.45; color: #c7d0e6; }
.owner-table { width: 100%; border-collapse: collapse; font-size: 12.5px; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.owner-table th { text-align: left; color: var(--mute); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--line); }
.owner-table td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
.owner-table td.up { color: var(--green); font-weight: 700; }
.owner-table td.down { color: var(--red); font-weight: 700; }

/* ---------- Get scans link in the top bar */
a.text-btn { text-decoration: none; }
.get-scans { color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.get-scans:hover { border-color: color-mix(in srgb, var(--green) 55%, transparent); background: color-mix(in srgb, var(--green) 8%, var(--bg2)); }
.bd-input input::placeholder { color: var(--dim); font-weight: 500; }

/* ---------- score working: how the AI moved the on-chain score */
.verdict.v-pending { --tone: var(--accent); }
.v-math { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; font-size: 12.5px; }
.v-math span { padding: 3px 8px; border-radius: 7px; background: rgba(132, 152, 200, 0.1); border: 1px solid var(--line); color: #c7d0e6; white-space: nowrap; }
.v-math .vm-buy, .v-math .vm-narrpos { color: var(--green); border-color: color-mix(in srgb, var(--green) 30%, transparent); }
.v-math .vm-narrneg, .v-math .vm-avoid, .v-math .vm-stage, .v-math .vm-deal, .v-math .vm-cap, .v-math .vm-hard { color: #f19aa9; border-color: color-mix(in srgb, var(--red) 28%, transparent); }
.v-math b { margin-left: 3px; font-size: 13.5px; color: var(--text); }
.jump.pending { border-style: dashed; color: var(--text); border-color: var(--line-strong); }
.jump.pending::before { content: ''; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 0.7s linear infinite; }

.owner-table tr.tier-row td { padding-top: 10px; color: var(--accent); font-weight: 700; border-bottom-color: transparent; }
