/* Tim · Wallet Deck — Flight Deck "Neon Noir" (C:\projects\ui flight-deck.css, data-t="noir"). No external fonts. */
:root {
  --mono: "Cascadia Code", "Cascadia Mono", ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  --bg: #0B0716; --s1: #130E24; --s2: #1A1330; --s3: #241A42; --line: #31245C; --line-2: #241B45;
  --ink: #EAE4FA; --dim: #A197C4; --faint: #6F6595; --quiet: #8C82B6;
  --A: #FF3DA6; --A-g: rgba(255, 61, 166, .45); --A-w: #2E0F2B;
  --B: #35E7F0; --B-g: rgba(53, 231, 240, .4); --B-w: #0B2A33;
  --C: #9B8CFF; --C-g: rgba(155, 140, 255, .42); --C-w: #191338;
  --D: #5CFF8A; --D-g: rgba(92, 255, 138, .42); --D-w: #0F3319;
  --gate: #FFB43C; --gate-g: rgba(255, 180, 60, .45); --gate-w: #2A1C10;
  --wash-a: rgba(124, 58, 237, .20); --wash-b: rgba(255, 61, 166, .14); --grid: rgba(140, 110, 220, .055);
  --acc: var(--B); --acc-g: var(--B-g); --acc-w: var(--B-w);
  color-scheme: dark; font-family: var(--mono); font-size: 13px;
}
.acc-a { --acc: var(--A); --acc-g: var(--A-g); --acc-w: var(--A-w); }
.acc-b { --acc: var(--B); --acc-g: var(--B-g); --acc-w: var(--B-w); }
.acc-c { --acc: var(--C); --acc-g: var(--C-g); --acc-w: var(--C-w); }
.acc-d { --acc: var(--D); --acc-g: var(--D-g); --acc-w: var(--D-w); }
.acc-gate { --acc: var(--gate); --acc-g: var(--gate-g); --acc-w: var(--gate-w); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; background: var(--bg); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); line-height: 1.45; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; position: relative; isolation: isolate;
  background:
    radial-gradient(1100px 460px at 14% -12%, var(--wash-a), transparent 62%),
    radial-gradient(900px 420px at 96% 100%, var(--wash-b), transparent 62%),
    var(--bg);
  background-attachment: fixed;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .42;
  background:
    repeating-linear-gradient(0deg, transparent 0 39px, var(--grid) 39px 40px),
    repeating-linear-gradient(90deg, transparent 0 39px, var(--grid) 39px 40px);
}
button, input, select { font: inherit; color: inherit; }
button, a, select, input { touch-action: manipulation; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, circle:focus-visible, summary:focus-visible { outline: 2px solid var(--B); outline-offset: 3px; }
svg { display: block; }
button svg, .read-only svg, .search svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
[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 { opacity: 0; position: fixed; top: -70px; left: 20px; z-index: 100; background: var(--B); color: #04191F; padding: 12px 20px; }
.skip:focus { opacity: 1; top: 10px; }
.positive { color: var(--D) !important; text-shadow: 0 0 12px var(--D-g); }
.negative { color: var(--A) !important; text-shadow: 0 0 12px var(--A-g); }

/* ---------- Header (the Flight Deck title bar) */
.header {
  position: relative; display: flex; align-items: center; gap: 48px; min-height: 60px; padding: 0 40px;
  background: rgba(19, 14, 36, .82); border-bottom: 1px solid var(--line);
}
.header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--A) 18%, var(--B) 72%, transparent); opacity: .7; }
.brand { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.brand-mark { width: 28px; height: 28px; flex: none; filter: drop-shadow(0 0 6px var(--A-g)); }
.brand-mark .bm-frame { fill: var(--A-w); stroke: var(--A); stroke-width: 1.6; }
.brand-mark .bm-t { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: square; }
.brand-mark .bm-dot { fill: var(--B); }
.brand-text { font-size: 13px; letter-spacing: .26em; color: var(--ink); text-shadow: 0 0 12px var(--A-g); font-weight: 600; }
.brand-sep { color: var(--A); margin: 0 .5em 0 .3em; }
.brand-sub { color: var(--dim); font-weight: 400; text-shadow: none; font-size: 11px; letter-spacing: .24em; }
.header nav { display: flex; align-self: stretch; gap: 28px; }
.header nav a { display: flex; align-items: center; position: relative; color: var(--dim); font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; }
.header nav a:hover { color: var(--ink); }
.header nav a.active { color: var(--B); text-shadow: 0 0 12px var(--B-g); }
.header nav a.active::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--B); box-shadow: 0 0 12px 1px var(--B-g); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.read-only { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.read-only svg { width: 13px; height: 13px; }
.status {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px; font-size: 10px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--dim); background: var(--s2); border: 1px solid var(--line); white-space: nowrap;
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--gate); box-shadow: 0 0 8px var(--gate-g); }
.status.live { color: var(--D); border-color: rgba(92, 255, 138, .45); }
.status.live i { background: var(--D); box-shadow: 0 0 9px var(--D); }
.status.offline i { background: var(--A); box-shadow: 0 0 9px var(--A-g); }
@media (prefers-reduced-motion: no-preference) { .status.live i { animation: pulse 2.1s ease-in-out infinite; } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }

main { max-width: 1440px; margin: 0 auto; padding: 0 40px 28px; }

/* ---------- Heading strip */
.deck-strip { position: relative; display: flex; align-items: baseline; gap: 14px; padding: 18px 2px 12px; }
.deck-strip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, var(--B), transparent 55%, var(--A)); opacity: .45; }
.strip-title { font-size: 10px; letter-spacing: .26em; text-transform: uppercase; color: var(--B); text-shadow: 0 0 12px var(--B-g); white-space: nowrap; }
.strip-summary { font-size: 11px; color: var(--dim); letter-spacing: .03em; min-width: 0; }
.strip-time { margin-left: auto; font-size: 10px; color: var(--faint); letter-spacing: .08em; white-space: nowrap; }

/* ---------- Wallet bar */
.wallet-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; padding: 8px 10px 8px 16px;
  background: rgba(19, 14, 36, .78); border: 1px solid var(--line-2);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.wallet-info, .wallet-controls { display: flex; align-items: center; gap: 12px; min-width: 0; }
.wallet-label { font-size: 10px; letter-spacing: .2em; text-transform: uppercase; color: var(--faint); }
.wallets { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.wallet-address {
  display: inline-flex; align-items: center; gap: 9px; min-height: 34px; padding: 4px 10px 4px 6px; font-size: 11.5px; letter-spacing: .04em;
  color: var(--ink); background: var(--s2); border: 1px solid var(--line);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
  transition: border-color .15s, background .15s;
}
.wallet-address:hover { border-color: var(--B); background: var(--B-w); color: var(--ink); }
.wallet-address svg { width: 13px; height: 13px; color: var(--faint); }
.wallet-address:hover svg { color: var(--B); }
.wallet-pending { font-size: 11px; color: var(--faint); }
select {
  border: 1px solid var(--line-2); background: var(--s1); color: var(--dim); padding: 7px 10px; font-size: 11px; max-width: 200px; min-height: 34px;
  letter-spacing: .04em;
}
option { background: var(--s1); }
.quiet-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 34px; padding: 4px 10px; color: var(--dim); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; border: 1px solid transparent; }
.quiet-button:hover { color: var(--B); border-color: var(--line); }
.quiet-button svg { width: 14px; height: 14px; }

/* ---------- Wallet and flow tags */
.wtags { display: inline-flex; gap: 4px; flex-wrap: wrap; vertical-align: middle; }
.wtag {
  display: inline-block; flex: none; padding: 1px 5px; font-size: 9px; line-height: 1.5; letter-spacing: .12em; font-weight: 600;
  color: var(--B); background: var(--B-w); border: 1px solid rgba(53, 231, 240, .55); text-shadow: 0 0 8px var(--B-g);
}
.wtag.wt-1 { color: var(--C); background: var(--C-w); border-color: rgba(155, 140, 255, .6); text-shadow: 0 0 8px var(--C-g); }
.wtag.wt-2, .wtag.wt-x { color: var(--gate); background: var(--gate-w); border-color: rgba(255, 180, 60, .55); text-shadow: 0 0 8px var(--gate-g); }

.notice { border-left: 2px solid var(--gate); background: rgba(255, 180, 60, .06); color: #F2CF95; font-size: 11.5px; line-height: 1.65; padding: 12px 16px; margin: 16px 0 0; box-shadow: -6px 0 18px -10px var(--gate-g); }

/* ---------- Chamfered neon panels and cards */
.panel, .card {
  --c: 14px; position: relative; min-width: 0;
  background:
    linear-gradient(90deg, var(--acc), transparent 55%) top left / 100% 1px no-repeat,
    linear-gradient(180deg, rgba(36, 26, 66, .5), rgba(19, 14, 36, .2) 160px),
    rgba(19, 14, 36, .9);
  border: 1px solid var(--line);
  box-shadow: inset 0 0 46px -26px var(--acc-g);
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
}
.panel::before, .card::before, .panel::after, .card::after {
  content: ""; position: absolute; height: 2px; width: calc(var(--c) * 1.4142 + 2px); pointer-events: none; transform: rotate(-45deg);
}
.panel::before, .card::before { left: -2px; top: calc(var(--c) - 2px); transform-origin: 0 50%; background: var(--acc); box-shadow: 0 0 10px var(--acc-g); }
.panel::after, .card::after { right: -2px; bottom: calc(var(--c) - 2px); transform-origin: 100% 50%; background: var(--line); }

.label { display: flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: var(--acc); text-shadow: 0 0 10px var(--acc-g); }
.unit { font-size: 9px; letter-spacing: .14em; color: var(--dim); background: var(--s3); border: 1px solid var(--line); padding: 1px 5px; text-shadow: none; }
.summary { display: grid; grid-template-columns: 1.55fr 1fr 1fr 1fr; gap: 14px; margin: 18px 0; }
.card { padding: 18px 20px 16px; display: flex; flex-direction: column; }
.big-value { font-size: 44px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; margin: 10px 0 4px; color: var(--ink); text-shadow: 0 0 24px var(--B-g); overflow-wrap: anywhere; }
.value-gbp { font-size: 13px; color: var(--ink); opacity: .85; letter-spacing: .02em; }
.value-note { margin-top: 8px; font-size: 10.5px; color: var(--quiet); line-height: 1.55; }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: -.01em; line-height: 1.3; margin: 12px 0 6px; overflow-wrap: anywhere; }
.stat-value.partial { color: var(--gate); text-shadow: 0 0 12px var(--gate-g); }
.small-muted { font-size: 10.5px; color: var(--quiet); line-height: 1.55; }
.summary-stat .text-button { align-self: flex-start; margin-top: auto; padding-top: 8px; }

.primary-grid, .secondary-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 14px; margin-bottom: 14px; }
.primary-grid { grid-template-columns: minmax(0, 1fr); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px 14px; position: relative; }
h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--acc); text-shadow: 0 0 14px var(--acc-g); }
.panel-heading p { margin: 6px 0 0; font-size: 10.5px; color: var(--quiet); line-height: 1.5; }
.panel-number { font-size: 9px; letter-spacing: .2em; color: var(--faint); border: 1px solid var(--line-2); padding: 3px 7px; white-space: nowrap; }
.text-button { font-size: 10.5px; letter-spacing: .06em; color: var(--dim); padding: 5px 0; line-height: 1.4; min-height: 28px; text-align: left; }
.text-button:hover { color: var(--B); }

/* ---------- Chart */
.ranges { display: flex; gap: 3px; }
.ranges button { font-size: 9.5px; letter-spacing: .14em; color: var(--dim); min-height: 28px; padding: 5px 10px; border: 1px solid var(--line-2); background: var(--s1); }
.ranges button:hover { color: var(--ink); }
.ranges button.selected { color: var(--B); border-color: var(--B); background: var(--B-w); box-shadow: 0 0 12px -3px var(--B-g); text-shadow: 0 0 8px var(--B-g); }
.chart-legend { display: flex; align-items: center; gap: 20px; padding: 0 22px; margin: 4px 0 14px; font-size: 9.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--dim); }
.chart-legend > span { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.legend-line { width: 16px; height: 2px; background: var(--B); box-shadow: 0 0 6px var(--B-g); }
.legend-line.dashed { height: 0; background: none; box-shadow: none; border-bottom: 2px dashed var(--C); }
.chart-legend > .text-button { margin-left: auto; font-size: 9.5px; letter-spacing: .12em; }
.chart-wrap { height: 260px; position: relative; margin: 0 18px; }
#chart { width: 100%; height: 100%; overflow: visible; }
#chart text { font-size: 9.5px; font-family: var(--mono); fill: var(--quiet); }
#chart .value-line { filter: drop-shadow(0 0 5px rgba(53, 231, 240, .65)); }
#chart .latest-dot { filter: drop-shadow(0 0 6px var(--B)); }
.chart-empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; background: radial-gradient(ellipse at center, rgba(53, 231, 240, .06), transparent 65%); }
.empty-orbit { width: 46px; height: 46px; display: grid; place-items: center; color: var(--B); font-size: 22px; border: 1px solid var(--B); background: var(--B-w); box-shadow: 0 0 18px -4px var(--B-g); clip-path: polygon(9px 0, calc(100% - 9px) 0, 100% 9px, 100% calc(100% - 9px), calc(100% - 9px) 100%, 9px 100%, 0 calc(100% - 9px), 0 9px); }
.chart-empty h3 { font-size: 12px; font-weight: 500; letter-spacing: .06em; margin: 14px 0 8px; }
.chart-empty p { font-size: 11px; color: var(--quiet); max-width: 260px; line-height: 1.6; margin: 0; }
.chart-footer { display: flex; justify-content: space-between; gap: 14px; margin-top: 8px; padding: 12px 22px; border-top: 1px solid var(--line-2); color: var(--faint); font-size: 9.5px; letter-spacing: .06em; }
.chart-footer > span:last-child { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tiny-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; background: var(--B); box-shadow: 0 0 6px var(--B); }
.chart-tooltip { position: absolute; left: 50%; top: 14px; z-index: 2; padding: 8px 11px; font-size: 10.5px; line-height: 1.6; white-space: nowrap; color: var(--ink); background: var(--s2); border: 1px solid var(--B); box-shadow: 0 0 18px -4px var(--B-g); pointer-events: none; }

/* ---------- Capital */
.capital-totals { margin: 0 22px 6px; padding: 2px 0 10px; font-size: 11.5px; }
.capital-totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.capital-totals dt { color: var(--dim); }
.capital-totals dd { margin: 0; color: var(--ink); text-align: right; }
.capital-totals .net dt { color: var(--D); letter-spacing: .04em; }
.capital-totals .net dd { color: var(--D); text-shadow: 0 0 10px var(--D-g); font-weight: 600; }
.flow-heading { display: flex; align-items: center; gap: 8px; padding: 14px 22px 6px; font-size: 9.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--faint); }
.flow-heading .count { font-size: 9px; letter-spacing: 0; color: var(--dim); background: var(--s3); padding: 1px 6px; }
.flow-list { list-style: none; margin: 0; padding: 0 22px; }
.flow-row { padding: 9px 0 9px 10px; border-left: 2px solid var(--line); margin: 0 0 6px; background: linear-gradient(90deg, rgba(36, 26, 66, .35), transparent 80%); }
.flow-row.deposit { border-left-color: var(--D); }
.flow-row.withdrawal { border-left-color: var(--gate); }
.flow-main { display: flex; align-items: center; gap: 8px; font-size: 11.5px; min-width: 0; }
.flow-qty { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.flow-qty b { font-weight: 500; color: var(--dim); }
.flow-value { white-space: nowrap; font-weight: 600; padding-right: 6px; }
.flow-row.deposit .flow-value { color: var(--D); }
.flow-row.withdrawal .flow-value { color: var(--gate); }
.flow-value.pending { color: var(--gate) !important; font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; border: 1px dashed rgba(255, 180, 60, .6); padding: 1px 6px; margin-right: 6px; font-weight: 500; }
.flow-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; font-size: 10px; color: var(--quiet); }
.flow-meta .network-badge { padding: 2px 6px; }
.flow-empty { font-size: 11px; color: var(--quiet); padding: 6px 0 10px; }
.capital-note { margin: 0; padding: 12px 22px 18px; font-size: 10px; line-height: 1.7; color: var(--quiet); }
.capital-note.warn { color: #F2CF95; }

/* ---------- Tables */
.allocation { padding: 0 22px; margin-bottom: 14px; min-height: 6px; }
.allocation svg { width: 100%; height: 6px; filter: drop-shadow(0 0 4px rgba(155, 140, 255, .35)); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; white-space: nowrap; text-align: left; font-size: 11.5px; }
thead th { padding: 9px 14px; font-size: 9.5px; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); background: rgba(11, 7, 22, .55); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
tbody tr:hover td { background: rgba(36, 26, 66, .35); }
.numeric { text-align: right; }
.asset-name { display: flex; align-items: center; gap: 11px; }
.token-mark {
  width: 30px; height: 30px; flex: none; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
  color: var(--C); background: var(--C-w); border: 1px solid var(--C);
  clip-path: polygon(6px 0, calc(100% - 6px) 0, 100% 6px, 100% calc(100% - 6px), calc(100% - 6px) 100%, 6px 100%, 0 calc(100% - 6px), 0 6px);
}
.token-mark.color-1 { color: var(--B); background: var(--B-w); border-color: var(--B); }
.token-mark.color-2 { color: var(--D); background: var(--D-w); border-color: var(--D); }
.token-mark.color-3 { color: var(--gate); background: var(--gate-w); border-color: var(--gate); }
.asset-name strong { font-size: 11.5px; font-weight: 600; }
.asset-name small { display: block; margin-top: 3px; font-size: 10px; color: var(--quiet); }
.asset-name a:hover strong { color: var(--B); }
.asset-links { min-width: 0; }
.asset-links > a { display: block; }
.asset-links > a.chart-link, .sold-row a.chart-link { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 4px 7px; padding: 2px 0; }
.asset-links > a.chart-link + a small { margin-top: 2px; }
.asset-links > .wtags { margin-top: 5px; display: flex; }
.chart-cue { font-size: 8.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--B); border: 1px solid rgba(53, 231, 240, .5); padding: 0 4px; line-height: 1.5; }
.chart-link:hover .chart-cue { color: #04191F; background: var(--B); box-shadow: 0 0 10px var(--B-g); }
.chart-link:focus-visible { outline-offset: 2px; }
.balance-symbol { font-size: 10px; color: var(--faint); margin-left: 4px; }
.bought-at { white-space: nowrap; }
.avg-tag { font-size: 8.5px; color: var(--faint); margin-left: 4px; letter-spacing: .1em; text-transform: uppercase; }
.excluded { opacity: .65; }
.panel-footnote { margin: 0; padding: 12px 22px; font-size: 10px; line-height: 1.65; color: var(--quiet); }
.empty-cell { padding: 32px 22px; color: var(--quiet); font-size: 11px; white-space: normal; line-height: 1.6; text-align: center; }
.holdings-panel { align-self: start; }
.holdings-panel table { min-width: 760px; }
.holdings-panel td.asset-cell { white-space: normal; min-width: 200px; }
.holdings-panel .asset-name small { max-width: 230px; }
.holdings-panel td, .holdings-panel th { padding-left: 11px; padding-right: 11px; }
.holdings-panel td:first-child, .holdings-panel th:first-child { padding-left: 22px; }
.holdings-panel td:last-child, .holdings-panel th:last-child { padding-right: 22px; }
.position-return { font-size: 11px; white-space: nowrap; }
.position-caption { margin: 0; padding: 10px 22px 0; font-size: 10px; line-height: 1.7; color: var(--dim); }
.mobile-position-returns { display: none; }

/* Collapsed groups: dust and airdrops */
.fold { border-top: 1px solid var(--line-2); }
.fold summary { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 22px; cursor: pointer; list-style: none; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); line-height: 1.6; }
.fold summary::-webkit-details-marker { display: none; }
.fold summary:focus-visible { outline-offset: -4px; }
.fold[open] summary { color: var(--ink); }
.fold-action { flex: none; font-size: 9.5px; letter-spacing: .16em; color: var(--C); }
.fold-action::after { content: " +"; }
.fold[open] .fold-action::after { content: " −"; }
.airdrop-fold summary { color: var(--quiet); }
.airdrop-fold summary #airdrop-title::before { content: "◇ "; color: var(--gate); }
.airdrop-list { list-style: none; margin: 0; padding: 0 22px 8px; }
.airdrop-row { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 10px 0; border-top: 1px dashed var(--line-2); opacity: .8; }
.airdrop-name { min-width: 0; }
.airdrop-name strong { font-size: 11px; font-weight: 500; color: var(--dim); overflow-wrap: anywhere; }
.airdrop-name a:hover strong { color: var(--ink); }
.airdrop-name small { display: block; margin-top: 3px; font-size: 10px; color: var(--faint); }
.airdrop-side { display: flex; align-items: center; gap: 10px; flex: none; }
.airdrop-balance { font-size: 11px; color: var(--dim); white-space: nowrap; }
.airdrop-balance b { font-weight: 400; color: var(--faint); }

/* ---------- Sold */
.account-column { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.sold-body { padding: 0 22px; }
.sold-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line-2); font-size: 12px; }
.sold-row:first-child { border-top: 0; padding-top: 2px; }
.sold-row > div { min-width: 0; }
.sold-row strong { font-weight: 600; }
.sold-row .wtags { margin-left: 8px; }
.sold-row small { display: block; margin-top: 6px; font-size: 10px; color: var(--quiet); line-height: 1.6; }
.sold-row a { overflow-wrap: anywhere; }
.sold-row > strong { white-space: nowrap; font-size: 14px; }
.sold-empty { margin: 0 0 16px; font-size: 11px; color: var(--quiet); line-height: 1.8; }

/* ---------- Activity */
.activity-controls { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 22px 16px; }
.activity-tabs { display: flex; gap: 18px; }
.activity-tabs button { padding: 8px 0; font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--dim); border-bottom: 2px solid transparent; }
.activity-tabs button.selected { color: var(--gate); border-color: var(--gate); text-shadow: 0 0 10px var(--gate-g); }
.activity-tabs span { margin-left: 6px; padding: 1px 6px; font-size: 9px; letter-spacing: 0; color: var(--dim); background: var(--s3); text-shadow: none; }
.search { display: flex; align-items: center; gap: 8px; padding: 6px 11px; background: var(--s1); border: 1px solid var(--line-2); }
.search:focus-within { border-color: var(--gate); box-shadow: 0 0 12px -4px var(--gate-g); }
.search svg { width: 14px; height: 14px; color: var(--faint); }
.search input { width: 240px; min-width: 0; padding: 4px 0; font-size: 11px; color: var(--ink); background: transparent; border: 0; outline: none; }
.search input::placeholder { color: var(--faint); }
.activity-summary { display: flex; align-items: center; gap: 10px; }
.activity-icon { width: 28px; height: 28px; flex: none; display: grid; place-items: center; font-size: 13px; color: var(--dim); background: var(--s2); border: 1px solid var(--line); }
.activity-summary .detail { max-width: 380px; overflow: hidden; text-overflow: ellipsis; }
.activity-summary small { display: block; margin-top: 4px; font-size: 10px; color: var(--quiet); overflow: hidden; text-overflow: ellipsis; }
.flow-label { font-weight: 600; letter-spacing: .02em; }
tr.flow-deposit td:first-child { box-shadow: inset 2px 0 0 var(--D); }
tr.flow-withdrawal td:first-child { box-shadow: inset 2px 0 0 var(--gate); }
tr.flow-internal td:first-child { box-shadow: inset 2px 0 0 var(--C); }
tr.flow-deposit .activity-icon { color: var(--D); border-color: var(--D); background: var(--D-w); box-shadow: 0 0 10px -3px var(--D-g); }
tr.flow-withdrawal .activity-icon { color: var(--gate); border-color: var(--gate); background: var(--gate-w); box-shadow: 0 0 10px -3px var(--gate-g); }
tr.flow-internal .activity-icon { color: var(--C); border-color: var(--C); border-style: dashed; background: var(--C-w); }
tr.flow-deposit .flow-label { color: var(--D); }
tr.flow-withdrawal .flow-label { color: var(--gate); }
tr.flow-internal .flow-label { color: var(--C); }
tr.flow-internal td { background: repeating-linear-gradient(135deg, rgba(155, 140, 255, .035) 0 6px, transparent 6px 12px); }
.purchase-row .activity-icon { color: var(--B); border-color: rgba(53, 231, 240, .5); }
.network-badge { display: inline-block; padding: 3px 7px; font-size: 9.5px; letter-spacing: .06em; color: var(--dim); background: var(--s2); border: 1px solid var(--line-2); white-space: nowrap; }
.transaction-status { display: flex; align-items: center; gap: 6px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--D); }
.transaction-status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.transaction-status.failed { color: var(--A); }
.transaction-status.pending { color: var(--gate); }
.tx-date { font-size: 11px; }
.tx-date small { display: block; margin-top: 4px; font-size: 10px; color: var(--quiet); }
.hash-link { font-size: 10.5px; color: var(--dim); }
.hash-link:hover { color: var(--B); text-shadow: 0 0 8px var(--B-g); }
.hash-chain { font-size: 9.5px; color: var(--faint); letter-spacing: .04em; }
.purchase-row td:last-child .hash-link { display: block; line-height: 1.4; }
.purchase-row td:last-child .hash-link + .hash-link { margin-top: 8px; }
.pair-legs { margin: 9px 0 0 38px; max-width: 540px; font-size: 10px; color: var(--dim); white-space: normal; }
.pair-legs summary { width: max-content; cursor: pointer; color: var(--B); letter-spacing: .08em; }
.pair-legs ul { list-style: none; margin: 8px 0 0; padding: 0 0 0 10px; border-left: 1px solid var(--line); }
.pair-legs li { margin: 0 0 8px; line-height: 1.9; overflow-wrap: anywhere; }
.pair-legs .network-badge { padding: 2px 6px; }
.activity-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 22px 16px; font-size: 10px; line-height: 1.6; color: var(--quiet); }
.activity-footer .text-button { white-space: nowrap; color: var(--gate); }

/* ---------- Footer, dialogs, toast, banner */
.footer { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 2px 0; font-size: 10px; color: var(--faint); }
.footer > div { display: flex; align-items: center; gap: 18px; }
.footer-brand { color: var(--dim); letter-spacing: .26em; text-shadow: 0 0 10px var(--A-g); }
.footer .text-button { font-size: 10px; }
.demo-banner { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 24px; font-size: 11px; line-height: 1.6; color: #FFE0B0; background: var(--gate-w); border-bottom: 1px solid var(--gate); }
.demo-banner > span { font-size: 9.5px; letter-spacing: .2em; font-weight: 700; color: var(--gate); }
.demo-banner button { color: var(--gate); text-decoration: underline; font-size: 10.5px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; max-width: calc(100% - 32px); padding: 11px 18px; font-size: 11.5px; color: var(--ink); background: var(--s2); border: 1px solid var(--B); box-shadow: 0 0 22px -6px var(--B-g), 0 10px 30px rgba(0, 0, 0, .5); }
dialog { width: 560px; max-width: calc(100% - 32px); max-height: calc(100% - 48px); padding: 30px 32px; color: var(--ink); background: var(--s1); border: 1px solid var(--A); box-shadow: 0 0 40px -10px var(--A-g), 0 24px 100px rgba(0, 0, 0, .7); }
dialog::backdrop { background: rgba(5, 3, 12, .82); backdrop-filter: blur(4px); }
.eyebrow { font-size: 9.5px; letter-spacing: .26em; color: var(--A); text-shadow: 0 0 10px var(--A-g); }
dialog h2 { margin: 14px 0 18px; font-size: 16px; letter-spacing: .14em; color: var(--ink); text-shadow: none; }
dialog h3 { margin: 22px 0 6px; font-size: 10.5px; letter-spacing: .2em; text-transform: uppercase; color: var(--B); font-weight: 500; }
dialog p { font-size: 11.5px; line-height: 1.75; color: var(--dim); }
dialog strong { color: var(--ink); font-weight: 600; }
.dialog-close { position: absolute; top: 10px; right: 14px; width: 38px; height: 38px; font-size: 24px; color: var(--dim); }
.dialog-close:hover { color: var(--A); }
.formula { margin: 18px 0; padding: 16px 18px; font-size: 12px; line-height: 2; color: var(--ink); background: var(--D-w); border-left: 2px solid var(--D); box-shadow: -6px 0 18px -10px var(--D-g); }
.formula strong { color: var(--D); text-shadow: 0 0 10px var(--D-g); }
.formula span { color: var(--dim); font-size: 11px; }
.source-details { font-size: 11px; line-height: 1.7; }
.source-details > div { margin: 14px 0; }
.source-details dt { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); }
.source-details dd { margin: 4px 0 0; }

/* ---------- Responsive */
@media (min-width: 1600px) { main { max-width: 1520px; } .secondary-grid { grid-template-columns: minmax(0, 1fr) 420px; } }
@media (max-width: 1150px) {
  .header { gap: 32px; padding: 0 24px; }
  main { padding: 0 24px 22px; }
  .secondary-grid { grid-template-columns: 1fr; }
  .account-column { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .read-only { display: none; }
  .big-value { font-size: 38px; }
  .stat-value { font-size: 21px; }
  .summary { grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 12px; }
  .card { padding: 16px 16px 14px; }
}
@media (max-width: 960px) {
  .summary { grid-template-columns: 1fr 1fr 1fr; }
  .summary-value { grid-column: 1 / -1; }
  .chart-footer > span:last-child { display: none; }
  .activity-summary .detail { max-width: 260px; }
}

/* Phones: each holding and each activity event is a card; nothing scrolls sideways. */
@media (max-width: 720px) {
  :root { font-size: 12.5px; }
  .header { min-height: 54px; padding: 0 16px; gap: 12px; }
  .brand-text { font-size: 12px; letter-spacing: .2em; }
  .brand-sub { font-size: 9.5px; letter-spacing: .16em; }
  .brand-sep { margin: 0 .35em 0 .2em; }
  .brand-mark { width: 24px; height: 24px; }
  .header nav { display: none; }
  .status { padding: 5px 9px; font-size: 9px; letter-spacing: .14em; }
  main { padding: 0 16px 20px; }
  .deck-strip { flex-wrap: wrap; gap: 4px 12px; padding-top: 14px; }
  .strip-summary { order: 3; flex-basis: 100%; font-size: 10.5px; }
  .wallet-bar { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .wallet-label { display: none; }
  .wallet-info { flex: 1 1 100%; }
  .wallets { width: 100%; }
  .wallet-address { flex: 1 1 140px; justify-content: space-between; font-size: 11px; }
  .wallet-controls { flex: 1 1 100%; justify-content: space-between; gap: 8px; }
  .wallet-controls select { flex: 1; max-width: none; min-width: 0; }
  .summary { grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0; }
  .summary-value, .summary-stat.acc-d { grid-column: 1 / -1; }
  .big-value { font-size: 36px; }
  .stat-value { font-size: 19px; margin-top: 10px; }
  .card { --c: 11px; padding: 14px 14px 12px; }
  .label { font-size: 9px; letter-spacing: .18em; }
  .primary-grid, .secondary-grid { grid-template-columns: 1fr; gap: 12px; margin-bottom: 12px; }
  .account-column { display: flex; gap: 12px; }
  .panel { --c: 12px; }
  .panel-heading { padding: 16px 16px 12px; flex-wrap: wrap; }
  .ranges button { padding: 5px 8px; }
  .chart-legend { padding: 0 16px; gap: 12px; flex-wrap: wrap; font-size: 9px; }
  .chart-wrap { height: 220px; margin: 0 10px; }
  .chart-footer { padding: 12px 16px; }
  .capital-totals { margin: 0 16px 6px; }
  .flow-heading { padding: 12px 16px 6px; }
  .flow-list { padding: 0 16px; }
  .flow-meta { gap: 4px 8px; }
  .capital-note, .panel-footnote, .position-caption { padding-left: 16px; padding-right: 16px; }
  .allocation { padding: 0 16px; }
  .fold summary { padding: 13px 16px; align-items: flex-start; letter-spacing: .1em; }
  .airdrop-list { padding: 0 16px 8px; }
  .airdrop-row { flex-wrap: wrap; }
  .airdrop-side { flex: 1 1 100%; justify-content: space-between; }
  .sold-body { padding: 0 16px; }
  .activity-controls { flex-direction: column; align-items: stretch; gap: 12px; padding: 0 16px 14px; }
  .search input { width: 100%; }
  .activity-footer { padding: 12px 16px 14px; flex-direction: column; align-items: flex-start; }
  .footer { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 22px; }
  .footer > div { flex-wrap: wrap; gap: 12px; }
  .demo-banner { flex-wrap: wrap; justify-content: flex-start; gap: 8px; padding: 10px 16px; font-size: 10.5px; }
  dialog { padding: 26px 20px; }

  .holdings-panel .table-scroll, .activity-panel .table-scroll { overflow-x: visible; }
  .holdings-panel table, .activity-panel table { min-width: 0; }
  .holdings-panel table, .holdings-panel tbody, .activity-panel table, .activity-panel tbody { display: block; white-space: normal; }
  .holdings-panel thead, .activity-panel thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .holdings-panel tbody tr, .activity-panel tbody tr { display: grid; gap: 12px 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
  .holdings-panel tbody tr:hover td, .activity-panel tbody tr:hover td { background: none; }
  .holdings-panel tbody td, .activity-panel tbody td { display: block; padding: 0; border: 0; min-width: 0; text-align: left; overflow-wrap: anywhere; }
  .holdings-panel tbody td[data-label]::before, .activity-panel tbody td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
  .holdings-panel tbody td.empty-cell, .activity-panel tbody td.empty-cell { grid-column: 1 / -1; padding: 18px 0; text-align: center; }
  .holdings-panel tbody tr { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-areas: "asset asset value" "balance price bought" "d1 d7 all"; }
  .holdings-panel tbody td.asset-cell { grid-area: asset; }
  .holdings-panel tbody td.value-cell { grid-area: value; align-self: center; text-align: right; font-size: 13px; font-weight: 600; }
  .holdings-panel tbody td.value-cell::before { display: none; }
  .holdings-panel tbody td[data-label="Balance"] { grid-area: balance; }
  .holdings-panel tbody td[data-label="Price"] { grid-area: price; }
  .holdings-panel tbody td[data-label="Bought at"] { grid-area: bought; }
  .holdings-panel tbody td[data-label="1D"] { grid-area: d1; }
  .holdings-panel tbody td[data-label="7D"] { grid-area: d7; }
  .holdings-panel tbody td[data-label="All time"] { grid-area: all; }
  .holdings-panel tbody td.position-return { display: block; font-size: 11.5px; }
  .holdings-panel tbody td.weight-cell { display: none; }
  .holdings-panel .balance-symbol { display: inline-block; margin-left: 3px; overflow-wrap: normal; }
  .activity-panel tbody tr { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "summary summary" "wallet network" "date status" "tx tx"; }
  .activity-panel tbody td[data-label="Activity"] { grid-area: summary; }
  .activity-panel tbody td[data-label="Activity"]::before { display: none; }
  .activity-panel tbody td[data-label="Wallet"] { grid-area: wallet; }
  .activity-panel tbody td[data-label="Network"] { grid-area: network; }
  .activity-panel tbody td[data-label="Date"] { grid-area: date; }
  .activity-panel tbody td[data-label="Status"] { grid-area: status; }
  .activity-panel tbody td[data-label="Transaction"] { grid-area: tx; }
  .activity-panel tbody tr.flow-deposit { box-shadow: inset 2px 0 0 var(--D); }
  .activity-panel tbody tr.flow-withdrawal { box-shadow: inset 2px 0 0 var(--gate); }
  .activity-panel tbody tr.flow-internal { box-shadow: inset 2px 0 0 var(--C); }
  .activity-panel tbody tr td:first-child { box-shadow: none; }
  .activity-panel tbody tr.flow-internal td { background: none; }
  .activity-panel tbody tr.flow-internal { background: repeating-linear-gradient(135deg, rgba(155, 140, 255, .035) 0 6px, transparent 6px 12px); }
  .activity-panel .activity-summary { align-items: flex-start; }
  .activity-panel .activity-summary .detail { max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .activity-panel .activity-summary small { white-space: normal; }
  .activity-panel .network-badge { max-width: 100%; white-space: normal; line-height: 1.5; }
  .activity-panel .pair-legs { margin-left: 0; max-width: none; }
  .activity-panel .hash-link { white-space: nowrap; overflow-wrap: normal; }
  .activity-panel .purchase-row .hash-chain { display: block; margin-bottom: 2px; white-space: normal; }
}
@media (max-width: 380px) {
  main { padding: 0 12px 18px; }
  .header { padding: 0 12px; }
  .brand-sub { display: none; }
  .big-value { font-size: 31px; }
  .stat-value { font-size: 17px; }
  .holdings-panel tbody tr, .activity-panel tbody tr { padding: 13px 13px; gap: 11px 8px; }
  .ranges button { padding: 5px 6px; }
  .chart-legend > .text-button { margin-left: 0; }
  .flow-main { flex-wrap: wrap; }
  .flow-qty { flex-basis: 50%; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
/* Below 1360px the Weight column gives way so 1D/7D/All time stay in view; the allocation bar still shows weight. */
@media (min-width: 721px) and (max-width: 1360px) {
  .holdings-panel th:last-child, .holdings-panel td.weight-cell { display: none; }
  .holdings-panel tr > :nth-last-child(2) { padding-right: 22px; }
}
