/* Quant AI Picks: responsive, light / dark, iOS + Android safe areas */
:root {
  --sev-critical: #c0262d; --sev-high: #d9622b; --sev-medium: #e0a526; --sev-warning: #6b7686; --sev-ok: #1b7f4b;
  --bg: #f6f7f9; --panel: #ffffff; --panel-2: #f1f3f6; --text: #16181d; --muted: #5d6573;
  --line: #e2e5ea; --accent: #0f766e; --accent-2: #115e59; --danger: #b42318; --focus: #2563eb;
  --up: #067647; --down: #b42318;
  --on-accent: #ffffff; --on-danger: #ffffff;            /* text on a filled accent / danger control: >= 4.5:1 in both themes */
  /* diverging scale (Strong Buy .. Strong Sell; also buys / planned sales / other sales), validated with
     dataviz validate_palette.js: adjacent ΔE >= 18.8 (CVD) / 19.0 (normal); Hold is the neutral midpoint */
  --rec-sb: #05603a; --rec-b: #3f9f72; --rec-h: #d3d8e0; --rec-s: #e0685c; --rec-ss: #a4231a;
  --gA: #0b6b3a; --gB: #3f9b4b; --gC: #c29a0a; --gD: #d9731c; --gF: #c0342b; --gNA: #9aa1ad;
  --chip-text: #ffffff; --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 10px; --tabbar-h: 58px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --sev-critical: #f2555a; --sev-high: #f08a4b; --sev-medium: #e8b53a; --sev-warning: #8d97a8; --sev-ok: #3fb97a;
    --bg: #0f1115; --panel: #171a21; --panel-2: #1e222b; --text: #e7e9ee; --muted: #9aa3b2;
    --line: #2a2f3a; --accent: #2bb3a3; --accent-2: #5fd3c5; --danger: #f97066; --focus: #7aa2ff;
    --up: #47cd89; --down: #f97066;
    --on-accent: #04211e; --on-danger: #2b0a07;          /* white on the light dark-mode teal / red was 2.6:1 / 2.8:1 */
    --rec-sb: #4cc38a; --rec-b: #1f7d55; --rec-h: #3a404a; --rec-s: #b24a3f; --rec-ss: #f07366;   /* dark: ΔE >= 12.3 / 15.7 */
    --gA: #1f9d57; --gB: #5bb85f; --gC: #d4a814; --gD: #e5842c; --gF: #e0483e; --gNA: #5d6573;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select { font: inherit; color: inherit; }
input, select { font-size: 16px; } /* no zoom-on-focus on iOS */
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1 { font-size: 1.45rem; margin: 0; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.up { color: var(--up); } .down { color: var(--down); }
[hidden] { display: none !important; }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: calc(8px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));
  background: var(--panel); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 700; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--on-accent); }
.search { position: relative; flex: 1; max-width: 460px; }
.search input { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); }
.search-results {
  position: absolute; top: 44px; left: 0; right: 0; margin: 0; padding: 4px; list-style: none; z-index: 30;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 60vh; overflow: auto;
}
.search-results li a { display: flex; gap: 10px; padding: 10px; border-radius: 8px; color: var(--text); }
.search-results li a:hover, .search-results li a.active { background: var(--panel-2); text-decoration: none; }
.search-results b { min-width: 64px; }
.topnav { display: flex; gap: 4px; align-items: center; }
.topnav a, .link-btn { padding: 8px 12px; border-radius: 8px; color: var(--muted); background: none; border: 0; cursor: pointer; }
.topnav a.active { color: var(--text); background: var(--panel-2); text-decoration: none; }
.reload-btn { font-size: 17px; line-height: 1; padding: 6px 8px; }
.reload-btn:hover { color: var(--text); background: var(--panel-2); }

/* bottom tab bar (phones) */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: none;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: var(--panel); border-top: 1px solid var(--line);
}
.tabbar a, .tabbar button {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  font-size: 11px; color: var(--muted); background: none; border: 0; min-height: 44px;
}
.tabbar a.active { color: var(--accent); }
.tabbar .ico { font-size: 20px; line-height: 1; }

/* the strip under the phone's own buttons (Android ◁ ○ ≡, the iPhone home bar), where the page is drawn behind them
   (installed app, edge-to-edge): the dark theme colour, so the light system buttons stay visible (2026-10-18) */
.tabbar::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: env(safe-area-inset-bottom, 0px);
  background: #0f766e; pointer-events: none; }
@media (max-width: 719px) {
  .topnav, .brand-text { display: none; }
  .tabbar { display: flex; }
  .search { max-width: none; }
}
@media (min-width: 720px) { body { padding-bottom: 0; } }
/* tablets (720-1099px, 2026-11-07): the logo, six menu links and Log out left the search box ~50-135px wide; the search
   takes its own full-width row under them */
@media (min-width: 720px) and (max-width: 1099px) {
  .topbar { flex-wrap: wrap; row-gap: 8px; }
  .topnav { margin-left: auto; }
  .search { order: 3; flex: 1 1 100%; max-width: none; }
}

/* layout */
.view { max-width: 1240px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right)) 32px max(16px, env(safe-area-inset-left)); outline: none; }
.loading, .empty { padding: 48px 0; text-align: center; color: var(--muted); }
.site-disclaimer { max-width: 1240px; margin: -16px auto 0; padding: 0 max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
  font-size: 12px; line-height: 1.5; color: var(--muted); }
.site-disclaimer[hidden] { display: none; }
.admin-only { border-left: 3px solid var(--accent); padding-left: 10px; margin-top: 12px; }
.admin-only .tag { margin-left: 6px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.grid { display: grid; gap: 12px; }
.grid-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.grid-metrics { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-ports { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--panel-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { color: var(--danger); }
.btn.small { min-height: 32px; padding: 0 10px; font-size: 13px; }
.input, select.input { height: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-width: 0; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--panel); padding: 6px 12px; min-height: 34px; cursor: pointer; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--accent); color: var(--on-accent); }
.tabs { display: flex; gap: 4px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; border: 0; background: none; padding: 10px 12px; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--text); border-bottom-color: var(--accent); font-weight: 600; }

/* grade chips */
.g { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding: 0 6px; border-radius: 6px; font-weight: 700; font-size: 13px; color: var(--chip-text); background: var(--gNA); }
.g.lg { min-width: 56px; height: 40px; font-size: 20px; border-radius: 8px; }
.g-A { background: var(--gA); } .g-B { background: var(--gB); } .g-C { background: var(--gC); }
.g-D { background: var(--gD); } .g-F { background: var(--gF); } .g-NA { background: var(--gNA); }
.bar { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 3px; }

/* tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* every table (2026-10-15): it scrolls inside its box, the header row and the first column stay in view */
.table-wrap { overflow: auto; max-height: calc(100vh - 120px); }
.table-wrap > table > thead th { position: sticky; top: 0; z-index: 2; background: var(--panel); }
.table-wrap > table > thead th:first-child, .table-wrap > table > tbody > tr > td:first-child:not([colspan]),
.table-wrap > table > tfoot td:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line), -2px 0 0 var(--panel); }
.table-wrap > table > thead th:first-child { z-index: 3; }
.table-wrap > table > tbody > tr:hover > td:first-child { background: var(--panel-2); }
@media (max-width: 719px) { .table-wrap > table > tbody > tr > td:first-child:not([colspan]) { max-width: 42vw; overflow: hidden; overflow-wrap: break-word; } }
/* a wide table's dock (topScrollbars, mouse devices): its header row and a sideways scrollbar under it, sticky under
   the top bar; the table's own header row is hidden meanwhile (it keeps the column widths) */
.thead-dock { position: sticky; top: var(--topbar-h, 56px); z-index: 6; background: var(--panel); max-width: 100%; }
.dock-head { overflow: hidden; }
.dock-head > table { table-layout: fixed; border-collapse: collapse; }
.dock-head th { position: static; cursor: default; }
.dock-head th.sort { cursor: pointer; }
.dock-head th:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line), -2px 0 0 var(--panel); }
.dock-head .ern th.s { position: sticky; left: 34px; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line); }   /* Earnings: 2 frozen columns */
.dock-head .ern th.w { box-shadow: -2px 0 0 var(--panel); }
.table-wrap.docked > table > thead { visibility: collapse; }
.hscroll-top { overflow-x: auto; overflow-y: hidden; height: 14px; background: var(--panel); border-bottom: 1px solid var(--line); }
.hscroll-top > div { height: 1px; }
@media (hover: hover) and (pointer: fine) {
  /* one side-scrollbar width docked or not (2026-10-18): with the browser's wider bar undocked, a table 1-5 px too wide
     fitted when docked and not when undocked, and switched back and forth many times a second */
  .table-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
  .table-wrap::-webkit-scrollbar-thumb { background: var(--line); border-radius: 5px; border: 2px solid var(--panel); }
  .table-wrap.docked::-webkit-scrollbar { height: 0; }
  .hscroll-top::-webkit-scrollbar { height: 12px; }
  .hscroll-top::-webkit-scrollbar-thumb { background: var(--muted); border-radius: 6px; border: 3px solid var(--panel); }
  .hscroll-top::-webkit-scrollbar-thumb:hover { background: var(--text); }
}
.fv-tab td:first-child { min-width: 128px; }
/* company page, Previous reports: the frozen report column (title + summary, as the banner at the top) */
.table-wrap.prev-rep { max-height: 70vh; }
/* financial statements panel (2026-11-09): first column frozen (table-wrap), numbers right, growth rows muted small */
.table-wrap.fs-wrap { max-height: 75vh; }
.fs-table { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.fs-table th, .fs-table td { white-space: nowrap; padding: 5px 8px; }
.fs-table th.num { text-align: right; vertical-align: bottom; }
.fs-table th.fs-lab { text-align: left; }
.fs-table td.fs-lab { min-width: 180px; max-width: 280px; white-space: normal; }
.fs-date { font-size: 11px; font-weight: 400; }
.fs-unit { font-size: 11px; margin-left: 4px; }
.fs-table tr.fs-row { cursor: pointer; }
.fs-table tr.fs-row:hover > td { background: var(--panel-2); }
.fs-table tr.fs-row.on > td, .table-wrap > .fs-table > tbody > tr.fs-row.on > td:first-child { background: var(--panel-2); }
.fs-table tr.fs-bold > td { font-weight: 600; border-top: 1px solid var(--line); }
.fs-table tr.fs-growth > td { font-size: 11px; color: var(--muted); padding-top: 0; padding-bottom: 4px; }
.fs-table sup { font-size: 9px; color: var(--muted); margin-left: 1px; }
.fs-table tr.fs-chart-row > td { background: var(--panel); white-space: normal; }
.fs-chart { position: sticky; left: 0; width: min(640px, calc(100vw - 72px)); padding: 4px 0 8px; }
.fs-svg { width: 100%; height: auto; display: block; }
.fs-svg rect.pos { fill: var(--accent); } .fs-svg rect.neg { fill: var(--danger); }
.fs-svg .fs-axis { stroke: var(--line); stroke-width: 1; }
.fs-svg text { fill: var(--muted); font-size: 11px; }
.fs-svg text.fs-max { font-size: 11px; }
.fs-gbtn.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (max-width: 719px) { .fs-table td.fs-lab { min-width: 130px; } }
.table-wrap.prev-rep > table > tbody > tr > td.rep { min-width: 240px; max-width: 360px; white-space: normal; }
@media (max-width: 719px) { .table-wrap.prev-rep > table > tbody > tr > td.rep { min-width: 60vw; max-width: 60vw; }
  .pr-rep > svg { display: none; } .pr-rep b { font-size: 14px; } }
.pr-rep { display: flex; gap: 10px; align-items: flex-start; color: inherit; text-decoration: none; }
.pr-rep > svg { flex: 0 0 auto; width: 20px; height: 20px; margin-top: 2px; color: var(--accent); }
.pr-rep > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pr-rep .pr-sum { font-size: 12px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pr-rep .go { font-size: 12px; color: var(--accent); }
a.pr-rep:hover b { text-decoration: underline; }
td.icons { padding-left: 2px; padding-right: 2px; white-space: nowrap; }
/* live quotes (live_quotes.py) */
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); margin-right: 5px; vertical-align: 1px; }
.live-dot.on { background: var(--up); box-shadow: 0 0 0 3px color-mix(in srgb, var(--up) 25%, transparent); }
.live-asof { font-size: 12px; margin-top: 2px; min-height: 16px; }
.live-total { font-size: 14px; padding: 10px 14px; }
.live-metric { font-size: 11px; white-space: nowrap; }
.now-fold summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.now-fold summary { list-style: none; } .now-fold summary::-webkit-details-marker { display: none; }
.now-fold .fold-btn { margin-left: auto; align-self: center; pointer-events: none; white-space: nowrap; }
.now-fold .fold-btn::after { content: 'Expand ▾'; } .now-fold[open] .fold-btn::after { content: 'Collapse ▴'; }
/* a changed live number: a short green / red flash (only when it is in view) */
@keyframes flash-up { from { background-color: color-mix(in srgb, var(--up) 38%, transparent); } to { background-color: transparent; } }
@keyframes flash-down { from { background-color: color-mix(in srgb, var(--down) 38%, transparent); } to { background-color: transparent; } }
.flash-up { animation: flash-up 1.6s ease-out; border-radius: 3px; }
.flash-down { animation: flash-down 1.6s ease-out; border-radius: 3px; }
@media (prefers-reduced-motion: reduce) { .flash-up, .flash-down { animation: none; } }
/* a metric / category name with an explanation (hover or tap) */
.has-tip { text-decoration: underline dotted var(--muted); text-underline-offset: 3px; cursor: help; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; white-space: nowrap; position: sticky; top: 0; background: var(--panel); }
th.sort { cursor: pointer; user-select: none; }
th.sort.on::after { content: ' ▾'; } th.sort.on.asc::after { content: ' ▴'; }
tbody tr:hover { background: var(--panel-2); }
td.sym a { font-weight: 700; }
td.name { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* screener cards (phones) */
.cards { display: none; }
.card { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; color: var(--text); }
.card:hover { text-decoration: none; background: var(--panel-2); }
.card > .row.spread { flex-wrap: nowrap; align-items: flex-start; }
.card > .row.spread > div:first-child { min-width: 0; }
.card > .row.spread > :last-child { flex-shrink: 0; }
.card .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card .chips span.lbl { font-size: 11px; color: var(--muted); margin-right: 2px; }
@media (max-width: 719px) {
  .screener-table.has-cards { display: none; }      /* only tables with a card view next to them (screener, open positions) */
  .cards { display: grid; gap: 8px; }
}

/* company page */
.company-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.price { font-size: 1.6rem; font-weight: 700; }
.cat-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; text-align: left; color: var(--text); }
.cat-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.cat-card .row { justify-content: space-between; margin-bottom: 8px; flex-wrap: nowrap; gap: 8px; align-items: flex-start; }
.cat-card .row h3 { min-width: 0; line-height: 1.25; }      /* a long name (EPS Revisions) wraps; the grade stays on its right */
.cat-card .row .g { flex: 0 0 auto; }
/* terms of use over the page (2026-10-20): read to the end, then "Read and understood" */
body.terms-lock { overflow: hidden; }
.terms-back { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .62); display: flex; align-items: center;
  justify-content: center; padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom)); }
.terms-sheet { background: var(--panel); color: var(--text); border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35);
  width: min(760px, 100%); max-height: 100%; display: flex; flex-direction: column; overflow: hidden; }
.terms-sheet header { padding: 18px 20px 10px; border-bottom: 1px solid var(--line); }
.terms-sheet header h2 { margin: 0 0 6px; }
.terms-sheet header p { margin: 0; font-size: 14px; }
.terms-body { overflow-y: auto; padding: 4px 20px 16px; flex: 1 1 auto; min-height: 120px; line-height: 1.55; font-size: 15px;
  -webkit-overflow-scrolling: touch; outline: none; }
.terms-body h2 { font-size: 16px; margin: 18px 0 6px; }
.terms-body .terms-date { font-size: 13px; color: var(--muted); }
.terms-end { text-align: center; font-size: 12px; margin: 22px 0 4px; }
.terms-sheet footer { padding: 10px 20px 16px; border-top: 1px solid var(--line); }
.terms-progress { height: 4px; border-radius: 2px; background: var(--panel-2); margin-bottom: 10px; overflow: hidden; }
.terms-progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .15s; }
.terms-note { font-size: 12px; margin: 8px 0 0; }
.terms-sheet [data-ok]:disabled { cursor: not-allowed; }
@media (max-width: 560px) { .terms-sheet header, .terms-body, .terms-sheet footer { padding-left: 14px; padding-right: 14px; } .terms-body { font-size: 14px; } }
.strategy-doc { max-width: 820px; margin: 0 auto; padding: 22px 26px; line-height: 1.6; font-size: 15.5px; }
.strategy-doc h1 { margin: 0 0 8px; line-height: 1.25; }
.strategy-doc .strategy-sum { font-size: 16px; margin: 0 0 6px; }
.strategy-doc h2 { font-size: 18px; margin: 22px 0 6px; }
.strategy-doc ul { padding-left: 20px; }
@media (max-width: 560px) { .strategy-doc { padding: 16px 14px; font-size: 15px; } }
.spotlight-doc figure { margin: 14px 0; }
.spotlight-doc figure img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; }
.spotlight-doc figcaption { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.ev-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin-top: 6px; }
.ev-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.btn.strategy-link { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); font-weight: 600; text-decoration: none; }
.cat-card.quant-card { background: color-mix(in srgb, var(--accent) 7%, var(--panel)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
.cat-card .link-ish { color: var(--accent); }
.gh-seg button i { height: 3px; }
.ma-seg button { display: inline-flex; align-items: center; gap: 5px; }
.ma-seg button i { display: inline-block; width: 12px; height: 2px; border-radius: 1px; opacity: .35; }
.ma-seg button.on i { opacity: 1; }
.chart-box { position: relative; height: 280px; }
.chart-box.sm { height: 120px; }
.metric-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.metric-card .val { font-size: 1.25rem; font-weight: 700; }
.metric-card .meta { font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 13px; }

/* forms / auth */
.auth { max-width: 380px; margin: 40px auto; }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--muted); }
.error { color: var(--danger); font-size: 14px; min-height: 1.2em; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.form-row .field { margin: 0; flex: 1 1 120px; }

/* alerts */
.tabbar a.tab-alerts { position: relative; }
/* "install the app" bar on phones (installBar): just above the tab bar */
.install-bar { position: fixed; left: 8px; right: 8px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 8px); z-index: 21;
  display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.18); font-size: 13px; line-height: 1.35; }
.install-bar > span { flex: 1; }
.install-bar .btn { flex: none; }
/* "a new version is ready" (updateBar): like the install bar, clear of the floating Ask AI button */
.update-bar { right: 76px; z-index: 36; }
@media (min-width: 720px) { .update-bar { left: 20px; right: auto; bottom: 20px; max-width: 520px; } }
.install-x { flex: none; background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; width: 36px; height: 36px; cursor: pointer; }
.tab-badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 18px; height: 18px; font-size: 11px; }
.alert-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.alert-item.unread { background: linear-gradient(90deg, rgba(15, 118, 110, .08), transparent 60%); }
.sev { flex: 0 0 8px; border-radius: 4px; }
.sev.critical { background: var(--gF); } .sev.warning { background: var(--gD); } .sev.info { background: var(--gB); }
.alert-item .t { font-weight: 600; }
.alert-item .d { font-size: 14px; color: var(--muted); margin-top: 2px; }
.toggle { display: flex; align-items: center; gap: 10px; min-height: 40px; font-size: 15px; }
.toggle input { width: 20px; height: 20px; }

/* quant rating badges */
.rbadge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; color: #fff; background: var(--gNA); }
.rbadge.lg { font-size: 15px; padding: 6px 14px; }
.rb-sb { background: var(--gA); } .rb-b { background: var(--gB); } .rb-h { background: var(--gC); }
.rb-s { background: var(--gD); } .rb-ss { background: var(--gF); } .rb-na { background: var(--gNA); }
/* economic moat: outlined, so it never reads as a second rating */
.formerly { font-size: 12px; font-weight: 400; white-space: nowrap; }
.info-tag { display: inline-block; margin-left: 6px; padding: 0 6px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 11px; font-weight: 400; color: var(--muted); white-space: nowrap; vertical-align: middle; }
.moat-badge { display: inline-block; padding: 2px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; white-space: nowrap;
  border: 1.5px solid var(--accent); color: var(--accent); background: transparent; vertical-align: middle; }
.moat-badge.moat-narrow { border-style: dashed; color: var(--muted); border-color: var(--muted); }
.moat-badge.lg { font-size: 14px; padding: 5px 12px; }
.moat-badge.moat-none { border-color: var(--line); color: var(--muted); font-weight: 600; }
.reasons { margin: 6px 0 0; padding-left: 18px; font-size: 14px; }
.reasons li { margin: 2px 0; }

/* screener filters: a small button; the pane opens only on request */
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-size: 12px; font-weight: 700; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.active-filters:empty { display: none; }
.fchip { border: 1px solid var(--line); background: var(--panel-2); color: var(--text); border-radius: 999px; padding: 4px 10px; font-size: 13px; min-height: 30px; cursor: pointer; }
.fchip.on { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.filter-pane { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); padding: 12px; margin-bottom: 12px; }
.fsec { margin-bottom: 14px; }
.fsec h3 { margin-bottom: 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
/* the filter pane's last box: how the list looks (columns) and saved screens, apart from the filters */
.fview { margin-top: 6px; padding: 12px 12px 2px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.fview-h { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.fview-h .muted { font-weight: 400; font-size: 12px; }
.fchips { display: flex; flex-wrap: wrap; gap: 6px; }
.flist { max-height: 180px; overflow: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); padding: 4px 8px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; }
.flist label { display: flex; gap: 8px; align-items: center; min-height: 32px; font-size: 14px; }
.fgrades { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.fgrade { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fgrades.wide { grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
.krange { display: flex; gap: 4px; min-width: 0; }
.krange .input { flex: 1 1 0; min-width: 0; width: 0; }
.frow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.frow select.input { flex: 1 1 150px; }
.frow input.input { flex: 1 1 80px; width: 90px; }
/* collapsible filter groups (size, valuation, trading, estimates, ownership, columns) */
.fdetails > summary { cursor: pointer; list-style: none; min-height: 32px; display: flex; align-items: center; }
.fdetails > summary::-webkit-details-marker { display: none; }
.fdetails > summary h3 { margin: 0; }
.fdetails > summary h3::before { content: '▸ '; }
.fdetails[open] > summary h3::before { content: '▾ '; }
.fdetails[open] > summary { margin-bottom: 6px; }
/* markets: index cards, rating-mix bars, the company's own row among its peers */
.mk-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 12px; margin-bottom: 16px; }
.mk-card { margin-bottom: 0; }
.mixbar { display: inline-flex; width: 120px; height: 10px; border-radius: 5px; overflow: hidden; background: var(--line); vertical-align: middle; gap: 1px; }
.mixbar.wide { width: 100%; height: 14px; border-radius: 7px; }
.mixbar i { display: block; height: 100%; }
tr.me-row td { background: var(--panel-2); font-weight: 600; }
.mk-legend i { opacity: 1; }
/* fair price range (company page, admins) */
.fv-bar { position: relative; height: 8px; background: var(--line); border-radius: 4px; margin: 26px 8px 30px; }
.fv-range { position: absolute; top: 0; bottom: 0; background: var(--panel-2); border: 1px solid var(--muted); border-radius: 4px; }
.fv-dot { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--muted); border: 2px solid var(--panel);
  color: #fff; font-size: 10px; font-weight: 700; line-height: 12px; text-align: center; cursor: default; }
.fv-tab td:not(:first-child) { white-space: nowrap; }     /* value columns on one line: the table scrolls sideways */
.fv-num { display: inline-block; width: 16px; height: 16px; margin-right: 6px; border-radius: 50%; background: var(--muted); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; vertical-align: 1px; }
.fv-mark { position: absolute; top: -8px; width: 2px; height: 24px; margin-left: -1px; }
.fv-mark.price { background: var(--text); }
.fv-mark.fair { background: var(--accent); }
.fv-mark i { position: absolute; left: 50%; transform: translateX(-50%); font-size: 11px; font-style: normal; white-space: nowrap; }
.fv-mark.price i { top: -16px; color: var(--text); }
.fv-mark.fair i { top: 24px; color: var(--accent); font-weight: 600; }

/* update sheet: bottom sheet on phones, centred dialog on larger screens */
.sheet-back { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; -webkit-overflow-scrolling: touch;
  background: var(--panel); border-radius: 16px 16px 0 0; padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
}
@media (min-width: 720px) { .sheet-back { align-items: center; } .sheet { border-radius: 16px; } }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px 16px; }
.stats .lbl { font-size: 12px; color: var(--muted); }
.stats b { display: block; font-variant-numeric: tabular-nums; }
.stats .sub { font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cat-chips { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; }
.cat-chip { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cat-chip .lbl { font-size: 12px; color: var(--muted); }
.trade-list { list-style: none; margin: 0; padding: 0; }
.trade-list li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.tag { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; }
.tag.buy { background: rgba(6, 118, 71, .15); color: var(--up); }
.tag.sell { background: rgba(180, 35, 24, .15); color: var(--down); }
.veto { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; font-size: 13px; border: 1px solid var(--down); color: var(--text); }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--tabbar-h) + 16px + env(safe-area-inset-bottom));
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; z-index: 50; max-width: 90vw;
}
@media (min-width: 720px) { .toast { bottom: 24px; } }

/* portfolio page */
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0;
  border: 1px solid transparent; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; vertical-align: middle; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--panel-2); border-color: var(--line); color: var(--text); }
.icon-btn.danger { width: 36px; height: 36px; color: var(--danger); }
.icon-btn.danger:hover { border-color: var(--danger); color: var(--danger); }
.sym-cell { display: inline-flex; align-items: center; gap: 2px; }
.btn.danger-fill { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.sheet.confirm { max-width: 420px; }
h1.editable { border-radius: 8px; padding: 0 6px; margin-left: -6px; outline: none; cursor: text; overflow-wrap: anywhere; }
h1.editable:hover { background: var(--panel-2); }
h1.editable:focus { background: var(--panel); box-shadow: 0 0 0 2px var(--accent, var(--line)); }
.search-results.suggest { top: 100%; margin-top: 4px; }
.sheet.confirm #cf-body { overflow-wrap: anywhere; user-select: text; }   /* long links in dialogs wrap and can be selected */

/* password fields: hold the eye to show the password */
.pw-wrap { position: relative; display: block; }
.pw-wrap .input { width: 100%; padding-right: 42px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px;
  display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  cursor: pointer; touch-action: none; -webkit-user-select: none; user-select: none; }
.pw-eye:hover, .pw-eye.on { color: var(--accent); background: var(--panel-2); }
.pw-eye:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }

/* admin Users page */
.user-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 12px 16px; }
.user-stats .stat-v { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.user-stats .stat > div:last-child { overflow-wrap: anywhere; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle;
  background: var(--line); }
.dot.on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .18); }
.stats.perf { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
td small { font-size: 11px; margin-left: 1px; }
/* holdings table: header row and symbol column stay put while scrolling */
.table-wrap.freeze { max-height: calc(100vh - 120px); overflow: auto; }
.table-wrap.freeze thead th { position: sticky; top: 0; z-index: 2; }
.table-wrap.freeze .sym { position: sticky; left: 0; z-index: 1; background: var(--panel); box-shadow: 1px 0 0 var(--line), -2px 0 0 var(--panel); }
.table-wrap.freeze thead th.sym { z-index: 3; }
.table-wrap.freeze tbody tr:hover .sym { background: var(--panel-2); }
.table-wrap.freeze tfoot td { position: sticky; bottom: 0; background: var(--panel-2); font-weight: 600; border-top: 2px solid var(--line); }
.table-wrap.freeze tfoot td.sym { z-index: 2; }
.sheet.add-pf { max-width: 520px; }
.sheet.co-profile { max-width: 640px; max-height: 85vh; overflow: auto; }
.cp-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.cp-facts dt { color: var(--muted); } .cp-facts dd { margin: 0; overflow-wrap: anywhere; }
.pf-pick { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.pf-pick legend { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.pf-opt { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.pf-opt:has(input:checked) { border-color: var(--accent); background: var(--panel-2); }
.pf-opt .muted { margin-left: auto; font-size: 12px; }

/* Top Picks: tabs + legend */
.seg.tabs { display: flex; flex-wrap: wrap; margin-bottom: 12px; overflow: visible; border: 0; gap: 4px; }
.seg.tabs button { border: 1px solid var(--line); border-radius: 8px; }
.seg.tabs button + button { border-left: 1px solid var(--line); }
.star { color: #c08a1e; margin-left: 3px; font-size: 13px; }
.sym-cell .tag { margin-left: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12px; }
.legend > span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
/* exit-strategy signals (CLOSE / TAKE OUT), universe membership, tooltips */
.tip-pop { position: fixed; z-index: 100; max-width: 340px; padding: 8px 10px; border-radius: 8px; background: var(--text); color: var(--bg);
  font-size: 12.5px; line-height: 1.45; white-space: pre-line; box-shadow: 0 4px 16px rgba(0, 0, 0, .25); pointer-events: none; }
.tip-pop::first-line { font-weight: 700; }
.xsig-slot { display: inline-flex; width: 18px; flex: 0 0 18px; justify-content: center; }
.xsig, .uni { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; cursor: help; }
.xsig { width: 18px; height: 18px; }
.xsig.close { color: var(--down); } .xsig.takeout { color: var(--gD); }
.uni { width: 16px; height: 16px; margin-right: 3px; }
.uni.in { color: var(--accent); } .uni.out { color: var(--muted); opacity: .8; }
.star[tabindex] { cursor: help; }
.legend .xsig, .legend .uni { cursor: default; }
.xsig-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; }
.xsig-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 6px; border-radius: 999px; font-size: 13px; cursor: help;
  border: 1px solid currentColor; }
.xsig-pill.close { color: var(--down); } .xsig-pill.takeout { color: var(--gD); }
.xsig-pill b { color: var(--text); }
.icon-btn.hdr { width: 36px; height: 36px; color: var(--muted); }
.xbadge { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 1px 7px 1px 4px; border-radius: 999px;
  border: 1px solid currentColor; vertical-align: 1px; }
.xbadge.close { color: var(--down); } .xbadge.takeout { color: var(--gD); }
.xbadge svg { width: 13px; height: 13px; }
.xitems { margin: 4px 0 0; padding-left: 18px; font-size: 13.5px; }
.pchips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pchip { font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); }
.pchip.tp { border-color: var(--accent); color: var(--accent); }
.pf-filter { margin: 0 0 12px; }
.fchip.on .badge { background: var(--on-accent); color: var(--accent); }
.fchip .badge { height: 18px; min-width: 18px; font-size: 11px; margin-left: 2px; }
/* closable sections */
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸'; color: var(--muted); font-size: 14px; transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary h2 { margin: 0; }
details.fold[open] > summary { margin-bottom: 8px; }
.fold-body h3 { font-size: .95rem; }.alert-item.done .t, .alert-item.done .d, .alert-item.done .xitems { opacity: .65; }
.alert-item.done .xbadge { opacity: .6; }
.xbadge.plan { color: var(--focus); }   /* Top Picks heads-up (planned buy, no price yet) */
.alert-item.plan.unread { background: linear-gradient(90deg, rgba(29, 78, 216, .07), transparent 60%); }
.done-tag { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--up); }/* Top Picks tabs: light tints with dark text (open green, closed red, trades yellow), same in dark mode */
.seg.tabs.tint button { color: #16181d; font-weight: 500; }
.seg.tabs.tint .tab-open { background: #e3f5ea; border-color: #b7dfc6; }
.seg.tabs.tint .tab-closed { background: #fbe6e3; border-color: #efbcb5; }
.seg.tabs.tint .tab-trades { background: #fdf5d3; border-color: #ead98f; }
.seg.tabs.tint button.on { color: #16181d; font-weight: 700; box-shadow: inset 0 -3px 0 rgba(22, 24, 29, .45); }
.seg.tabs.tint .tab-open.on { background: #bfe8cf; border-color: #4f9c6f; }
.seg.tabs.tint .tab-closed.on { background: #f7c9c2; border-color: #c4574a; }
.seg.tabs.tint .tab-trades.on { background: #f8e595; border-color: #b39320; }.invite-link { margin-top: 12px; padding: 10px 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--panel-2); }
.invite-link .row { margin-top: 6px; }.nt-group { border: 0; padding: 0; margin: 10px 0 0; }
.nt-group legend { font-weight: 600; font-size: 14px; margin-bottom: 4px; padding: 0; }.xbadge.buy { color: var(--up); }
/* Alerts: date / symbol filters and the scrollable older section */
.alert-filters { margin: 0 0 12px; align-items: flex-end; }
.alert-filters [hidden] { display: none !important; }
.older-alerts { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 10px; }
.older-alerts summary { cursor: pointer; font-weight: 600; color: var(--accent); padding: 4px 0; }
.older-alerts .older-list { max-height: 480px; overflow-y: auto; margin-top: 6px; padding-right: 4px; }
.alert-filters .field { flex: 0 1 170px; }

/* scope tabs on portfolio pages and Top Picks: Overall (blue) / Open (green) / Closed (red) / Recent trades (yellow) */
.scope-tabs { margin: 0 0 12px; flex-wrap: wrap; }
.seg.tabs.tint .tab-overall { background: #e4ecfa; border-color: #b7c8ea; }
.seg.tabs.tint .tab-overall.on { background: #c3d5f4; border-color: #4a6fb3; }

/* multi-bagger badges: 2x gold, 4x orange, 6x red, 8x pink, 10x+ purple (light tint, dark text; same in dark mode) */
.bagger { display: inline-flex; align-items: center; gap: 2px; margin-left: 4px; padding: 0 5px; border-radius: 9px; border: 1px solid;
  font-size: 11px; font-weight: 700; line-height: 16px; white-space: nowrap; cursor: help; }
.bagger.b2 { background: #fdf3d7; border-color: #d9a520; color: #7a5600; }
.bagger.b4 { background: #ffe8d1; border-color: #e8820c; color: #8a4300; }
.bagger.b6 { background: #ffe0e0; border-color: #d63c3c; color: #8f1d1d; }
.bagger.b8 { background: #ffe0f0; border-color: #d6338a; color: #8a1456; }
.bagger.b10 { background: #ece4ff; border-color: #7048e8; color: #3d1f9e; }

/* model settings (admins) */
.cfg-edit { display: flex; gap: 6px; align-items: center; }
.cfg-edit .input { width: 150px; min-width: 0; padding: 4px 8px; }
.cfg-edit select.input { width: auto; max-width: 220px; }
.cfg-edit input[type="date"].input, .cfg-edit input[type="time"].input { width: 150px; }
.cfg-multi { display: flex; flex-wrap: wrap; gap: 2px 10px; max-width: 320px; }
.cfg-multi .toggle { font-size: 13px; white-space: nowrap; }
.cfg-order { margin: 0; padding-left: 22px; font-size: 13px; max-width: 520px; }      /* social_send_order (2026-11-08) */
.cfg-order li { padding: 4px 0; border-bottom: 1px solid var(--line); }
.cfg-order li > div { display: flex; gap: 8px; align-items: flex-start; }
.cfg-order-btns { display: inline-flex; gap: 4px; flex: none; }
.cfg-order-btns .btn { min-width: 30px; padding: 2px 6px; }
.cfg-order-why { font-size: 12px; }
.cfg-cmap select.input { font-size: 13px; padding: 4px 6px; min-width: 220px; }
.cfg-hint { font-size: 11.5px; margin-top: 3px; max-width: 320px; line-height: 1.35; }
.cfg-table td { vertical-align: top; }
.cfg-table code { font-size: 12px; white-space: nowrap; }
.cfg-jump button { margin-bottom: 4px; }
.cfg-help-m { display: none; }
.cfg-table .cfg-when { white-space: nowrap; }
@media (max-width: 640px) {
  .cfg-edit .input { width: 110px; }
  .cfg-table .cfg-what, .cfg-table .cfg-when { display: none; }
  .cfg-help-m { display: block; font-size: 12.5px; margin-top: 4px; line-height: 1.4; }
  .cfg-table code { white-space: normal; word-break: break-all; }
}

/* screener: conviction column */
.conv-cell { font-variant-numeric: tabular-nums; cursor: help; }
.conv-cell.veto { color: var(--danger, #c0392b); font-weight: 600; }

/* Top Picks pick reports (#/report/<id>, pick_report.py) */
.report-banner { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); border-left: 3px solid var(--accent); }
.report-banner svg { color: var(--accent); flex: none; width: 22px; height: 22px; }
.report-banner > div { flex: 1; min-width: 0; }
.report-banner .go { color: var(--accent); font-weight: 600; white-space: nowrap; }
.report-banner:hover { border-color: var(--accent); }
.sim-icon { display: inline-flex; margin-left: 4px; color: var(--muted); vertical-align: middle; cursor: help; }
.report-icon { display: inline-flex; margin-left: 6px; color: var(--accent); vertical-align: middle; }
.report-link { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.report-head h1 { margin: 6px 0 8px; font-size: 26px; line-height: 1.25; }
.report-summary { font-size: 16px; font-style: italic; color: var(--muted); margin: 0 0 12px; }
.report-body { max-width: 900px; font-size: 16px; line-height: 1.65; }
.report-body h2 { font-size: 20px; margin: 28px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.report-body h2:first-child { border-top: 0; margin-top: 0; }
.report-body h3, .report-body h4 { font-size: 17px; margin: 18px 0 6px; }
.report-body p, .report-body ul, .report-body ol { margin: 0 0 12px; }
.report-body li { margin: 4px 0; }
.report-body a { color: var(--accent); }
.report-body hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.report-fig { margin: 16px 0 20px; }
.report-fig img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; }
.report-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.report-body .table-wrap { overflow-x: auto; margin: 0 0 14px; }
.report-table { border-collapse: collapse; font-size: 14px; min-width: 60%; }
.report-table th, .report-table td { border-bottom: 1px solid var(--line); padding: 6px 10px; text-align: left; vertical-align: top; }
.report-table th { background: var(--panel-2); }
@media (max-width: 719px) {
  .report-head h1 { font-size: 21px; }
  .report-body { font-size: 15px; }
}

/* social posts (admin) */
.soc-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.soc-item .soc-text { width: 100%; margin: 6px 0; font: inherit; resize: vertical; height: auto; padding: 8px 10px; line-height: 1.45; }   /* rows decide the height (.input is 40 px) */
.soc-pics { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-start; margin: 6px 0; }
.soc-pic { margin: 0; display: flex; flex-direction: column; gap: 4px; }
.soc-pic img { display: block; max-height: 120px; max-width: 220px; border: 1px solid var(--line); border-radius: 6px; }
.soc-pic figcaption { display: flex; gap: 6px; align-items: center; }
.soc-pic select { min-height: 30px; padding: 2px 6px; font-size: 13px; flex: 1; }
.soc-addpic { align-self: center; }
.soc-copy { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-top: 8px; }
.soc-copy pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14px; margin: 6px 0; }
.soc-dl { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.soc-dl img { max-height: 70px; max-width: 124px; border: 1px solid var(--line); border-radius: 4px; }
#soc-new { width: 100%; font: inherit; resize: vertical; }

/* earnings calendar */
.ern { table-layout: fixed; min-width: 760px; }
.ern th, .ern td { padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ern .w { width: 34px; text-align: center; } .ern .s { width: 120px; } .ern .qt { width: 84px; }
.ern .num { width: 100px; } .ern .rt { width: 110px; } .ern .dt { width: 48px; text-align: center; }
.ern tr.ern-day th { padding-top: 18px; font-size: 15px; font-weight: 700; color: var(--text); text-transform: none; letter-spacing: 0; border-bottom: 2px solid var(--line); background: var(--panel); }
.ern tr.ern-day.today th { color: var(--accent); }
.ern .ern-count { font-weight: 400; font-size: 12px; color: var(--muted); }
/* frozen: the time + symbol columns stay on the left, each day heading stays below the column headings in its day */
.freeze .ern .w, .freeze .ern .s { position: sticky; z-index: 1; background: var(--panel); }
.freeze .ern .w { left: 0; box-shadow: -2px 0 0 var(--panel); } .freeze .ern .s { left: 34px; box-shadow: 1px 0 0 var(--line); }
.freeze .ern thead th.w, .freeze .ern thead th.s { z-index: 3; }
.freeze .ern tbody tr:hover td.w, .freeze .ern tbody tr:hover td.s { background: var(--panel-2); }
.freeze .ern tr.ern-day th { top: var(--head-h, 32px); z-index: 2; overflow: visible; }
.ern-day-l { position: sticky; left: 8px; }
.freeze td.ind { min-width: 130px; max-width: 170px; white-space: normal; }   /* sector page: frozen industry names wrap */
/* Insights: strongest / weakest industries */
.mk-ind td:first-child { white-space: normal; }
.mk-ind th.num, .mk-ind td.num { width: 1%; white-space: nowrap; }
.ern-notes { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 12px 0 0; font-size: 12px; color: var(--muted); }
.ern-notes dt { font-weight: 600; color: var(--text); } .ern-notes dd { margin: 0; }
.when { display: inline-block; width: 1.2em; text-align: center; }
.cap { font-weight: 700; }
.cap.ok { color: var(--up); }
.cap.wait { color: var(--muted, #888); letter-spacing: 1px; }
@media (max-width: 640px) { .ern { min-width: 600px; } .ern th.name, .ern td.name { display: none; } .ern-notes { grid-template-columns: 1fr; } .ern-notes dd { margin-bottom: 4px; } }
/* System health (#/ops) */
.badge.crit { background: var(--danger); color: var(--on-danger); }
.sev-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sev-card { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; text-align: left; border-left-width: 4px; }
.sev-card b { font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.sev-card span { font-size: 13px; color: var(--muted); }
.sev-card.critical { border-left-color: var(--sev-critical); } .sev-card.high { border-left-color: var(--sev-high); }
.sev-card.medium { border-left-color: var(--sev-medium); } .sev-card.warning { border-left-color: var(--sev-warning); }
.sev-card.zero b { color: var(--muted); font-weight: 500; }
.ops-days { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ops-day { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.ops-day.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--sev-ok); }
.dot.critical { background: var(--sev-critical); } .dot.high { background: var(--sev-high); }
.dot.medium { background: var(--sev-medium); } .dot.warning { background: var(--sev-warning); }
.jst { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.jst.ok { background: color-mix(in srgb, var(--sev-ok) 16%, transparent); color: var(--sev-ok); }
.jst.warn { background: color-mix(in srgb, var(--sev-medium) 18%, transparent); color: var(--text); }
.jst.bad { background: color-mix(in srgb, var(--sev-critical) 16%, transparent); color: var(--sev-critical); }
.jst.wait { background: var(--panel-2); color: var(--muted); }
.ops-q tr.q-flag td { background: color-mix(in srgb, var(--sev-medium) 7%, transparent); }
.ops-q td.q-big { font-weight: 600; }
.ops-issues { list-style: none; margin: 8px 0 0; padding: 0; }
.ops-issue { border-top: 1px solid var(--line); }
.ops-head { display: grid; grid-template-columns: 78px 150px 1fr auto 14px; gap: 10px; align-items: baseline; width: 100%;
  padding: 9px 2px; background: none; border: 0; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.ops-head[aria-expanded="true"] .ops-more { transform: rotate(90deg); }
.ops-more { color: var(--muted); transition: transform .15s; }
.ops-src { color: var(--muted); font-size: 13px; }
.ops-at { font-size: 12px; white-space: nowrap; }
.sev { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .03em; color: #fff; text-align: center; }
.sev.critical { background: var(--sev-critical); } .sev.high { background: var(--sev-high); }
.sev.medium { background: var(--sev-medium); color: #1d1d1d; } .sev.warning { background: var(--sev-warning); }
.ops-detail { margin: 0 0 10px; padding: 10px 12px; background: var(--panel-2); border-radius: 8px; font-size: 12px;
  white-space: pre-wrap; word-break: break-word; max-height: 360px; overflow: auto; }
@media (max-width: 640px) {
  .sev-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ops-head { grid-template-columns: 70px 1fr 14px; } .ops-head .ops-src, .ops-head .ops-at { display: none; }
  .ops-jobs th:nth-child(4), .ops-jobs td:nth-child(4) { display: none; }
}

/* price chart: rating periods legend */
.rt-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; margin-top: 6px; }
.rt-legend span { display: inline-flex; align-items: center; gap: 5px; }
.rt-legend i { width: 12px; height: 12px; border-radius: 3px; opacity: .55; display: inline-block; }

/* Account page: the admin pages as cards, the whole card opens the page (2026-10-19; was a panel with an Open button) */
.admin-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-bottom: 16px; }
.admin-links .admin-link { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; color: inherit; text-decoration: none; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.admin-link > span:first-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.admin-link b { font-size: 16px; }
.admin-link .muted { font-size: 13px; }
.admin-link .chev { font-size: 26px; line-height: 1; color: var(--muted); flex: 0 0 auto; }
.admin-link:hover, .admin-link:focus-visible { border-color: var(--accent); }
.admin-link:hover .chev { color: var(--accent); }

/* search + filter bar above the Users page lists (listTools, 2026-10-19) */
.list-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.list-tools input[type=search] { flex: 1 1 220px; max-width: 340px; }
.list-tools .seg { flex-wrap: wrap; }
.list-tools .seg button { font-size: 13px; padding: 4px 10px; min-height: 32px; }
.list-tools .seg button .muted { font-size: 12px; }
.list-tools .seg button.on .muted { color: inherit; opacity: .85; }
.list-tools .lt-count { font-size: 12px; }

/* install guide (2026-10-25, #/install) */
.inst-steps { list-style: none; padding: 0; margin: 12px 0 0; counter-reset: st; }
.inst-steps > li { counter-increment: st; display: grid; grid-template-columns: 1fr 240px; gap: 16px; align-items: center; }
.inst-steps > li:not(:has(figure)) { grid-template-columns: 1fr; }
.inst-steps h3 { margin: 0 0 4px; }
.inst-steps h3::before { content: counter(st); display: inline-grid; place-items: center; width: 26px; height: 26px; margin-right: 8px;
  border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: 14px; }
.inst-steps p { margin: 0; }
.ill { margin: 0; text-align: center; }
.ill figcaption { font-size: 11px; margin-top: 4px; }
.inst-shots { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.inst-shots figure { margin: 0; }
.inst-shots img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; display: block; }
.inst-shots figcaption { font-size: 12px; margin-top: 4px; text-align: center; }
@media (max-width: 719px) {
  .inst-steps > li { grid-template-columns: 1fr; }
  .inst-shots { grid-template-columns: 1fr; }
  .inst-shots figure:first-child { max-width: 260px; margin: 0 auto; }
}

/* picture viewer (2026-10-27): full size over the page, closes with ✕ / Esc / a tap outside / back */
.img-viewer { position: fixed; inset: 0; z-index: 1000; background: rgba(8, 10, 14, .88); display: flex;
  align-items: center; justify-content: center; padding: 48px 12px 16px; }
.img-viewer figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.img-viewer img { max-width: min(1400px, 100%); max-height: calc(100vh - 110px); object-fit: contain; border-radius: 8px; background: #fff; }
.img-viewer figcaption { color: #e7e9ee; font-size: 13px; text-align: center; }
.img-viewer .iv-close { position: fixed; top: max(10px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px;
  border-radius: 50%; border: 0; background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px; cursor: pointer; }
.img-viewer .iv-close:focus-visible { outline: 2px solid var(--focus); }

/* settings: a grid of tick boxes (social_auto_post, 2026-10-27) */
.cfg-grid { display: table; max-width: none; border-collapse: collapse; font-size: 13px; }   /* not .cfg-multi's flex */
.cfg-grid th { position: static; text-transform: none; letter-spacing: 0; background: none; }
.cfg-grid thead th { font-weight: 600; }
.cfg-grid th, .cfg-grid td { padding: 4px 10px; border-bottom: 1px solid var(--line); text-align: center; }
.cfg-grid tbody th { text-align: left; font-weight: 400; white-space: nowrap; }
.cfg-grid input { width: 18px; height: 18px; }
.cfg-grid .cfg-why { text-align: left; color: var(--muted); font-size: 12px; min-width: 140px; max-width: 340px; white-space: normal; line-height: 1.35; }
.cfg-grid thead th.cfg-why { font-weight: 600; color: var(--muted); }
.cfg-grid { width: 100%; } .cfg-grid tbody th { white-space: normal; min-width: 120px; }

/* Where to start calculator (2026-10-28) */
.st-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 12px 18px; align-items: start; }
.st-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.st-form .st-lab { font-size: 13px; margin-bottom: 4px; }
.st-form .seg { flex-wrap: wrap; }
#st-months-box { display: inline-block; margin-top: 6px; }
#st-months-box[hidden] { display: none; }

/* Ask AI (2026-10-31): the floating ✦ button, its panel, the search bar with suggestions, prompt cards */
:root { --ai: #e8762b; }
.ai-spark { color: var(--ai); display: inline-flex; flex: 0 0 auto; }
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 35; width: 54px; height: 54px; border-radius: 50%; border: 0;
  background: var(--panel); color: var(--ai); box-shadow: 0 4px 16px rgba(16, 24, 40, .22); display: flex; align-items: center;
  justify-content: center; cursor: pointer; border: 1px solid var(--line); }
.ai-fab svg { width: 28px; height: 28px; }
.ai-fab:hover { transform: scale(1.05); }
@media (max-width: 719px) { .ai-fab { right: 14px; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px); width: 50px; height: 50px; } }
.ai-panel-back { position: fixed; inset: 0; z-index: 45; background: rgba(15, 23, 42, .28); display: flex; justify-content: flex-end; align-items: flex-end; }
.ai-panel { width: min(600px, 100%); height: min(780px, calc(100vh - 32px)); margin: 16px; background: var(--panel); border-radius: 16px;
  display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0, 0, 0, .28); overflow: hidden; }
@media (max-width: 719px) { .ai-panel { margin: 0; width: 100%; height: 92vh; border-radius: 16px 16px 0 0; } }
.ai-head { display: flex; align-items: center; gap: 4px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.ai-head h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 6px; flex: 1; }
.ai-icon-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 15px; text-decoration: none; }
.ai-icon-btn:hover { background: var(--panel-2); text-decoration: none; }
.ai-body { flex: 1; overflow: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.ai-disc { font-size: 11px; color: var(--muted); padding: 8px 16px calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.ai-bar { position: relative; display: flex; align-items: flex-end; gap: 8px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; padding: 8px 8px 8px 12px; box-shadow: var(--shadow); }
.ai-panel .ai-bar { background: var(--panel-2); box-shadow: none; }
.ai-bar:focus-within { border-color: var(--focus); }
.ai-bar > .ai-spark { align-self: center; }
.ai-bar textarea { flex: 1; border: 0; background: none; resize: none; font: inherit; font-size: 16px; color: var(--text); outline: none;
  height: 26px; max-height: 140px; padding: 2px 0; line-height: 1.4; }
.ai-top { display: flex; justify-content: flex-end; margin: 0 0 6px; }
.ai-model { flex: 0 0 auto; width: auto; max-width: 160px; font-size: 12px !important; height: 26px; border: 1px solid var(--line);
  border-radius: 999px; background: var(--panel); color: var(--muted); padding: 0 6px; }
.ai-bar textarea { min-width: 0; }
.ai-bar textarea::placeholder { color: var(--muted); opacity: 1; }
.ai-tab { align-self: center; font: 600 11px/1 inherit; color: var(--muted); border: 1px solid var(--line); border-radius: 6px;
  padding: 3px 6px; background: var(--panel); cursor: pointer; }
@media (max-width: 719px) { .ai-tab { display: none; } }
.ai-send { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; }
.ai-send:disabled { background: var(--line); color: var(--muted); cursor: default; }
.ai-sugg { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 10px 28px rgba(16, 24, 40, .16); padding: 6px; margin: 0; list-style: none; }
.ai-sugg li { padding: 9px 10px; border-radius: 8px; cursor: pointer; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.ai-sugg li .ai-spark svg { width: 16px; height: 16px; }
.ai-sugg li.on, .ai-sugg li[data-i]:hover { background: var(--panel-2); }
.ai-sugg li.lbl { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 6px 10px 2px; cursor: default; }
.ai-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ai-out { margin-top: 14px; }
.ai-q { font-weight: 600; margin: 4px 0 8px; }
.ai-deep { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); display: grid; gap: 8px; font-size: 14px; }
.ai-deep .btn { justify-self: start; display: inline-flex; align-items: center; gap: 6px; }
.ai-deep .btn svg { width: 15px; height: 15px; color: var(--ai); }
.ai-deep.done { color: var(--muted); font-size: 13px; }
.ai-foot { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 10px; display: grid; gap: 6px; }
.ai-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-actions .btn { display: inline-flex; align-items: center; gap: 4px; }
.ai-actions .btn svg { width: 14px; height: 14px; color: var(--ai); }
.ai-actions .input { flex: 1; min-width: 160px; font-size: 13px; padding: 5px 8px; }
.ai-recent { margin: 6px 0 0; padding-left: 18px; }
.ai-recent li { margin: 4px 0; }
.ai-recent .muted { font-size: 12px; }
.ai-prompts { display: grid; gap: 8px; margin: 10px 0 12px; }
.ai-prompt { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; color: var(--text); text-decoration: none; box-shadow: var(--shadow); }
.ai-prompt:hover { border-color: var(--ai); text-decoration: none; }
.ai-prompt .go { margin-left: auto; color: var(--muted); }
.ai-page { max-width: 820px; }
.ai-title { display: flex; align-items: center; gap: 8px; }
.ai-title .ai-spark svg { width: 26px; height: 26px; }
/* Ask AI usage (Account page, AI usage page) */
.ai-uses { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 24px; margin-top: 10px; }
.ai-use-h { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.ai-use { margin: 6px 0 10px; font-size: 14px; }
.ai-meter { height: 6px; border-radius: 3px; background: var(--panel-2); overflow: hidden; margin-top: 4px; }
.ai-meter > span { display: block; height: 100%; background: var(--accent); }
.ai-meter.warn > span { background: var(--sev-medium); }
.ai-meter.full > span { background: var(--sev-critical); }
td.ai-full { color: var(--sev-critical); font-weight: 600; }
tr.ai-total td { border-top: 2px solid var(--line); }

/* user guide (2026-11-01) */
.guide-toc { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-toc a { font-size: 13px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; }
.guide-toc a:hover { border-color: var(--accent); }
.guide-sec { scroll-margin-top: 70px; }
.guide-sec h3 { font-size: 15px; margin: 12px 0 4px; }
.guide-day { border-top: 1px solid var(--line); padding: 6px 0; }
.guide-day summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.guide-day ul { margin: 6px 0 2px; }
.guide-older-days { padding-left: 14px; }          /* What's new: the days inside "Older" (2026-11-07) */
.guide-older-days .guide-day summary { font-weight: 500; }
.guide-top { margin: 12px 0 0; text-align: right; font-size: 13px; }
.guide-top a { text-decoration: none; }
.guide-sec ul, .guide-sec ol { padding-left: 20px; }
.guide-sec li { margin: 4px 0; }
.guide-sec code { overflow-wrap: anywhere; }
/* two-step sign-in (2026-11-01) */
.mfa-apps { margin: 6px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.mfa-steps { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.mfa-qr { margin: 8px 0; }
.mfa-qr svg { width: 240px; max-width: 100%; height: auto; display: block; background: #fff; border-radius: 6px; border: 1px solid var(--line); }
.mfa-key { word-break: break-all; font-size: 13px; }
.mfa-codes { display: grid; grid-template-columns: repeat(2, max-content); gap: 6px 24px; }
.mfa-codes code { font-size: 16px; letter-spacing: .5px; }
.mfa-warn { background: rgba(217, 119, 6, .12); border: 1px solid rgba(217, 119, 6, .4); border-radius: 10px; padding: 8px 12px; margin: 0 0 10px; }
/* #/campaigns (2026-11-01) */
.cmp-sets { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.cmp-set { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.cmp-set .input { min-width: 150px; }
.cmp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; }
.cmp-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.cmp-grid label[hidden] { display: none; }
.cmp-grid .cmp-check { flex-direction: row; align-items: center; gap: 6px; }
.cmp-acts { white-space: nowrap; } .cmp-acts .btn { margin: 2px 0; }
.cmp-log { margin: 0; padding-left: 18px; font-size: 13px; } .cmp-log li { margin: 3px 0; }
@media (max-width: 700px) { .cmp-acts { white-space: normal; } }
.cmp-kind-note { font-size: 12px; color: var(--muted); line-height: 1.35; }
.cmp-totals { margin: 12px 0; }
.cmp-move { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.cmp-mail { white-space: pre-wrap; font: inherit; font-size: 13px; background: var(--panel-2, rgba(0,0,0,.03)); padding: 10px; border-radius: 8px; }

/* Ask AI conversations (2026-11-02): one block per question and answer */
.ai-turn + .ai-turn { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ai-turn { scroll-margin-top: 12px; }
.guide-fig { margin: 10px 0 14px; }
.guide-fig img { display: block; width: 100%; max-width: 720px; border: 1px solid var(--line); border-radius: 8px; }
.guide-fig figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Ask AI bar at the bottom (2026-11-02), like chat assistants: answers above, one bar below; suggestions open upwards */
.ai-dock { padding: 10px 16px 4px; border-top: 1px solid var(--line); background: var(--panel); }
.ai-dock .ai-meta { margin-top: 4px; }
.ai-dock .ai-sugg { top: auto; bottom: calc(100% + 6px); }
.ai-panel .ai-out { margin-top: 0; }
.ai-dock-page { position: sticky; bottom: 0; z-index: 4; background: var(--bg); border-top: 0; padding: 10px 0 8px; margin-top: 12px; }
@media (max-width: 719px) { .ai-dock-page { bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); } }
.ai-recent-box { margin: 8px 0; }
.ai-recent-box summary { cursor: pointer; font-weight: 600; font-size: 14px; }

/* statements audit (2026-11-10): a held statement, as admins see it */
.fs-held { border: 1px solid var(--warn, #b7791f); border-radius: 8px; padding: 8px 12px; margin: 8px 0; font-size: 13px; }
.fs-held ul { margin: 4px 0 4px 18px; padding: 0; }

/* chart builder (2026-11-13, charts.js) */
.cb-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; align-items: start; }
.cb-controls, .cb-preview { margin-bottom: 0; min-width: 0; }
.cb-co { position: relative; }
.cb-co .search-results { top: 68px; }
.cb-selected { display: grid; gap: 6px; }
.cb-sel { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.cb-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.cb-sel-name { flex: 1; min-width: 0; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere; }
.cb-type button { padding: 3px 9px; min-height: 28px; font-size: 12px; }
.cb-x { flex: none; padding: 4px 6px; font-size: 14px; }
.ig-panel-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ig-panel-row .cb-opt { flex: 1; min-width: 0; }
.ig-panel-mv { display: flex; gap: 4px; flex: none; }
.ig-measures { border: 0; margin: 0; padding: 0; min-width: 0; }
.ig-measures legend { padding: 0; margin-bottom: 4px; font-size: 13px; color: var(--muted); }
.ig-measure { padding: 6px 0 6px 2px; min-height: 32px; }
.cb-sel-opts { flex: 1 1 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; padding-left: 18px; }
.cb-panel { width: auto; min-height: 30px; padding: 2px 8px; font-size: 12px; }
.cb-avg { padding: 2px 0; font-size: 12px; }
.cb-msg { margin: 6px 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--danger); color: var(--danger); font-size: 13px; line-height: 1.4; }
.cb-picker { max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }
.cb-group > summary { cursor: pointer; padding: 8px 0; font-weight: 600; font-size: 14px; }
.cb-opt { display: flex; align-items: baseline; gap: 8px; padding: 5px 0 5px 4px; font-size: 14px; cursor: pointer; line-height: 1.3; }
.cb-opt input { flex: none; align-self: center; }
.cb-opt > span:nth-of-type(1) { flex: 1; min-width: 0; }
.cb-unit { flex: none; font-size: 11px; }
.cb-head { margin-bottom: 8px; }
.cb-title { font-size: 20px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cb-subline { font-size: 13px; }
.cb-canvas { position: relative; height: 380px; margin: 8px 0; }
.cb-canvas.tall { height: 560px; }
@media (max-width: 719px) { .cb-canvas.tall { height: 460px; } .ig-measure { min-height: 44px; } }
.cb-export { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 900px) {
  .cb-grid { grid-template-columns: minmax(0, 1fr); }
  .cb-preview { order: -1; }
  .cb-canvas { height: 300px; }
  .cb-picker { max-height: 300px; }
}
.cb-export .seg button { white-space: nowrap; padding: 6px 8px; font-size: 13px; }
@media (max-width: 480px) { .cb-export #cb-size { width: 100%; } .cb-export #cb-size button { flex: 1; } }
/* chart builder, peers (2026-11-13, branch charts2) */
.cb-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cb-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel-2); font-size: 13px; }
.cb-chip .link-btn { padding: 2px 6px; font-size: 13px; }
.cb-src { flex-wrap: wrap; }
.cb-src button { padding: 5px 10px; min-height: 30px; font-size: 13px; }
.cb-peerlist { max-height: 220px; overflow: auto; margin-top: 4px; }
.cb-peer-item { display: flex; align-items: baseline; gap: 8px; width: 100%; text-align: left; padding: 6px 8px; margin: 0 0 4px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.cb-peer-item.on { border-color: var(--accent, #0f766e); box-shadow: inset 0 0 0 1px var(--accent, #0f766e); }
.cb-peer-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-peer-cap { flex: none; font-size: 12px; }
.cb-index { margin-top: 6px; }
.cb-peer-note { margin-top: 6px; line-height: 1.4; }
.cb-missing { border: 1px solid var(--warn, #b7791f); background: color-mix(in srgb, var(--sev-medium) 14%, transparent); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; font-size: 13px; line-height: 1.45; }
.cb-missing ul { margin: 4px 0 0; padding-left: 18px; }
.cb-chip.missing { border-style: dashed; border-color: var(--warn, #b7791f); }
.cb-chip.missing b { text-decoration: line-through; opacity: .7; }
.cb-chip.missing .cb-dot { background: transparent !important; border: 1px dashed var(--muted); }
.cb-nodata { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: color-mix(in srgb, var(--sev-medium) 25%, transparent); }
/* chart builder, saved charts (2026-11-13, branch charts2) */
.cb-save { margin-top: 12px; }
.cb-mine-list { display: grid; gap: 8px; margin-top: 10px; }
.cb-mine-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.cb-mine-row.on { border-color: var(--accent); }
.cb-mine-name { flex: 1; min-width: 160px; display: grid; gap: 2px; font-size: 14px; }
.cb-mine-name b { overflow-wrap: anywhere; }
.cb-mine-name .muted { font-size: 12px; overflow-wrap: anywhere; }

/* infographics (2026-11-13, infographic.js): the preview is the exported canvas scaled down; the image keeps its own light look */
.ig-preview { margin-bottom: 0; min-width: 0; }
.ig-box { display: flex; justify-content: center; }
.ig-canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
.ig-canvas.portrait { max-width: 560px; }
.ig-canvas.square { max-width: 640px; }
.cu-map { display: grid; gap: 6px; }
.cu-cell { display: grid; gap: 2px; align-content: start; text-align: left; min-height: 56px; padding: 6px 8px; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-width: 0; }
.cu-cell.full { border-style: solid; }
.cu-cell.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cu-no { font-size: 11px; color: var(--muted); }
.cu-sum { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-cell b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-editor { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.cu-editor .seg { flex-wrap: wrap; }
/* custom infographic v2 (2026-11-13, branch custom2): companies first, one coloured row per company, steps 2 and 3 locked until one is picked */
.cu-chips { display: grid; gap: 6px; margin-bottom: 8px; }
.cu-chip { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 6px 4px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); font-size: 14px; min-width: 0; }
.cu-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; }
.cu-chip-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.cu-mini { flex: none; min-width: 36px; min-height: 36px; padding: 2px 8px; }
.cu-step { border: 0; margin: 0; padding: 0; min-width: 0; }
.cu-step:disabled { opacity: .45; }
.cu-problems { margin: 0 0 10px; font-size: 13px; line-height: 1.45; color: var(--warn, #b7791f); }
.cu-problems:empty { display: none; }

/* chartfix (2026-11-13): phone width, chart builder and infographics: tap targets of at least 40 px, tap to enlarge the picture */
.ig-box { flex-wrap: wrap; }
.ig-tap { display: none; flex-basis: 100%; text-align: center; font-size: 12px; margin-top: 6px; }
.ig-zoom { position: fixed; inset: 0; z-index: 200; overflow: auto; background: rgba(8, 10, 14, .92); -webkit-overflow-scrolling: touch; padding: 56px 8px 24px; }
.ig-zoom img { display: block; width: 100%; height: auto; border-radius: 6px; }
.ig-zoom img.wide { width: max(100%, 860px); }
.ig-zoom-x { position: fixed; top: 8px; right: 8px; min-height: 44px; min-width: 88px; }
@media (max-width: 600px) {
  .ig-tap { display: block; }
  .ig-canvas { cursor: zoom-in; }
  .cb-type button, .cb-src button, .seg button { min-height: 40px; }
  .cb-x, .cb-chip .link-btn { min-width: 40px; min-height: 40px; padding: 4px 10px; }
  .cb-chip { padding-right: 2px; }
  .cb-opt { min-height: 40px; align-items: center; padding-top: 4px; padding-bottom: 4px; }
  .cb-opt input { width: 22px; height: 22px; }
  .cb-group > summary { min-height: 40px; display: flex; align-items: center; }
  .cb-peer-item, .cb-mine-row .btn, .cu-cell { min-height: 40px; }
  .cu-chip, .cu-mini { min-height: 40px; }
  .cu-mini { min-width: 40px; }
}

/* custom infographic v3 = rows (2026-11-13, branch rows): starting layouts, the outline of the rows, the fit meter, the outline of the selected cell on the preview */
.cu-presets { display: grid; gap: 6px; }
.cu-preset { display: grid; gap: 2px; text-align: left; padding: 8px 10px; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); color: var(--text); font: inherit; cursor: pointer; }
.cu-preset b { font-size: 14px; }
.cu-preset .muted { font-size: 12px; }
.cu-preset.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cu-rows { display: grid; gap: 10px; }
.cu-row { border: 1px solid var(--line); border-radius: 10px; padding: 8px; background: var(--panel-2); min-width: 0; }
.cu-row.on { border-color: var(--accent); }
.cu-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cu-rowname { background: none; border: 0; color: var(--text); font: inherit; padding: 4px 6px; min-height: 36px; cursor: pointer; }
.cu-hseg { flex: 1 1 auto; }
.cu-hseg button { padding: 4px 8px; font-size: 13px; }
.cu-row-acts { margin-left: auto; display: flex; gap: 4px; }
.cu-split { margin: 6px 0; font-size: 13px; }
.cu-split summary { cursor: pointer; min-height: 32px; display: flex; align-items: center; }
.cu-splits { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.cu-splits .btn { min-height: 36px; font-size: 13px; }
.cu-splits .btn.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cu-cells { display: flex; gap: 6px; }
.cu-cell2 { display: grid; gap: 4px; min-width: 0; align-content: start; }
.cu-cellbtn { display: grid; gap: 2px; align-content: start; text-align: left; min-height: 56px; padding: 6px 8px; width: 100%; border: 1px dashed var(--line); border-radius: 8px; background: var(--panel); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; min-width: 0; }
.cu-cell2.full .cu-cellbtn { border-style: solid; }
.cu-cell2.on .cu-cellbtn { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cu-cell2.bad .cu-cellbtn { border-color: #b42318; }
.cu-cellbtn b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cu-cell-acts { display: flex; gap: 4px; justify-content: flex-end; }
.cu-meter { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 10px; }
.cu-meter i { display: block; height: 100%; background: var(--accent); }
.cu-meter.bad i { background: #b42318; }
.cu-bad { color: #b42318; }
.cu-prob { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; color: var(--warn, #b7791f); }
.cu-prob span { flex: 1 1 220px; }
.ig-wrap { position: relative; width: 100%; }
.ig-wrap.portrait { max-width: 560px; }
.ig-wrap.square { max-width: 640px; }
.ig-wrap .ig-canvas { max-width: none; }
.cu-hl { position: absolute; border: 3px solid var(--accent); border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 2px rgba(255, 255, 255, .75); }
.cu-hlrow { position: absolute; border: 2px dashed var(--accent); border-radius: 12px; opacity: .65; pointer-events: none; }
.cu-previewcol { position: sticky; top: calc(var(--topbar-h, 56px) + 8px); align-self: start; max-height: calc(100vh - var(--topbar-h, 56px) - 16px); overflow-y: auto; }   /* 2026-11-13: the preview stays in view while the settings scroll (a stretched grid cell cannot stick) */
#ig-empty, #cb-empty { padding: 14px 16px; border: 1px dashed var(--line); border-radius: 8px; font-size: 14px; }   /* a short hint, not a big box that looks like an input */
@media (max-width: 719px) { .cu-previewcol { position: static; } }
@media (max-width: 600px) {
  .cu-cells { flex-direction: column; }
  .cu-cell2 { flex: none !important; }
  .cu-hseg button, .cu-splits .btn, .cu-rowname, .cu-cellbtn, .cu-preset, .cu-split summary { min-height: 40px; }
  .cu-hseg button { min-width: 44px; }
}

/* page tours (2026-11-14): one closed help block at the top of Screener, Company, Portfolios, Top Picks and Insights pages,
   and in the Ask AI panel; the pictures, the clip with its caption bar and the enlarged picture follow site/public/site.css */
.tour-slot { max-width: 1240px; margin: 0 auto; padding: 10px max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.tour-slot:empty { display: none; }
.tour-slot:not(:empty) + .view { padding-top: 12px; }
.tour-in .tour-more { margin: 0 0 4px; padding: 6px 12px; }
.tour-slot .tour-more { margin-bottom: 0; }
.tour-more > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; }
.tour-more > summary::-webkit-details-marker { display: none; }
.tour-more > summary .ico-play { flex: 0 0 auto; width: 22px; height: 22px; color: var(--accent); }
.tour-more > summary::after { content: '+'; flex: 0 0 auto; font-size: 20px; line-height: 1; color: var(--muted); width: 14px; text-align: center; }
.tour-more[open] > summary::after { content: '\2212'; }
.tour-more > summary .stxt { flex: 1 1 0; min-width: 0; }
.tour-more > summary .stxt b { font-weight: 600; }
.tour-sent { color: var(--muted); }
@media (min-width: 900px) { .tour-more > summary .stxt { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.tour-hide { flex: 0 0 auto; background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12.5px; padding: 2px 10px; cursor: pointer; min-height: 28px; }
.tour-hide:hover { background: var(--panel-2); color: var(--text); }
.tour-more[open] > summary { margin-bottom: 8px; }
.tour-wait { padding: 8px 0; }
.tour-gallery { list-style: none; margin: 6px 0 10px; padding: 0 0 6px; display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x proximity; }
.tour-gallery li { flex: 0 0 168px; scroll-snap-align: start; }
.tour-gallery a.shot { display: block; text-decoration: none; color: var(--muted); font-size: 12.5px; }
.tour-gallery img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-2); }
.tour-gallery a.shot:hover img, .tour-gallery a.shot:focus-visible img { border-color: var(--accent); }
.tour-gallery .tt { display: block; margin-top: 4px; color: var(--text); font-weight: 600; }
.tour-vid { position: relative; max-width: min(960px, 100%, calc((100vh - 170px) * 1.6)); margin: 6px auto 4px; }
.tour-vid video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; border: 1px solid var(--line); border-radius: 10px; background: #000; }
.tour-vcap { position: absolute; left: 10px; right: 10px; bottom: 56px; padding: 7px 12px; border-radius: 8px; background: rgba(0, 0, 0, .74); color: #fff; font-size: 14px; line-height: 1.4; pointer-events: none; }
.tour-vcap[hidden] { display: none; }
.tour-box { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; overflow: visible; color: #fff; }
.tour-box::backdrop { background: rgba(0, 0, 0, .8); }
.tour-box figure { margin: 0; text-align: center; }
.tour-frame { position: relative; display: inline-block; line-height: 0; }
.tour-box img { display: block; max-width: 92vw; max-height: 80vh; width: auto; height: auto; border-radius: 6px; background: #fff; margin: 0 auto; }
.tour-bar { position: absolute; left: 0; right: 0; bottom: 0; max-height: 22%; overflow: auto; box-sizing: border-box; padding: 8px 14px; background: rgba(0, 0, 0, .74); color: #fff; font-size: 15px; line-height: 1.4; text-align: left; border-radius: 0 0 6px 6px; }
.tour-box figcaption { margin-top: 8px; font-size: 14px; }
.tour-box button { position: absolute; z-index: 2; background: rgba(0, 0, 0, .6); color: #fff; border: 1px solid rgba(255, 255, 255, .4); border-radius: 999px; width: 40px; height: 40px; font-size: 22px; cursor: pointer; }
.tour-x { top: -14px; right: -14px; } .tour-prev { left: -14px; top: 40%; } .tour-next { right: -14px; top: 40%; }
.tour-box button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.ai-tour-btn { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--accent); font-weight: 600; }
.ai-tour-btn .ico-play { width: 20px; height: 20px; }
.ai-body .tour-in { margin-bottom: 12px; }
.ai-body .tour-in .tour-more { margin: 0; }
.ai-body .tour-more > summary .stxt { white-space: normal; overflow: visible; }
@media (max-width: 520px) { .ai-tour-btn span { display: none; } }
@media (max-width: 640px) {
  .tour-gallery li { flex-basis: 62%; }
  .tour-vid video { border-radius: 10px 10px 0 0; }
  .tour-vcap { position: static; box-sizing: border-box; min-height: 74px; margin-top: -1px; padding: 7px 10px; font-size: 13px; border-radius: 0 0 10px 10px; background: #0b0f10; }
  .tour-frame { display: block; } .tour-bar { position: static; max-height: none; font-size: 13.5px; border-radius: 0 0 6px 6px; margin-top: -2px; }
  .tour-box img { max-width: 94vw; max-height: 58vh; border-radius: 6px 6px 0 0; } .tour-x { right: 0; top: -44px; } .tour-prev { left: 0; } .tour-next { right: 0; }
}
/* phones: the closed line shows its title only; laptops: the opened block (title, pictures, clip with caption and controls)
   fits in the window without scrolling */
@media (max-width: 640px) { .tour-slot .tour-sent { display: none; } }
@media (min-width: 641px) and (min-height: 521px) { .tour-slot .tour-vid { max-width: min(960px, 100%, calc((100vh - 300px) * 1.6)); } }
/* phone turned sideways: the clip on the left, its caption beside it */
@media (max-height: 520px) and (orientation: landscape) {
  .tour-vid { display: flex; align-items: stretch; max-width: none; margin: 6px 0 4px; }
  .tour-vid video { flex: 0 0 auto; width: auto; height: calc(100vh - 150px); aspect-ratio: 16 / 10; border-radius: 10px 0 0 10px; }
  .tour-vcap { position: static; box-sizing: border-box; flex: 1 1 auto; min-height: 0; background: #0b0f10; max-height: calc(100vh - 150px); overflow: auto; margin: 0 0 0 -1px; padding: 8px 12px; font-size: 13.5px; border-radius: 0 10px 10px 0; }
  .tour-box img { max-height: calc(100vh - 130px); }
  .tour-bar { font-size: 12.5px; padding: 5px 10px; }
}
/* Alert settings button in the Alerts header and its panel; the six alert rows (2026-11-14) */
.as-toggle { display: inline-flex; align-items: center; gap: 6px; }
.as-toggle .gear { flex: none; }
.as-toggle[aria-expanded="true"] { background: var(--panel-2); border-color: var(--accent); }
.as-short { display: none; }
@media (max-width: 600px) { .as-full { display: none; } .as-short { display: inline; } }
#alert-settings[hidden] { display: none; }
.nt-row .nt-note { margin: 0 0 6px 26px; font-size: 12px; }
.nt-sub { margin: 0 0 6px 26px; }
#alert-settings .toggle input, .nt-row .toggle input, .nt-sub .toggle input { flex: none; }
#alert-settings .toggle { padding: 3px 0; }

/* company colours (2026-11-15): the colour dot on a company and the choice of 8 colours */
.cp-dot { flex: none; width: 24px; height: 24px; min-width: 24px; padding: 0; border-radius: 50%; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--muted); cursor: pointer; position: relative; background: var(--muted); }
.cp-dot::after { content: ""; position: absolute; inset: -9px; }                 /* a 42 px touch target around the small dot */
.cp-dot:focus-visible, .cp-sw:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.cp-row { display: flex; align-items: center; gap: 12px; }
.cp-row .input { flex: 1; min-width: 0; }
.cp-pop { position: absolute; z-index: 60; width: 244px; max-width: calc(100vw - 16px); padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); box-shadow: 0 6px 24px rgba(0, 0, 0, .25); color: var(--text); }
.cp-title { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.cp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cp-sw { height: 44px; border-radius: 10px; border: 1px solid rgba(0, 0, 0, .25); cursor: pointer; color: #fff; font-size: 20px; font-weight: 800; text-shadow: 0 0 3px #000, 0 0 2px #000; padding: 0; }
.cp-sw.on { outline: 3px solid var(--text); outline-offset: 2px; }
.cp-hint { font-size: 12px; margin-top: 8px; }
.cb-chip .cp-dot, .cu-chip .cp-dot { width: 20px; height: 20px; min-width: 20px; }

/* ---------- Data corrections page (admins, 2026-11-16) ---------- */
.corr-card { padding: 14px 16px; }
.corr-head { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.corr-sym { font-weight: 700; font-size: 17px; margin-right: 6px; }
.corr-vals { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-bottom: 8px; }
.corr-vals > div { display: flex; flex-direction: column; gap: 2px; min-width: 120px; }
.corr-vals b { font-size: 18px; font-variant-numeric: tabular-nums; }
.corr-vals .muted { font-size: 12px; }
.corr-reads { font-size: 13px; margin-bottom: 6px; }
.corr-ev { margin: 6px 0; padding-left: 18px; font-size: 14px; }
.corr-ev li { margin: 3px 0; overflow-wrap: anywhere; }
.corr-link { margin: 6px 0; font-size: 14px; }
.corr-note { font-size: 14px; margin: 6px 0; overflow-wrap: anywhere; }
.corr-form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr); gap: 10px 14px; margin: 10px 0 4px; }
.corr-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.corr-acts .btn { min-height: 40px; }
.corr-log { margin-top: 8px; font-size: 13px; color: var(--muted); }
.corr-log ul { margin: 6px 0 0; padding-left: 18px; }
.corr-add { margin-bottom: 14px; }
.corr-add summary { cursor: pointer; min-height: 32px; }
.corr-add [hidden] { display: none !important; }
.corr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px 14px; margin: 12px 0; }
.corr-grid .corr-wide { grid-column: 1 / -1; }
.corr-card textarea.input, .corr-add textarea.input { min-height: 56px; resize: vertical; font: inherit; }
@media (max-width: 600px) { .corr-form { grid-template-columns: 1fr; } .corr-acts .btn { flex: 1 1 calc(50% - 8px); } }
.corr-filters { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end; margin: 0 0 12px; }
.corr-f { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--muted); }
.corr-f .input { min-height: 40px; font-size: 14px; max-width: 100%; }
.corr-fq { flex: 1 1 220px; }
.corr-fq .input { width: 100%; }
.corr-filters select.input { min-width: 130px; }
.corr-count { font-size: 14px; align-self: center; margin-left: auto; }
.corr-filed { border-left: 3px solid var(--border, #ccc); padding-left: 10px; }
@media (max-width: 600px) { .corr-f { flex: 1 1 calc(50% - 10px); } .corr-fq { flex-basis: 100%; } .corr-filters select.input { min-width: 0; width: 100%; } }
