/* GSIP — design tokens + app styles */
:root {
  --accent: #5857D6;
  /* THE BRAND HUE AS TEXT. --accent is a fill (white on it is 5.60:1) and
     stays the brand colour; as 11px text on a 13% tint of itself it was
     3.78-4.45:1. Same split the dark theme already makes, for the same
     reason. 4.77:1 at worst on every accent tint in the app. */
  --accent-ink: oklch(0.47 0.19 278);
  --bg: oklch(0.975 0.004 85);
  --surface: #ffffff;
  --surface-2: oklch(0.962 0.005 85);
  --ink: oklch(0.22 0.01 270);
  --muted: oklch(0.52 0.012 270);
  --faint: oklch(0.56 0.01 270); /* was 0.65 — 4.6:1 vs white (WCAG AA) */
  --line: oklch(0.91 0.006 85);
  --line-strong: oklch(0.85 0.008 85);
  /* L 0.55 -> 0.46: AA on every ground this token lands on. The worst was
     not --gain-bg (3.87:1) but .policy-tag.benef's 14% tint of --gain over
     the v2 page ground (3.49:1), so the value is set against its own tint.
     Now 4.86:1 at worst, and white-on---gain (.plan-badge) goes 4.52 ->
     6.47:1. Hue and chroma unchanged. */
  --gain: oklch(0.46 0.14 155);
  --gain-bg: oklch(0.94 0.04 155);
  /* Same change for the same reason: .policy-tag.risk's own 14% tint was
     3.98:1, and .penny-warning / .vol-tag / .ipo-rating.cautious sat at
     4.31:1 on --loss-bg. L 0.48 -> 5.23:1 at worst. */
  --loss: oklch(0.48 0.16 25);
  --loss-bg: oklch(0.94 0.04 25);
  --shadow: 0 1px 2px oklch(0.2 0.01 270 / 0.05), 0 4px 16px oklch(0.2 0.01 270 / 0.05);
  /* ONE layer for every modal backdrop, above every fixed thing in the app:
     the phone nav bar (40), the data banner (190), the update banner and the
     "what's new" card (200), the Ask button and its panel (210) and the
     toaster (300). The overlays used to pick their own numbers -- 100 for the
     trade ticket, 200 for the gate -- which is how the Ask button came to
     float over an open sign-in sheet. A token rather than a number so the next
     overlay cannot quietly land below the furniture again. */
  --z-modal: 1000;
  --radius: 14px;
  --cell-pad: 11px 14px;
  --font-display: "Bricolage Grotesque", "Helvetica Neue", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, monospace;
}
:root[data-theme="dark"] {
  /* Dark theme: the brightened accent already clears AA as text on these
     surfaces, so ink and fill are the same value here. */
  --accent-ink: oklch(0.7 0.15 283);
  --accent: oklch(0.7 0.15 283); /* brand hue brightened — 6.0:1 vs dark surface (light-theme #5857D6 was 2.98:1, WCAG fail) */
  --bg: oklch(0.19 0.012 270);
  --surface: oklch(0.235 0.014 270);
  --surface-2: oklch(0.27 0.015 270);
  --ink: oklch(0.93 0.005 270);
  --muted: oklch(0.68 0.01 270);
  --faint: oklch(0.7 0.01 270); /* was 0.55 — 6.2:1 vs surface (WCAG AA) */
  --line: oklch(0.32 0.014 270);
  --line-strong: oklch(0.4 0.015 270);
  --gain: oklch(0.72 0.14 155);
  --gain-bg: oklch(0.32 0.05 155);
  --loss: oklch(0.7 0.15 25);
  --loss-bg: oklch(0.32 0.05 25);
  --shadow: 0 1px 2px oklch(0 0 0 / 0.25), 0 4px 16px oklch(0 0 0 / 0.25);
}
:root[data-density="compact"] { --cell-pad: 6px 12px; }

/* keyboard focus: visible ring on focusable rows/cards (a11y) */
.rowlink:focus-visible, [role="button"]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* BYOK AI setup (Pro) */
.ai-setup .req-fields { margin: 10px 0; }
.ai-setup select.sel { width: 100%; }

* { box-sizing: border-box; }
/* modern floating thin scrollbars across the app */
* { scrollbar-width: thin; scrollbar-color: color-mix(in oklch, var(--muted) 40%, transparent) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in oklch, var(--muted) 38%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; transition: background 0.15s; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--muted) 60%, transparent); background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
#root, .app { height: 100vh; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, select { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--muted); }
.gain { color: var(--gain); }
.loss { color: var(--loss); }
.accent { color: var(--accent); }

/* ---------- layout ---------- */
.app { display: flex; }
/* Sidebar ground. A vertical wash with a faint accent at the foot — depth
   without colour that competes with the data tables beside it. It deliberately
   does NOT land on var(--surface-2): that is what .nav-item:hover used to
   paint, and a hover that matches its own background is an invisible hover. */
.sidebar {
  width: 208px; flex: none; display: flex; flex-direction: column;
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface) 0%, color-mix(in oklch, var(--accent) 3%, var(--surface)) 50%, color-mix(in oklch, var(--accent) 9%, var(--surface)) 100%);
  padding: 20px 14px; position: relative;
  height: 100vh; overflow-y: auto; overscroll-behavior: contain;
}
.logo { display: flex; align-items: center; gap: 10px; padding: 2px 10px 22px; }
/* The old rotated-square mark lived here (`.logo-mark` + its ::after). It is
   gone — every brand lockup in the app now renders the Candle Eye `<Logo>`
   from components.jsx, which is the same geometry as
   assets/tickereyes-mark.svg and the PWA icons. tools/test_ui_v2_brand_root.py fails
   if a `.logo-mark` element is ever rendered again. */
.logo-text { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.02em; }
.logo-eyes { color: var(--accent); }
/* Phone-only: the sidebar and its logo are hidden below 760px. */
.topbar-brand { display: none; align-items: center; gap: 8px; flex: none; }
.nav-list { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 10px; color: var(--muted); font-weight: 500; text-align: left;
  transition: background 0.15s, color 0.15s;
}
/* Relative darkening, not a fixed colour — survives any background the
   sidebar carries now or later. */
.nav-item:hover { background: color-mix(in oklch, var(--ink) 6%, transparent); color: var(--ink); }
.nav-item.on { background: color-mix(in oklch, var(--accent) 11%, transparent); color: var(--accent); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 14px 14px 18px; font-size: 11px; color: var(--faint); line-height: 1.55; border-top: 1px solid var(--line); }
.sidebar-foot p { margin: 10px 0 0; }
.foot-link { display: block; color: var(--accent); text-decoration: none; font-size: 12px; font-weight: 550; margin-bottom: 9px; }
.foot-link:hover { text-decoration: underline; }
.foot-copy { margin-top: 10px !important; font-size: 10.5px; opacity: 0.85; }
/* Mobile-only page footer (same FootLinks as .sidebar-foot, which the ≤760px
   bottom tab bar hides). Shown in the responsive block at the end of the file. */
.mobile-foot { display: none; }

/* ---------- funds ---------- */
.fund-cell { display: flex; flex-direction: column; }
.fund-sym { font-weight: 600; font-size: 13px; }
.fund-name { font-size: 11.5px; color: var(--faint); }
.yrs { width: 100%; accent-color: var(--accent); margin: 10px 0 4px; }
.fee-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fee-row:last-of-type { border-bottom: none; }
.fee-rank { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.fee-id { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.fee-name { font-weight: 550; font-size: 13px; }
.fee-cap { font-size: 11px; color: var(--faint); }
/* `.fee-cap` is now used up to three times in one row -- the cost label, the
   per-trade line on the US tab, and the per-row checked date -- so the rows
   need a little breathing space between them rather than three lines jammed
   together at 11px. */
.fee-cap + .fee-cap { margin-top: 2px; }
/* The region tab. It changes the currency, the wrapper set and whether a
   contribution picks up pension relief, so it sits on its own card above the
   controls rather than reading as one more filter inside them. */
.funds-region { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.funds-region-note { font-size: 11.5px; color: var(--muted); }
.fee-name a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-strong); }
.fee-name a:hover { color: var(--accent); border-bottom-color: var(--accent); }
/* Managed services pick the holdings for you, so their fee is not comparable
   with a self-select platform's and excludes the underlying fund costs. */
.fee-tag { font-size: 9.5px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
  padding: 1px 5px; border-radius: 5px; margin-left: 6px; vertical-align: 1px; }

/* ---------- admin ---------- */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.cov-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cov-row:last-child { border-bottom: none; }
.cov-state {
  flex: none; width: 76px; text-align: center; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 0; border-radius: 99px;
}
.cov-state.live { background: var(--gain-bg); color: var(--gain); }
.cov-state.indicative { background: oklch(0.94 0.04 85); color: oklch(0.5 0.1 75); }
.cov-state.model { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent); }
.cov-state.locked { background: var(--surface-2); color: var(--faint); border: 1px solid var(--line); }
.cov-state.audit, .cov-state.owner { background: var(--loss-bg); color: var(--loss); }
.cov-state.go-live { background: var(--gain-bg); color: var(--gain); }
.cov-state.strategy, .cov-state.roadmap { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent); }
.cov-id { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cov-layer { font-weight: 550; font-size: 13px; }
.cov-detail { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 6px; }
.switch {
  flex: none; width: 34px; height: 20px; border-radius: 99px; background: var(--line-strong);
  position: relative; transition: background 0.15s;
}
.switch .knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 99px; background: white; transition: left 0.15s; box-shadow: 0 1px 2px rgb(0 0 0 / 0.2); }
.switch.on { background: var(--gain); }
.switch.on .knob { left: 16px; }
.feed-remove { font-size: 11.5px; color: var(--loss); flex: none; }
.feed-remove:hover { text-decoration: underline; }
.feed-add { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.feed-add input { flex: 1 1 100%; min-width: 140px; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); outline: none; font-size: 12.5px; }
.feed-json-opt { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex: 1 1 100%; }
.feed-json-opt input { flex: none; accent-color: var(--accent); min-width: 0; }
.feed-add input:focus { border-color: var(--accent); }
@media (max-width: 1100px) { .admin-grid { grid-template-columns: 1fr; } }

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
/* Header. `space-between` with a wrapping right cluster produced a 100px-tall
   header at 1280-1600px and 64px at 2560px — a 56% height swing — plus 653px of
   dead space in the middle on wide monitors. Both symptoms came from the same
   cause: eleven independent items right-aligned in one wrapping row.

   Now the search grows to absorb slack instead of a gap absorbing it, and the
   right cluster never wraps on desktop. Height is fixed at 60px so it cannot
   breathe with viewport width or with how many exchanges happen to be open. */
.topbar {
  flex: none; display: flex; align-items: center; gap: 16px;
  min-height: 60px; padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, var(--surface) 0%, color-mix(in oklch, var(--accent) 4%, var(--surface)) 55%, color-mix(in oklch, var(--accent) 8%, var(--surface)) 100%);
  position: relative; z-index: 10;
}
/* Texture, not decoration. No overflow:hidden anywhere — the search and the
   account menu open downward out of this element and must not be clipped. */
.topbar::before, .sidebar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}
.topbar > *, .sidebar > * { position: relative; z-index: 1; }
/* The search takes the slack. A flexible SEARCH BOX is useful width; a
   flexible GAP is the thing the owner circled. */
.topbar > .gsearch, .topbar > form, .topbar > div:first-child { flex: 1 1 auto; min-width: 220px; max-width: min(900px, 42vw); }
/* Live market state sits in the MIDDLE. On a wide monitor the slack has to go
   somewhere; a centred band of live content is a better occupant than a void,
   and it splits the remaining space into two small gaps instead of one large
   one. `margin: 0 auto` is what does the centring — the zone is not a grid
   track, so it cannot fight the search box for width. */
/* flex: none is load-bearing. As `0 1 auto` this box shrank below its own
   content while the chips inside it (white-space:nowrap, flex:none) could not,
   so they spilled out of it and overlapped the account cluster by up to 49px —
   an overlap invisible to a height-and-row-count check, because the header was
   still one row at 60px throughout. The search box is the only flexible item
   here and must remain the only thing that gives. */
.topbar-mid { display: flex; align-items: center; gap: 10px; flex: none; margin: 0 auto; }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; justify-content: flex-end; flex: none; }

/* Closed markets, collapsed. Not a 99px pill (that is a status chip) and not
   600 weight (that is the .lic-cta conversion button) — a third, quieter shape. */
.mkt-summary {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 5px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap;
}
.mkt-summary-flags { display: inline-flex; align-items: center; gap: 3px; }
.mkt-summary-flags .flag { width: 13px; height: 10px; }
/* When the summary is carrying an OPEN market it is no longer purely a
   "nothing to see here" control, so it borrows the open border. */
.mkt-summary.has-open { border-color: color-mix(in oklch, var(--gain) 35%, transparent); }
.topbar-date { font-size: 13px; color: var(--muted); }
.mkt-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500;
  color: var(--muted); padding: 5px 10px; border: 1px solid var(--line); border-radius: 99px;
  white-space: nowrap; flex: none;
}
.mkt-chip .mkt-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--faint); }
.mkt-chip.open { color: var(--gain); border-color: color-mix(in oklch, var(--gain) 35%, transparent); }
.mkt-chip.open .mkt-dot { background: var(--gain); }

.main { flex: 1; overflow-y: auto; }
.screen { max-width: 1180px; margin: 0 auto; padding: 28px 28px 64px; }

/* ---------- search ---------- */
.gsearch { position: relative; width: 320px; }
.gsearch input, .search {
  width: 100%; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); outline: none; transition: border-color 0.15s;
}
.gsearch input:focus, .search:focus { border-color: var(--accent); }
.gsearch-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); overflow: hidden; padding: 4px;
}
.gsearch-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px;
  border-radius: 8px; text-align: left;
}
.gsearch-row:hover { background: var(--surface-2); }
.gsearch-sym { font-weight: 600; font-size: 12.5px; min-width: 64px; }
.gsearch-name { flex: 1; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- screen headers ---------- */
.screen-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 26px; }
.screen-head h1 { font-size: 30px; font-weight: 700; }
.screen-sub { margin: 6px 0 0; color: var(--muted); font-size: 13.5px; }
.head-stats { display: flex; gap: 26px; padding-bottom: 4px; }
.head-stat { display: flex; flex-direction: column; align-items: flex-end; }
.hs-num { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.hs-label { font-size: 12px; color: var(--muted); }

.block { margin-bottom: 30px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.block-head h2 { font-size: 19px; font-weight: 650; }
.block-note { font-size: 12.5px; color: var(--faint); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.two-col > * { min-width: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card.pad { padding: 18px 20px; }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h3 { font-size: 15px; font-weight: 650; }
.card-note { font-size: 11.5px; color: var(--faint); }
.table-card { overflow-x: auto; overflow-y: visible; }
.table-card.scrollx { overflow-x: auto; }
/* Same 14px gutter as .gtable td and .pager, so the rows-per-page control, the
   first table column and the pager count all sit on one vertical line. */
.table-top { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 4px 14px 10px; }
.table-top .table-count { font-size: 12.5px; color: var(--faint); margin-right: auto; }

/* "estimate / modelled" badge on model-derived figures */
.est-badge { display: inline-block; font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); background: var(--surface-2, rgba(128,128,128,0.12)); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; vertical-align: middle; margin-left: 4px; }
.est-badge.live { color: var(--gain, #1a9c6b); border-color: currentColor; }

/* "NO REAL MONEY". features.html promises paper trades carry this label
   "everywhere they appear", and the string was in no app source at all — the
   claim was simply untrue. It is the design's pill (frame 3b), and it now
   sits on both surfaces a paper trade has: the confirmation and the Paper
   trades section. tools/test_measurement_claims.py holds the promise to it. */
.nrm-badge { display: inline-flex; align-items: center; font-size: 9.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
  color: oklch(0.45 0.10 70); background: oklch(0.95 0.05 80); border: 1px solid oklch(0.87 0.07 80);
  border-radius: 99px; padding: 2px 8px; }
@media (prefers-color-scheme: dark) {
  .nrm-badge { color: oklch(0.86 0.09 80); background: oklch(0.30 0.05 75); border-color: oklch(0.42 0.07 78); }
}

/* Market-data freshness chip (topbar) */
.freshchip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; cursor: default; }

/* "Where prices come from" (design frame 4c). The chip is a button now, so it
   keeps the chip's own look and drops the button defaults. */
.freshwrap { position: relative; display: inline-flex; }
button.freshchip { font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; background: none; }
button.freshchip:hover { border-color: var(--line-strong, var(--line)); }
.fresh-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: min(320px, 86vw);
  padding: 14px; display: flex; flex-direction: column; gap: 10px; text-align: left;
  box-shadow: 0 18px 44px rgba(20, 22, 40, 0.18); }
.fresh-pop-head { font-weight: 600; font-size: 14px; }
.fresh-pop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.fresh-pop-list li { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline;
  padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.fresh-pop-list li:last-child { border-bottom: none; }
.fp-what { font-weight: 600; }
.fp-src { color: var(--muted); }
.fp-note { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--faint); background: var(--surface-2, rgba(128,128,128,0.12));
  border: 1px solid var(--line); border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.fresh-pop .fineprint { margin: 0; }
@media (max-width: 719px) { .fresh-pop { right: auto; left: 0; } }
.freshchip .fresh-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.freshchip .fresh-delay { color: var(--faint); font-weight: 500; }
.freshchip.ok .fresh-dot { background: var(--gain); }
.freshchip.warn { border-color: color-mix(in oklch, var(--warn, #c98a00) 50%, var(--line)); color: var(--warn, #c98a00); }
.freshchip.warn .fresh-dot { background: var(--warn, #c98a00); }
.freshchip.off { border-color: color-mix(in oklch, var(--loss) 55%, var(--line)); color: var(--loss); }
.freshchip.off .fresh-dot { background: var(--loss); }

/* Price provenance chip (stock page / cards) */
.prov-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); cursor: default; }
.prov-chip .prov-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.prov-chip.prov-live { color: var(--gain); border-color: color-mix(in oklch, var(--gain) 40%, var(--line)); }
.prov-chip.prov-delayed { color: var(--muted); }
.prov-chip.prov-closed { color: var(--warn, #c98a00); border-color: color-mix(in oklch, var(--warn, #c98a00) 40%, var(--line)); }
.prov-chip.prov-indicative { color: var(--faint); }

/* Page-level compliance / staleness banner */
.data-banner { position: fixed; z-index: 190; left: 50%; transform: translateX(-50%); top: 16px; display: flex; align-items: flex-start; gap: 10px; width: min(620px, calc(100vw - 28px)); padding: 11px 13px; border-radius: 12px; font-size: 12.8px; line-height: 1.45; box-shadow: 0 8px 30px oklch(0.2 0.02 270 / 0.26); }
.data-banner .db-ico { flex-shrink: 0; font-size: 14px; }
.data-banner .db-text { flex: 1; }
.data-banner .db-x { flex-shrink: 0; background: none; border: none; color: inherit; opacity: 0.6; font-size: 17px; line-height: 1; cursor: pointer; padding: 0 2px; }
.data-banner .db-x:hover { opacity: 1; }
.data-banner.warn { background: color-mix(in oklch, var(--warn, #c98a00) 12%, var(--surface)); border: 1px solid color-mix(in oklch, var(--warn, #c98a00) 45%, var(--line)); color: var(--ink); }
.data-banner.off { background: color-mix(in oklch, var(--loss) 14%, var(--surface)); border: 1px solid color-mix(in oklch, var(--loss) 50%, var(--line)); color: var(--ink); }
@media (max-width: 560px) { .data-banner { left: 12px; right: 12px; transform: none; width: auto; } }

/* Licensed actions */
.lic-active-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }

/* AI copilot */
.copilot-fab { position: fixed; z-index: 210; right: 22px; bottom: 22px; height: 46px; min-width: 46px; padding: 0 18px; border-radius: 999px; border: none; cursor: pointer; background: var(--accent); color: #fff; font-size: 14px; font-weight: 700; box-shadow: 0 8px 26px color-mix(in oklch, var(--accent) 40%, transparent); display: inline-flex; align-items: center; gap: 6px; touch-action: none; /* draggable: pointermove must win over page scroll */ }
.copilot-fab.open { background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); font-size: 22px; padding: 0; width: 46px; justify-content: center; }
.copilot-fab:hover { filter: brightness(1.05); }
.copilot-panel { position: fixed; z-index: 210; right: 22px; bottom: 78px; width: min(380px, calc(100vw - 28px)); height: min(560px, calc(100vh - 120px)); background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: 0 18px 50px oklch(0.2 0.02 270 / 0.32); display: flex; flex-direction: column; overflow: hidden; }
.cp-head { padding: 13px 16px; border-bottom: 1px solid var(--line); }
.cp-head strong { display: block; font-size: 15px; }
.cp-head .cp-sub { font-size: 11px; color: var(--faint); }
.cp-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.cp-note, .cp-welcome p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.cp-suggest { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cp-suggest .chip-btn { font-size: 12px; padding: 5px 10px; }
.cp-msg { font-size: 13.5px; line-height: 1.55; padding: 9px 12px; border-radius: 12px; max-width: 90%; white-space: pre-wrap; }
.cp-msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.cp-msg.ai { align-self: flex-start; background: var(--surface-2, rgba(128,128,128,0.1)); color: var(--ink); border-bottom-left-radius: 4px; }
.cp-typing { opacity: 0.7; font-style: italic; }
.cp-err { font-size: 12.5px; color: var(--loss); }
.cp-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.cp-input input { flex: 1; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2, var(--surface)); color: inherit; font: inherit; }
.cp-foot { font-size: 10.5px; color: var(--faint); padding: 0 12px 10px; margin: 0; }
@media (max-width: 560px) { .copilot-panel { right: 12px; left: 12px; width: auto; bottom: calc(var(--bottom-nav, 51px) + 56px); } }

/* My portfolio (holdings import + P&L) */
.my-holdings { margin-bottom: 20px; }
.mh-import { margin-top: 6px; }
.mh-addrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.mh-addrow input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, var(--surface)); color: inherit; font: inherit; }
.mh-paste { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.mh-paste textarea { flex: 1; min-width: 240px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, var(--surface)); color: inherit; font: 400 12.5px ui-monospace, monospace; resize: vertical; }
.mh-summary { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 14px; }
.mh-summary .mh-lab { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
.mh-summary .mh-val { font-size: 21px; font-weight: 650; margin-top: 2px; display: block; }
@media (max-width: 560px) { .mh-addrow input { flex: 1; width: auto !important; } }

/* Portfolio Risk Lab (descriptive analytics inside My portfolio) */
.risk-lab { border-top: 1px solid var(--line); margin-top: 16px; }
.risk-lab .mh-summary .mh-val { font-size: 16px; }
.rl-bars { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 14px; }
.rl-group { flex: 1; min-width: 200px; }
.rl-bar-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.rl-bar-lab { flex: 0 0 96px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-bar-track { flex: 1; height: 8px; border-radius: 999px; background: var(--track, var(--line)); overflow: hidden; }
.rl-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.rl-bar-val { flex: 0 0 38px; text-align: right; font-size: 12px; }
.rl-scen { margin-top: 16px; }
.rl-scen-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.rl-scen-row:last-child { border-bottom: none; }
.rl-scen-name { font-size: 13px; font-weight: 600; flex: 0 0 auto; }
.rl-scen-asm { flex: 1; min-width: 180px; font-size: 12px; }
.rl-scen-hit { flex: 0 0 auto; font-size: 13px; }

/* Screener */
.scr-presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip-btn { padding: 6px 13px; border-radius: 999px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--accent); color: var(--accent); }
.chip-btn.ghost { color: var(--muted); }
.scr-saved { font-size: 12.5px; color: var(--faint); margin-bottom: 12px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.scr-saved-chip { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 4px 2px 10px; }
.scr-x { background: none; border: none; color: var(--faint); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; }
.scr-x:hover { color: var(--loss); }
.scr-filters { margin-bottom: 14px; }
.scr-nums { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.scr-num { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: 0.03em; }
.scr-num input { width: 120px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, var(--surface)); color: inherit; font: 400 13px inherit; text-transform: none; letter-spacing: 0; }
@media (max-width: 560px) { .scr-num, .scr-num input { width: 100%; } .scr-nums { gap: 8px; } }

/* Custom alert builder */
.custom-alerts { margin-bottom: 18px; }
.ca-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ca-form .ca-sym { width: 150px; }
.ca-form .ca-val { width: 120px; }
.ca-form input, .ca-form .sel { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, var(--surface)); color: inherit; font: inherit; }
.ca-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.ca-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
.ca-row .ca-label { font-size: 13px; color: var(--ink); }
@media (max-width: 560px) { .ca-form .ca-sym, .ca-form .ca-val { width: 100%; } .ca-form .sel { flex: 1; } }

/* Policy Pulse */
.policy-note { padding: 13px 15px; font-size: 12.8px; line-height: 1.55; color: var(--muted); margin-bottom: 20px; }
.policy-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 6px; vertical-align: 2px; margin-left: 6px; }
.policy-tag.linked { color: var(--accent); background: color-mix(in oklch, var(--accent) 14%, transparent); }
.policy-tag.benef { color: var(--gain); background: color-mix(in oklch, var(--gain) 14%, transparent); }
.policy-tag.risk { color: var(--loss); background: color-mix(in oklch, var(--loss) 14%, transparent); }

/* In-app update banner */
.update-banner {
  position: fixed; z-index: 200; left: 50%; transform: translateX(-50%);
  bottom: 18px; display: flex; align-items: center; gap: 12px;
  max-width: min(560px, calc(100vw - 28px));
  padding: 10px 12px 10px 16px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line-strong);
  box-shadow: 0 8px 30px oklch(0.2 0.02 270 / 0.28); font-size: 13px;
}
.update-banner .ub-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in oklch, var(--accent) 18%, transparent); }
.update-banner .ub-text { color: var(--ink); }
.update-banner .ub-cur { color: var(--faint); }
.update-banner .ub-btn {
  flex-shrink: 0; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
  background: var(--accent); color: #fff; border: none; cursor: pointer; text-decoration: none;
}
.update-banner .ub-btn:hover { filter: brightness(1.06); }
.update-banner .ub-x { flex-shrink: 0; color: var(--faint); font-size: 17px; line-height: 1; padding: 2px 4px; background: none; border: none; cursor: pointer; }
.update-banner .ub-x:hover { color: var(--ink); }
@media (max-width: 560px) { .update-banner { left: 14px; right: 14px; transform: none; max-width: none; } }

/* "What's new" after an auto-update */
.whatsnew-card {
  position: fixed; z-index: 200; top: 16px; left: 50%; transform: translateX(-50%);
  width: min(460px, calc(100vw - 28px));
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 12px; padding: 12px 14px;
  box-shadow: 0 10px 34px oklch(0.2 0.02 270 / 0.3);
}
.whatsnew-card .wn-head { display: flex; align-items: center; gap: 8px; }
.whatsnew-card .wn-badge { font-size: 10px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; background: var(--accent); padding: 3px 7px; border-radius: 6px; }
.whatsnew-card .wn-title { font-size: 13.5px; color: var(--ink); }
.whatsnew-card .wn-x { margin-left: auto; background: none; border: none; color: var(--faint); font-size: 18px; line-height: 1; cursor: pointer; padding: 0 2px; }
.whatsnew-card .wn-x:hover { color: var(--ink); }
.whatsnew-card .wn-body { margin-top: 8px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
@media (max-width: 560px) { .whatsnew-card { left: 14px; right: 14px; transform: none; width: auto; } }

/* Today — page-level market selector + empty states */
.head-right { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; justify-content: flex-end; }
.today-market { display: inline-flex; align-items: center; gap: 8px; }
.today-market .tm-label { font-size: 11px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
.today-market .tm-sel { min-width: 160px; font-weight: 600; }
.mkt-status { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--faint); white-space: nowrap; }
.mkt-status .mkt-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); opacity: 0.5; }
.mkt-status.on { color: var(--gain); }
.mkt-status.on .mkt-dot { background: var(--gain); opacity: 1; box-shadow: 0 0 0 3px oklch(0.65 0.16 150 / 0.18); animation: mktpulse 2s ease-in-out infinite; }
@keyframes mktpulse { 0%, 100% { box-shadow: 0 0 0 3px oklch(0.65 0.16 150 / 0.18); } 50% { box-shadow: 0 0 0 4px oklch(0.65 0.16 150 / 0.06); } }
.empty-note { padding: 22px; text-align: center; color: var(--faint); font-size: 13.5px; }
.brief-empty { padding: 14px 4px 2px; color: var(--faint); font-size: 13px; }
.linkbtn { background: none; border: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; font: inherit; }
.linkbtn:hover { text-decoration: underline; }
@media (max-width: 720px) {
  .head-right { width: 100%; justify-content: space-between; }
  .today-market { flex: 1; }
  .today-market .tm-sel { flex: 1; min-width: 0; }
}

/* Today — Signal board (segmented Buy/Sell) */
.board-head { align-items: center; }
.board-head-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.board-head .seg { flex-shrink: 0; }
.board-head .seg-btn.on { box-shadow: 0 1px 4px oklch(0.2 0.01 270 / 0.16); }
@media (max-width: 620px) {
  .board-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .board-head .seg { align-self: stretch; }
  .board-head .seg-btn { flex: 1; text-align: center; }
}
.gtable.wide { min-width: 940px; }
.fineprint { font-size: 11.5px; color: var(--faint); margin: 10px 2px 0; line-height: 1.5; }

/* ---------- buy feature cards ---------- */
.buy-feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.buy-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; transition: transform 0.15s, border-color 0.15s;
}
.buy-card:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.buy-card-top { display: flex; align-items: center; gap: 12px; }
.rank-medal {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 99px; background: var(--accent); color: white;
  font-family: var(--font-display); font-weight: 700; font-size: 15px;
}
.buy-card-id { flex: 1; min-width: 0; }
.buy-card-sym { display: flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.buy-card-name { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.buy-card-price-row { display: flex; align-items: baseline; gap: 10px; }
.buy-card-price { font-family: var(--font-mono); font-size: 22px; font-weight: 600; }
.buy-card .spark { width: 100%; }
.buy-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.buy-card-stats > div { display: flex; flex-direction: column; gap: 2px; }
.bcs-label { font-size: 11px; color: var(--faint); }
.bcs-val { font-family: var(--font-mono); font-weight: 600; font-size: 15px; }
.buy-card-note { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 10px; text-wrap: pretty; }

/* ---------- tables ---------- */
.gtable { width: 100%; border-collapse: collapse; }
.gtable th {
  text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--faint); padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.gtable th.num { text-align: right; }
.gtable th.sortable { cursor: pointer; user-select: none; }
.gtable th.sortable:hover { color: var(--ink); }
.gtable th.sorted { color: var(--accent); }
.gtable td { padding: var(--cell-pad); border-bottom: 1px solid var(--line); white-space: nowrap; }
.gtable tbody tr:last-child td { border-bottom: none; }
.gtable td.num { text-align: right; }
.rowlink { cursor: pointer; transition: background 0.12s; }
.rowlink:hover { background: var(--surface-2); }
.rank-num { color: var(--faint); font-family: var(--font-mono); }
.empty-row { text-align: center; color: var(--muted); padding: 28px !important; }

.ticker-cell { display: flex; align-items: center; gap: 10px; text-align: left; }
.ticker-ava {
  width: 32px; height: 32px; flex: none; display: grid; place-items: center;
  border-radius: 9px; font-family: var(--font-mono); font-size: 9.5px; font-weight: 600;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
}
.ticker-ava.lg { width: 46px; height: 46px; font-size: 12px; border-radius: 13px; }
.ticker-ava[data-region="us"] { background: color-mix(in oklch, var(--accent) 9%, var(--surface-2)); }
.ticker-ava[data-region="uk"] { background: color-mix(in oklch, var(--gain) 9%, var(--surface-2)); }
.ticker-ava[data-region="in"] { background: color-mix(in oklch, oklch(0.66 0.13 50) 12%, var(--surface-2)); }
.ticker-ava[data-region="jp"] { background: color-mix(in oklch, oklch(0.6 0.13 0) 11%, var(--surface-2)); }
.ticker-ava[data-region="hk"] { background: color-mix(in oklch, oklch(0.6 0.13 20) 12%, var(--surface-2)); }
.ticker-ava[data-region="au"] { background: color-mix(in oklch, oklch(0.66 0.12 140) 12%, var(--surface-2)); }
.ticker-meta { display: flex; flex-direction: column; min-width: 0; }
.ticker-name { font-weight: 550; font-size: 13.5px; }
.ticker-sub { font-size: 11px; color: var(--faint); }

/* ---------- atoms ---------- */
.delta { font-family: var(--font-mono); font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 550; }
.delta.sm { font-size: 11.5px; }
.delta.up { color: var(--gain); }
.delta.down { color: var(--loss); }
.delta.flat { color: var(--faint); }

.ctag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 600; padding: 2px 6px;
  border-radius: 5px; letter-spacing: 0.04em;
}
.ctag.us { background: color-mix(in oklch, var(--accent) 13%, transparent); color: var(--accent); }
.ctag.uk { background: var(--gain-bg); color: var(--gain); }
.ctag.eu { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ctag.in { background: color-mix(in oklch, oklch(0.62 0.14 50) 16%, transparent); color: oklch(0.5 0.13 50); }
.ctag.jp { background: color-mix(in oklch, oklch(0.58 0.16 5) 14%, transparent); color: oklch(0.52 0.16 5); }
.ctag.hk { background: color-mix(in oklch, oklch(0.58 0.15 20) 15%, transparent); color: oklch(0.5 0.14 20); }
.ctag.au { background: color-mix(in oklch, oklch(0.6 0.13 140) 16%, transparent); color: oklch(0.46 0.12 140); }
:root[data-theme="dark"] .ctag.in { color: oklch(0.78 0.12 50); }
:root[data-theme="dark"] .ctag.jp { color: oklch(0.76 0.13 5); }
:root[data-theme="dark"] .ctag.hk { color: oklch(0.76 0.13 20); }
:root[data-theme="dark"] .ctag.au { color: oklch(0.78 0.12 140); }
:root[data-theme="dark"] .ctag.in { color: oklch(0.78 0.12 50); }
:root[data-theme="dark"] .ctag.jp { color: oklch(0.76 0.13 5); }

/* ---------- exchange group sections ---------- */
.exch-group { margin-bottom: 8px; }
.exch-head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px 9px;
  border-bottom: 1px solid var(--line);
}
.exch-head:not(:first-child) { border-top: 1px solid var(--line); }
.exch-flag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.04em;
  padding: 2px 7px; border-radius: 5px; flex: none;
}
.exch-flag.us { background: color-mix(in oklch, var(--accent) 13%, transparent); color: var(--accent-ink); }
.exch-flag.uk { background: var(--gain-bg); color: var(--gain); }
.exch-flag.eu { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.exch-flag.in { background: color-mix(in oklch, oklch(0.62 0.14 50) 16%, transparent); color: oklch(0.5 0.13 50); }
.exch-flag.jp { background: color-mix(in oklch, oklch(0.58 0.16 5) 14%, transparent); color: oklch(0.52 0.16 5); }
.exch-flag.hk { background: color-mix(in oklch, oklch(0.58 0.15 20) 15%, transparent); color: oklch(0.5 0.14 20); }
.exch-flag.au { background: color-mix(in oklch, oklch(0.6 0.13 140) 16%, transparent); color: oklch(0.46 0.12 140); }
.exch-title { font-family: var(--font-display); font-weight: 650; font-size: 13.5px; }
.exch-count { font-size: 11.5px; color: var(--faint); }
.exch-senti { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.exch-senti .scorebar-track { width: 60px; }
.exch-trow td { padding: 0 !important; background: var(--surface-2); }
.exch-trow .exch-head { padding: 10px 16px; border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.exch-trow:first-child .exch-head { border-top: none; }

.rating-pill {
  display: inline-block; padding: 5px 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600;
  white-space: nowrap;
}
.rating-pill.sm { padding: 3px 9px; font-size: 11px; }
.rating-pill.strong-buy { background: var(--gain); color: white; }
.rating-pill.buy { background: var(--gain-bg); color: var(--gain); }
.rating-pill.hold { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.rating-pill.sell { background: var(--loss-bg); color: var(--loss); }
.rating-pill.strong-sell { background: var(--loss); color: white; }

.scorebar { display: inline-flex; align-items: center; gap: 8px; }
.scorebar-num { font-family: var(--font-mono); font-size: 13px; font-weight: 600; min-width: 22px; text-align: right; }
.scorebar-track { width: 54px; height: 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: inline-block; }
.scorebar-fill { display: block; height: 100%; border-radius: 99px; }
.scorebar-fill.good { background: var(--gain); }
.scorebar-fill.mid { background: oklch(0.72 0.13 75); }
.scorebar-fill.bad { background: var(--loss); }

.riskdots { display: inline-flex; align-items: center; gap: 3px; }
.rdot { width: 6px; height: 6px; border-radius: 99px; background: var(--line-strong); }
.riskdots.low .rdot.on { background: var(--gain); }
.riskdots.medium .rdot.on { background: oklch(0.72 0.13 75); }
.riskdots.high .rdot.on { background: var(--loss); }
.risk-text { font-size: 11.5px; color: var(--muted); margin-left: 5px; }

.ring-wrap { position: relative; flex: none; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-val { font-family: var(--font-mono); font-weight: 600; font-size: 14px; line-height: 1; }
.ring-label { font-size: 8.5px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.06em; }

/* The pill track never grows past its container: once the options stop fitting
   (region selectors on phones) it scrolls inside its own box instead of pushing
   the whole page sideways. No visible scrollbar — the pills are the affordance. */
.seg {
  display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 10px;
  max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain;
  scrollbar-width: none; -ms-overflow-style: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-btn { flex: none; white-space: nowrap; padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--muted); transition: all 0.15s; }
.seg.sm .seg-btn { padding: 4px 10px; font-size: 12px; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px oklch(0.2 0.01 270 / 0.12); }

.chip {
  font-size: 11.5px; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line);
  border-radius: 99px; background: var(--surface);
}
.chip-row { display: flex; align-items: center; gap: 6px; margin-top: 5px; flex-wrap: wrap; }
.tradeable-chip { color: var(--gain); border-color: color-mix(in oklch, var(--gain) 35%, transparent); background: var(--gain-bg); }
.untradeable-chip { color: var(--loss); border-color: color-mix(in oklch, var(--loss) 35%, transparent); background: var(--loss-bg); }

/* ---------- filter row ---------- */
.filter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-row .search { width: 240px; background: var(--surface); }
.sel {
  padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface);
  outline: none; cursor: pointer;
}
.filter-count { margin-left: auto; font-size: 12.5px; color: var(--faint); }
.group-toggle {
  font-size: 12.5px; font-weight: 500; padding: 8px 13px; border-radius: 10px;
  border: 1px solid var(--line); color: var(--muted); background: var(--surface); white-space: nowrap;
}
.group-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.group-toggle.on { background: color-mix(in oklch, var(--accent) 11%, transparent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.remark-tag { font-size: 11px; font-weight: 550; padding: 2px 8px; border-radius: 6px; white-space: nowrap; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.remark-tag.r-strong, .remark-tag.r-breakout, .remark-tag.r-accumulating { color: var(--gain); background: var(--gain-bg); border-color: color-mix(in oklch, var(--gain) 25%, transparent); }
.remark-tag.r-downtrend, .remark-tag.r-distributing { color: var(--loss); background: var(--loss-bg); border-color: color-mix(in oklch, var(--loss) 25%, transparent); }
.remark-tag.r-value, .remark-tag.r-near { color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); border-color: color-mix(in oklch, var(--accent) 25%, transparent); }
.remark-tag.r-high { color: oklch(0.55 0.12 75); background: oklch(0.95 0.05 75); border-color: oklch(0.6 0.12 75 / 0.3); }
.pf-table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.pf-table-title { font-family: var(--font-display); font-weight: 650; font-size: 14px; }
.gtable.wide .spark { display: block; }

/* ---------- stock detail ---------- */
.back-btn { color: var(--muted); font-weight: 500; margin-bottom: 14px; padding: 4px 0; }
.back-btn:hover { color: var(--accent); }
/* One row on desktop; below 1100px it wraps into stacked rows (see the narrow
   block at the end of this file). Nothing here is absolutely positioned — the
   badges/price used to collide only because the row could not wrap. */
.stock-head { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.stock-head-id { flex: 1; min-width: 0; }
.stock-head h1 { font-size: 24px; font-weight: 700; overflow-wrap: anywhere; }
.stock-sym { font-family: var(--font-mono); font-size: 15px; color: var(--faint); font-weight: 500; margin-left: 6px; }
.stock-head-price { text-align: right; flex: none; }
.stock-price { font-family: var(--font-mono); font-size: 26px; font-weight: 600; }
.detail-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.detail-main, .detail-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.chart-foot { display: flex; gap: 24px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.chart-foot strong { font-family: var(--font-mono); color: var(--ink); font-weight: 600; }

.horizon-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.horizon-label { font-size: 11.5px; color: var(--faint); margin-bottom: 4px; }
.horizon-val { font-family: var(--font-mono); font-size: 19px; font-weight: 650; }
.horizon-track { height: 5px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); margin: 8px 0 6px; overflow: hidden; }
.horizon-fill { display: block; height: 100%; border-radius: 99px; }
.horizon-fill.pos { background: var(--gain); }
.horizon-fill.neg { background: var(--loss); }
.horizon-target { font-size: 12px; color: var(--muted); }

.drivers { display: flex; flex-direction: column; gap: 9px; }
.driver-row { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 12px; }
.driver-label { font-size: 12.5px; color: var(--muted); }
.driver-track { position: relative; height: 14px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; display: block; }
.driver-zero { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line-strong); }
.driver-fill { position: absolute; top: 2px; bottom: 2px; border-radius: 5px; }
.driver-fill.pos { background: var(--gain); }
.driver-fill.neg { background: var(--loss); }
.driver-val { font-size: 12px; text-align: right; }

.score-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.big-score { font-family: var(--font-display); font-size: 44px; font-weight: 700; line-height: 1; }
.big-score-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.subscore-list { display: flex; flex-direction: column; gap: 9px; border-top: 1px solid var(--line); padding-top: 14px; }
.subscore { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); }
.risk-line { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }

.stat-list { margin: 0; display: flex; flex-direction: column; }
.stat-list > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); }
.stat-list > div:last-child { border-bottom: none; }
.stat-list dt { color: var(--muted); font-size: 13px; }
.stat-list dd { margin: 0; font-weight: 550; font-size: 13px; }

/* ---------- news ---------- */
.news-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px;
  border-bottom: 1px solid var(--line); cursor: pointer; width: 100%; text-align: left;
}
.news-item:last-child { border-bottom: none; }
.news-item:hover { background: var(--surface-2); }
.news-item.compact { padding: 10px 0; cursor: default; }
.news-item.compact:hover { background: none; }
.news-body { flex: 1; min-width: 0; }
.news-title { margin: 0; font-weight: 550; font-size: 13.5px; line-height: 1.4; text-wrap: pretty; }
.news-meta { margin: 3px 0 0; font-size: 11.5px; color: var(--faint); }
.news-scores { display: flex; flex-direction: column; gap: 3px; align-items: flex-end; flex: none; }
.news-score { font-size: 11px; color: var(--muted); }
.tone-chip {
  flex: none; font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.04em; margin-top: 1px;
}
.tone-chip.bull { background: var(--gain-bg); color: var(--gain); }
.tone-chip.bear { background: var(--loss-bg); color: var(--loss); }
.tone-chip.neutral { background: var(--surface-2); color: var(--muted); }
.tone-dot { flex: none; width: 8px; height: 8px; border-radius: 99px; margin-top: 6px; }
.tone-dot.bull { background: var(--gain); }
.tone-dot.bear { background: var(--loss); }
.tone-dot.neutral { background: var(--faint); }

/* ---------- pulse ---------- */
.heatmap { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.heat-tile {
  display: flex; flex-direction: column; gap: 2px; align-items: flex-start;
  padding: 10px 12px; border-radius: 10px; transition: transform 0.12s;
  border: 1px solid transparent;
}
.heat-tile:hover { transform: scale(1.04); }
.heat-sym { font-family: var(--font-mono); font-weight: 600; font-size: 12.5px; }
.heat-val { font-size: 11px; opacity: 0.75; }
.heat-tile.s5 { background: var(--gain); color: white; }
.heat-tile.s4 { background: var(--gain-bg); color: var(--gain); border-color: color-mix(in oklch, var(--gain) 25%, transparent); }
.heat-tile.s3 { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.heat-tile.s2 { background: var(--loss-bg); color: var(--loss); border-color: color-mix(in oklch, var(--loss) 25%, transparent); }
.heat-tile.s1 { background: var(--loss); color: white; }
.heat-legend { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--faint); }
.heat-swatch { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.heat-swatch.s5 { background: var(--gain); } .heat-swatch.s4 { background: var(--gain-bg); }
.heat-swatch.s3 { background: var(--surface-2); border: 1px solid var(--line); }
.heat-swatch.s2 { background: var(--loss-bg); } .heat-swatch.s1 { background: var(--loss); }

.pulse-cols { grid-template-columns: 1.5fr 1fr; }
.trend-row {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 18px;
  border-bottom: 1px solid var(--line); text-align: left;
}
.trend-row:last-child { border-bottom: none; }
.trend-row:hover { background: var(--surface-2); }
.trend-id { display: flex; flex-direction: column; min-width: 110px; }
.trend-sym { font-family: var(--font-mono); font-weight: 600; font-size: 13px; }
.trend-name { font-size: 11px; color: var(--faint); }
.buzz-track { flex: 1; height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.buzz-fill { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.buzz-num { font-size: 12px; min-width: 24px; text-align: right; }

/* The hypothetical amount, under the flag. 22px mono was Portfolio Studio's
   headline-figure sizing borrowed onto a control in a three-column row, where
   it read as an output rather than something to type in. Scoped to
   `.bt-controls` so Portfolio Studio's own amount field is untouched. */
.bt-controls .v2-amount .amount-ccy { font-size: 15px; }
.bt-controls .v2-amount input { font-size: 15px; font-weight: 600; padding: 9px 8px; }

/* ---------- portfolio ---------- */
.pf-controls { display: grid; grid-template-columns: 1.2fr 1.3fr 1fr; gap: 28px; margin-bottom: 20px; }
.pf-field label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); margin-bottom: 8px; }
.field-hint { margin: 8px 0 0; font-size: 12px; color: var(--faint); line-height: 1.45; text-wrap: pretty; }
.amount-wrap { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); padding: 0 14px; }
.amount-wrap:focus-within { border-color: var(--accent); }
.amount-ccy { font-family: var(--font-mono); font-size: 20px; color: var(--faint); }
.amount-wrap input {
  width: 100%; border: none; background: none; outline: none; padding: 10px 8px;
  font-family: var(--font-mono); font-size: 22px; font-weight: 600;
}
.amount-wrap input::-webkit-outer-spin-button, .amount-wrap input::-webkit-inner-spin-button { -webkit-appearance: none; }
.amount-presets { display: flex; gap: 6px; margin-top: 8px; }
.preset { font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.preset:hover { border-color: var(--accent); color: var(--accent); }
.preset.on { background: color-mix(in oklch, var(--accent) 12%, transparent); border-color: var(--accent); color: var(--accent); font-weight: 600; }

.pf-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.sum-card { display: flex; flex-direction: column; gap: 3px; }
.sum-label { font-size: 12px; color: var(--faint); }
/* A long unbreakable value ("Interactive", a big mono figure) is the min-content
   floor of its `1fr` column, so without this the summary grid refuses to shrink
   and pushes the whole page sideways below ~390px. */
.sum-val { font-family: var(--font-mono); font-size: 24px; font-weight: 650; overflow-wrap: anywhere; }
.sum-sub { font-size: 11.5px; color: var(--faint); }
/* A worded verdict, not a figure. "Direction matched" is 17 characters and at
   the 24px mono of a percentage it wrapped to two lines in a 269px column —
   which pushed that card's .sum-sub a line below the three beside it, so the
   whole summary row lost its baseline. The words are the point, so the size
   gives way, not the wording. */
.sum-val-words { font-size: 19px; }
.fee-warn {
  margin-top: 6px; font-size: 11px; line-height: 1.45; color: var(--loss);
  background: var(--loss-bg); border-radius: 8px; padding: 5px 9px; text-wrap: pretty;
}

.pf-body { display: grid; grid-template-columns: 1.9fr 1fr; gap: 20px; align-items: start; }
.pf-body > * { min-width: 0; } /* clamp grid tracks so wide tables scroll internally instead of widening the page */
.pf-body .table-card { overflow-x: auto; }
/* Recommended holdings: the scroller belongs to the TABLE, not the card. The
   card above is already overflow-x:auto, so the eleven columns did scroll —
   but the card also holds .pf-table-head and the fineprint, so reaching "Best
   venue" slid the title and the Group-by-exchange button out of frame. This
   wrapper sits inside the card, so only the rows move.

   NOT .ui2-table-wrap: that carries `min-width: var(--ui2-min, 720px)` at
   every width, and at 0,1,1 it outranks `.gtable { min-width: 560px }` in the
   max-width:760px block below (media queries add no specificity), so the
   phone rules would have stopped applying. The floor is therefore scoped to
   this one table AND to 761px and up. 1200px is measured, not guessed: the
   table's max-content width at 1280 is 1198px. Below 761px the .gtable rules
   own the floor and the table scrolls inside this wrapper as before. */
.pf-holdings-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (min-width: 761px) { .pf-holdings-wrap > table { min-width: 1200px; } }
@media (max-width: 1400px) { .pf-body { grid-template-columns: 1fr; } }
.donut { width: 150px; margin: 4px auto 12px; display: block; }
.alloc-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.alloc-legend li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.dotsq { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.alloc-sym { font-family: var(--font-mono); font-weight: 550; flex: 1; }
.alloc-pct { color: var(--muted); }

/* ---------- live data ---------- */
.livectl { position: relative; }
.livechip { cursor: pointer; }
.livechip.live { color: var(--gain); border-color: color-mix(in oklch, var(--gain) 40%, transparent); background: var(--gain-bg); }
.livechip.live .mkt-dot { background: var(--gain); animation: livepulse 1.6s ease-in-out infinite; }
.livechip.connecting { color: oklch(0.62 0.13 75); border-color: oklch(0.62 0.13 75 / 0.4); }
.livechip.connecting .mkt-dot { background: oklch(0.72 0.13 75); animation: livepulse 0.8s ease-in-out infinite; }
.livechip.error { color: var(--loss); border-color: color-mix(in oklch, var(--loss) 40%, transparent); }
.livechip.error .mkt-dot { background: var(--loss); }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-pop {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60; width: 340px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 16px 18px;
}
.live-pop h4 { margin: 0 0 6px; font-family: var(--font-display); font-size: 14px; }
.live-pop-sub { margin: 0 0 12px; font-size: 12px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.live-pop-sub a { color: var(--accent); }
.live-key-row { display: flex; gap: 8px; }
.live-key-row input {
  flex: 1; min-width: 0; padding: 8px 12px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--bg); outline: none; font-family: var(--font-mono); font-size: 12px;
}
.live-key-row input:focus { border-color: var(--accent); }
.live-save {
  flex: none; padding: 8px 14px; border-radius: 9px; background: var(--accent); color: white;
  font-weight: 600; font-size: 13px;
}
.live-err { margin: 10px 0 0; font-size: 12px; color: var(--loss); }
.live-ok { margin: 10px 0 0; font-size: 12px; color: var(--gain); }
.live-disconnect { display: block; margin-top: 10px; font-size: 12px; color: var(--muted); text-decoration: underline; }
.live-disconnect:hover { color: var(--loss); }
.live-badge {
  display: inline-block; vertical-align: 2px; margin-left: 8px; padding: 2px 8px; border-radius: 99px;
  background: var(--gain); color: white; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.07em; font-family: var(--font-body);
}

/* ---------- sentiment engine ---------- */
.senti-engine .card-head { margin-bottom: 10px; }
.rescan-btn {
  padding: 6px 14px; border-radius: 9px; background: var(--accent); color: white;
  font-weight: 600; font-size: 12.5px;
  /* 7.6: buttons never wrap. "Mark all read" broke onto two lines at 820px on
     Alerts — found by tools/test_responsive_app.py, not by looking. */
  white-space: nowrap;
}
.rescan-btn[disabled] { opacity: 0.55; cursor: default; }
.head-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.rescan-wrap { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rescan-meta { font-size: 10.5px; color: var(--faint); }
.senti-sources { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 28px; }
.senti-source { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.senti-source.locked { opacity: 0.55; }
.src-dot { width: 8px; height: 8px; border-radius: 99px; flex: none; background: var(--line-strong); }
.src-dot.ok { background: var(--gain); }
.src-dot.busy { background: oklch(0.72 0.13 75); animation: livepulse 0.8s ease-in-out infinite; }
.src-dot.bad { background: var(--loss); }
.src-id { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.src-label { font-size: 13px; font-weight: 550; }
.src-sub { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-count { font-size: 11.5px; color: var(--muted); flex: none; }
.src-ms { color: var(--faint); }
.senti-totals { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); }
.senti-totals strong { color: var(--ink); font-weight: 600; }
.live-badge.scanning { background: oklch(0.72 0.13 75); }
.senti-chip { font-size: 10px; font-weight: 600; color: var(--gain); letter-spacing: 0.03em; margin-left: 4px; font-family: var(--font-body); }
.senti-live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: var(--gain); margin-right: 7px; animation: livepulse 1.6s ease-in-out infinite; }
.sim-chip {
  display: inline-block; margin-top: 2px; font-size: 10px; font-weight: 600; color: var(--faint);
  border: 1px solid var(--line); border-radius: 99px; padding: 1px 8px; letter-spacing: 0.04em;
}
@media (max-width: 1100px) { .senti-sources { grid-template-columns: 1fr; } }

/* ---------- platforms ---------- */
.platform-block { margin-top: 6px; margin-bottom: 24px; }
.platform-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.platform-card {
  display: block; position: relative; text-align: left; width: 100%; cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.platform-card:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.platform-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow);
}
.platform-suggest {
  position: absolute; top: -9px; left: 14px; padding: 2px 9px; border-radius: 99px;
  background: var(--gain); color: white; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.platform-radio {
  margin-left: auto; width: 18px; height: 18px; flex: none; border-radius: 99px;
  border: 2px solid var(--line-strong); position: relative;
}
.platform-radio.on { border-color: var(--accent); }
.platform-radio.on::after { content: ""; position: absolute; inset: 3px; border-radius: 99px; background: var(--accent); }
.platform-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.platform-top > div { display: flex; flex-direction: column; min-width: 0; }
.platform-mark {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center;
  border-radius: 11px; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: white;
}
.platform-mark.sm { width: 22px; height: 22px; border-radius: 7px; font-size: 11px; }
.platform-mark[data-p="hl"] { background: oklch(0.45 0.13 270); }
.platform-mark[data-p="fid"] { background: oklch(0.5 0.12 200); }
.platform-mark[data-p="etoro"] { background: oklch(0.54 0.14 150); }   /* white initials: 3.70 -> 4.75:1 */
.platform-mark[data-p="ibkr"] { background: oklch(0.5 0.13 25); }
.platform-mark[data-p="t212"] { background: oklch(0.55 0.13 250); }
.platform-mark[data-p="zerodha"] { background: oklch(0.57 0.15 40); }   /* white initials: 4.20 -> 4.76:1 */
.platform-mark[data-p="groww"] { background: oklch(0.54 0.14 155); }   /* white initials: 4.01 -> 4.70:1 */
.platform-mark[data-p="sbi"] { background: oklch(0.5 0.14 0); }
.platform-mark[data-p="rakuten"] { background: oklch(0.55 0.16 15); }
.platform-mark[data-p="futu"] { background: oklch(0.55 0.16 25); }
.platform-mark[data-p="tiger"] { background: oklch(0.56 0.15 60); }   /* white initials: 3.80 -> 4.85:1 */
.platform-mark[data-p="commsec"] { background: oklch(0.5 0.14 250); }
.platform-mark[data-p="stake"] { background: oklch(0.55 0.14 300); }
.platform-mark[data-p="saxo"] { background: oklch(0.48 0.13 20); }
.platform-mark[data-p="schwab"] { background: oklch(0.5 0.14 235); }
.platform-mark[data-p="fidelityus"] { background: oklch(0.52 0.13 155); }
.platform-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.platform-domain { font-size: 11.5px; color: var(--accent); text-decoration: none; }
.platform-domain:hover { text-decoration: underline; }
.platform-nums { display: flex; align-items: baseline; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.platform-net { font-family: var(--font-mono); font-size: 20px; font-weight: 650; }
.platform-net-label { font-size: 11.5px; color: var(--faint); }
.platform-fees { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.platform-desc { margin: 0 0 8px; font-size: 12.5px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.platform-feeline { margin: 0; font-size: 11px; color: var(--faint); font-family: var(--font-mono); }
.venue-chip { display: inline-flex; align-items: center; gap: 7px; }
.venue-name { font-size: 12px; font-weight: 550; color: var(--muted); }
@media (max-width: 1100px) { .platform-grid { grid-template-columns: 1fr; } }

/* ---------- trade ticket ---------- */
.trade-btn {
  padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 600;
  color: var(--accent); border: 1px solid color-mix(in oklch, var(--accent) 40%, transparent);
  white-space: nowrap; transition: background 0.15s;
}
.trade-btn:hover { background: color-mix(in oklch, var(--accent) 10%, transparent); }
.ticket-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal); background: oklch(0.15 0.01 270 / 0.45);
  display: grid; place-items: center; padding: 24px;
}
.ticket { width: 100%; max-width: 580px; max-height: 90vh; overflow-y: auto; }
.ticket-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 0; }
.ticket-head h3 { font-size: 17px; }
.ticket-sub { font-size: 12px; color: var(--muted); }
.ticket-close { font-size: 22px; line-height: 1; color: var(--faint); padding: 2px 6px; }
.ticket-close:hover { color: var(--ink); }
/* paper-trade confirmation */
.paper-confirm-body { padding: 14px 20px 0; }
.paper-confirm-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.6; color: var(--muted); }
.paper-confirm-body p strong { color: var(--ink); }
.paper-confirm-facts { list-style: none; margin: 12px 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.paper-confirm-facts li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
.paper-confirm-facts li:last-child { border-bottom: none; }
.paper-confirm-facts span { color: var(--faint); }
.paper-confirm-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 4px 20px 20px; }
.paper-confirm-actions .ghost { padding: 9px 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; }
@media (max-width: 560px) { .paper-confirm-actions { justify-content: stretch; } .paper-confirm-actions button { flex: 1; } }
.ticket-platforms { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px 0; flex-wrap: wrap; }
.ticket-net { font-size: 13px; font-weight: 600; }
.ticket-steps { margin: 14px 0 0; padding: 0 20px; list-style: none; counter-reset: step; }
.ticket-steps li {
  counter-increment: step; position: relative; padding: 10px 0 10px 38px;
  border-bottom: 1px solid var(--line);
}
.ticket-steps li:last-child { border-bottom: none; }
.ticket-steps li::before {
  content: counter(step); position: absolute; left: 0; top: 11px; width: 22px; height: 22px;
  display: grid; place-items: center; border-radius: 99px; font-family: var(--font-mono);
  font-size: 11px; font-weight: 600; background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent);
}
.ticket-steps li strong { display: block; font-size: 13px; font-weight: 650; margin-bottom: 2px; }
.ticket-steps li span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; text-wrap: pretty; }
.ticket-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; }
.ticket-link { font-size: 13px; font-weight: 550; color: var(--accent); }
.ticket-go {
  padding: 8px 16px; border-radius: 10px; background: var(--accent); color: white;
  font-weight: 600; font-size: 13px; text-decoration: none;
}

/* ---------- penny stocks ---------- */
.penny-warning {
  background: var(--loss-bg); border: 1px solid color-mix(in oklch, var(--loss) 30%, transparent);
  color: var(--loss); border-radius: var(--radius); padding: 12px 18px;
  font-size: 13px; line-height: 1.55; margin-bottom: 26px; text-wrap: pretty;
}
.penny-warning strong { font-weight: 700; }
.vol-tag {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--loss); background: var(--loss-bg); border-radius: 99px; padding: 2px 8px; white-space: nowrap;
}
.penny-medal { background: var(--loss); }
.new-chip {
  display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 99px;
  background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent);
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  vertical-align: 1px;
}
.buzz-track.sm { display: inline-block; width: 64px; vertical-align: middle; }

/* ---------- ticker tape ---------- */
.tape {
  flex: none; overflow: hidden; border-bottom: 1px solid var(--line);
  background: var(--surface); white-space: nowrap; position: relative;
}
.tape::before, .tape::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 48px; z-index: 2; pointer-events: none;
}
.tape::before { left: 0; background: linear-gradient(90deg, var(--surface), transparent); }
.tape::after { right: 0; background: linear-gradient(270deg, var(--surface), transparent); }
.tape-track { display: inline-flex; gap: 30px; padding: 7px 0; width: max-content; animation: tapescroll 70s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tapescroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .tape-track { animation: none; } }
.tape-item { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; flex: none; }
.tape-item:hover .tape-sym { color: var(--accent); }
.tape-dot { width: 5px; height: 5px; border-radius: 99px; background: var(--gain); animation: livepulse 1.6s ease-in-out infinite; }
.tape-sym { font-weight: 600; color: var(--ink); }
.tape-px { color: var(--muted); }

/* ---------- license & analyst ---------- */
.lic-chip.trial { color: oklch(0.55 0.12 75); border-color: oklch(0.62 0.13 75 / 0.45); }
.lic-chip.trial .mkt-dot { background: oklch(0.72 0.13 75); }
.lic-chip.expired { color: var(--loss); border-color: color-mix(in oklch, var(--loss) 40%, transparent); background: var(--loss-bg); }
.lic-chip.expired .mkt-dot { background: var(--loss); }
.lic-chip.pro { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 40%, transparent); }
.lic-chip.pro .mkt-dot { background: var(--accent); }
.lic-screen { max-width: 820px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.pricing-region { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.founder-card { border-color: color-mix(in oklch, oklch(0.72 0.13 60) 45%, var(--line)); }
.founder-card.selected { box-shadow: 0 0 0 1px oklch(0.72 0.13 60), var(--shadow); border-color: oklch(0.72 0.13 60); }
/* The gold stays; the white text does not. White on these stops is 2.58:1,
   the worst item in the app. Dark ink on them is 6.27:1 and 5.26:1, and the
   badge still reads as the gold Lifetime badge. */
.founder-badge { background: linear-gradient(95deg, oklch(0.72 0.14 60), oklch(0.68 0.15 35)) !important;
  color: oklch(0.25 0.04 60) !important; }
.lic-chip.founder { color: oklch(0.55 0.14 55); border-color: color-mix(in oklch, oklch(0.7 0.13 55) 45%, transparent); background: oklch(0.95 0.05 70); }
.lic-chip.founder .mkt-dot { background: oklch(0.7 0.14 55); }
.founder-active { border-color: color-mix(in oklch, oklch(0.72 0.13 60) 35%, var(--line)); }
.upgrade-block { margin-top: 24px; }
.upgrade-h { font-size: 16px; margin: 0 0 4px; }
.upgrade-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upgrade-card { position: relative; display: flex; flex-direction: column; gap: 6px; }
.upgrade-perk { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 2px 0 10px; flex: 1; text-wrap: pretty; }
.upgrade-btn { width: 100%; }
@media (max-width: 760px) { .upgrade-grid { grid-template-columns: 1fr; } }
@media (max-width: 880px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card { position: relative; text-align: left; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.plan-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan-badge { position: absolute; top: -9px; right: 14px; padding: 2px 9px; border-radius: 99px; background: var(--gain); color: white; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.plan-name { display: block; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.plan-price { display: block; font-family: var(--font-display); font-size: 34px; font-weight: 700; margin: 4px 0 10px; }
.plan-per { font-size: 14px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.plan-points { margin: 0; padding: 0 0 0 18px; }
.plan-points li { font-size: 13px; color: var(--muted); margin: 4px 0; }
.lic-active { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.lic-active p { margin: 0; }
.weight-row { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 12px; padding: 5px 0; }
.weight-row input { accent-color: var(--accent); width: 100%; }
.weight-label { font-size: 13px; color: var(--muted); }
.weight-val { font-size: 12.5px; text-align: right; }
.analyst-loading { margin: 0; font-size: 13px; color: var(--muted); animation: livepulse 1.4s ease-in-out infinite; }
.analyst-text { margin: 0 0 10px; font-size: 13px; line-height: 1.6; color: var(--muted); white-space: pre-wrap; text-wrap: pretty; }
@media (max-width: 1100px) { .plan-grid { grid-template-columns: 1fr; } }

.req-form { margin-bottom: 20px; border-color: color-mix(in oklch, var(--accent) 35%, var(--line)); }
.req-fields { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.req-fields input { padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); outline: none; font-size: 13px; }
.req-fields input:focus { border-color: var(--accent); }
.req-sent { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.live-save[disabled] { opacity: 0.5; cursor: default; }
@media (max-width: 1100px) { .req-fields { grid-template-columns: 1fr; } }

/* ---------- source network ---------- */
.srcnet-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 14px; font-size: 11.5px; color: var(--muted); }
.srcnet-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.srcnet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(330px, 100%), 1fr)); gap: 14px; align-items: start; }
.srcnet-card h4 { font-family: var(--font-display); font-size: 13.5px; font-weight: 650; margin: 0 0 8px; }
.srcrow { display: flex; align-items: baseline; gap: 9px; padding: 3.5px 0; text-decoration: none; color: inherit; min-width: 0; }
.srcrow:hover .srcname { color: var(--accent); }
.srcname { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.srcnote { font-size: 10.5px; color: var(--faint); margin-left: auto; flex: none; }
.src-chip { flex: none; width: 46px; text-align: center; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; border-radius: 99px; padding: 2px 0; }
.src-chip.live { background: var(--gain-bg); color: var(--gain); }
.src-chip.feed { background: color-mix(in oklch, var(--accent) 13%, transparent); color: var(--accent); }
.src-chip.open { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.src-chip.api { background: oklch(0.94 0.04 85); color: oklch(0.52 0.11 75); }
.src-chip.ent { background: var(--surface-2); color: var(--faint); border: 1px dashed var(--line-strong); }
.src-chip.locked { background: var(--loss-bg); color: var(--loss); }

/* ---------- appropriateness gate ----------
   First screen a new visitor sees. Two panels: capability on the left so the
   opening impression is what the product does, confirmations on the right so
   the required disclosures read as a setup step rather than a warning notice.
   Collapses to one column below 860px. */
.ack-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal); background: oklch(0.15 0.01 270 / 0.62);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px;
}
.ack-card {
  width: 100%; max-width: 900px; padding: 0; max-height: 92vh;
  display: grid; grid-template-columns: 0.85fr 1.15fr;
  overflow-x: hidden;   /* clip the grid's corners — NOT a shorthand, see below */
  overflow-y: auto;     /* `overflow: hidden` here silently killed this */
}
.ack-hero {
  padding: 32px 30px; background:
    radial-gradient(120% 90% at 0% 0%, color-mix(in oklch, var(--accent) 16%, transparent), transparent 60%),
    var(--surface-2);
  border-right: 1px solid var(--line);
}
.ack-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.ack-card h2 {
  font-family: var(--font-display); font-size: 27px; line-height: 1.18;
  margin: 0 0 10px; letter-spacing: -0.015em;
}
.ack-lead { margin: 0 0 24px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.ack-caps { display: flex; flex-direction: column; gap: 12px; }
.ack-cap {
  display: flex; flex-direction: column; gap: 1px;
  padding-left: 12px; border-left: 2px solid var(--accent);
}
.ack-cap strong { font-family: var(--font-display); font-size: 17px; color: var(--ink); letter-spacing: -0.01em; }
.ack-cap span { font-size: 12px; color: var(--muted); }

.ack-reg { margin: 22px 0 0; font-size: 11px; color: var(--faint); line-height: 1.5; }

/* The gate's brand panel, as the design draws it (Overlays 1a / 1b): a solid
   accent block with the three capabilities as tiles, not a pale panel with a
   left rule. Parity pass, 2026-09-27. Scoped to `ui_v2` so an opt-out browser
   still gets the shipped v1 rendering unchanged. */
:root[data-ui-v2] .ack-hero {
  background: linear-gradient(168deg, oklch(0.44 0.17 285), oklch(0.33 0.14 284));
  border-right: none; color: oklch(0.99 0.002 280);
}
:root[data-ui-v2] .ack-hero h2,
:root[data-ui-v2] .ack-hero .logo-text { color: oklch(0.99 0.002 280); }
:root[data-ui-v2] .ack-hero .logo-eyes { color: oklch(0.86 0.07 287); }
:root[data-ui-v2] .ack-hero .ack-lead,
:root[data-ui-v2] .ack-hero .signin-sub { color: oklch(0.90 0.03 283); }
:root[data-ui-v2] .ack-hero .ack-caps { flex-direction: row; flex-wrap: wrap; gap: 10px; }
:root[data-ui-v2] .ack-hero .ack-cap {
  flex: 1 1 86px; padding: 11px 12px; border-left: 0; border-radius: 12px;
  background: oklch(1 0 0 / 0.13);
}
:root[data-ui-v2] .ack-hero .ack-cap strong { color: oklch(0.99 0.002 280); }
:root[data-ui-v2] .ack-hero .ack-cap span { color: oklch(0.88 0.03 283); }
:root[data-ui-v2] .ack-hero .ack-reg { color: oklch(0.84 0.03 283); }

/* The Ask copilot FAB sits at z-index 210. Every modal backdrop is now on
   --z-modal, above it, so it no longer paints over an open sheet — but the gate
   needs more than that: it must not be REACHABLE either, or someone opens the
   AI assistant before acknowledging anything. Hidden, not merely covered. */
body:has(.ack-overlay) .copilot-fab,
body:has(.ack-overlay) .copilot-panel { display: none; }

/* ---------- what an open modal does to the page behind it ----------
   The page does not scroll while a modal is up, and the version stamp — the
   "(c) 2026 TechProf Ltd. / TickerEyes v2.19.0" line at the end of <main> —
   is hidden rather than left to show through a translucent backdrop.

   `visibility: hidden`, not `display: none`: the stamp is in flow, so removing
   it would reflow the page under the modal and shift it back the moment the
   modal closed. Nothing moves; CLS is unchanged.

   The Pro lock is in both lists. It is a screen state rather than a dialog, but
   both of its buttons route to the licence screen (`onUpgrade` is
   `go('license')` at both call sites in app.jsx), so covering the phone nav bar
   while it is open strands nobody. */
body:has(.ack-overlay), body:has(.ticket-overlay),
body:has(.pro-lock-overlay), body:has(.ui2-modal-back) { overflow: hidden; }

body:has(.ack-overlay) .foot-copy, body:has(.ticket-overlay) .foot-copy,
body:has(.pro-lock-overlay) .foot-copy, body:has(.ui2-modal-back) .foot-copy { visibility: hidden; }

.ack-confirm { padding: 32px 30px; }
.ack-confirm-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.ack-confirm-head h3 { font-size: 15px; margin: 0; }
.ack-progress {
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; color: var(--accent);
  background: color-mix(in oklch, var(--accent) 12%, transparent); padding: 3px 9px; border-radius: 20px;
}
.ack-points { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.ack-point {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; cursor: pointer;
  padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px;
  transition: border-color 0.15s, background 0.15s;
}
.ack-point:hover { border-color: var(--line-strong); }
.ack-point.on { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 5%, transparent); }
.ack-point input { position: absolute; opacity: 0; pointer-events: none; }
/* The real <input> is visually hidden, so without this a keyboard user tabbing
   through the gate gets no focus indicator at all on the only controls here. */
/* :not(.on) matters. `.ack-point.on` and `.ack-point:focus-within` have equal
   specificity, so whichever is written last wins — and clicking a card focuses
   it, meaning an unscoped focus rule repaints a JUST-CHECKED card with the
   unchecked border. Focus styling therefore applies only while unchecked; the
   accent border stays unambiguous evidence of "this one is confirmed". */
.ack-point:focus-within:not(.on) { border-color: var(--line-strong); }
.ack-point:focus-within .ack-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.ack-box {
  width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: white; background: var(--surface);
  transition: background 0.15s, border-color 0.15s;
}
.ack-point.on .ack-box { background: var(--accent); border-color: var(--accent); }
.ack-text { font-size: 12.5px; line-height: 1.5; color: var(--muted); }
/* Disclosure headings, not decoration: each one names what the paragraph
   under it is actually asking the reader to accept. */
.ack-text strong { display: block; font-size: 13px; color: var(--ink); margin-bottom: 4px; }
/* One clause per line. The first disclosure carries five distinct regulatory
   points; as a single 90-word block it invites rubber-stamping rather than
   reading, which works against the legibility the disclosure exists for. */
.ack-clause { display: block; }
.ack-clause + .ack-clause { margin-top: 4px; }
.ack-btn {
  width: 100%; padding: 13px; border-radius: 11px; background: var(--accent); color: white;
  font-weight: 600; font-size: 14.5px; transition: opacity 0.15s, transform 0.1s;
}
.ack-btn:not([disabled]):hover { opacity: 0.92; }
.ack-btn:not([disabled]):active { transform: translateY(1px); }
.ack-btn[disabled] { opacity: 0.4; cursor: default; }
.ack-foot { margin: 14px 0 0; font-size: 11px; color: var(--faint); line-height: 1.5; text-align: center; }
.ack-foot a { color: var(--accent); }

@media (max-width: 860px) {
  .ack-overlay { padding: 12px; }
  .ack-card { grid-template-columns: 1fr; max-width: 560px; }
  .ack-hero { padding: 24px 22px 22px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ack-card h2 { font-size: 22px; }
  .ack-brand { margin-bottom: 18px; }
  .ack-lead { margin-bottom: 16px; }
  /* Horizontal on small screens: three stacked stats push the actual
     confirmations below the fold on a phone. */
  .ack-caps { flex-direction: row; gap: 14px; }
  .ack-cap { flex: 1; padding-left: 9px; }
  .ack-cap strong { font-size: 14px; }
  .ack-cap span { font-size: 10.5px; line-height: 1.3; }
  .ack-confirm { padding: 22px; }
}

/* Short viewports — a landscape phone is ~390px tall, against ~965px of
   content. The disclosures and the CTA are all reachable by scrolling, but
   the marketing half is what should give way, never the regulatory half:
   drop the stats and the registration line and tighten the hero so the
   confirmations start near the top. Nothing in .ack-points is touched. */
@media (max-height: 520px) {
  .ack-card { max-height: 96vh; }
  .ack-hero { padding: 16px 22px; }
  .ack-card h2 { font-size: 18px; margin-bottom: 6px; }
  .ack-brand { margin-bottom: 10px; }
  .ack-lead { margin-bottom: 0; font-size: 12.5px; }
  .ack-caps, .ack-reg { display: none; }
  .ack-confirm { padding: 16px 22px; }
}

/* ---------- IPO centre ---------- */
.pro-tag, .pro-badge { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-ink); background: color-mix(in oklch, var(--accent) 13%, transparent); padding: 2px 8px; border-radius: 6px; vertical-align: 3px; }
.nav-pro { margin-left: auto; font-size: 8.5px; font-weight: 700; letter-spacing: 0.06em; color: var(--accent-ink); background: color-mix(in oklch, var(--accent) 14%, transparent); padding: 1px 5px; border-radius: 5px; }
.ipo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; }
.ipo-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; display: flex; flex-direction: column; gap: 9px; }
.ipo-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ipo-name { font-family: var(--font-display); font-weight: 650; font-size: 15px; }
.ipo-meta { font-size: 11.5px; color: var(--faint); margin-top: 1px; }
.ipo-rating { flex: none; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; padding: 3px 9px; border-radius: 99px; }
.ipo-rating.hot { background: var(--gain); color: #fff; }
.ipo-rating.strong { background: var(--gain-bg); color: var(--gain); }
.ipo-rating.neutral { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.ipo-rating.cautious { background: var(--loss-bg); color: var(--loss); }
.ipo-row { display: flex; align-items: baseline; justify-content: space-between; font-size: 12.5px; }
.ipo-k { color: var(--muted); }
.ipo-v { font-weight: 600; }
.ipo-pred { border-top: 1px solid var(--line); padding-top: 9px; }
.ipo-pred-h { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.ipo-pred-h .mono { font-size: 14px; font-weight: 650; }
.ipo-bar { height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.ipo-bar-fill { display: block; height: 100%; background: var(--gain); border-radius: 99px; }
.ipo-stats { display: flex; gap: 16px; border-top: 1px solid var(--line); padding-top: 10px; }
.ipo-stats > div { display: flex; flex-direction: column; gap: 2px; }
.ipo-s-label { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.ipo-s-val { font-size: 13px; font-weight: 600; }
.ipo-note { margin: 0; font-size: 11.5px; color: var(--muted); line-height: 1.5; border-top: 1px solid var(--line); padding-top: 9px; text-wrap: pretty; }

.mfa-card { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 460px; }
.mfa-card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.55; }
.mfa-secret2 { background: var(--bg); border: 1px dashed var(--line-strong); border-radius: 9px; padding: 12px; text-align: center; font-size: 16px; letter-spacing: 0.08em; width: 100%; }
.mfa-uri2 { font-size: 12.5px; color: var(--accent); }
.mfa-code2 { width: 180px; padding: 11px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg); outline: none; font-family: var(--font-mono); font-size: 22px; letter-spacing: 0.3em; text-align: center; }
.mfa-code2:focus { border-color: var(--accent); }

/* ---------- super engine ---------- */
.sig-pill { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.sig-pill.sm { padding: 2px 7px; font-size: 9.5px; }
.sig-pill.verified { background: var(--gain-bg); color: var(--gain); }
.sig-pill.upgraded { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent); }
.sig-pill.downgraded { background: var(--loss-bg); color: var(--loss); }
.sig-pill.review { background: oklch(0.95 0.06 75); color: oklch(0.5 0.12 70); }
.sig-verify { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 13px; }
.sig-verify-head { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 9px; }
.sig-verify-row { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.sig-verify-row .mono { font-weight: 600; font-size: 14px; color: var(--ink); }
.sig-verify-row .accent { color: var(--accent); }
.sig-arrow { color: var(--faint); }
.sig-verify-note { font-size: 11.5px; color: var(--faint); line-height: 1.5; text-wrap: pretty; }
.se-stats { display: flex; gap: 18px; margin-bottom: 12px; }
.se-stat { display: flex; flex-direction: column; }
.se-num { font-family: var(--font-display); font-weight: 700; font-size: 22px; line-height: 1; }
.se-lab { font-size: 11px; color: var(--faint); margin-top: 3px; }
.train-spark { width: 100%; height: 40px; display: block; margin: 4px 0 2px; }

/* ---------- toasts & error boundary ---------- */
.toaster { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-left-width: 3px; border-radius: 12px; box-shadow: 0 8px 28px oklch(0.2 0.01 270 / 0.18); padding: 12px 14px; animation: toastin 0.22s ease; }
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.error { border-left-color: var(--loss); }
.toast.warn { border-left-color: oklch(0.72 0.13 75); }
.toast.success { border-left-color: var(--gain); }
.toast.info { border-left-color: var(--accent); }
.toast-ic { flex: none; width: 19px; height: 19px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; margin-top: 1px; }
.toast.error .toast-ic { background: var(--loss); }
.toast.warn .toast-ic { background: oklch(0.72 0.13 75); }
.toast.success .toast-ic { background: var(--gain); }
.toast.info .toast-ic { background: var(--accent); }
.toast-msg { flex: 1; font-size: 12.5px; line-height: 1.45; color: var(--ink); }
.toast-x { flex: none; color: var(--faint); font-size: 16px; line-height: 1; padding: 0 2px; }
.toast-x:hover { color: var(--ink); }
.err-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.err-card { max-width: 440px; text-align: center; padding: 34px 32px; }
.err-icon { width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 14px; display: grid; place-items: center; background: var(--loss-bg); color: var(--loss); font-size: 24px; font-weight: 700; }
.err-card h2 { font-size: 20px; margin: 0 0 8px; }
.err-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 16px; }
.err-actions { margin-bottom: 14px; }
.err-reload { width: auto; padding: 11px 22px; }
.err-detail { font-size: 11px; color: var(--faint); background: var(--surface-2); border-radius: 8px; padding: 8px 10px; word-break: break-word; }
@media (max-width: 560px) { .toaster { left: 14px; right: 14px; max-width: none; bottom: calc(var(--bottom-nav, 51px) + 14px); } }

/* ---------- home trust bar ---------- */
.home-trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 30px; }
.trust-item { display: flex; gap: 11px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.trust-item span:last-child { font-size: 12px; line-height: 1.5; color: var(--muted); text-wrap: pretty; }
.trust-item strong { color: var(--ink); font-weight: 650; }
.trust-dot { flex: none; width: 9px; height: 9px; border-radius: 99px; margin-top: 4px; }
.trust-dot.a { background: var(--accent); }
.trust-dot.g { background: var(--gain); }
.trust-dot.r { background: oklch(0.72 0.13 75); }
@media (max-width: 900px) { .home-trust { grid-template-columns: 1fr; } }

/* ---------- pagination ---------- */
/* One row: the count sits on the controls' baseline, indented by the table's
   own cell padding so it lines up with the first column — true both inside the
   table card (Today) and directly under it (Markets / Screener / Penny). */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px 12px; margin-top: 6px; padding: 10px 14px 12px; flex-wrap: wrap; }
.pager-info { font-size: 12.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pager-controls { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.pager-btn {
  min-width: 40px; height: 40px; padding: 0 10px; border-radius: 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 13px; font-weight: 550; font-variant-numeric: tabular-nums;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.pager-btn:hover:not([disabled]) { color: var(--ink); border-color: var(--line-strong); }
.pager-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager-btn[disabled] { opacity: 0.4; cursor: default; }
.pager-ellipsis { color: var(--faint); padding: 0 2px; }

/* ---------- pro lock teaser ---------- */
.pro-lock-wrap { position: relative; }
.pro-lock-content { max-height: 80vh; overflow: hidden; filter: blur(5px) saturate(0.65); opacity: 0.5; pointer-events: none; user-select: none; }
/* FIXED, not absolute — the 390px bug, reproduced on production 2026-10-05.
   This was `position: absolute; inset: 0` inside `.pro-lock-wrap`, whose
   height is whatever `.pro-lock-content` clamps to (80vh). On a 390x844 phone
   the card is ~858px tall in a 675px box, so 206-225px of it hung OUT of its
   own overlay and into page flow — where the phone nav bar, the Ask button and
   the footer's "(c) 2026 TechProf Ltd. / TickerEyes v2.19.0" stamp all painted
   on top of it. No z-index could have fixed that: the card was not on a layer,
   it was in the document. It is a modal now, on the modal layer, and it scrolls
   itself rather than growing past its backdrop. */
.pro-lock-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center;
  padding: 24px; background: oklch(0.15 0.01 270 / 0.45); overflow-y: auto;
}
.pro-lock-card {
  max-width: 470px; text-align: center; padding: 34px 32px; box-shadow: 0 10px 40px oklch(0.2 0.01 270 / 0.18);
  /* The card never grows past the viewport: a grid-centred item taller than
     its container is clipped at the TOP, where the heading is, and `overflow`
     on the overlay cannot scroll back to it. Same shape as `.ack-card` and
     `.ticket`, which have always had it. */
  max-height: calc(100dvh - 48px); overflow-y: auto;
}
.pro-lock-icon { width: 56px; height: 56px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 16px; background: color-mix(in oklch, var(--accent) 13%, transparent); color: var(--accent); }
.pro-lock-card .pro-badge { display: inline-block; margin-bottom: 10px; }
.pro-lock-card h2 { font-size: 20px; margin: 0 0 8px; }
.pro-lock-card p { color: var(--muted); font-size: 13.5px; line-height: 1.55; margin: 0 0 18px; text-wrap: pretty; }
.pro-lock-btn { width: auto; padding: 11px 22px; }
.pro-lock-link { display: block; margin: 12px auto 0; font-size: 13px; color: var(--accent); font-weight: 550; }
.pro-lock-link:hover { text-decoration: underline; }
.pro-lock-trial { margin-top: 14px !important; font-size: 11.5px !important; color: var(--faint) !important; }

/* ---------- markets-today strip ---------- */
.market-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); gap: 14px; }
.market-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 15px 16px; display: flex; flex-direction: column; gap: 11px; }
.market-card-head { display: flex; align-items: center; gap: 8px; }
.market-region { font-family: var(--font-display); font-weight: 650; font-size: 14px; }
.market-status { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--faint); }
.market-status .mkt-dot { width: 6px; height: 6px; border-radius: 99px; background: var(--faint); }
.market-status.open { color: var(--gain); }
.market-status.open .mkt-dot { background: var(--gain); animation: livepulse 1.6s ease-in-out infinite; }
.market-exch { font-size: 11px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: -4px; }
.market-metrics { display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); padding-top: 11px; }
.market-metrics > div { display: flex; flex-direction: column; gap: 3px; }
.mm-label { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
.market-metrics > div:nth-child(3) { flex: 1; min-width: 0; }
.mm-val { font-size: 14px; font-weight: 600; }
.market-top { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border-top: 1px solid var(--line); padding-top: 11px; }
.market-top:hover .mt-sym { color: var(--accent); }
.mt-label { font-size: 10px; color: var(--faint); text-transform: uppercase; letter-spacing: 0.04em; }
.mt-sym { font-weight: 600; font-size: 12.5px; }
.market-top .delta { margin-left: auto; }

/* ---------- backtest ---------- */
.bt-controls { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr; gap: 24px; margin-bottom: 20px; }
@media (max-width: 760px) { .bt-controls { grid-template-columns: 1fr; gap: 16px; } }

/* ---------- daily brief ---------- */
.daily-brief { background: linear-gradient(160deg, color-mix(in oklch, var(--accent) 9%, var(--surface)), var(--surface)); border: 1px solid color-mix(in oklch, var(--accent) 22%, var(--line)); border-radius: 16px; padding: 18px 20px; margin-bottom: 26px; }
.brief-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.brief-kicker { font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.brief-head h2 { font-size: 19px; font-weight: 650; margin-top: 3px; }
.brief-controls { display: flex; align-items: center; gap: 8px; }
.brief-sel { padding: 6px 10px; font-size: 12.5px; }
.brief-x { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); color: var(--faint); font-size: 18px; line-height: 1; background: var(--surface); }
.brief-x:hover { color: var(--ink); border-color: var(--line-strong); }
.brief-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

/* The daily brief as the design draws it (App canvas, Today): a saturated
   accent panel with translucent cards on it, rather than a tinted white card.
   Parity pass, 2026-09-27. Every child that assumed a light surface is given
   its dark-surface value here — the panel alone would have left grey-on-purple
   labels. Scoped to `ui_v2`, like the rest of the v2 treatment. */
:root[data-ui-v2] .daily-brief {
  background: linear-gradient(168deg, oklch(0.46 0.17 285), oklch(0.36 0.15 284));
  border-color: oklch(1 0 0 / 0.14); color: oklch(0.99 0.002 280);
}
:root[data-ui-v2] .daily-brief .brief-kicker { color: oklch(0.85 0.07 287); }
:root[data-ui-v2] .daily-brief .brief-head h2 { color: oklch(0.99 0.002 280); }
:root[data-ui-v2] .daily-brief .brief-x {
  background: oklch(1 0 0 / 0.12); border-color: oklch(1 0 0 / 0.22);
  color: oklch(0.93 0.02 283);
}
:root[data-ui-v2] .daily-brief .brief-x:hover { color: #fff; border-color: oklch(1 0 0 / 0.4); }
:root[data-ui-v2] .daily-brief .brief-card {
  background: oklch(1 0 0 / 0.12); border-color: oklch(1 0 0 / 0.18);
  color: oklch(0.99 0.002 280);
}
:root[data-ui-v2] .daily-brief .brief-card:hover { border-color: oklch(1 0 0 / 0.45); }
:root[data-ui-v2] .daily-brief .brief-rank {
  background: oklch(1 0 0 / 0.2); color: oklch(0.99 0.002 280);
}
:root[data-ui-v2] .daily-brief .brief-name,
:root[data-ui-v2] .daily-brief .brief-score { color: oklch(0.88 0.03 283); }
:root[data-ui-v2] .daily-brief .brief-actions { border-top-color: oklch(1 0 0 / 0.16); }
:root[data-ui-v2] .daily-brief .brief-mini {
  background: oklch(1 0 0 / 0.14); border-color: oklch(1 0 0 / 0.22);
  color: oklch(0.99 0.002 280);
}
:root[data-ui-v2] .daily-brief .brief-mini:hover { background: oklch(1 0 0 / 0.24); }
/* The gain/loss and score tokens are tuned for a white card; on the accent
   panel they read as muddy, so lift them rather than leave them unreadable. */
:root[data-ui-v2] .daily-brief .gain,
:root[data-ui-v2] .daily-brief .delta.up { color: oklch(0.88 0.17 155); }
:root[data-ui-v2] .daily-brief .loss,
:root[data-ui-v2] .daily-brief .delta.down { color: oklch(0.82 0.15 22); }
:root[data-ui-v2] .daily-brief .delta.flat { color: oklch(0.86 0.02 283); }
:root[data-ui-v2] .daily-brief .ui2-score,
:root[data-ui-v2] .daily-brief .rating-pill {
  background: oklch(1 0 0 / 0.18); color: oklch(0.99 0.002 280);
  border-color: oklch(1 0 0 / 0.24);
}
:root[data-ui-v2] .daily-brief .brief-foot { color: oklch(0.86 0.03 283); }
.brief-card { display: flex; flex-direction: column; gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; transition: transform 0.15s, border-color 0.15s; position: relative; }
.brief-card:hover { transform: translateY(-2px); border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.brief-rank { position: absolute; top: 12px; right: 12px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px; background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent); font-family: var(--font-display); font-weight: 700; font-size: 12px; }
.brief-sym { font-family: var(--font-mono); font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.brief-name { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brief-stat { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.brief-figs { font-size: 12.5px; display: inline-flex; align-items: center; gap: 6px; }
.brief-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding-top: 9px; }
.brief-score { font-size: 11.5px; color: var(--muted); }
.brief-btns { display: flex; gap: 5px; }
.brief-mini { padding: 3px 9px; border-radius: 7px; border: 1px solid var(--line); font-size: 11.5px; font-weight: 600; color: var(--muted); background: var(--surface); }
.brief-mini:hover { border-color: var(--accent); color: var(--accent); }
.brief-mini.on { color: oklch(0.6 0.13 75); border-color: color-mix(in oklch, oklch(0.7 0.13 75) 45%, transparent); }
.brief-mini.paper { color: #fff; background: var(--accent); border-color: var(--accent); }
.brief-foot { margin: 12px 0 0; font-size: 11px; color: var(--faint); }
@media (max-width: 760px) { .brief-grid { grid-template-columns: 1fr; } }

/* ---------- watchlist & paper trade ---------- */
.explain-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 22px; }
.explain-card { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.explain-ic { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; background: var(--surface-2); font-size: 15px; color: var(--muted); }
.explain-ic.accent { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent); }
.explain-card strong { font-size: 13.5px; }
.explain-card p { margin: 3px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.explain-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); background: color-mix(in oklch, var(--accent) 12%, transparent); padding: 1px 6px; border-radius: 99px; vertical-align: 1px; margin-left: 4px; }
@media (max-width: 760px) { .explain-row { grid-template-columns: 1fr; } }
.stock-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.watch-btn, .paper-btn { padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); white-space: nowrap; transition: all 0.15s; }
.watch-btn { color: var(--muted); background: var(--surface); }
.watch-btn:hover { border-color: var(--accent); color: var(--accent); }
.watch-btn.on { color: oklch(0.6 0.13 75); border-color: color-mix(in oklch, oklch(0.7 0.13 75) 45%, transparent); background: oklch(0.96 0.04 80); }
.paper-btn { color: #fff; background: var(--accent); border-color: var(--accent); }
.paper-btn:hover { filter: brightness(1.06); }
.paper-hint { font-weight: 500; opacity: 0.8; font-size: 11px; }
.share-btn { padding: 7px 13px; border-radius: 9px; font-size: 12.5px; font-weight: 600; border: 1px solid var(--line); background: var(--surface); color: var(--muted); white-space: nowrap; transition: all 0.15s; }
.share-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- onboarding ----------
   The onboarding steps reuse .ack-card for the modal chrome, but they are ONE
   column of content, not the gate's hero + confirmations pair. .ack-card is a
   `0.85fr 1.15fr` grid and each step renders inside a React.Fragment — which
   emits no DOM node — so every child (heading, lead, option grid, Continue)
   became a grid ITEM: the 8 market options were squeezed into a 254px left
   column while Continue stretched to fill the 344px right one, 352px tall, as
   a solid block of accent. Reset to a normal block flow and supply the padding
   .ack-card deliberately leaves to .ack-hero / .ack-confirm. */
.onb-card { display: block; max-width: 720px; padding: 30px 32px; }
.onb-progress { display: flex; gap: 6px; margin-bottom: 16px; }
.onb-dot { width: 28px; height: 4px; border-radius: 99px; background: var(--line); transition: background 0.2s; }
.onb-dot.on { background: var(--accent); }
/* Auto-fit so extra width buys COLUMNS, not dead space — same idiom as
   .ipo-grid. `min(…, 100%)` keeps the track from overflowing a narrow card. */
.onb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 9px; margin-bottom: 20px; }
.onb-grid-3 { grid-template-columns: repeat(3, 1fr); }
.onb-opt { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); transition: all 0.15s; }
.onb-opt:hover { border-color: var(--line-strong); }
.onb-opt.on { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 6%, transparent); box-shadow: 0 0 0 1px var(--accent); }
.onb-opt-label { font-weight: 650; font-size: 14px; }
.onb-opt-sub { font-size: 11.5px; color: var(--muted); }
.onb-amts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(96px, 100%), 1fr)); gap: 9px; margin-bottom: 20px; }
.onb-amt { padding: 13px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-family: var(--font-mono); font-weight: 600; font-size: 14px; transition: all 0.15s; }
.onb-amt:hover { border-color: var(--line-strong); }
.onb-amt.on { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 6%, transparent); box-shadow: 0 0 0 1px var(--accent); color: var(--accent); }
/* Back sits left, Continue right, and Continue is a BUTTON — not a panel.
   `.ack-btn { width: 100% }` is right for the compliance gate (one button in
   one column) and wrong here, and `.onb-nav .ack-btn { flex: 1 }` re-created
   the same stretch through flex — it hands the button every pixel the nav row
   has spare, which on a wide card is most of them. Cap it to its content and
   let the ROW, not the button, absorb the free width. Scoped to .onb-card so
   the gate's own full-width CTA (and the pro-lock / error buttons that reuse
   .ack-btn) are untouched. */
.onb-nav { display: flex; align-items: center; justify-content: flex-end; gap: 12px; }
.onb-nav .onb-back { margin-right: auto; }
.onb-card .ack-btn { width: auto; flex: 0 1 auto; min-width: 190px; padding: 13px 28px; }
.onb-back { padding: 12px 16px; border-radius: 11px; border: 1px solid var(--line); color: var(--muted); font-weight: 600; font-size: 13.5px; background: var(--surface); }
.onb-back:hover { color: var(--ink); border-color: var(--line-strong); }
.onb-skip { display: block; margin: 12px auto 0; font-size: 12.5px; color: var(--faint); text-decoration: underline; }
.onb-skip:hover { color: var(--muted); }
/* .onb-card is declared after the gate's own 860px rule, so it must restate
   the narrow-screen cap itself — otherwise 720px wins on a phone. */
@media (max-width: 860px) { .onb-card { max-width: 560px; padding: 24px 24px 22px; } }
@media (max-width: 560px) {
  .onb-card { padding: 20px 18px 18px; }
  .onb-grid, .onb-grid-3, .onb-amts { grid-template-columns: 1fr 1fr; }
  /* Phone: one thumb-width action again — the row has no spare width to give. */
  .onb-card .ack-btn { min-width: 0; flex: 1; padding: 13px 16px; }
}
.side-tag { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 99px; }
.side-tag.buy { background: var(--gain-bg); color: var(--gain); }
.side-tag.sell { background: var(--loss-bg); color: var(--loss); }
.empty-cta { text-align: center; }
.empty-cta p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

/* ---------- topbar bell ---------- */
.bell-btn {
  position: relative; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: var(--muted); border: 1px solid var(--line); transition: color 0.15s, border-color 0.15s;
}
.bell-btn:hover { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.bell-badge {
  position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 99px; background: var(--loss); color: white; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; border: 2px solid var(--surface); font-family: var(--font-body);
}

/* ---------- alerts ---------- */
.alerts-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 20px; align-items: start; }
.alerts-side { display: flex; flex-direction: column; gap: 20px; }
.alerts-list { overflow: hidden; }
.alert-row {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  padding: 13px 18px; border-bottom: 1px solid var(--line); transition: background 0.12s;
}
.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: var(--surface-2); }
.alert-row.unread { background: color-mix(in oklch, var(--accent) 5%, transparent); }
.alert-row.unread .alert-title { font-weight: 650; }
.alert-sev { flex: none; width: 9px; height: 9px; border-radius: 99px; background: var(--faint); }
.alert-sev.pos { background: var(--gain); } .alert-sev.neg { background: var(--loss); }
.alert-sev.warn { background: oklch(0.72 0.13 75); } .alert-sev.info { background: var(--accent); }
.alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.alert-title { font-size: 13.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-detail { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.alert-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.alert-tag { font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 7px; border-radius: 99px; }
.alert-tag.pos { background: var(--gain-bg); color: var(--gain); }
.alert-tag.neg { background: var(--loss-bg); color: var(--loss); }
.alert-tag.warn { background: oklch(0.94 0.04 85); color: oklch(0.52 0.11 75); }
.alert-tag.info { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent-ink); }
.alert-time { font-size: 10.5px; color: var(--faint); }

/* ---------- scorecard ---------- */
.outcome { font-size: 12px; font-weight: 600; }
.outcome.hit { color: var(--gain); } .outcome.miss { color: var(--loss); }
.cal-row { display: grid; grid-template-columns: 70px 1fr 42px; align-items: center; gap: 12px; padding: 7px 0; }
.cal-h { font-size: 12.5px; color: var(--muted); }
.cal-track { position: relative; height: 14px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.cal-fill { display: block; height: 100%; background: var(--accent); border-radius: 7px; }
.cal-mid { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1.5px; background: var(--ink); opacity: 0.4; }
.cal-val { font-size: 12.5px; text-align: right; font-weight: 600; }

/* ---------- admin console (tabbed) ---------- */
.admin-screen { max-width: 1100px; }
.admin-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; box-shadow: var(--shadow); }
.kpi-dot { flex: none; width: 9px; height: 9px; border-radius: 99px; }
.kpi-dot.g { background: var(--gain); animation: livepulse 1.6s ease-in-out infinite; }
.kpi-dot.a { background: oklch(0.72 0.13 75); }
.kpi-dot.r { background: var(--loss); }
.kpi-val { font-family: var(--font-display); font-weight: 700; font-size: 19px; line-height: 1.05; }
.kpi-sub { font-size: 12px; color: var(--faint); font-weight: 500; }
.kpi-lab { font-size: 11px; color: var(--faint); margin-top: 2px; }
.admin-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.admin-tab { padding: 9px 16px; border-radius: 9px 9px 0 0; font-size: 13.5px; font-weight: 550; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.admin-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.crawler-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.crawler-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.crawler-row.disabled { opacity: 0.55; }
.crawler-row .cov-id { flex: 1; min-width: 0; }
.crawler-row .src-count { flex: none; }
@media (max-width: 1000px) { .admin-kpis { grid-template-columns: repeat(2, 1fr); } .admin-cols, .crawler-grid { grid-template-columns: 1fr; } }

/* ---------- internal report rows ---------- */
.report-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; }
.report-row:last-of-type { border-bottom: none; }
.report-row:hover .cov-layer { color: var(--accent); }
.report-arrow { color: var(--faint); font-size: 14px; }

/* ---------- technical setup card ---------- */
.tech-pattern { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tech-badge { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 99px; }
.tech-badge.bull { background: var(--gain-bg); color: var(--gain); }
.tech-badge.bear { background: var(--loss-bg); color: var(--loss); }
.tech-badge.neutral { background: var(--surface-2); color: var(--muted); }
.tech-pattern-name { font-family: var(--font-display); font-weight: 650; font-size: 15px; }
.tech-strength { display: flex; align-items: center; gap: 7px; margin-left: auto; }
.tech-strength-track { width: 64px; height: 6px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.tech-strength-fill { display: block; height: 100%; border-radius: 99px; }
.tech-strength-fill.gain { background: var(--gain); } .tech-strength-fill.loss { background: var(--loss); } .tech-strength-fill.dim { background: var(--faint); }
.tech-blurb { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 0 0 12px; text-wrap: pretty; }
.tech-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.tech-levels > div { display: flex; justify-content: space-between; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.tl-k { font-size: 12px; color: var(--faint); }
.tl-v { font-size: 12.5px; font-weight: 550; }

/* ---------- economic calendar ---------- */
.cal-day { margin-bottom: 18px; }
.cal-day-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.cal-day-name { font-family: var(--font-display); font-weight: 650; font-size: 15px; }
.cal-day-sub { font-size: 12px; color: var(--faint); }
.cal-row { display: flex; align-items: center; gap: 12px; padding: 11px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin-bottom: 7px; cursor: default; transition: border-color 0.12s; }
.cal-row.clickable { cursor: pointer; }
.cal-row.clickable:hover { border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.cal-time { font-family: var(--font-mono); font-size: 12.5px; color: var(--muted); width: 48px; flex: none; }
.cal-imp { display: flex; gap: 2px; flex: none; }
.cal-imp i { width: 5px; height: 14px; border-radius: 2px; background: var(--line-strong); display: block; }
.cal-imp.i1 i:nth-child(1), .cal-imp.i2 i:nth-child(-n+2), .cal-imp.i3 i { background: var(--amber, oklch(0.66 0.13 75)); }
.cal-imp.i3 i { background: var(--loss); }
.cal-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cal-title { display: block; font-weight: 600; font-size: 13.5px; }
.cal-detail { display: block; font-size: 11.5px; color: var(--faint); }
.cal-kind { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; padding: 2px 8px; border-radius: 99px; flex: none; }
.cal-kind.macro { background: color-mix(in oklch, var(--accent) 12%, transparent); color: var(--accent); }
.cal-kind.rates { background: oklch(0.95 0.05 75); color: oklch(0.5 0.11 70); }
.cal-kind.earnings { background: var(--gain-bg); color: var(--gain); }
.cal-flag { font-size: 9.5px; font-weight: 700; padding: 2px 6px; border-radius: 5px; background: var(--surface-2); color: var(--muted); flex: none; text-transform: uppercase; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .alerts-body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  /* Let the page scroll naturally (the 100vh box + column-reverse + sticky
     pushed content off-screen on phones). Content flows; nav is a FIXED bottom
     bar (out of flow, so it can't stretch to full height). */
  html, body { height: auto; }
  #root, .app { height: auto; min-height: 100vh; }
  .app { flex-direction: column; }
  /* Single source of truth for the fixed bar's footprint — content padding, the
     copilot bubble, the toast stack and the copilot panel all clear it from
     here, so they can't drift apart when the bar's height changes. */
  :root { --bottom-nav: calc(51px + env(safe-area-inset-bottom, 0px)); }
  .main-col { order: 1; padding-bottom: calc(var(--bottom-nav) + 12px); }
  .main { overflow: visible; }
  .sidebar {
    order: 2;
    width: 100%; flex-direction: row; padding: 0 0 env(safe-area-inset-bottom, 0px); border-right: none; border-top: 1px solid var(--line);
    position: fixed; left: 0; right: 0; bottom: 0; height: auto; z-index: 40; overflow-x: auto; background: var(--surface);
    /* the bar is a horizontal scroller, not a squeeze-everything-in strip */
    overflow-y: hidden; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity; scrollbar-width: none; -ms-overflow-style: none;
  }
  .sidebar::-webkit-scrollbar { display: none; }
  /* topbar density: keep LSE chip only; other market chips hidden on phones */
  /* The pulse already collapses CLOSED markets; on a phone there is no room
     for the open ones either, so keep the first chip and the summary only. */
  .topbar-mid .mkt-chip:not(:first-child) { display: none; }
  .topbar-mid { margin: 0 0 0 auto; }
  .logo, .sidebar-foot { display: none; }
  /* ...which is why the brand moves into the top bar here. */
  .topbar-brand { display: flex; }
  .topbar-brand .logo-text { font-size: 16px; }
  /* Intrinsic width + non-shrinking items: with `width: 100%` the 16 tabs were
     squeezed onto the viewport and each nowrap label painted outside its own
     64px box, so labels ran into each other. The list is now as wide as its
     content and the bar scrolls. */
  .nav-list { flex-direction: row; gap: 0; width: max-content; min-width: 100%; }
  /* Two fixed rows — glyph, then label + PRO side by side — so every tab is the
     same height and every label sits on the same baseline whether or not it
     carries a badge (`margin-left: auto` used to drop the badge onto a third
     row on Pro tabs only). Empty `pro` track costs nothing: the gap lives on
     the badge's own margin, so non-Pro labels stay centred. */
  .nav-item {
    flex: 0 0 auto; min-width: 64px; padding: 8px 12px; border-radius: 0;
    font-size: 10.5px; white-space: nowrap;
    display: grid; grid-template-areas: "icon icon" "label pro";
    grid-template-columns: auto auto; align-items: center; justify-content: center;
    column-gap: 0; row-gap: 3px; scroll-snap-align: center;
  }
  .nav-item > svg { grid-area: icon; justify-self: center; }
  .nav-item span { grid-area: label; display: block; }
  .nav-item .nav-pro { grid-area: pro; margin: 0 0 0 4px; }
  .nav-item.on { background: transparent; color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
  /* the bubble's default corner is inside the fixed tab bar — lift it clear so
     it stops covering the last nav labels (it stays drag-to-reposition) */
  .copilot-fab { bottom: calc(var(--bottom-nav) + 10px); }
  .topbar { flex-wrap: wrap; gap: 8px; padding: 10px 14px; }
  .gsearch { width: 100%; order: 2; }
  .topbar-right { width: 100%; order: 1; justify-content: space-between; gap: 6px; }
  .topbar-date { display: none; }
  .screen { padding: 18px 14px 40px; }
  .screen-head { flex-direction: column; align-items: flex-start; gap: 12px; }
  .screen-head h1 { font-size: 24px; }
  .head-stats { display: flex; }
  .buy-feature-grid { grid-template-columns: 1fr; }
  .two-col, .detail-grid, .pf-body, .pulse-cols, .admin-grid, .srcnet-grid { grid-template-columns: 1fr !important; }
  .pf-summary { grid-template-columns: 1fr 1fr; }
  .table-card { overflow-x: auto; }
  .gtable { min-width: 560px; }
  .plan-grid { grid-template-columns: 1fr; }
}
/* Tablet-only icon rail. MUST be range-scoped: a plain max-width:1100px here
   also matches phones and, being later in the file, overrides the 760px
   bottom-nav rules above (cascade bug — phones got a 64px strip). */
@media (max-width: 1100px) {
  /* Sidebar footer links (Download / Terms / Privacy / Refunds) are hidden on
     both the phone bottom-nav (≤760px) and the tablet icon rail (761–1100px),
     so surface them as a footer at the end of the scrolled content — the div
     lives inside <main>, so it scrolls with each screen on every layout. */
  .mobile-foot {
    display: block; padding: 18px 14px 10px; font-size: 11px; color: var(--faint);
    line-height: 1.55; border-top: 1px solid var(--line);
  }
  .mobile-foot p { margin: 10px 0 0; }
  .two-col, .detail-grid, .pf-body, .pulse-cols { grid-template-columns: 1fr; }
  .buy-feature-grid { grid-template-columns: 1fr; }
  .pf-controls { grid-template-columns: 1fr; gap: 18px; }
  .pf-summary { grid-template-columns: repeat(2, 1fr); }
  .head-stats { display: none; }
  /* Stock detail header: give each block a wrap-friendly basis so the row breaks
     into [avatar + name/chips] / [price + rating] / [actions] instead of
     over-shrinking every child until the chips paint on top of the price. */
  .stock-head { gap: 12px 14px; }
  .stock-head-id { flex: 1 1 220px; }
  .stock-head-price { flex: 0 1 auto; text-align: left; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
  .stock-actions { flex: 1 1 100%; }
}
@media (min-width: 761px) and (max-width: 1100px) {
  .sidebar { width: 64px; padding: 20px 8px; }
  .logo-text, .nav-item span, .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
  .logo { justify-content: center; padding-bottom: 18px; }
}

/* VAT disclosure on the pricing block — must be legible, not fine print: the
   whole point is that a UK buyer is not surprised by +20% at the final step. */
.vat-note { display: block; margin-top: 6px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }

/* Markets free-tier boundary row */
.cap-row td { background: color-mix(in oklch, var(--accent) 6%, transparent); border-top: 1px solid var(--line); }
.cap-inner { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 4px; }
.cap-inner strong { font-size: 14.5px; }
.cap-sub { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cap-actions { flex: none; }
@media (max-width: 560px) { .cap-inner { flex-direction: column; align-items: flex-start; } .cap-actions button { width: 100%; } }

/* Sign-in-gated trial start inside the Pro lock card. */
.trial-form { display: flex; flex-direction: column; gap: 8px; margin: 0 0 10px; }
.trial-form input { width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 14px; background: var(--surface); color: var(--ink); }
.trial-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.trial-form button[disabled] { opacity: 0.5; cursor: default; }
.trial-form .mh-addrow { display: flex; gap: 8px; align-items: center; }

/* Google's rendered button is an iframe of a fixed pixel width, so it is
   centred rather than stretched — restyling or resizing it would breach
   Google's branding terms. */
.gsi-wrap { display: flex; flex-direction: column; align-items: center; }
.gsi-btn { min-height: 44px; display: flex; justify-content: center; }
.gsi-btn iframe { margin: 0 auto !important; }

.trial-or { display: flex; align-items: center; gap: 10px; margin: 2px 0;
  color: var(--muted); font-size: 12px; }
.trial-or::before, .trial-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* First-launch sign-in gate (installed apps only). Reuses .ack-overlay /
   .ack-card, but explicitly resets the grid the compliance gate applies at
   wide widths: .ack-card becomes a two-column grid above 860px, and this
   card's children are a hero and a form that must stay stacked. */
.ack-card.signin-card { display: block; max-width: 460px; }
/* .ack-card has padding:0 and .card adds none, so the hero supplies its own
   32px/30px. Without matching it here the form ran edge-to-edge — the code
   input's border sitting on the card's border — while the heading above it was
   inset 30px. The hero's border-right is only reset below 860px, so it must be
   cleared here too or a stray vertical rule runs down this card. */
.signin-card .ack-hero { padding: 26px 30px 4px; border-right: 0; }
.signin-card .ack-hero h2 { font-size: 22px; margin: 10px 0 6px; }
.signin-sub { font-size: 13.5px; line-height: 1.55; color: var(--muted); margin: 0; }
.signin-body { padding: 14px 30px 26px; }

.code-form { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.code-form input { width: 100%; padding: 11px 13px; border: 1px solid var(--line-strong);
  border-radius: 10px; font-size: 14px; background: var(--surface); color: var(--ink); }
.code-form input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.code-form button[disabled] { opacity: 0.5; cursor: default; }
.code-input { text-align: center; font-size: 22px !important; letter-spacing: 6px;
  font-family: ui-monospace, Menlo, monospace; }


/* The update banner sits bottom-centre, which on a phone is exactly where the
   navigation bar lives — it intercepted taps on the centre of the primary nav.
   Only the offline build shows it at all now, but that build runs on phones
   too, so lift it clear of the bar rather than relying on the banner being
   rare. */
@media (max-width: 860px) {
  .update-banner { bottom: calc(env(safe-area-inset-bottom, 0px) + 74px); }
}

/* Locked rows carry no rating: the pill shows an em dash rather than a verdict
   invented from a hash. Muted so it reads as "not available", not as neutral. */
.rating-pill.locked { background: transparent; color: var(--muted); border: 1px dashed var(--line); }

/* Row-level Track control. Quiet by default — it sits on every row of a dense
   table and must not compete with the score, which is what the row is for. It
   earns emphasis only once the stock is being tracked. */
.track-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted);
  border-radius: 7px; padding: 4px 9px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.track-btn:hover { border-color: var(--accent); color: var(--accent); }
.track-btn.on { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- national flag glyphs (gsip/flags.jsx) ----------
   Decorative only: the chip and tab text already names the market, so every
   flag is aria-hidden. The hairline is a box-shadow rather than a border so
   white-edged flags (Japan, India) don't bleed into the page ground, and so
   the 16x12 box isn't inflated by border-box maths at this size. A drop
   shadow would read as muddy at 16px — a 1px ring does not. */
.flag {
  flex: none; display: block; border-radius: 2px;
  box-shadow: 0 0 0 1px var(--line-strong);
}
.mkt-chip .flag { margin-right: 1px; }
/* Europe's neutral glyph inherits the tab's own text colour via currentColor,
   so it stays quiet when unselected and lifts with the label when selected. */
.seg-flag { display: inline-flex; align-items: center; gap: 7px; }

/* Ticker avatar accent — one hairline edge, varied deterministically by ticker.
   Region tint (above) stays the colour language and has 100% coverage; this
   only breaks up the flat column you get when Markets is filtered to a single
   region and every avatar therefore shares one tint. It carries no meaning:
   see GSIP.avaAccent() for why nothing data-bearing belongs here. */
.ticker-ava[data-accent="0"] { border-top-color: var(--line-strong); }
.ticker-ava[data-accent="1"] { border-right-color: var(--line-strong); }
.ticker-ava[data-accent="2"] { border-bottom-color: var(--line-strong); }
.ticker-ava[data-accent="3"] { border-left-color: var(--line-strong); }

/* ---------- licence CTA vs licence STATUS ----------
   These are two different things and must never look alike. The CTA takes
   money; the status states report what the user already has. Both previously
   rendered as `.mkt-chip lic-chip pro` — the same pill, weight and leading dot
   as "LSE open" and "NYSE closed" sitting beside them. In a row of read-only
   status pills, the one element meant to convert read as a seventh status, and
   its leading dot actively said "this is the state of a thing", i.e. "you are
   on Pro" — close to the opposite of the intended meaning.

   The CTA is therefore its own class: soft-square at 10px to match .bell-btn
   next to it (an ACTION), not the 99px capsule of the chips (a STATUS), 600
   weight against their 500, and no dot at all. */
.lic-cta {
  display: inline-flex; align-items: center; justify-content: center;
  height: 32px; padding: 0 14px; border-radius: 10px;
  font-size: 12px; font-weight: 600;
  background: color-mix(in oklch, var(--accent) 8%, var(--surface));
  color: var(--accent);
  border: 1px solid color-mix(in oklch, var(--accent) 25%, var(--line));
  cursor: pointer; transition: background 0.15s, border-color 0.15s;
}
.lic-cta:hover { background: color-mix(in oklch, var(--accent) 15%, var(--surface)); border-color: var(--accent); }
.lic-cta:active { background: color-mix(in oklch, var(--accent) 22%, var(--surface)); }
.lic-cta:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lic-cta[disabled], .lic-cta.loading { opacity: 0.55; cursor: progress; pointer-events: none; }

/* Licensed status. Renamed from `.pro` so the CTA can never silently reuse the
   class again — that shared name is what let a sales button and a "you already
   pay us" badge render identically. .trial/.expired/.founder are unchanged. */
.lic-chip.active { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 40%, transparent); }
.lic-chip.active .mkt-dot { background: var(--accent); }

/* Payment reassurance at checkout. Text, not scheme logos: drawing scheme
   artwork breaches every card brand programme, and naming schemes would be a
   claim about Stripe Dashboard configuration that nobody has read. Stripe
   Checkout shows the real accepted set before the customer confirms. */
.pay-note { margin-top: 10px; }

/* Between the phone breakpoint (760px) and comfortable desktop there is a band
   — landscape phones and small tablets — where the sidebar is still shown and
   the header has only ~590px to work with. `.topbar-mid` is flex:none by
   necessity (see above), so nothing in the middle can give, and the row
   overflowed horizontally at 844px. The least useful items stand down first:
   the date, then the whole market zone. The summary's information is still
   reachable on the Markets screen. */
@media (max-width: 1149px) {
  .topbar-date { display: none; }
}
@media (max-width: 999px) {
  .topbar-mid { display: none; }
}

/* =============================================================================
   UI v2 TOKENS — README 7.1
   =============================================================================
   Scoped to [data-ui-v2], stamped by SF_UI in gsip/flags.jsx. With the flag off
   this block never matches and the cascade is identical to main.

   Warm cream neutrals -> light blue. --accent, --gain, --loss, --radius and the
   fonts are deliberately unchanged, per 7.1. Dark theme keeps its current
   values (already hue 270), so only the light set is redefined here. */
:root[data-ui-v2] {
  --bg: oklch(0.972 0.012 245);
  --surface: #ffffff;
  --surface-2: oklch(0.955 0.016 245);
  --ink: oklch(0.22 0.02 260);
  --muted: oklch(0.46 0.02 260);
  /* 0.55 -> 0.52. At 0.55 this was 4.28:1 on --surface-2 and 4.49:1 on
     --bg — the token behind p.fineprint, .block-note, .nav-group-label,
     .foot-copy and the risk line on every screen. Now 4.84:1 at worst.
     (The 6 Oct review attributed these to --muted; --muted already
     measures 4.84-6.58:1 and is unchanged.) */
  --faint: oklch(0.52 0.018 260);
  --line: oklch(0.9 0.018 245);
  --line-strong: oklch(0.84 0.022 245);
  --accent-tint: oklch(0.93 0.035 265);
  --mid: oklch(0.62 0.13 75);
  --panel-dark: oklch(0.2 0.03 262);
  /* Same three families, plus the metric-matched fallback the first paint
     uses — PR #68, CLS. The families are still "deliberately unchanged, per
     7.1"; what changes is only the face the text is measured in for the few
     hundred milliseconds before the real one arrives, which is what stops it
     rewrapping when it does. "Helvetica Neue" stays behind the fallback for
     the machines that have it and not Arial.

     The faces themselves are declared by `sf_fonts.FALLBACKS`, which rides in
     with the `SITE_V2` head block. With that switch off these names resolve to
     nothing and the browser falls through to the next entry, so this override
     is inert rather than broken — and with the FLAG off it never matches at
     all, which is the guarantee this block exists under. */
  --font-display: "Bricolage Grotesque", "Bricolage Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Instrument Fallback", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Spline Sans Mono", "Mono Fallback", ui-monospace, monospace;
}
/* Dark keeps hue 270 per 7.1; only the three NEW tokens need a dark value,
   since the rest already exist and are not being changed. */
:root[data-ui-v2][data-theme="dark"],
:root[data-ui-v2]:not([data-theme="light"]) {
  --accent-tint: oklch(0.32 0.04 265);
  --mid: oklch(0.72 0.13 75);
  --panel-dark: oklch(0.17 0.02 262);
}

/* ---- shared components (README 7.2) ---- */
.ui2-skel {
  background: linear-gradient(90deg, var(--surface-2) 25%, color-mix(in oklch, var(--line) 45%, var(--surface-2)) 37%, var(--surface-2) 63%);
  background-size: 400% 100%; border-radius: 8px; animation: ui2shimmer 1.4s ease infinite;
}
@keyframes ui2shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
/* A shimmering skeleton is motion. Anyone who has asked not to see motion gets
   a flat block instead — the layout reservation is the point, not the animation. */
@media (prefers-reduced-motion: reduce) { .ui2-skel { animation: none; } }

.ui2-score { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 99px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Colour is never the only carrier — each pill states its band in words too,
   per the 7.5 QA line "chips and scores rely on text as well as colour". */
.ui2-score.strong { background: var(--gain-bg); color: var(--gain); }
.ui2-score.mid { background: color-mix(in oklch, var(--mid) 16%, var(--surface)); color: color-mix(in oklch, var(--mid) 75%, var(--ink)); }
.ui2-score.weak { background: var(--loss-bg); color: var(--loss); }
.ui2-score.none { background: var(--surface-2); color: var(--faint); }

/* A banded driver value — the word in place of the points figure. The numeric
   slot is sized for "+2.5", so the word drops the tabular figures and is
   allowed to size itself. Keeps its gain/loss hue, which is the direction cue
   the saturated pillar does still carry. */
.v2-driver-v.banded { font-family: var(--font-body); font-size: 11px; font-weight: 600;
  font-variant-numeric: normal; white-space: nowrap; text-align: right; }

/* A banded pillar value. The number slot is sized for two or three digits, so
   a word needs the monospace figure styling dropped and room to sit. Still
   right-aligned with the numbers above and below it in the same list. */
.scorebar-num.banded { font-family: var(--font-body); font-size: 11.5px; font-weight: 600;
  font-variant-numeric: normal; white-space: nowrap; letter-spacing: -0.01em; }

/* Score provenance chip. Sits beside a score and says how much of it is backed
   by real inputs (gsip/components.jsx ProvenanceChip).

   COLOUR IS var(--ink), NOT var(--muted). The 6 Oct contrast sweep
   (tools/test_app_contrast.py) measured --muted on --surface-2 at 4.28:1 and on
   --surface at 4.49:1 — both BELOW the 4.5 AA threshold, across 34 screen
   passes. A new chip in the quiet token would have added to that count on the
   day it was measured, so it uses the body ink and carries its quietness
   through size and weight instead. */
.prov-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px;
  border-radius: 7px; border: 1px solid var(--line); background: var(--surface-2);
  color: var(--ink); font-size: 10.5px; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums; cursor: default; }
.prov-chip.sm { font-size: 10px; padding: 1px 6px; }
/* A mostly-modelled row. The border carries it rather than the text colour, so
   the label keeps its AA ratio while still reading as a caveat. */
.prov-chip.thin { border-color: color-mix(in oklch, var(--mid) 45%, var(--line)); }
/* The graded chip. NO `thin` state by design: fund is 42% of the score and is
   ungraded by design, so the quantity tops out at 58% and most rows sit at 30%
   — a warning treatment would mark normal behaviour as a defect. Neutral
   sibling of the inputs chip, distinguished only by a slightly firmer edge so
   the two are visibly two things rather than one wrapped chip. */
.prov-chip.graded { border-color: color-mix(in oklch, var(--accent) 30%, var(--line)); }
/* In a table cell the chip goes UNDER the pill rather than beside it: the score
   column is the narrowest on the board and a second inline chip is what pushes
   a numeric column into wrapping. */
td.num .prov-chip { display: inline-flex; margin-top: 3px; }

.ui2-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 34px 20px; text-align: center; }
.ui2-empty h4 { margin: 0; font-size: 14px; font-weight: 600; }
.ui2-empty p { margin: 0; font-size: 12.5px; color: var(--muted); max-width: 46ch; line-height: 1.55; }
.ui2-empty.err h4 { color: var(--loss); }

.ui2-kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ui2-kpi .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint); }
.ui2-kpi .v { font-family: var(--font-mono); font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.ui2-kpi .s { font-size: 11.5px; color: var(--muted); }

.ui2-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); font-size: 12px; color: var(--muted); white-space: nowrap; }
.ui2-chip.on { background: var(--accent-tint); border-color: color-mix(in oklch, var(--accent) 30%, transparent); color: var(--accent); }

/* Today's market pills, ui_v2 only — the control that replaces the <select>.
   One line, always: `flex: none` plus a scrolling row rather than `wrap`,
   because eight markets do not fit the main column at 1280 and a second row
   of pills pushes the whole screen down. The scrollbar is hidden because the
   row is short and the pills are self-evidently draggable/scrollable. */
.v2-mktrow { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; margin: -8px 0 4px; }
.v2-mktrow::-webkit-scrollbar { display: none; }
.v2-mktrow .ui2-chip { flex: none; padding: 7px 13px; font-size: 13px; cursor: pointer; }
.v2-mktrow .ui2-chip:hover { border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); color: var(--accent); }
.v2-mktrow .ui2-chip.on { font-weight: 600; }
.v2-mktrow .ui2-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Same open/closed semantics as .mkt-status, at pill scale. */
.v2-mktdot { width: 6px; height: 6px; border-radius: 99px; flex: none; background: var(--faint); opacity: 0.5; }
.v2-mktdot.live { background: var(--gain); opacity: 1; }

/* Crypto & FX asset cards, ui_v2 only — the design's grid in place of the two
   tables. The design also shows a 56px sparkline per card; the feed
   (backend/crypto/worker.py) returns a spot price, a USD price and a 24h
   change and no history at all, so the slot is left out rather than drawn
   from something that is not a price series. */
.v2-asset-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 12px; }
.v2-asset { display: flex; flex-direction: column; gap: 7px; }
.v2-asset-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; }
.v2-asset-sym { font-size: 14px; font-weight: 600; }
.v2-asset-px { font-size: 26px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.15; min-height: 30px; }
.v2-asset-sub { font-size: 12.5px; color: var(--muted); }
.v2-asset-src { font-size: 11.5px; color: var(--faint); margin-top: auto; padding-top: 2px; }

/* Row-level Track control, ui_v2 only — the design gives every list row one.
   Wired to wl.toggleWatch, so it shares state with the star on every other
   screen rather than introducing a second way to track a stock. */
.ui2-track { padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 600;
  white-space: nowrap; cursor: pointer; }
.ui2-track:hover { border-color: var(--accent); color: var(--accent); }
.ui2-track.on { background: var(--accent-tint); border-color: color-mix(in oklch, var(--accent) 30%, transparent); color: var(--accent); }
.ui2-track:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Calendar's 7-day strip, ui_v2 only. Eight cells rather than the design's
   seven: "All" is first and is the default, because ECON_EVENTS carries day
   offsets 0-8 and the earnings feed reaches further, so a strip that only
   spanned a week would hide events this screen shows today. */
.v2-calweek { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-bottom: 18px; }
.v2-calday { display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px 4px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; min-width: 0; }
.v2-calday:hover { border-color: color-mix(in oklch, var(--accent) 40%, var(--line)); }
.v2-calday.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.v2-calday:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v2-calday-wd { font-size: 11px; font-weight: 600; white-space: nowrap; }
.v2-calday-n { font-family: var(--font-display); font-size: 20px; font-weight: 700; line-height: 1.1; }
.v2-calday-c { font-size: 10.5px; white-space: nowrap; color: var(--faint); }
/* Was #fff at 80% over the accent fill: 4.21:1. Full white is 5.60:1. */
.v2-calday.on .v2-calday-c { color: #fff; }
@media (max-width: 760px) {
  .v2-calweek { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .v2-calday-c { display: none; }
}

/* Platform-fee bars, ui_v2 only. Scaled against the most expensive row in the
   same list, so the comparison is between the platforms shown and nothing
   else. aria-hidden: the £ figure next to it is the accessible value, and a
   bar that announced a second number would just be noise. */
.fee-bar { display: block; height: 5px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 6px; }
.fee-bar-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.fee-bar-na { display: block; font-size: 10.5px; color: var(--faint); margin-top: 6px; font-style: italic; }

/* Market Pulse: the design's mood split and its per-market bars, ui_v2 only.
   Both are aggregates of the very `senti` values the heatmap paints, using the
   heatmap's own bands, so the two cannot disagree. The fills reuse the .s1-.s5
   heat scale for the same reason. */
/* `align-items: start` because the two cards hold different amounts of
   text: the mood card is a bar and two lines, the per-market card is one
   row per region. Stretched, the short card grew to the tall one's height
   and its content floated in the middle of an empty box. */
.v2-pulse-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
                gap: 12px; margin-bottom: 22px; align-items: start; }
.v2-mood { display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.v2-mood-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; gap: 10px; }
.v2-mood-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; gap: 2px; }
.v2-mood-bull { background: var(--gain); }
.v2-mood-mid { flex: 1; background: var(--surface-2); }
.v2-mood-bear { background: var(--loss); }
.v2-region-senti { display: flex; flex-direction: column; gap: 8px; }
.v2-rs-row { display: grid; grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 30px; gap: 10px; align-items: center; font-size: 13px; }
.v2-rs-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-rs-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
/* The .s1-.s5 scale is scoped to .heat-tile / .heat-swatch, so a bar fill
   needs its own rules or it silently falls back to one flat accent. Same five
   steps, at bar contrast: the two pale swatch tints are too faint for an 8px
   bar, so they are mixed toward their full colour rather than reused raw. */
.v2-rs-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.v2-rs-fill.s5 { background: var(--gain); }
.v2-rs-fill.s4 { background: color-mix(in oklch, var(--gain) 55%, var(--surface)); }
.v2-rs-fill.s3 { background: color-mix(in oklch, var(--muted) 45%, var(--surface)); }
.v2-rs-fill.s2 { background: color-mix(in oklch, var(--loss) 55%, var(--surface)); }
.v2-rs-fill.s1 { background: var(--loss); }

/* Policy Pulse basket summary cards, ui_v2 only. The design's card grid, over
   the baskets this screen already curates — its own cards are dated policy
   EVENTS and there is no feed of those. */
.v2-policy-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 12px; margin-bottom: 22px; }
.v2-policy-card { display: flex; flex-direction: column; gap: 9px; }
.v2-policy-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v2-policy-n { font-size: 11.5px; font-weight: 600; color: var(--faint); }
.v2-policy-title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; }
.v2-policy-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--muted); }
.v2-policy-figs { display: flex; gap: 22px; border-top: 1px solid var(--line); padding-top: 9px; }
.v2-policy-figs > span { display: flex; flex-direction: column; gap: 2px; }
.v2-policy-k { font-size: 11px; color: var(--faint); }
.v2-policy-v { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-policy-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; }
.v2-policy-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink);
  font-size: 12px; font-weight: 600; cursor: pointer; }
.v2-policy-chip:hover { border-color: var(--accent); color: var(--accent); }
.v2-policy-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v2-policy-chipv { font-family: var(--font-mono); color: var(--faint); font-weight: 500; }
.v2-policy-chip:hover .v2-policy-chipv { color: var(--accent); }

/* Alerts: the design's labelled builder fields and a switch per saved rule. */
.v2-ca-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; align-items: end; }
.v2-ca-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.v2-ca-field > span { font-size: 11px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--faint); }
.v2-ca-field input, .v2-ca-field select { width: 100%; min-width: 0; }
.v2-ca-add { min-height: 38px; }
/* `.ca-form .ca-sym { width:150px }` (:394) and `.ca-val { width:120px }`
   (:395) are the legacy flex row's sizing, and the v2 form carries BOTH class
   names — so at specificity 0,2,0 they beat `.v2-ca-field input { width:100% }`
   at 0,1,1 and the Stock box sat 150px wide inside a 1fr column with the WHEN
   select starting well to its right. Matched on specificity and won on source
   order; no !important needed. */
.v2-ca-form .ca-sym, .v2-ca-form .ca-val { width: 100%; }
/* A paused rule is dimmed but still fully legible — it is a state the user
   chose, not an error, and its threshold is the thing they came back to read. */
.ca-row.off .ca-label { opacity: 0.55; text-decoration: line-through; }
.v2-switch { position: relative; flex: none; width: 38px; height: 22px; border-radius: 99px;
  border: none; background: var(--line-strong, var(--line)); cursor: pointer; padding: 0; }
.v2-switch.on { background: var(--accent); }
.v2-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.v2-switch-knob { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 99px;
  background: #fff; box-shadow: 0 1px 2px oklch(0 0 0 / 0.2); transition: left 0.15s; }
.v2-switch.on .v2-switch-knob { left: 18px; }
.v2-rs-val { text-align: right; font-variant-numeric: tabular-nums; }

/* `.senti-sources` is a two-column grid (styles.css:868), written when the
   engine listed many sources. It lists exactly ONE now — the subscriber's
   own feeds — so the row sat in the left half of the card with dead space
   beside it. Scoped to [data-ui-v2]: with the flag off this file must
   render byte-identically to main. */
:root[data-ui-v2] .senti-sources { grid-template-columns: 1fr; }

/* IPO Centre, ui_v2 only — the design's row grid in place of the <table>, and
   the shared KPI row. The design's fifth column is "Early sentiment", a 0-100
   score per listing; nothing scores an unlisted company, and the design file
   labels its own content "· demo". Shares and expected raise fill that slot
   because the feed already returns both. */
.v2-kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 10px; margin-bottom: 20px; }
/* A company NAME in the value slot: mono at 22px turns "Northwind Robotics"
   into three lines. The figures keep the mono scale; only words step down. */
.v2-kpi-word { font-family: var(--font-body) !important; font-size: 16px !important; line-height: 1.25; }
.v2-ipo-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.v2-ipo-table { display: flex; flex-direction: column; min-width: 720px; }
.v2-ipo-head, .v2-ipo-row {
  display: grid; gap: 12px; align-items: center; padding: 10px 16px;
  grid-template-columns: minmax(0, 2fr) 92px minmax(0, 1fr) minmax(0, 1.2fr) 84px 110px;
}
.v2-ipo-head { font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--faint); border-bottom: 1px solid var(--line); }
.v2-ipo-row { font-size: 13px; border-bottom: 1px solid var(--line); }
.v2-ipo-row:last-child { border-bottom: none; }
.v2-ipo-co { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-ipo-name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-ipo-sub { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.v2-ipo-num { font-family: var(--font-mono); text-align: right; font-variant-numeric: tabular-nums; }
.v2-ipo-head .num { text-align: right; }

/* Portfolio Studio, ui_v2 only — the design's two bottom cards in place of
   the donut. The donut and its legend restated the table's own "Alloc."
   column one stock at a time; the sector roll-up and the scenarios are
   figures the screen did not show anywhere. */
/* The same auto-fit the design uses. `.pf-body` collapses to one column
   below 1400px (styles.css:825), so at 1280 this pair has the full width and
   sits side by side; in the narrow sidebar slot above 1400 it stacks. */
.v2-pf-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 12px; min-width: 0; align-items: start; }
.v2-alloc-row { display: grid; grid-template-columns: minmax(0, 104px) minmax(0, 1fr) 46px;
  gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.v2-alloc-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-alloc-track { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.v2-alloc-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.v2-alloc-val { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.v2-stress-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line); font-size: 13.5px; }
.v2-stress-row + .fineprint { margin-top: 12px; }
.v2-stress-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.v2-stress-asm { font-size: 11.5px; color: var(--faint); line-height: 1.4; }
.v2-stress-v { font-family: var(--font-mono); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Data & Tools, ui_v2 only — the design's two columns in place of three tabs.
   The console has three short panels; tabs hid two-thirds of a settings
   screen behind a click. */
.v2-dt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 12px; align-items: start; }
.v2-dt-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.v2-dt-field { display: flex; flex-direction: column; gap: 6px; }
.v2-dt-field > span { font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--faint); }

/* Plans, ui_v2 only — the design's per-card CTA. The card stops being one
   giant <button> whose accessible name was its entire contents. */
.v2-plan-card { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.v2-plan-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v2-plan-card .plan-badge { position: static; }
.v2-plan-card .plan-points { flex: 1; }
.v2-plan-cta { width: 100%; margin-top: 4px; }

/* ---------------------------------------------------------------------------
   Item 7, group 1 — first visit. The acknowledgement, sign-in and onboarding
   gates all render `.ack-overlay`, so one rule restyles the three of them.

   The design keeps the app VISIBLE behind each gate — "at 70% with a blur" —
   in place of the near-opaque dark wash. The wash reads as "the app is gone";
   the blur reads as "the app is waiting", which is what is actually true: none
   of these three gates destroys state, and two of them are skippable.

   The scrim is what carries the 70%, so the blur is raised and the shadow
   deepened to keep a light card separated from a light page. Wording is
   untouched throughout — `SF_ACK_POINTS` is a Guardrail, and the design says
   in its own text that the acknowledgement copy is verbatim.
   ------------------------------------------------------------------------ */
:root[data-ui-v2] .ack-overlay {
  background: color-mix(in oklch, var(--bg) 30%, transparent);
  backdrop-filter: blur(14px) saturate(1.06);
}
:root[data-ui-v2] .ack-card {
  border-radius: 18px;
  box-shadow: 0 26px 70px oklch(0.28 0.04 260 / 0.26), 0 0 0 1px var(--line);
}

/* Item 7, group 2 — accounts & upgrading, ui_v2 only. ---------------------- */
.v2-offer-watch { margin-bottom: 14px; }
.v2-offer-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.v2-offer-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px;
  border-radius: 99px; background: var(--accent-tint); color: var(--accent);
  font-size: 12px; font-weight: 600; }
.v2-offer-chip.dim { background: var(--surface-2); color: var(--muted); }
.v2-offer-head { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 650; line-height: 1.3; }

.v2-checkout { display: flex; flex-direction: column; gap: 2px; margin: 0 0 14px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.v2-co-row { display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
  font-size: 13px; padding: 4px 0; }
.v2-co-row.dim { color: var(--muted); font-size: 12.5px; }
.v2-co-total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 8px; font-weight: 650; }
.v2-co-alt { font-family: var(--font-body); font-weight: 400; font-size: 12px; color: var(--muted); }

.v2-upgrade-swap { display: flex; align-items: stretch; gap: 12px; margin: 0 0 14px; }
.v2-swap-side { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  padding: 11px 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.v2-swap-new { border-color: var(--accent); background: var(--accent-tint); }
.v2-swap-k { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.v2-swap-v { font-size: 15px; font-weight: 650; }
.v2-swap-s { font-size: 12px; color: var(--muted); }
.v2-swap-arrow { align-self: center; color: var(--faint); font-size: 18px; flex: none; }

/* `.lic-active` is a flex column with `align-items: flex-start` (styles.css:1085),
   which shrink-wraps its children — the grid got ~170px and laid out one
   column. `align-self: stretch` gives it the card. */
.v2-lic-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 12px; margin: 4px 0 14px; align-self: stretch; width: 100%; }
.v2-lic-facts > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.v2-lic-facts dt { font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--faint); }
.v2-lic-facts dd { margin: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 560px) { .v2-upgrade-swap { flex-direction: column; } .v2-swap-arrow { transform: rotate(90deg); } }

/* The licence's device list (PARITY O2, frames 2e / 2f). Not behind ui_v2:
   the list is a fact about the licence, not a copy variant, and the
   device-limit message it also appears in renders in both states. */
.lic-devices { align-self: stretch; width: 100%; margin: 2px 0 14px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface); overflow: hidden; }
.lic-dev-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px;
  padding: 9px 13px; border-bottom: 1px solid var(--line); font-size: 10.5px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.lic-dev-head strong { font-size: 12px; letter-spacing: 0; color: var(--ink); }
.lic-devices ul { list-style: none; margin: 0; padding: 0; }
.lic-devices li { display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 13px; border-bottom: 1px solid var(--line); }
.lic-devices li:last-child { border-bottom: none; }
.lic-dev-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lic-dev-name b { font-size: 13.5px; font-weight: 650; overflow-wrap: anywhere; }
.lic-dev-name span { font-size: 12px; color: var(--muted); }
.lic-dev-here { font-size: 11.5px; color: var(--faint); white-space: nowrap; }
.lic-dev-free { margin: 0; padding: 5px 11px; font-size: 12.5px; white-space: nowrap; }


/* Item 7, group 3 — the push pre-prompt (frame 3e), ui_v2 only. */
.v2-preprompt { max-width: 460px; }

/* Item 7, groups 4-5 — ui_v2 only. */
.v2-nores { padding: 14px 16px; }
.v2-nores-head { margin: 0 0 4px; font-size: 14px; font-weight: 650; }
.v2-nores-sub { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.v2-nores-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.v2-nores-chips .ui2-chip { cursor: pointer; }
.v2-nores-chips .ui2-chip:hover { border-color: var(--accent); color: var(--accent); }

.v2-paid { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px;
  border-color: color-mix(in oklch, var(--gain) 40%, var(--line)); }
.v2-paid h3 { margin: 0 0 4px; font-size: 17px; }
.v2-paid p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.v2-paid-tick { flex: none; width: 34px; height: 34px; border-radius: 99px; display: grid;
  place-items: center; background: var(--gain-bg); color: var(--gain); font-weight: 700; }

.v2-mfa-eyebrow { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }

/* Item 8 — README 5.2 pricing screen, ui_v2 only. */
.v2-billing { display: flex; justify-content: center; margin: 0 0 14px; }
.v2-plan-grid { align-items: stretch; }
.v2-plan-pro { border: 2px solid var(--accent); }
.v2-badge-pro { background: var(--accent); color: #fff; }
.v2-badge-current { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.v2-plan-card .trial-form { margin-top: 4px; }
.v2-plan-cta:disabled { opacity: 0.6; cursor: default; }
.v2-compare { margin-top: 18px; }
.v2-compare .gtable td.num, .v2-compare .gtable th.num { width: 84px; text-align: center; }
.v2-yes { color: var(--gain); font-weight: 700; }
.v2-no { color: var(--faint); }

/* Tables scroll sideways rather than squeezing columns (7.6). */
.ui2-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ui2-table-wrap > table { min-width: 720px; width: 100%; }

.ui2-modal-back { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; padding: 20px;
  background: color-mix(in oklch, var(--bg) 70%, transparent); backdrop-filter: blur(6px); }
.ui2-modal { width: min(560px, 100%); max-height: 86vh; overflow-y: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.ui2-score-w { font-family: var(--font-body); font-size: 10.5px; font-weight: 500; opacity: 0.85; }
.ui2-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.ui2-logo { flex: none; display: block; }
/* The mark's one candle drifts 4px either side of centre on a 3s loop. A
   TRANSFORM, so it is composited and never touches layout: the <svg> keeps its
   width and height attributes and nothing around it moves, which is what keeps
   CLS at zero. Clipped to the eye by the component, so the candle slides behind
   the sclera rather than off the edge of the mark.

   Declared once, here, for every copy — the app page and the static homepage
   both load this stylesheet. The website's own pages do not, so
   backend/common/sf_chrome.py carries the same three rules for them. */
@keyframes te-tick{0%,100%{transform:translateX(-4px)}50%{transform:translateX(4px)}}
.te-strip{animation:te-tick 3s ease-in-out infinite}
@media (prefers-reduced-motion:reduce){.te-strip{animation:none}}
.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; }
.ui2-table-wrap > table { min-width: var(--ui2-min, 720px); }

/* Sidebar groups — README 3.1, ui_v2 only. Labels are presentational; ids,
   routes and NAV_IDS are unchanged. Hidden on the phone bar and the tablet
   rail, where there is no room for a label above three icons. */
:root[data-ui-v2] .nav-group { display: flex; flex-direction: column; gap: 4px; }
:root[data-ui-v2] .nav-group + .nav-group { margin-top: 16px; }
:root[data-ui-v2] .nav-group-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--faint); padding: 0 12px 4px;
}
:root[data-ui-v2] .nav-group-rule { height: 1px; background: var(--line); margin: 4px 12px 8px; }
:root[data-ui-v2] .nav-item.on { background: var(--accent-tint); }
/* A wrapped nav label reflows the whole rail and pushes its PRO badge onto a
   second line. Only the LABEL is targeted — `.nav-item span` would also match
   `.nav-pro`, and no overflow rule is used: a label must be shortened in the
   markup rather than clipped, or the visible text stops matching textContent
   and every label assertion in the suite goes on passing against "Portfolio
   Stu…". `min-width: 0` lets the flex item shrink at all. */
:root[data-ui-v2] .nav-item { min-width: 0; }
:root[data-ui-v2] .nav-item > span:first-of-type { white-space: nowrap; }
:root[data-ui-v2] .nav-item .nav-pro { flex: none; }
@media (max-width: 1099px) {
  :root[data-ui-v2] .nav-group-label, :root[data-ui-v2] .nav-group-rule { display: none; }
  :root[data-ui-v2] .nav-group + .nav-group { margin-top: 6px; }
}

/* Tablet rail — README 7.6 specifies 72px across 720–1099px, one glyph per
   route. The app already had a 64px rail at 761–1100px, so this is an
   alignment rather than a new component: the width goes to 72 and the band
   starts at 720 so it meets the phone bar's ceiling with no gap. Scoped to
   ui_v2; with the flag off the existing 64px rail is untouched. */
@media (min-width: 720px) and (max-width: 1099px) {
  :root[data-ui-v2] .sidebar { width: 72px; padding: 20px 10px; }
  :root[data-ui-v2] .logo-text,
  :root[data-ui-v2] .nav-item span,
  :root[data-ui-v2] .sidebar-foot { display: none; }
  :root[data-ui-v2] .nav-item { justify-content: center; }
  /* 44px minimum hit target on touch sizes (7.6). */
  :root[data-ui-v2] .nav-item { min-height: 44px; }
  :root[data-ui-v2] .logo { justify-content: center; padding-bottom: 18px; }
}

/* ---- ui_v2 phone tab bar + More sheet (README 7.6) ----
   The base stylesheet turns the sidebar into a horizontally scrolling 16-tab
   bar at <=760px. 7.6 puts the phone breakpoint at <720 and the icon rail at
   720-1099, which OVERLAPS that band: at 720-760 the base rule would still be
   fixing the sidebar to the bottom of the screen while the v2 rail tried to
   stand it up on the left. These first rules unwind that, so the rail is a
   real sidebar for its whole band. */
@media (min-width: 720px) and (max-width: 760px) {
  :root[data-ui-v2] .sidebar {
    order: 0; position: static; flex-direction: column; height: 100vh;
    border-right: 1px solid var(--line); border-top: none; overflow-x: hidden; overflow-y: auto;
  }
  :root[data-ui-v2] .nav-list { flex-direction: column; width: auto; gap: 4px; }
  :root[data-ui-v2] .nav-item { border-radius: 10px; font-size: 13px; display: flex; min-width: 0; }
  :root[data-ui-v2] .main-col { padding-bottom: 0; }
  :root[data-ui-v2] .nav-more { display: none; }
}
/* Above the phone band the More entry is meaningless — every route is already
   visible in the sidebar or the rail. */
@media (min-width: 720px) { :root[data-ui-v2] .nav-more { display: none; } }

@media (max-width: 719px) {
  /* Five entries: four routes plus More. Everything else moves INTO the sheet
     rather than being dropped — no route may become unreachable on a phone. */
  :root[data-ui-v2] .nav-item:not([data-phone="1"]):not(.nav-more) { display: none; }
  :root[data-ui-v2] .nav-list { width: 100%; min-width: 0; }
  :root[data-ui-v2] .nav-group { flex-direction: row; flex: 1 1 auto; }
  :root[data-ui-v2] .nav-group + .nav-group { margin-top: 0; }
  /* Five equal columns, so the bar no longer scrolls sideways. */
  :root[data-ui-v2] .sidebar { display: flex; flex-direction: row; overflow-x: hidden; }
  :root[data-ui-v2] .nav-item { flex: 1 1 0; min-width: 0; min-height: 52px; }
  :root[data-ui-v2] .nav-more { display: grid; flex: 1 1 0; min-height: 52px; }
}
.more-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.more-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; min-height: 48px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); font-size: 13.5px; font-weight: 500; text-align: left; cursor: pointer;
}
.more-item:hover { background: var(--surface-2); }
.more-item.on { background: var(--accent-tint); color: var(--accent); border-color: color-mix(in oklch, var(--accent) 30%, transparent); }
/* Per-feature paywall points (ONE_PHASE item 6). */
.pro-points { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 7px; text-align: left; }
.pro-points li { position: relative; padding-left: 20px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.pro-points li::before {
  content: ""; position: absolute; left: 4px; top: 7px; width: 6px; height: 6px;
  border-radius: 99px; background: var(--accent);
}

/* ---- ui_v2 stock screen ---- */
.v2-back { margin-bottom: 14px; }
.v2-stock-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.v2-stock-id { display: flex; align-items: center; gap: 12px; min-width: 0; }
.v2-stock-id h1 { margin: 0; font-family: var(--font-display); font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -0.02em; }
.v2-stock-sub { font-size: 12.5px; color: var(--muted); }
.v2-stock-price { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.v2-price { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-chg { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.v2-stock-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.v2-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.v2-chart-head h3 { margin: 0; font-size: 15px; }
.v2-range { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.v2-range-tab { border: none; background: transparent; cursor: pointer; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 7px; color: var(--muted); white-space: nowrap; min-height: 32px; }
.v2-range-tab.on { background: var(--ink); color: var(--surface); }
.v2-range-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.v2-est-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(110px, 100%), 1fr)); gap: 10px; margin-top: 14px; }
.v2-est { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.v2-est-l { font-size: 11px; color: var(--faint); white-space: nowrap; }
.v2-est-v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-est-t { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.v2-score-k { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.v2-score-row { display: flex; align-items: center; gap: 12px; margin: 6px 0 10px; }
.v2-score-n { font-size: 44px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.v2-marker { position: relative; height: 6px; border-radius: 99px; margin-bottom: 14px;
  background: linear-gradient(90deg, var(--loss), var(--mid, var(--faint)), var(--gain)); }
.v2-marker-dot { position: absolute; top: -3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 99px;
  background: var(--surface); border: 2px solid var(--ink); }
/* "Top N% of scored stocks" under the score marker. Only rendered under
   `ui_v2_copy`, so the rule is inert with the flag off — the element is absent.
   The negative top margin pulls it up under .v2-marker's own 14px gap rather
   than adding a second one. */
.v2-score-pct { display: block; font-size: 12.5px; color: var(--muted); margin: -6px 0 12px;
  font-variant-numeric: tabular-nums; }
.v2-score-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.v2-score-meta > div { display: flex; flex-direction: column; gap: 3px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; }
.v2-score-meta span:first-child { font-size: 11px; color: var(--faint); }
.v2-score-meta span:last-child { font-size: 13.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.v2-drivers { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.v2-driver { display: grid; grid-template-columns: 1fr 96px 46px; align-items: center; gap: 10px; }
.v2-driver-l { font-size: 12.5px; color: var(--muted); }
.v2-driver-track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.v2-driver-fill { display: block; height: 100%; border-radius: 99px; }
.v2-driver-fill.gain { background: var(--gain); } .v2-driver-fill.loss { background: var(--loss); }
.v2-driver-v { font-size: 12.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.v2-stock-actions { display: flex; gap: 8px; }
.v2-act { flex: 1; min-height: 44px; padding: 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; }
.v2-act:hover { background: var(--surface-2); }
.v2-act.on { background: var(--accent-tint); color: var(--accent); border-color: color-mix(in oklch, var(--accent) 30%, transparent); }
.v2-act:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---- ui_v2 Markets region cards ---- */
.v2-region-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.v2-region { display: flex; flex-direction: column; gap: 10px; }
.v2-region-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.v2-region-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.v2-region-id > div { display: flex; flex-direction: column; min-width: 0; }
.v2-region-name { font-family: var(--font-display); font-weight: 650; font-size: 15px; }
.v2-region-sub { font-size: 11.5px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.v2-session { height: 4px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.v2-session-fill { display: block; height: 100%; border-radius: 99px; background: var(--gain); }
.v2-leader { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 10px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  cursor: pointer; text-align: left; min-height: 44px; }
.v2-leader:hover { background: var(--surface-2); }
.v2-leader:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.v2-leader-id { display: flex; flex-direction: column; min-width: 0; }
.v2-leader-sym { font-size: 12.5px; font-weight: 600; }
.v2-leader-name { font-size: 11px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v2-leader-px { font-size: 12.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---- ui_v2 Watchlist ---- */
.v2-wl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 14px; }
.v2-wl-card { display: flex; flex-direction: column; gap: 10px; }
.v2-wl-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.v2-wl-id { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; background: none; border: none; padding: 0; cursor: pointer; text-align: left; }
.v2-wl-sym { font-size: 14px; font-weight: 650; }
.v2-wl-name { font-size: 11.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.v2-wl-foot { display: flex; align-items: center; gap: 10px; }
.v2-wl-px { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v2-wl-rm { margin-left: auto; min-height: 32px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.v2-wl-rm:hover { background: var(--loss-bg); color: var(--loss); border-color: color-mix(in oklch, var(--loss) 35%, transparent); }
.v2-wl-rm:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.v2-sync { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px;
  background: var(--accent-tint); border-color: color-mix(in oklch, var(--accent) 28%, transparent); }
.v2-sync > span { flex: 1 1 260px; font-size: 13px; line-height: 1.5; }

/* Crypto & FX card sparkline (design frame / PARITY A3). Drawn only when the
   worker's own rolling window has enough real points — see AssetSpark. */
.v2-asset-spark { display: block; width: 100%; height: 34px; margin: 2px 0 -2px; }

/* Share card (design frame 3c). The desktop path only — where
   navigator.share exists the OS sheet is still what opens. */
.share-preview { margin: 0 0 8px; font-size: 14.5px; line-height: 1.5; }
.share-url { margin: 0 0 10px; font-size: 12.5px; word-break: break-all; color: var(--accent); }
.share-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.share-actions .ghost { text-align: center; }
