:root {
  --bg: #101010;
  --bg-raised: #101010;
  --panel: #141414;
  --panel-2: #191919;
  --line: #292929;
  --line-soft: #212121;
  --text: #ececec;
  --muted: #8e8e8e;
  --dim: #616161;
  --accent: #6fffc1;
  --accent-soft: rgba(111, 255, 193, .1);
  --amber: #f0b966;
  --amber-soft: rgba(240, 185, 102, .11);
  --red: #ff7b82;
  --red-soft: rgba(255, 123, 130, .1);
  --blue: #72a7ff;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .34);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }
html.detail-open { overflow: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 0%, rgba(50, 111, 93, .08), transparent 25rem),
    var(--bg);
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; z-index: 100; left: 12px; top: -48px; padding: 9px 14px;
  color: #07120d; background: var(--accent); border-radius: 5px;
}
.skip-link:focus { top: 12px; }

.topbar {
  height: 56px; padding: 0 clamp(16px, 3vw, 42px); display: flex; align-items: center;
  border-bottom: 1px solid var(--line); background: rgba(8, 13, 18, .88);
  backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 20;
}
.app-update-banner {
  position: sticky; top: 56px; z-index: 19; min-height: 38px; padding: 7px clamp(16px, 3vw, 42px);
  display: flex; align-items: center; justify-content: center; gap: 12px;
  color: #d9fff0; background: #123126; border-bottom: 1px solid #276b50; font-size: 12px;
}
.app-update-banner button {
  padding: 5px 9px; border: 1px solid var(--accent); border-radius: 5px;
  color: #07120d; background: var(--accent); font: inherit; font-weight: 700;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 14px; letter-spacing: .12em; }
.brand b { color: var(--accent); font-weight: 700; }
.brand-mark { width: 25px; display: inline-block; color: #fff; font: 800 13px/1 ui-sans-serif, system-ui, sans-serif; letter-spacing: -.12em; }
.sol-price { margin-left: 18px; display: flex; align-items: center; gap: 7px; flex-shrink: 0; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); font: 600 13px ui-monospace, monospace; white-space: nowrap; }
.sol-price svg { width: 17px; height: 17px; }
.feed-status { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); }
.status-dot.is-live { background: var(--accent); box-shadow: 0 0 10px rgba(111,255,193,.7); }
.status-dot.is-warning { background: var(--amber); }
.status-dot.is-error { background: var(--red); }
.status-dot.is-loading { animation: pulse 1.3s ease-in-out infinite; }
.status-age { padding-left: 8px; border-left: 1px solid var(--line); color: var(--dim); }

.shell { width: min(1600px, 100%); margin: 0 auto; padding: 12px clamp(14px, 3vw, 42px) 32px; }
h1 { margin: 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.15; letter-spacing: -.035em; font-weight: 640; }
.icon-button {
  display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line);
  color: var(--muted); background: var(--panel); border-radius: 6px;
}
.icon-button:hover { color: var(--text); border-color: #414141; }
.icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.refresh-button.is-busy svg { animation: spin .8s linear infinite; }
.topbar .refresh-button { margin-left: 12px; flex-shrink: 0; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 16px; }
.metric-card { min-height: 84px; padding: 11px 16px; background: linear-gradient(145deg, var(--panel), #111111); border-right: 1px solid var(--line); }
.metric-card:last-child { border-right: 0; }
.metric-card-accent { background: linear-gradient(145deg, rgba(111,255,193,.075), var(--panel)); }
.metric-label { color: var(--muted); font-size: 10px; letter-spacing: .11em; }
.metric-value { display: block; margin-top: 8px; font-size: 25px; line-height: 1.1; letter-spacing: -.025em; font-weight: 630; }
.metric-card-accent .metric-value { color: var(--accent); }
.metric-value-status { font-size: 17px; line-height: 29px; letter-spacing: .04em; }
.metric-note { display: none; }

.workspace { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; box-shadow: var(--shadow); }
.toolbar { min-height: 52px; padding: 7px 12px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); background: #121212; }
.toolbar-label { margin-right: 4px; color: var(--dim); font-size: 9px; font-weight: 700; letter-spacing: .11em; }
.window-switch { display: flex; align-items: center; padding: 3px; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.window-switch button { min-width: 38px; height: 28px; border: 0; color: var(--muted); background: transparent; border-radius: 4px; font-size: 11px; font-weight: 650; }
.window-switch button:hover { color: var(--text); }
.window-switch button.is-active { color: #08130e; background: var(--accent); }
.search-field { flex: 1; min-width: 190px; max-width: 410px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.search-field:focus-within { border-color: #4d6c61; }
.search-field svg { width: 15px; height: 15px; flex: 0 0 auto; fill: none; stroke: var(--dim); stroke-width: 1.8; }
.search-field input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.search-field input::placeholder { color: var(--dim); }
kbd { padding: 1px 5px; color: var(--dim); border: 1px solid var(--line); border-radius: 3px; background: var(--panel-2); font: 10px ui-monospace, monospace; }
.toolbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.compact-select select { height: 34px; padding: 0 28px 0 10px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: var(--bg); font-size: 11px; }
.volume-filter select { max-width: 180px; }
.check-control { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; white-space: nowrap; cursor: pointer; }
.check-control input { position: absolute; opacity: 0; pointer-events: none; }
.check-control span { width: 28px; height: 16px; position: relative; border: 1px solid #404040; border-radius: 10px; background: var(--bg); transition: .15s ease; }
.check-control span::after { content: ""; position: absolute; left: 2px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--dim); transition: .15s ease; }
.check-control input:checked + span { border-color: #3d856a; background: var(--accent-soft); }
.check-control input:checked + span::after { left: 14px; background: var(--accent); }
.check-control input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.notice { margin: 0; padding: 0 12px; color: var(--muted); border-bottom: 1px solid var(--line); background: var(--bg-raised); font-size: 11px; }
.notice summary { min-height: 34px; padding: 8px 0; cursor: pointer; }
.notice strong { margin-right: 8px; font-weight: 550; }
.notice-more { color: var(--dim); }
.notice-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 10px; }
.notice-body span { line-height: 1.5; }
.notice.is-error { border-left: 2px solid var(--red); }
.notice.is-error strong { color: var(--red); }
.notice button, .empty-state button { padding: 6px 10px; color: var(--text); border: 1px solid currentColor; border-radius: 4px; background: transparent; font-size: 11px; }
.legend { display: flex; align-items: center; gap: 6px; }
.table-scroll { overflow: auto; }
table { width: 100%; min-width: 1120px; border-collapse: collapse; }
th { height: 37px; padding: 0 11px; text-align: right; color: var(--dim); border-bottom: 1px solid var(--line); font-size: 9px; letter-spacing: .08em; white-space: nowrap; }
th:nth-child(2) { text-align: left; }
.sort-button { padding: 4px 0; border: 0; color: inherit; background: none; font-size: inherit; letter-spacing: inherit; }
.sort-button:hover, .sort-button.is-sorted { color: var(--muted); }
td { height: 44px; padding: 4px 10px; text-align: right; border-bottom: 1px solid var(--line-soft); white-space: nowrap; }
tbody tr { cursor: pointer; transition: background .12s ease; }
tbody tr:hover, tbody tr:focus-within { background: rgba(255,255,255,.022); }
tbody tr.is-selected { background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
tbody tr:last-child td { border-bottom: 0; }
td:nth-child(2) { width: 290px; max-width: 290px; text-align: left; }
#pool-table { min-width: 1040px; }
#pool-table th:nth-child(n+3), #pool-table td:nth-child(n+3) { text-align: center; vertical-align: middle; }
#pool-table .sort-button { text-align: center; }
#pool-table th:nth-child(4), #pool-table td:nth-child(4),
#pool-table th:nth-child(5), #pool-table td:nth-child(5) { width: 112px; padding-left: 8px; padding-right: 8px; }
#pool-table th:nth-child(4) .sort-button,
#pool-table th:nth-child(5) .sort-button { max-width: 96px; white-space: pre-line; line-height: 1.35; }
.favorite-cell { width: 72px; min-width: 72px; padding-left: 8px; padding-right: 2px; text-align: left; white-space: nowrap; }
.favorite-cell button { vertical-align: middle; }
.favorite-button { width: 32px; height: 36px; padding: 0; border: 0; color: #535353; background: transparent; font-size: 18px; }
.favorite-button:hover, .favorite-button.is-active { color: var(--amber); }
.blacklist-token-button { flex: 0 0 auto; width: 30px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 19px; }
.blacklist-token-button:hover, .blacklist-token-button:focus-visible { color: var(--red); background: var(--red-soft); }
.blacklist-action { flex-shrink: 0; min-height: 34px; padding: 5px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--panel); color: var(--text); font-size: 11px; }
.blacklist-action:hover { border-color: var(--muted); }
#blacklist-button, #token-labels-button { white-space: nowrap; }
.blacklist-dialog { width: min(540px, calc(100vw - 28px)); max-height: 80vh; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--text); }
.blacklist-dialog::backdrop { background: rgba(3, 7, 10, .76); }
.blacklist-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.blacklist-heading h2 { margin: 0; font-size: 18px; }
#blacklist-message { color: var(--muted); font-size: 12px; line-height: 1.5; }
#blacklist-list { list-style: none; padding: 0; margin: 0; }
#blacklist-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
#blacklist-list li div { min-width: 0; }
#blacklist-list strong { display: block; overflow-wrap: anywhere; }
#blacklist-list code { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.token-labels-help, #token-labels-empty { color: var(--muted); font-size: 12px; line-height: 1.5; }
#token-labels-list { list-style: none; padding: 0; margin: 0; }
#token-labels-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
#token-labels-list li > div { min-width: 0; }
#token-labels-list strong { display: block; max-width: 290px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#token-labels-list code { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.token-label-management-actions { display: flex; flex: 0 0 auto; gap: 6px; }
.token-label-feedback { min-height: 18px; margin: 8px 0; color: var(--red); font-size: 11px; line-height: 1.5; }
.token-label-editor { width: min(460px, calc(100vw - 28px)); }
.token-label-field { display: block; margin-top: 14px; color: var(--muted); font-size: 11px; }
.token-label-field > span { display: block; margin-bottom: 6px; }
.token-label-field input, .token-label-field select { box-sizing: border-box; width: 100%; height: 40px; padding: 0 9px; border: 1px solid var(--line); border-radius: 5px; color: var(--text); background: var(--bg); font: inherit; }
.token-label-field input:focus-visible, .token-label-field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.token-label-editor-actions button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; }
.token-label-editor-actions { flex-wrap: wrap; }
.token-label-editor-actions button[type="submit"] { color: #07120d; border-color: var(--accent); background: var(--accent); font-weight: 650; }
.token-label-editor-actions #token-label-delete { margin-right: auto; color: var(--red); }
.blacklist-feedback { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 10px; width: max-content; max-width: calc(100vw - 28px); padding: 10px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); box-shadow: var(--shadow); font-size: 12px; }
.blacklist-feedback[hidden] { display: none; }
.blacklist-feedback span { min-width: 0; overflow-wrap: anywhere; }
.pool-main { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 290px; }
.token-stack { width: 34px; height: 30px; position: relative; flex: 0 0 auto; }
.token-dot { width: 28px; height: 28px; display: grid; place-items: center; position: absolute; overflow: hidden; border: 1px solid var(--line); border-radius: 50%; color: #e2e2e2; background: #313131; font-size: 10px; font-weight: 700; }
.token-dot:last-child { width: 15px; height: 15px; right: 0; bottom: 0; border: 2px solid var(--panel); font-size: 7px; }
.token-dot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.token-dot.has-avatar { color: transparent; }
.pool-copy { display: flex; align-items: center; gap: 6px; min-width: 0; max-width: 222px; overflow: hidden; }
.pool-copy strong { display: block; min-width: 54px; max-width: 124px; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 13px; font-weight: 600; }
.type-badge { color: var(--dim); font-size: 9px; font-style: normal; letter-spacing: .03em; }
.platform-icon { width: 18px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.pool-terms { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; white-space: nowrap; }
.pool-copy.has-stock { flex-wrap: wrap; row-gap: 2px; }
.pool-copy.has-stock .pool-terms { flex-basis: 100%; }
.pool-copy.has-token-label { flex-wrap: wrap; row-gap: 2px; }
.pool-copy.has-token-label .pool-terms { flex-basis: 100%; flex-wrap: wrap; }
.backpack-stock-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 14px; width: 14px; height: 14px; padding: 0; border: 0; background: transparent; vertical-align: middle; }
.token-label-badge { flex: 0 1 92px; max-width: 92px; padding: 1px 4px; overflow: hidden; border: 1px solid #5c8f7d66; border-radius: 4px; color: #a9eed3; background: #55bd9314; font-size: 9px; font-weight: 600; line-height: 12px; text-overflow: ellipsis; white-space: nowrap; }
.token-label-badge:hover, .token-label-badge:focus-visible { border-color: var(--accent); color: var(--accent); }
.pool-fee-rate { color: var(--text); font-size: 11px; font-variant-numeric: tabular-nums; }
.value-main { display: block; color: var(--text); font-size: 13px; font-weight: 570; }
.value-main.is-accent { color: var(--accent); }
.value-main.is-positive { color: var(--accent); }
.value-main.is-negative { color: var(--red); }
.missing-value { color: var(--dim); }
.quality-mark { display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.quality-mark.warning { background: var(--amber); }
.quality-mark.bad { background: var(--red); }
.loading-row { cursor: default; }
.loading-row td { height: 190px; padding: 40px 12%; }
.loading-line, .detail-loading span { display: block; height: 10px; margin: 14px 0; border-radius: 8px; background: linear-gradient(90deg, #1d1d1d 25%, #252525 50%, #1d1d1d 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; }
.loading-line:nth-child(2) { width: 78%; }
.loading-line:nth-child(3) { width: 52%; }
.empty-state { padding: 70px 20px; text-align: center; border-top: 1px solid var(--line-soft); }
.empty-state strong { display: block; margin-top: 17px; font-size: 16px; }
.empty-state p { max-width: 440px; margin: 7px auto 16px; color: var(--muted); }
.empty-radar { width: 44px; height: 44px; display: inline-block; border: 1px solid var(--line); border-radius: 50%; box-shadow: inset 0 0 0 10px var(--panel), inset 0 0 0 11px var(--line); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(0,0,0,.36); }
.detail-drawer { width: min(660px, 94vw); position: fixed; z-index: 40; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; border-left: 1px solid #373737; background: #111111; box-shadow: -28px 0 70px rgba(0,0,0,.45); transform: translateX(102%); visibility: hidden; transition: transform .2s ease, visibility .2s; }
.detail-drawer.is-open { transform: translateX(0); visibility: visible; }
.drawer-header { min-height: 80px; padding: 14px 18px; display: flex; align-items: flex-start; justify-content: space-between; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0 0 5px; font-size: 23px; letter-spacing: -.025em; }
.detail-title-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.detail-title-row h2 { min-width: 0; overflow-wrap: anywhere; }
.detail-label-button { flex: 0 0 auto; width: 36px; height: 36px; color: var(--muted); }
.detail-label-button[hidden] { display: none; }
.detail-label-button:hover, .detail-label-button:focus-visible { color: var(--accent); border-color: var(--accent); }
.detail-purpose { color: var(--muted); font-size: 11px; }
.drawer-body { flex: 1; padding: 14px 18px 20px; overflow-y: auto; }
.drawer-footer { padding: 14px 24px; border-top: 1px solid var(--line); background: #101010; }
.primary-link { height: 42px; display: flex; align-items: center; justify-content: center; gap: 8px; color: #07120d; background: var(--accent); border-radius: 6px; text-decoration: none; font-size: 12px; font-weight: 700; }
.primary-link:hover { background: #91ffd0; }
.primary-link.is-disabled { color: var(--dim); background: var(--line); pointer-events: none; }
.primary-link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.detail-placeholder { color: var(--muted); }
.detail-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
.detail-stat { min-height: 58px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.detail-stat span { display: block; color: var(--dim); font-size: 9px; letter-spacing: .07em; }
.detail-stat strong { display: block; margin-top: 4px; font-size: 16px; font-weight: 590; }
.chart-card { margin-top: 12px; padding: 13px 14px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.chart-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; color: var(--muted); font-size: 10px; }
.chart-title { min-width: 0; padding-top: 2px; color: var(--text); font-size: 11px; font-weight: 620; letter-spacing: .025em; }
.chart-latest { display: grid; flex: 0 0 auto; justify-items: end; color: var(--dim); font-variant-numeric: tabular-nums; }
.chart-latest small { font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.chart-latest strong { margin-top: 2px; color: var(--text); font-size: 13px; font-weight: 620; }
.chart-range { min-height: 18px; margin-top: 5px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; color: var(--dim); font-size: 9px; font-variant-numeric: tabular-nums; }
.chart-domain { color: var(--muted); }
.chart-coverage::before { content: "·"; margin-right: 10px; color: var(--line); }
.chart-inspection-hint { margin-left: auto; }
.chart-outlier-note { width: 100%; color: var(--amber); }
.chart-plot { position: relative; }
.chart-svg { width: 100%; height: auto; display: block; margin-top: 3px; overflow: visible; touch-action: pan-y; outline: none; }
.chart-svg:focus-visible { border-radius: 4px; box-shadow: 0 0 0 2px var(--accent); }
.chart-svg .grid { stroke: var(--line-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-svg .line { fill: none; stroke: var(--accent); stroke-width: 1.7; vector-effect: non-scaling-stroke; }
.chart-svg .line.secondary { stroke: var(--blue); }
.chart-svg .line.is-clipped { stroke: var(--amber); }
.chart-y-label { fill: var(--muted); font: 10px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.chart-axis text { fill: var(--muted); font: 10px ui-monospace, monospace; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) {
  .chart-y-label, .chart-axis text { font-size: 14px; }
  .chart-inspection-hint { display: none; }
}
.chart-hit-area { fill: transparent; cursor: crosshair; }
.chart-crosshair { stroke: #7e7e7e; stroke-width: 1; stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart-focus-point { fill: var(--panel); stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.chart-focus-point.secondary { stroke: var(--blue); }
.chart-crosshair[hidden], .chart-focus-point[hidden] { display: none; }
.chart-inspector { position: absolute; z-index: 2; max-width: 190px; padding: 5px 7px; border: 1px solid #4f4f4f; border-radius: 4px; color: var(--text); background: #181818; box-shadow: 0 5px 16px rgba(0,0,0,.34); font: 10px ui-monospace, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; transform: translate(-50%, calc(-100% - 8px)); }
.chart-inspector.is-left { transform: translate(0, calc(-100% - 8px)); }
.chart-inspector.is-right { transform: translate(-100%, calc(-100% - 8px)); }
.chart-inspector.is-missing { color: var(--dim); border-style: dashed; }
.chart-scale-toggle { min-height: 28px; margin-left: 8px; padding: 2px 7px; border: 1px solid currentColor; border-radius: 4px; color: var(--amber); background: transparent; font: inherit; cursor: pointer; }
.chart-scale-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chart-empty { height: 58px; display: grid; place-items: center; color: var(--dim); font-size: 11px; }
.detail-section-title { margin: 16px 0 7px; color: var(--muted); font-size: 10px; letter-spacing: .09em; }
.issue-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.issue-list li { padding: 5px 0; color: var(--muted); border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.issue-list li.is-ok { color: #91cbb3; border-color: var(--accent); background: var(--accent-soft); }
.detail-loading { padding: 20px 0; }

.range-card { padding: 12px; margin: 12px 0; border: 1px solid #30483f; border-radius: var(--radius); background: var(--panel); }
.range-heading { margin: 0 0 9px; font-size: 10px; letter-spacing: .09em; color: var(--muted); font-weight: 650; }
.range-spot { display: block; color: var(--accent); font-size: 23px; overflow-wrap: anywhere; }
.range-native { margin: 5px 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.range-note { margin: 8px 0 0; font-size: 11px; color: var(--muted); line-height: 1.55; overflow-wrap: anywhere; }
.range-form { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.range-presets, .range-copy { display: flex; gap: 7px; margin: 10px 0; flex-wrap: wrap; }
.range-button { min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); color: var(--text); font-size: 12px; }
.range-button:hover:not(:disabled) { border-color: var(--accent); }
.range-button:disabled { opacity: .45; cursor: not-allowed; }
.range-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.range-field { display: block; min-width: 0; margin: 10px 0; }
.range-field span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; }
.range-field input, .range-field select { width: 100%; min-width: 0; height: 40px; padding: 0 9px; color: var(--text); border: 1px solid var(--line); background: var(--bg); border-radius: 5px; font: inherit; }
.range-submit { width: 100%; margin-top: 4px; font-weight: 650; color: var(--accent); background: var(--accent-soft); border-color: #345b48; }
.range-message { margin: 10px 0 0; color: var(--amber); font-size: 12px; overflow-wrap: anywhere; }
.range-message:empty { display: none; }
.range-result { margin-top: 14px; padding: 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); }
.range-result-heading { font-size: 12px; font-weight: 600; }
.range-bounds { margin: 10px 0 5px; color: var(--accent); font-size: 15px; overflow-wrap: anywhere; }
.range-position { margin: 12px 0 0; font-size: 12px; }
.range-position.is-warning { color: var(--amber); }


/* Pool inspection: dense readout, stable controls, readable full contracts. */
.detail-drawer .drawer-header, .detail-drawer .drawer-footer { flex: 0 0 auto; }
.detail-drawer .drawer-header > div { min-width: 0; }
.detail-drawer h2 { overflow-wrap: anywhere; }
.detail-drawer .is-positive, .detail-drawer .is-accent { color: var(--accent); }
.detail-drawer .is-negative { color: var(--red); }
.detail-controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.detail-controls .detail-section-title { margin: 0; }
.detail-window-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; }
.detail-window-switch button { min-width: 38px; height: 32px; padding: 0 5px; border: 0; border-radius: 4px; color: var(--muted); background: transparent; font-size: 11px; }
.detail-window-switch button.is-active { background: var(--accent); color: var(--bg); font-weight: 650; }
.detail-market, .detail-daily { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 6px; }
.detail-market .detail-stat { min-height: 62px; background: transparent; }
.detail-stat { min-width: 0; }
.detail-stat strong { overflow-wrap: anywhere; }
.detail-market .detail-stat strong, .detail-daily .detail-stat strong { font-size: 15px; }
.detail-freshness { margin: 8px 0 10px; font-size: 10px; color: var(--muted); line-height: 1.6; }
.detail-freshness.is-stale { color: var(--red); }
.detail-summary { margin: 0 0 6px; }
.detail-summary .detail-stat strong { font-size: 22px; }
.detail-signals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.detail-signals .detail-stat { min-height: 52px; border: 0; background: var(--bg); }
.detail-reading, .detail-source-note { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.window-comparison { min-width: 0; width: 100%; table-layout: fixed; font-size: 11px; border: 1px solid var(--line); border-radius: 5px; }
.window-comparison th, .window-comparison td { height: 31px; padding: 5px 7px; font-size: 11px; text-align: right; letter-spacing: 0; overflow-wrap: anywhere; white-space: normal; }
.window-comparison thead th { color: var(--muted); font-size: 10px; font-weight: 500; }
.window-comparison th:first-child { text-align: left; width: 16%; }
.window-comparison th:last-child { width: 14%; }
.window-comparison tbody th { color: var(--muted); font-weight: 500; }
.window-comparison tbody tr { cursor: default; }
.window-comparison tr.is-current { background: var(--accent-soft); }
.window-comparison tr.is-current th { color: var(--accent); }
.contract-row { margin-bottom: 6px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 5px; background: var(--bg); }
.contract-heading { display: flex; gap: 8px; align-items: center; justify-content: space-between; color: var(--muted); font-size: 11px; }
.contract-heading > span { overflow-wrap: anywhere; min-width: 0; }
.contract-actions { display: flex; flex-shrink: 0; gap: 10px; align-items: center; }
.contract-copy, .contract-explorer { color: var(--accent); background: transparent; border: 0; padding: 2px 0; text-decoration: none; font-size: 11px; min-height: 28px; }
.contract-copy:disabled { color: var(--dim); cursor: default; }
.contract-address { display: block; margin-top: 3px; color: var(--text); font: 12px/1.6 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.detail-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.detail-charts .chart-card { margin: 0; padding: 10px; min-width: 0; }
.detail-charts .chart-svg { height: auto; }
.detail-charts .chart-empty { height: 38px; }
.chart-header strong { overflow-wrap: anywhere; }
.chart-header > span { white-space: nowrap; }
.detail-disclosure { margin-top: 16px; border: 1px solid var(--line); border-radius: 6px; }
.detail-disclosure > summary { padding: 11px 12px; color: var(--text); font-size: 12px; cursor: pointer; }
.detail-disclosure > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.detail-disclosure .range-card { margin: 0; border: 0; border-top: 1px solid var(--line); }
.detail-source-body { padding: 0 12px 12px; }
.liquidity-card { margin-top: 16px; padding: 14px; border: 1px solid #454545; border-radius: 7px; background: var(--panel); }
.liquidity-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.liquidity-head h3 { font-size: 14px; margin: 0; }
.liquidity-subtitle, .liquidity-status, .liquidity-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin: 6px 0; }
.liquidity-spot { font-size: 18px; color: var(--accent); font-weight: 650; margin: 14px 0 10px; overflow-wrap: anywhere; }
.liquidity-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; font-size: 11px; color: var(--muted); }
.liquidity-toolbar [aria-pressed="true"] { color: var(--accent); border-color: var(--accent); background: #15342e; }
.liquidity-svg { width: 100%; display: block; touch-action: pan-y; margin-top: 10px; }
.liquidity-svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.liquidity-grid { stroke: var(--line); stroke-width: 1; }
.liquidity-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.liquidity-bar { fill: #328978; fill-opacity: .65; stroke: #52b49d; stroke-width: .5; }
.liquidity-bar.is-current { fill: #68ffc3; fill-opacity: .6; }
.liquidity-bar.is-inspected { fill: #8de8c6; fill-opacity: .7; }
.liquidity-current { stroke: #e5fff1; stroke-width: 1.5; stroke-dasharray: 4 3; }
.liquidity-current-label { fill: #e5fff1; font-size: 12px; }
.liquidity-range-fill { fill: #77aaff; opacity: .12; }
.liquidity-range-edge { stroke: #8bb6ff; stroke-width: 1.5; }
.liquidity-readout { min-height: 30px; color: var(--text); font-size: 12px; line-height: 1.5; margin: 6px 0; font-variant-numeric: tabular-nums; }
.liquidity-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.liquidity-fields label { min-width: 0; }
.liquidity-fields span { display: block; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.liquidity-fields input { width: 100%; min-width: 0; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--text); font: inherit; font-size: 12px; }
.liquidity-fields input:focus-visible { outline: 1px solid var(--accent); }
.liquidity-selection { margin: 8px 0; font-size: 12px; color: #9bbfff; line-height: 1.5; }
.liquidity-prepare { margin-left: auto; color: var(--accent); }
.detail-source .issue-list { gap: 4px; }
.detail-daily .detail-stat { background: transparent; }
.detail-daily-meteora { grid-template-columns: 1fr 1fr; }

.auth-dialog { width: min(410px, calc(100vw - 28px)); padding: 0; border: 1px solid #3f3f3f; border-radius: 9px; color: var(--text); background: var(--panel); box-shadow: var(--shadow); }
.auth-dialog::backdrop { background: rgba(3,7,10,.76); backdrop-filter: blur(4px); }
.auth-dialog form { padding: 26px; }
.auth-dialog h2 { margin: 9px 0 7px; font-size: 20px; }
.auth-dialog p { margin: 0 0 18px; color: var(--muted); font-size: 12px; }
.auth-icon { color: var(--accent); font-size: 24px; }
.auth-dialog label span { display: block; margin-bottom: 6px; color: var(--dim); font-size: 9px; letter-spacing: .1em; }
.auth-dialog input { width: 100%; height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; outline: none; color: var(--text); background: var(--bg); }
.auth-dialog input:focus { border-color: var(--accent); }
.auth-dialog .form-error { margin: 8px 0 0; color: var(--red); }
.dialog-actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
.dialog-actions button { min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); background: transparent; }
.dialog-actions button[type="submit"] { color: #07120d; border-color: var(--accent); background: var(--accent); font-weight: 650; }

@keyframes pulse { 50% { opacity: .3; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1020px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-card:nth-child(2) { border-right: 0; }
  .metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .toolbar { flex-wrap: wrap; }
  .search-field { order: 3; max-width: none; flex-basis: 100%; }
}

@media (max-width: 680px) {
  .topbar { padding: 10px 14px; height: auto; min-height: 56px; flex-wrap: wrap; gap: 8px; }
  .app-update-banner { position: static; }
  .sol-price { margin-left: 4px; }
  .status-age { display: none; }
  .shell { padding-top: 12px; }
  h1 { font-size: 25px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 82px; padding: 10px 12px; }
  .metric-value { font-size: 20px; }
  .metric-value-status { font-size: 13px; }
  .toolbar { gap: 9px; }
  .window-switch { width: 100%; }
  .window-switch button { flex: 1; }
  .toolbar-actions { width: 100%; margin: 0; justify-content: flex-start; gap: 8px; flex-wrap: wrap; }
  .volume-filter select { max-width: none; }
  .check-control { font-size: 10px; }
  .legend { display: none; }
  .detail-drawer { width: 100%; }
  .detail-controls { flex-wrap: wrap; }
  .detail-charts { grid-template-columns: minmax(0, 1fr); }
  .chart-y-label, .chart-axis text { font-size: 11px; }
  .detail-market { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-market .detail-stat:first-child { grid-column: 1 / -1; }
  .detail-daily { grid-template-columns: minmax(0, 1fr); }
  .detail-daily .detail-stat { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; }
  .detail-daily .detail-stat strong { margin: 0; }
  .contract-copy, .contract-explorer { min-height: 36px; display: inline-flex; align-items: center; }
  .contract-address { font-size: 12px; }
  .window-comparison th, .window-comparison td { padding: 5px 3px; font-size: 10px; }
  .detail-summary .detail-stat strong { font-size: 19px; }
  .drawer-header, .drawer-body, .drawer-footer { padding-left: 18px; padding-right: 18px; }
}

.fee-alert-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 14px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  background: var(--bg-raised); font-size: 11px;
}
.fee-alert-bar button, .fee-alert-dialog button {
  border: 1px solid var(--line); border-radius: 5px; background: var(--panel);
  color: var(--text); padding: 6px 9px; font-size: 12px;
}
.fee-alert-bar button:hover, .fee-alert-dialog button:hover { border-color: var(--accent); }
#fee-alert-state { color: var(--muted); flex: 1; min-width: 130px; }
#fee-alert-sound[aria-pressed="true"] { color: var(--accent); border-color: #315d4b; background: var(--accent-soft); }
/* Keep the legacy DOM hooks for cached scripts, but never show the signal banner. */
#fee-alert-latest { display: none !important; }
.fee-alert-dialog { width: min(590px, calc(100vw - 28px)); max-height: 85vh; padding: 20px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.fee-alert-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.fee-alert-dialog h2 { font-size: 20px; margin: 0; }
.fee-alert-dialog h3 { font-size: 13px; margin-bottom: 8px; }
.fee-alert-dialog small { font-size: 11px; color: var(--muted); font-weight: normal; }
.fee-alert-dialog p { font-size: 12px; color: var(--muted); }
.fee-alert-enable { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 18px 0 12px; }
.fee-alert-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fee-alert-fields label { font-size: 12px; color: var(--muted); min-width: 0; }
.fee-alert-fields input { display: block; box-sizing: border-box; width: 100%; margin-top: 6px; padding: 9px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; color: var(--text); }
.fee-alert-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.fee-alert-actions button[type="submit"] { background: var(--accent); color: var(--bg); border-color: var(--accent); font-weight: 600; }
#fee-alert-feedback { min-height: 18px; color: var(--accent); }
#fee-alert-list { padding: 0; margin: 0; list-style: none; }
#fee-alert-list li + li { margin-top: 6px; }
#fee-alert-list button { width: 100%; text-align: left; padding: 10px; }
#fee-alert-list strong, #fee-alert-list span { display: block; overflow-wrap: anywhere; }
#fee-alert-list span { color: var(--muted); font-size: 11px; margin-top: 4px; }
.fee-signal-active td { background-color: rgba(111, 255, 193, .1); box-shadow: inset 0 2px 0 rgba(111, 255, 193, .16); }
.fee-signal-row td { animation: fee-signal-row-fade 6s ease-out both; animation-delay: var(--signal-elapsed, 0ms); }
.fee-signal-pulse { animation: fee-signal-fade 6s ease-out; }
.fee-alert-bar.fee-signal-pulse { animation: none; }
@keyframes fee-signal-row-fade {
  0%, 18% { background-color: rgba(111, 255, 193, .34); box-shadow: inset 0 2px 0 rgba(111, 255, 193, .72); }
  100% { background-color: rgba(111, 255, 193, .1); box-shadow: inset 0 2px 0 rgba(111, 255, 193, .16); }
}
@keyframes fee-signal-fade {
  0%, 18% { background-color: rgba(111, 255, 193, .23); box-shadow: inset 0 2px 0 rgba(111, 255, 193, .6); }
  100% { background-color: transparent; box-shadow: inset 0 2px 0 transparent; }
}
@media (max-width: 680px) {
  .fee-alert-bar { padding: 8px 12px; gap: 7px; }
  #fee-alert-state { order: 3; flex-basis: 100%; }
  .fee-alert-dialog { padding: 14px; }
  .fee-alert-fields { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .fee-signal-row td, .fee-signal-pulse { animation: none !important; box-shadow: inset 3px 0 0 var(--accent); }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.sunrise-token-badge { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 14px; width: 14px; height: 14px; padding: 0; border: 0; background: transparent; vertical-align: middle; }
.wormhole-token-badge { flex: 0 0 auto; padding: 2px 4px; border: 1px solid #8b7cf066; border-radius: 4px; color: #9be8ef; background: #7667e619; font-size: 9px; font-weight: 500; line-height: 12px; white-space: nowrap; }

.backpack-stock-badge img, .sunrise-token-badge img { display: block; width: 12px; height: 12px; object-fit: contain; }
:root { --hub-sidebar-width: 190px; }
.hub-header { height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 20px; border-bottom: 1px solid var(--line, #2e2e2e); background: #121212; }
.hub-brand { text-decoration: none; color: inherit; font-size: 18px; white-space: nowrap; }
.hub-header__note { color: #8d8d8d; font-size: 12px; margin-left: auto; }
.hub-layout { display: grid; grid-template-columns: var(--hub-sidebar-width) minmax(0, 1fr); min-height: calc(100dvh - 64px); }
.hub-sidebar { padding: 26px 12px 20px; display: flex; flex-direction: column; gap: 12px; border-right: 1px solid #292929; background: #101010; }
.hub-nav-label { padding: 0 12px; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; color: #838383; }
.hub-nav-item { display: block; width: 100%; padding: 12px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #c8c8c8; text-align: left; text-decoration: none; font: inherit; cursor: pointer; }
.hub-nav-item:hover { background: #1d1d1d; color: #ffffff; }
.hub-nav-item.is-active { color: #dcdcdc; border-color: #484848; background: #222222; }
.hub-nav-item:focus-visible, .hub-retry:focus-visible { outline: 2px solid #dcdcdc; outline-offset: 3px; }
.hub-nav-item:disabled { opacity: .5; cursor: wait; }
.hub-sidebar__account { display: grid; gap: 4px; margin-top: 24px; }
.hub-sidebar__account .hub-nav-label { margin-bottom: 8px; }
.hub-sidebar__footer { margin-top: auto; padding: 24px 12px 0; color: #616161; font-size: 11px; }
.hub-content { min-width: 0; }
#pools-workspace { height: calc(100dvh - 65px); min-height: 600px; }
#pools-frame { display: block; width: 100%; height: 100%; border: 0; background: #101010; }
.hub-content [hidden], .hub-sidebar [hidden] { display: none !important; }
.tool-topbar { position: static; padding: 0 24px; border-bottom: 1px solid #292929; background: transparent; }
.tool-topbar .brand { font-size: 14px; }
.tool-topbar .brand-mark { display: none; }
.preferences-status { display: flex; align-items: center; gap: 8px; font-size: 11px; color: #8d8d8d; margin-left: 12px; }
.preferences-status button, .hub-retry { padding: 8px 12px; border: 1px solid #434343; border-radius: 7px; background: #1f1f1f; color: #e2e2e2; font: inherit; cursor: pointer; }
.preferences-status button { padding: 3px 7px; font-size: 11px; }
.hub-empty { min-height: 65dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 32px; }
.hub-empty__mark { width: 64px; height: 64px; display: grid; place-items: center; background: #252525; color: #dcdcdc; border: 1px solid #484848; border-radius: 18px; font-size: 19px; font-weight: 700; }
.hub-empty h1 { margin: 24px 0 8px; font-size: 22px; }
.hub-empty p { max-width: 430px; margin: 0 0 24px; color: #9b9b9b; line-height: 1.7; }
.acct-tools-form { margin: 18px 0; padding: 18px; border: 1px solid #383838; border-radius: 10px; }
.acct-tools-form p { margin: 0; color: #9b9b9b; font-size: 12px; }
@media (max-width: 900px) {
  .hub-header { padding: 0 14px; gap: 10px; }
  .hub-header__note { display: none; }
  .hub-header #account-controls { margin-left: auto; }
  .hub-layout { display: block; }
  .hub-sidebar { padding: 10px 12px; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid #292929; }
  .hub-sidebar > .hub-nav-label, .hub-sidebar__account .hub-nav-label, .hub-sidebar__footer { display: none; }
  .hub-sidebar__account { display: flex; margin: 0 0 0 auto; gap: 4px; }
  .hub-nav-item { padding: 8px 10px; font-size: 12px; white-space: nowrap; }
  .tool-topbar { padding: 0 14px; flex-wrap: wrap; height: auto; min-height: 56px; gap: 10px; }
  .preferences-status { margin-left: auto; }
}
@media (max-width: 480px) {
  .hub-brand { font-size: 15px; gap: 8px; }
  .hub-header .brand-mark { display: none; }
  .hub-sidebar__account { margin-left: 0; }
  .hub-sidebar { gap: 4px; }
  .hub-empty { padding: 28px 18px; }
  .hub-empty h1 { font-size: 19px; }
}

/* Source diagnostics remain in feed status; omit the table notice panel. */
#global-notice { display: none; }

/* Keep the hub header minimal; account navigation lives in the sidebar. */
.hub-header__note { display: none; }

.feed-status .status-age { display: none; }

/* Compact hub navigation control. */
.hub-menu-toggle { flex: 0 0 40px; width: 40px; height: 40px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #a0a0a0; cursor: pointer; transition: background .18s, color .18s; }
.hub-menu-toggle span { width: 17px; height: 1.5px; border-radius: 2px; background: currentColor; }
.hub-menu-toggle:hover { background: rgba(160, 160, 160, .08); color: #e0e0e0; }
.hub-menu-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hub-menu-toggle:active { background: rgba(160, 160, 160, .12); }
.hub-layout { transition: grid-template-columns .24s ease; }
.hub-sidebar { min-width: 0; overflow: hidden; transition: opacity .18s, padding .24s, visibility .24s; }
.hub-layout.is-sidebar-collapsed { grid-template-columns: 0 minmax(0, 1fr); }
.is-sidebar-collapsed .hub-sidebar { padding-left: 0; padding-right: 0; opacity: 0; visibility: hidden; border-right: 0; pointer-events: none; }
@media (max-width: 900px) { .is-sidebar-collapsed .hub-sidebar { display: none; } .hub-menu-toggle { flex-basis: 40px; } }
@media (prefers-reduced-motion: reduce) { .hub-menu-toggle, .hub-menu-toggle span, .hub-layout, .hub-sidebar { transition: none; } }

/* Brand lockup: shared hub and sign-in identity. */
.hub-brand, .auth-page__brand[aria-label] {
  gap: 14px;
  color: #f7f7f7;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .105em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hub-brand b, .auth-page__brand[aria-label] b { color: #bbbbbb; font-weight: 600; }
.hub-brand .brand-monogram, .auth-page__brand[aria-label] .brand-monogram {
  display: block;
  flex: 0 0 38px;
  width: 38px;
  height: 20px;
  color: #ffffff;
}
@media (max-width: 480px) {
  .hub-brand, .auth-page__brand[aria-label] { gap: 12px; font-size: 13px; letter-spacing: .085em; }
}

.acct-toggle__chevron { display: none; }

.hub-header #account-controls { margin-left: auto; }

/* Arbitrage Suka shell is monochrome; Fee Radar owns its mint accents. */
body { background: #101010; }
#fi-radar-workspace { background: var(--bg); }
.hub-header, .hub-sidebar, .hub-empty { --accent: #e6e6e6; --line: #282828; color: #e6e6e6; }
.hub-nav-item.is-active { color: #f2f2f2; border-color: #3a3a3a; background: #222222; }
.hub-nav-item:focus-visible, .hub-retry:focus-visible, .hub-menu-toggle:focus-visible { outline-color: #e6e6e6; }
.hub-brand, .hub-brand b, .hub-brand .brand-monogram { color: #eeeeee; }
.auth-page { background: #101010; }
.auth-page__card { background: #171717; }
.auth-page__brand, .auth-page__brand b, .auth-page__brand[aria-label] b, .auth-page__brand .brand-monogram { color: #eeeeee; }

/* Private hub home: registry-backed tool cards. */
.hub-home { max-width: 1120px; padding: clamp(28px, 5vw, 64px); margin: 0 auto; }
.hub-home__eyebrow { margin: 0 0 14px; font-size: 11px; letter-spacing: .16em; color: var(--muted); }
.hub-home h1 { margin: 0; font-size: clamp(26px, 3vw, 36px); font-weight: 650; letter-spacing: -.035em; }
.hub-home__intro { margin: 12px 0 32px; color: var(--muted); line-height: 1.6; }
.hub-tool-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 18px; }
.hub-tool-card { display: flex; flex-direction: column; align-items: flex-start; min-height: 250px; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); text-decoration: none; color: var(--text); transition: border-color .18s, background .18s; }
.hub-tool-card:hover { border-color: #505050; background: #1b1b1b; }
.hub-tool-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.hub-tool-card__mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #242424; color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .03em; }
.hub-tool-card h2 { margin: 22px 0 9px; font-size: 20px; font-weight: 600; }
.hub-tool-card p { margin: 0 0 26px; max-width: 340px; color: var(--muted); line-height: 1.65; }
.hub-tool-card__action { margin-top: auto; color: var(--accent); font-size: 13px; }
.hub-home__no-tools { padding: 24px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); line-height: 1.7; }
@media(max-width: 480px) { .hub-home { padding: 28px 18px; } .hub-tool-card { padding: 22px; min-height: 230px; } }
@media(prefers-reduced-motion: reduce) { .hub-tool-card { transition: none; } }

/* Open workspaces remain mounted while their tab is inactive. */
.hub-work-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 10px 18px; border-bottom: 1px solid var(--line); background: var(--bg-raised); }
.hub-work-tab { display: flex; align-items: center; flex: 0 0 auto; border: 1px solid transparent; border-radius: 8px; }
.hub-work-tab:has([aria-selected="true"]) { border-color: #404040; background: #202020; }
.hub-work-tab button { min-height: 36px; padding: 8px 12px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.hub-work-tab [aria-selected="true"] { color: var(--text); }
.hub-work-tab button:hover { background: #252525; color: var(--text); }
.hub-work-tab .hub-work-tab__close { padding: 6px 10px; font-size: 19px; }
.hub-work-tab button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
@media(max-width: 480px) { .hub-work-tabs { padding: 8px 12px; } .hub-work-tab button { min-height: 40px; } }

.hub-view-controls { display: flex; align-items: center; gap: 20px; padding: 8px 18px; border-bottom: 1px solid var(--line); }
.hub-view-controls button { padding: 8px 12px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--text); font: inherit; font-size: 12px; cursor: pointer; }
.hub-view-controls label { display: flex; gap: 10px; align-items: center; font-size: 11px; color: var(--muted); }
.hub-view-controls input { width: 110px; accent-color: var(--accent); }
.hub-view-controls button:focus-visible, .hub-view-controls input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hub-content.is-split { display: grid; grid-template-columns: minmax(0, var(--split-width, 50%)) 8px minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); height: calc(100dvh - 64px); }
.is-split > .hub-work-tabs, .is-split > .hub-view-controls { grid-column: 1 / -1; }
.is-split > #fi-radar-workspace { grid-column: 1; grid-row: 3; min-width: 0; overflow: auto; }
.is-split > #pools-workspace { grid-column: 3; grid-row: 3; min-height: 0; height: 100%; }
.is-split .shell { min-width: 0; padding: 12px; }
.is-split .tool-topbar { flex-wrap: wrap; height: auto; gap: 10px; padding: 12px; }
.hub-split-divider { grid-column: 2; grid-row: 3; background: #252525; cursor: col-resize; touch-action: none; }
.hub-split-divider:hover, .hub-split-divider:focus-visible { background: #777; outline: none; }
.is-resizing iframe { pointer-events: none; }
@media(max-width: 900px) { .hub-content.is-split { display: block; height: auto; } .is-split > #fi-radar-workspace, .is-split > #pools-workspace { height: 65dvh; min-height: 360px; overflow: auto; border-bottom: 1px solid var(--line); } .is-split .hub-split-divider, .is-split #hub-split-size { display: none; } .hub-view-controls { padding: 8px 12px; } }

.is-split .toolbar, .is-split .toolbar-actions { flex-wrap: wrap; }
.is-split .toolbar-actions { margin-left: 0; }

.hub-tool-group { min-width: 0; }
.hub-tool-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; list-style: none; }
.hub-tool-group > summary::-webkit-details-marker { display: none; }
.hub-tool-group > summary::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); }
.hub-tool-group[open] > summary::after { transform: rotate(45deg); }
.hub-tool-group > nav { margin: 4px 0 0 16px; padding-left: 8px; border-left: 1px solid #383838; }
