/* etf.css — the ETFs tab (2026-11-03, lane etf-C), for web/etf.js. Tokens only: every colour is a var() from styles.css, the
   checked inks of readable.css / skins.css (--ink-2, --accent-ink, --bull-ink, --bear-ink, --amber-ink, --on-accent, each with a
   styles.css fallback), --cvc-orange / --cvc-violet (company_charts.js) and --seg-* (styles.css), or a color-mix() over them —
   so the tab reads in light, dark and all 18 skins. Nothing is dimmed with opacity. Text never sits on a wash deeper than 31 %;
   inline bars are 18 % washes behind the number, so a signed figure keeps its red / green ink. Reference lines are
   --cvc-orange, never --muted. Every class is etf- (plus the app's shared .num .muted .bull .bear .placeholder .bf-*).
   Layout: the chrome (page bar + at most two filter lines) is sticky inside #table-wrap; wide tables scroll inside their own
   .etf-twrap box, which carries the sticky header and the sticky ticker column; the column menu hangs outside that box. */

.etf-tab {
  --etf-ink2: var(--ink-2, var(--muted));          /* secondary text on a tinted surface (header band, chip, wash) */
  --etf-acc: var(--accent-ink, var(--accent));      /* accent as TEXT */
  --etf-up: var(--bull-ink, var(--bull));
  --etf-dn: var(--bear-ink, var(--bear));
  --etf-amb: var(--amber-ink, var(--amber));
  --etf-ref: var(--cvc-orange, var(--amber));       /* reference lines: SPY, 0 %, the quadrant axes */
  --etf-vio: var(--cvc-violet, var(--seg-val));
  --etf-onacc: var(--on-accent, var(--panel));      /* text on an accent fill */
  padding: 0 14px 22px; font-size: 13px; color: var(--text);
}
.etf-tab .muted { color: var(--muted); }
.etf-tab .bull { color: var(--etf-up); }
.etf-tab .bear { color: var(--etf-dn); }
.etf-body { min-width: 0; }
.etf-na { color: var(--muted); cursor: help; }
.etf-nm { font-weight: 500; }
.etf-v { white-space: nowrap; font-variant-numeric: tabular-nums; }
.etf-v small { font-size: .8em; font-weight: 500; margin-left: 1px; }
.etf-fl { color: var(--etf-acc); font-weight: 700; text-decoration: none; white-space: nowrap; }
.etf-fl:hover, .etf-olink:hover, .etf-hn:hover { text-decoration: underline; }
.etf-olink { color: var(--etf-acc); font-weight: 600; text-decoration: none; white-space: nowrap; }
.etf-pxm { font-size: 10px; font-weight: 600; color: var(--etf-amb); }

/* ─── chrome: page bar + line 1 (+ line 2 on the Screener), sticky inside #table-wrap ─── */
.etf-chrome {
  position: sticky; top: 0; z-index: 6;
  margin: 0 -14px 12px; padding: 6px 14px 7px;
  background: var(--panel); border-bottom: 1px solid var(--border);
}
.etf-pbar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; }
.etf-pages { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; min-width: 0; }
.etf-page {
  font: inherit; font-size: 13px; font-weight: 650; line-height: 1.5; padding: 3px 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted);
}
.etf-page b { font-weight: 500; margin-left: 2px; font-variant-numeric: tabular-nums; }
.etf-page:hover { color: var(--text); background: var(--hover); border-color: var(--border); }
.etf-page.active { background-color: var(--accent); background-image: var(--accent-grad, none); border-color: var(--accent); color: var(--etf-onacc); }
.etf-crumb { margin-left: 4px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.etf-crumb b { color: var(--text); font-weight: 750; }
.etf-fresh { margin-left: auto; font-size: 11.5px; color: var(--muted); white-space: nowrap; cursor: help; }
.etf-fresh b { color: var(--text); font-weight: 600; }
.etf-bchip { margin-left: 4px; padding: 0 6px; border-radius: 5px; font-size: 10.5px; font-weight: 650; color: var(--etf-amb); background: var(--amber-bg); }
.etf-info {
  font: inherit; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: var(--panel); color: var(--text);
}
.etf-info:hover, .etf-info.active { border-color: var(--accent); }
.etf-info.active { background: var(--accent-soft); }
.etf-ctl, .etf-l2 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-top: 6px; }
/* segmented controls: one click, never a confirm */
.etf-seg { display: inline-flex; flex: none; flex-wrap: nowrap; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; max-width: 100%; vertical-align: middle; }
.etf-sg {
  font: inherit; font-size: 12px; line-height: 1.45; padding: 3px 9px; cursor: pointer; white-space: nowrap;
  border: 0; border-right: 1px solid var(--border); background: var(--panel); color: var(--text);
}
.etf-sg:last-child { border-right: 0; }
.etf-sg:hover { background: var(--hover); }
.etf-sg.on { background-color: var(--accent); background-image: var(--accent-grad, none); color: var(--etf-onacc); }
/* markets (2026-11-06): the chips lead line 1; the Market column is flag + short name */
.etf-mks { margin-right: 4px; }
.etf-mks .etf-sg { padding: 3px 7px; }
.etf-mkc { white-space: nowrap; }
.etf-qbox, .etf-hbox { position: relative; display: inline-flex; align-items: center; }
.etf-qbox { flex: 1 1 150px; min-width: 150px; max-width: 270px; }   /* it gives way first, so line 1 stays one line at 1280 px */
.etf-hbox { width: min(440px, 100%); margin: 0 0 10px; }
.etf-qi { position: absolute; left: 9px; top: 50%; transform: translateY(-52%); font-size: 13px; color: var(--muted); pointer-events: none; }
.etf-in {
  font: inherit; font-size: 12.5px; line-height: 1.4; padding: 2px 7px; min-width: 0; max-width: 100%;
  border: 1px solid var(--border); border-radius: 6px; background: var(--panel); color: var(--text);
}
.etf-in::placeholder { color: var(--muted); }
.etf-q, .etf-hq, .etf-cq { width: 100%; padding: 3px 10px 3px 26px; border-radius: 7px; }
.etf-hq { font-size: 13px; padding-top: 5px; padding-bottom: 5px; }

/* ─── chips, buttons, focus ─── */
.etf-chip {
  display: inline-block; font: inherit; font-size: 12px; line-height: 1.45; padding: 2px 9px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border); background: var(--panel); color: var(--text); text-decoration: none;
}
.etf-chip:hover { border-color: var(--accent); }
.etf-chip.active { background-color: var(--accent); background-image: var(--accent-grad, none); border-color: var(--accent); color: var(--etf-onacc); }
.etf-chip small { font-size: 10.5px; color: var(--muted); margin-left: 2px; }
.etf-chip.active small { color: var(--etf-onacc); }
.etf-reset { border-style: dashed; color: var(--muted); }
.etf-reset:hover { color: var(--text); }
.etf-tv { color: var(--etf-acc); }
.etf-x {
  font: inherit; font-size: 11px; line-height: 1; padding: 2px 4px; margin-left: 4px; cursor: pointer; vertical-align: 1px;
  border: 1px solid transparent; border-radius: 4px; background: none; color: var(--muted);
}
.etf-x:hover { border-color: var(--border); color: var(--text); }
.etf-co {
  font: inherit; font-weight: 700; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--etf-acc); text-decoration: underline dotted; text-underline-offset: 3px;
}
.etf-co:hover { text-decoration-style: solid; }
.etf-hk { font-weight: 700; }
.etf-hn { color: var(--text); text-decoration: none; }
.etf-tab :is(.etf-page, .etf-sg, .etf-chip, .etf-info, .etf-thb, .etf-x, .etf-co, .etf-pill, .etf-howb, .etf-cm-x, .etf-dr-x, .etf-fl, .etf-hn, .etf-olink):focus-visible,
.etf-tab .etf-in:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* ─── badges after a ticker: leverage, ETN, new, closure risk, data check (and on the fund page: active, options income…) ─── */
.etf-b {
  display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; vertical-align: 1px; cursor: help; white-space: nowrap;
  font-size: 10px; font-weight: 650; line-height: 15px; color: var(--grey-chip); background: var(--grey-chip-bg);
}
.etf-b-lev, .etf-b-dq { color: var(--etf-amb); background: var(--amber-bg); }
.etf-b-inv { color: var(--etf-dn); background: var(--bear-bg); }
.etf-b-cls { color: var(--etf-dn); background: var(--panel); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bear) 55%, transparent); }
.etf-b-etn { color: var(--etf-ink2); background: var(--panel); box-shadow: inset 0 0 0 1px var(--border); }
.etf-b-new { color: var(--blue-chip); background: var(--blue-chip-bg); }
.etf-b-act { color: var(--grey-chip); background: var(--grey-chip-bg); }
.etf-b-oi { color: var(--text); background: var(--accent-soft); }
.etf-b-xl { color: var(--etf-acc); background: var(--panel); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }

/* ─── verdict, sections, one-line notes ─── */
.etf-verdict .bf-verdict { margin-bottom: 12px; padding: 9px 14px; }
.etf-verdict .bf-vh { font-size: 14px; font-weight: 600; }
.etf-verdict .bf-vh b { font-weight: 750; }
/* a signed figure on the verdict's tinted band: the checked ink pulled 28 % toward the text (readable.css's .bf-mx-c recipe) */
.etf-verdict .bf-vh .bull { color: color-mix(in srgb, var(--etf-up) 72%, var(--text)); }
.etf-verdict .bf-vh .bear { color: color-mix(in srgb, var(--etf-dn) 72%, var(--text)); }
.etf-verdict .bf-vs { color: var(--etf-ink2); }
.etf-sec { position: relative; margin: 0 0 22px; min-width: 0; scroll-margin-top: 112px; }   /* clear of the sticky chrome */
.etf-sh { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin: 0 0 6px; }
.etf-h { margin: 0; font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.etf-leg { font-size: 12px; color: var(--muted); }
.etf-leg b { color: var(--text); font-weight: 650; }
.etf-leg .etf-chip { font-size: 11px; padding: 0 8px; margin-left: 4px; }
.etf-leg .etf-seg { margin-right: 2px; }
.etf-crs { margin-left: 0; }   /* the chart range (1Y · 5Y · Max), at the head of a chart legend */
.etf-leg .etf-sg { font-size: 11.5px; padding: 1px 8px; }
.etf-howb {
  margin-left: auto; font: inherit; font-size: 11.5px; font-weight: 600; padding: 0 3px; cursor: pointer; white-space: nowrap;
  color: var(--etf-acc); background: none; border: 0;
}
.etf-howb:hover { text-decoration: underline; }
.etf-how {
  max-width: 1100px; margin: 0 0 8px; padding: 6px 11px; border-radius: 6px; font-size: 12px; line-height: 1.55;
  background: var(--thead); border: 1px solid var(--border); color: var(--text);
}
.etf-one {
  margin: 0 0 10px; padding: 8px 12px; border-radius: 6px; font-size: 12.5px; line-height: 1.55;
  background: var(--panel); border: 1px solid var(--border); color: var(--text);
}
.etf-one .etf-picks { margin: 6px 0 0; }
.etf-gap { border-style: dashed; color: var(--etf-ink2); }
.etf-gap b { color: var(--text); }
.etf-wait { border-style: dashed; color: var(--muted); font-style: italic; }
.etf-hsum { border: 0; border-left: 3px solid var(--accent); border-radius: 0; padding: 2px 10px; }
.etf-cnote { margin-top: 4px; font-size: 11.5px; }
.etf-key { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; white-space: nowrap; color: var(--text); }
.etf-key i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.etf-key i.etf-k-sec { background: var(--accent); }
.etf-key i.etf-k-th { background: var(--etf-vio); }
.etf-key i.etf-k-ref { width: 16px; height: 0; border-radius: 0; border-top: 2px dashed var(--etf-ref); }

/* ─── the dense table ─── */
.etf-tblock { position: relative; min-width: 0; }
/* count · active-filter pills · hint — ONE line; it scrolls sideways rather than wrap */
.etf-tbar {
  display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin: 0 0 5px; min-height: 24px; font-size: 12px;
  overflow-x: auto; scrollbar-width: thin; white-space: nowrap;
}
.etf-tn { flex: none; color: var(--muted); margin-right: 2px; cursor: help; }
.etf-tn b { color: var(--text); font-variant-numeric: tabular-nums; }
.etf-pill {
  flex: none; font: inherit; font-size: 11.5px; line-height: 1.45; padding: 1px 8px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--accent); background: var(--accent-soft); color: var(--text);
}
.etf-pill i { font-style: normal; font-weight: 700; margin-left: 2px; }
.etf-pill:hover { background: var(--hover); }
.etf-pill-x { border-style: dashed; background: var(--panel); color: var(--muted); }
.etf-tbhint { flex: none; font-size: 11.5px; color: var(--muted); margin-left: 4px; }
.etf-twrap {
  overflow: auto; max-height: min(640px, calc(100vh - 230px)); min-height: 0;
  border: 1px solid var(--border); border-radius: 7px; -webkit-overflow-scrolling: touch;
}
.etf-p-screener .etf-twrap { max-height: max(320px, calc(100vh - 250px)); }
.etf-dt { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.etf-dt thead th {
  position: sticky; top: 0; z-index: 2; padding: 4px 7px; text-align: left; white-space: nowrap; vertical-align: bottom;
  font-size: 12px; font-weight: 650; color: var(--text); background: var(--thead); border-bottom: 1px solid var(--border);
}
.etf-dt th small, .etf-heat th small { font-size: 10.5px; font-weight: 500; color: var(--etf-ink2); }
.etf-dt td {
  height: 28px; padding: 2px 7px; line-height: 1.3; white-space: nowrap; vertical-align: middle;
  background: var(--panel); border-bottom: 1px solid var(--row-border);
}
.etf-dt tbody th {
  padding: 2px 8px; height: 28px; text-align: left; white-space: nowrap; font-size: 12px; font-weight: 600;
  background: var(--panel); border-bottom: 1px solid var(--row-border);
}
.etf-dt tbody tr:hover > td:not(.etf-hc), .etf-dt tbody tr:hover > th { background: var(--hover); }
.etf-dt .num { text-align: right; font-variant-numeric: tabular-nums; }
.etf-dt tbody tr:last-child > td, .etf-dt tbody tr:last-child > th { border-bottom: 0; }
/* the identity column (ticker) stays put while the matrix scrolls sideways */
.etf-dt .etf-idc { position: sticky; left: 0; z-index: 1; max-width: 230px; overflow: hidden; text-overflow: ellipsis; box-shadow: inset -1px 0 0 var(--border); }
.etf-dt thead th.etf-idc { z-index: 3; }
/* column blocks (Screener, 2026-11-06, as on Markets): a label row over the header and a 2px coloured rule on the first cell
   of every block, header and body. Colours are Markets' --seg-* tokens (styles.css; each skin and readable.css retune them),
   so both tabs read as one system. Rules only, never fills — the cells already carry bars and red / green ink. The label row
   is a fixed 19px so the column-name row can stick right under it (top: 18px — a 1px overlap, never a gap). */
.etf-dt thead tr.etf-segr th.etf-segl {
  height: 19px; box-sizing: border-box; padding: 4px 7px 2px; line-height: 13px; border-bottom: 0;
  font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--seg-c, var(--muted));
}
.etf-dt.etf-segd thead tr + tr th { top: 18px; }
.etf-dt th[data-segs], .etf-dt td[data-segs] { border-left: 2px solid var(--seg-c, var(--border)); }
.etf-dt td.etf-nmc { max-width: 250px; overflow: hidden; text-overflow: ellipsis; }
.etf-dt td.etf-grc { max-width: 170px; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.etf-dt td.etf-none { height: auto; padding: 14px; text-align: center; white-space: normal; color: var(--muted); }
/* group headings inside a table (Themes: asset class · Leveraged: what it multiplies · Compare / Risk: the row groups) */
.etf-dt tr.etf-grp th {
  position: static; height: auto; padding: 6px 8px 4px; text-align: left; white-space: normal;
  font-size: 12px; font-weight: 700; color: var(--text); background: var(--thead); border-bottom: 1px solid var(--border);
}
.etf-dt tbody tr.etf-grp:hover > th { background: var(--thead); }
.etf-grp .muted { font-weight: 500; color: var(--etf-ink2); }
.etf-gh { font-size: 12.5px; font-weight: 750; }
.etf-ghn { font-weight: 600; }
.etf-ghm { font-size: 11.5px; font-weight: 500; color: var(--etf-ink2); }
.etf-ghm .etf-v { font-weight: 650; }
/* rows: a click marks ✓ (shared shortlist); Themes / most-held rows open another view */
.etf-dt tr[data-etf-row], .etf-dt tr[data-etf-go], .etf-dt tr[data-etf-set] { cursor: pointer; }
.etf-dt tr[data-etf-go]:focus-visible > td, .etf-dt tr[data-etf-set]:focus-visible > td { box-shadow: inset 0 2px 0 var(--accent), inset 0 -2px 0 var(--accent); }
.etf-dt tr.etf-mk > td { box-shadow: inset 0 0 0 9999px var(--sel-wash); }
.etf-dt tr.etf-mk > td.etf-idc { box-shadow: inset 4px 0 0 var(--sel-bar), inset -1px 0 0 var(--border), inset 0 0 0 9999px var(--sel-block); }
.etf-dt tr.etf-mk .etf-fl { font-weight: 800; color: color-mix(in srgb, var(--etf-acc) 60%, var(--text)); }
/* Themes: segment rows lead, theme rows sit indented beneath */
.etf-dt tr.etf-r-seg > td { border-top: 1px solid var(--border); }
.etf-tl { display: inline-block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.etf-tl1 { font-weight: 700; }
.etf-tl2 { padding-left: 10px; font-weight: 500; }
.etf-tl2 i { font-style: normal; color: var(--muted); }
.etf-dt .etf-r-th > td.etf-idc { max-width: 300px; }
/* column header: the NAME opens sort + filter; ▾ is a bordered accent button, ▲ / ▼ marks the sorted column */
.etf-thb {
  display: inline-flex; align-items: center; gap: 3px; font: inherit; font-size: 12px; font-weight: 650; padding: 0; cursor: pointer; white-space: nowrap;
  color: var(--text); background: none; border: 0;
}
.etf-thb:hover { color: var(--etf-acc); }
.etf-car, .etf-ar {
  display: inline-block; min-width: 11px; padding: 0 2px; font-style: normal; font-size: 9.5px; font-weight: 700; line-height: 13px; text-align: center;
  border: 1px solid var(--border); border-radius: 4px; color: var(--etf-acc); background: var(--panel);
}
.etf-ar { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.etf-thb:hover .etf-car, .etf-thb.open .etf-car { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.etf-thb.on .etf-car, .etf-thb.on .etf-ar { border-color: var(--accent); background-color: var(--accent); background-image: var(--accent-grad, none); color: var(--etf-onacc); }
.etf-fdot { font-style: normal; font-size: 8px; line-height: 1; color: var(--etf-acc); }
.etf-dt thead th.sorted, .etf-heat thead th.sorted { box-shadow: inset 0 -2px 0 var(--accent); }
.etf-dt thead th.etf-idc.sorted { box-shadow: inset 0 -2px 0 var(--accent), inset -1px 0 0 var(--border); }
.etf-more { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; }
/* inline bars: an 18 % wash behind the number — signed bars grow from the cell's middle, sized bars from its left edge */
.etf-tab td.etf-bc { position: relative; }
.etf-bc > * { position: relative; }
.etf-bc > .etf-db { position: absolute; top: 5px; bottom: 5px; border-radius: 2px; pointer-events: none; }
.etf-db-u { left: 3%; background: color-mix(in srgb, var(--accent) 16%, transparent); }
.etf-db-p { left: 50%; background: color-mix(in srgb, var(--bull) 18%, transparent); box-shadow: inset 1px 0 0 color-mix(in srgb, var(--bull) 60%, transparent); }
.etf-db-n { right: 50%; background: color-mix(in srgb, var(--bear) 18%, transparent); box-shadow: inset -1px 0 0 color-mix(in srgb, var(--bear) 60%, transparent); }
.etf-dt td.etf-best .etf-v { font-weight: 800; }

/* ─── the column menu: hangs under its header, outside the table's scroll box (placed by etf.js) ─── */
.etf-cmenu {
  position: absolute; z-index: 5; top: 58px; left: 0; width: 310px; max-width: calc(100vw - 40px); max-height: 400px; overflow: auto;
  padding: 7px 10px 9px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); color: var(--text);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--text) 18%, transparent); font-size: 12px; white-space: normal;
}
.etf-cm-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 3px; font-size: 13px; }
.etf-cm-x { font: inherit; font-size: 13px; line-height: 1; padding: 2px 5px; border: 1px solid transparent; border-radius: 5px; background: none; color: var(--muted); cursor: pointer; }
.etf-cm-x:hover { border-color: var(--border); color: var(--text); }
.etf-cm-def { margin-bottom: 5px; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.etf-cm-row { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 5px 0; }
.etf-cm-pre .etf-chip { font-size: 11.5px; }
.etf-cm-in { width: 84px; }
.etf-cm-in.etf-cm-d { width: 108px; }
.etf-cm-go { font-weight: 700; }
.etf-cm-find { width: 100%; margin: 3px 0 4px; }
.etf-cm-hint { font-size: 11px; }
.etf-cm-err { font-size: 11.5px; font-weight: 650; color: var(--etf-dn); }
.etf-cm-opts { display: flex; flex-direction: column; gap: 1px; }
/* tick-box rows, the Cockpit's column-filter look: box · value · count on the right */
.etf-cm-o { display: flex; align-items: center; gap: 7px; padding: 3px 5px; border-radius: 4px; font-size: 12.5px; white-space: nowrap; cursor: pointer; color: var(--text); }
.etf-cm-o:hover { background: var(--thead); }
.etf-cm-o input { flex: none; width: 14px; height: 14px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.etf-cm-o input:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.etf-cm-o span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.etf-cm-o.on span { font-weight: 650; }
.etf-cm-o b { margin-left: auto; padding-left: 12px; font-weight: 500; color: var(--etf-ink2); font-variant-numeric: tabular-nums; }
.etf-cm-o.etf-cm-o0 span { color: var(--muted); }
.etf-cm-more { margin-top: 3px; font-size: 11px; }
.etf-cm-sub { margin: 8px 0 0; padding-top: 6px; border-top: 1px solid var(--border); font-size: 11px; color: var(--muted); }

/* ─── Summary: six numbers ─── */
.etf-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; margin: 0 0 18px; }
.etf-tile { display: flex; flex-direction: column; gap: 1px; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: help; }
.etf-tile > i { font-style: normal; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etf-tile > b { font-size: 18px; font-weight: 750; line-height: 1.3; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.etf-tile > b small { font-size: 11px; font-weight: 500; color: var(--muted); }
.etf-tile > small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ─── Summary: heat map (segment / theme × window, signed washes) ─── */
.etf-twrap.etf-heatw { max-width: 1000px; max-height: none; }   /* grows with the page — no scroll trap on Summary */
.etf-heat { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.etf-heat thead th {
  position: sticky; top: 0; z-index: 2; padding: 4px 8px; white-space: nowrap; font-weight: 650;
  color: var(--text); background: var(--thead); border-bottom: 1px solid var(--border);
}
.etf-heat thead th.num { text-align: right; }
.etf-heat th.etf-hl {
  position: sticky; left: 0; z-index: 1; max-width: 300px; padding: 2px 10px 2px 8px; text-align: left; white-space: nowrap;
  font-weight: 600; background: var(--panel); border-bottom: 1px solid var(--row-border); box-shadow: inset -1px 0 0 var(--border);
}
.etf-heat thead th.etf-hl { z-index: 3; background: var(--thead); border-bottom: 1px solid var(--border); }
.etf-hlt { display: inline-block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.etf-heat tbody th.etf-hl small { color: var(--muted); }
.etf-heat td {
  height: 26px; min-width: 60px; padding: 2px 8px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums;
  background: var(--panel); border-bottom: 1px solid var(--row-border); border-left: 1px solid var(--row-border);
}
.etf-hc[data-etf-go] { cursor: pointer; }
.etf-hc[data-etf-go]:hover, .etf-hc[data-etf-go]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
/* the signed washes: green above zero, red below, four steps within the column; the accent wash (Compare overlap) likewise */
.etf-tab .etf-p1 { background: color-mix(in srgb, var(--bull) 9%, var(--panel)); }
.etf-tab .etf-p2 { background: color-mix(in srgb, var(--bull) 16%, var(--panel)); }
.etf-tab .etf-p3 { background: color-mix(in srgb, var(--bull) 23%, var(--panel)); }
.etf-tab .etf-p4 { background: color-mix(in srgb, var(--bull) 31%, var(--panel)); }
.etf-tab .etf-n1 { background: color-mix(in srgb, var(--bear) 9%, var(--panel)); }
.etf-tab .etf-n2 { background: color-mix(in srgb, var(--bear) 16%, var(--panel)); }
.etf-tab .etf-n3 { background: color-mix(in srgb, var(--bear) 23%, var(--panel)); }
.etf-tab .etf-n4 { background: color-mix(in srgb, var(--bear) 31%, var(--panel)); }
.etf-tab .etf-a1 { background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.etf-tab .etf-a2 { background: color-mix(in srgb, var(--accent) 15%, var(--panel)); }
.etf-tab .etf-a3 { background: color-mix(in srgb, var(--accent) 23%, var(--panel)); }
.etf-tab .etf-a4 { background: color-mix(in srgb, var(--accent) 31%, var(--panel)); }

/* ─── Summary: rotation quadrant (RS vs SPY, 3M across × 1M up; the axes are the orange reference lines) ─── */
.etf-quadw { max-width: 660px; }
.etf-quad { display: block; width: 100%; height: auto; overflow: visible; }
.etf-qframe { fill: none; stroke: var(--border); stroke-width: 1; }
.etf-qlab { font-size: 12px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; fill: var(--muted); }
.etf-qa { cursor: pointer; }
.etf-qp { stroke: var(--panel); stroke-width: 1.5; }
.etf-qp-sec { fill: var(--accent); }
.etf-qp-th { fill: var(--etf-vio); }
.etf-qa:hover .etf-qp, .etf-qa:focus-visible .etf-qp { stroke: var(--text); stroke-width: 2; }
.etf-qa:focus-visible { outline: none; }
.etf-ql { font-size: 10.5px; font-weight: 650; fill: var(--text); paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round; }
.etf-qa:hover .etf-ql { fill: var(--etf-acc); }

/* ─── charts: total return rebased to 100 (log), drawdown band; six series slots — never red / green / the reference orange ─── */
.etf-chart { display: block; width: 100%; max-width: 980px; height: auto; overflow: visible; }
.etf-grid { stroke: var(--border); stroke-width: 1; }
.etf-gx { stroke-dasharray: 2 3; }
.etf-ref { stroke: var(--etf-ref); stroke-width: 1.3; stroke-dasharray: 5 3; }
.etf-ax { font-size: 11px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.etf-ax-dd { fill: var(--etf-dn); font-weight: 650; }
.etf-s0 { --sc: var(--accent); }
.etf-st0 { --sc: var(--etf-acc); }
.etf-s1, .etf-st1 { --sc: var(--etf-vio); }
.etf-s2, .etf-st2 { --sc: var(--seg-brd, var(--blue-chip)); }
.etf-s3, .etf-st3 { --sc: var(--text); }
.etf-s4, .etf-st4 { --sc: var(--seg-eco, var(--grey-chip)); }
.etf-s5, .etf-st5 { --sc: var(--seg-mkt, var(--grey-chip)); }
.etf-ln { fill: none; stroke: var(--sc, var(--accent)); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.etf-ln.etf-ln-ref { stroke: var(--etf-ref); stroke-width: 1.5; stroke-dasharray: 5 3; }
.etf-endl {
  font-size: 11.5px; font-weight: 700; fill: var(--sc, var(--text)); font-variant-numeric: tabular-nums;
  paint-order: stroke; stroke: var(--panel); stroke-width: 3px; stroke-linejoin: round;
}
.etf-endl.etf-endl-ref { fill: color-mix(in srgb, var(--etf-ref) 60%, var(--text)); }
.etf-dd { fill: color-mix(in srgb, var(--bear) 16%, transparent); stroke: color-mix(in srgb, var(--bear) 55%, transparent); stroke-width: 1; }
/* a fund's colour on Compare's column heads: a band on top (on a row head: on the left) — the text keeps the base ink */
.etf-dt thead th:is(.etf-st0, .etf-st1, .etf-st2, .etf-st3, .etf-st4, .etf-st5) { box-shadow: inset 0 3px 0 var(--sc); }
.etf-dt tbody th:is(.etf-st0, .etf-st1, .etf-st2, .etf-st3, .etf-st4, .etf-st5) { box-shadow: inset 3px 0 0 var(--sc); }

/* ─── Summary: flows (the 10 biggest in and out, $ on the bars) · the fund page's four windows ─── */
.etf-fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 26px; max-width: 1200px; }
.etf-fcol { min-width: 0; }
.etf-fcol > .etf-fh { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.etf-fr { display: grid; align-items: center; gap: 8px; min-height: 22px; padding: 1px 0; font-size: 12px; }
.etf-fcol .etf-fr { grid-template-columns: 54px minmax(0, 1fr) minmax(90px, 38%) 56px; }
.etf-fl2 { display: grid; gap: 2px; max-width: 640px; }
.etf-fl2 .etf-fr { grid-template-columns: 104px minmax(0, 1fr) 60px; }
.etf-fr > small { font-size: 11px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.etf-fr-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etf-frl { color: var(--muted); white-space: nowrap; }
.etf-hb { position: relative; display: block; height: 16px; min-width: 0; border-radius: 3px; background: var(--grey-chip-bg); overflow: hidden; }
.etf-hb > i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; }
.etf-hb > i.pos { background: color-mix(in srgb, var(--bull) 36%, var(--panel)); }
.etf-hb > i.neg { background: color-mix(in srgb, var(--bear) 36%, var(--panel)); }
.etf-hb > em { position: relative; padding: 0 6px; font-style: normal; font-size: 11px; font-weight: 650; line-height: 16px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ─── weight bars (top 10, sectors, overlap, exposures): the % printed on the bar ─── */
.etf-wb {
  position: relative; display: inline-block; width: 112px; height: 16px; vertical-align: middle; text-align: right;
  border-radius: 3px; background: var(--grey-chip-bg); overflow: hidden;
}
.etf-wb > i { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 34%, var(--panel)); }
.etf-wb > em { position: relative; padding: 0 5px; font-style: normal; font-size: 11px; font-weight: 650; line-height: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.etf-dt td.etf-wc { width: 124px; }
.etf-dt.etf-top td.etf-nmc { max-width: 330px; }

/* ─── Holders ─── */
.etf-picks { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 0 0 10px; font-size: 12px; }
.etf-hhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin: 2px 0 6px; }
.etf-hname { font-size: 16px; font-weight: 750; }

/* ─── Compare ─── */
.etf-cmpbar { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.etf-cmpbar > .etf-qi { top: 14px; }
.etf-cq { width: 210px; max-width: 100%; }
.etf-cmp th.etf-cmf { min-width: 130px; white-space: normal; }
.etf-cmn { max-width: 200px; margin-top: 2px; font-size: 11px; font-weight: 500; line-height: 1.3; white-space: normal; color: var(--etf-ink2); }
.etf-dt th.etf-cmk { min-width: 120px; }
.etf-cmp th.etf-cmk { position: sticky; left: 0; z-index: 1; box-shadow: inset -1px 0 0 var(--border); }
.etf-cmp thead th.etf-cmk { z-index: 3; }
.etf-dt.etf-ovl, .etf-dt.etf-sec2, .etf-dt.etf-shr { width: auto; min-width: min(100%, 520px); }
.etf-ovl td { min-width: 76px; }
.etf-dt td.etf-hc { color: var(--text); }

/* ─── the fund page ─── */
.etf-body > .etf-fh { margin: 0 0 16px; }
.etf-fht { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.etf-fsym { font-size: 22px; font-weight: 800; letter-spacing: .01em; }
.etf-fht .etf-b { font-size: 11px; line-height: 17px; padding: 0 6px; margin-left: 0; vertical-align: 3px; }
.etf-fname { font-size: 15px; font-weight: 600; }
.etf-fsub { margin-top: 2px; font-size: 12px; }
.etf-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 8px 0 6px; }
.etf-desc { max-width: 1040px; margin: 4px 0 6px; font-size: 12.5px; line-height: 1.6; }
.etf-dq { margin: 4px 0 0; font-size: 12px; }
.etf-dq .etf-howb { margin-left: 2px; }
.etf-dqd { color: var(--text); line-height: 1.5; }
.etf-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 0 20px; border-top: 1px solid var(--row-border); }
.etf-fact { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 5px 0; font-size: 12.5px; border-bottom: 1px solid var(--row-border); cursor: help; }
.etf-fact > i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.etf-fact > b { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.etf-fact small { font-size: 11.5px; font-weight: 400; color: var(--muted); }
.etf-fact a { color: var(--etf-acc); text-decoration: none; }
.etf-fact a:hover { text-decoration: underline; }
.etf-dt.etf-perf td, .etf-dt.etf-risk td, .etf-dt.etf-levt td { min-width: 78px; }
.etf-expo { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; }
.etf-fh3 { margin: 0 0 4px; font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.etf-wl { display: grid; gap: 3px; }
.etf-wr { display: grid; grid-template-columns: minmax(0, 1fr) 112px; align-items: center; gap: 8px; font-size: 12px; }
.etf-wn { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: help; }
/* wide screens: the fund page in two columns — performance beside the chart, holdings beside the mix, flows beside risk */
@media (min-width: 1280px) {
  .etf-p-fund .etf-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 24px; align-items: start; }
  .etf-p-fund .etf-body > * { grid-column: 1 / -1; min-width: 0; }
  .etf-p-fund .etf-body > :is(#etf-perf, #etf-chart, #etf-top, #etf-expo, #etf-flow, #etf-risk) { grid-column: auto; }
}

/* ─── ⓘ Guide: a slide-over drawer, Esc / ✕ closes; the backdrop only catches the click, it dims nothing ─── */
.etf-dr-bg { position: fixed; inset: 0; z-index: 40; background: transparent; }
.etf-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; display: flex; flex-direction: column; width: min(580px, 94vw);
  background: var(--panel); color: var(--text); border-left: 1px solid var(--border); box-shadow: -10px 0 28px color-mix(in srgb, var(--text) 16%, transparent);
}
.etf-dr-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; font-size: 14px; background: var(--thead); border-bottom: 1px solid var(--border); }
.etf-dr-x { font: inherit; font-size: 15px; line-height: 1; padding: 3px 7px; border-radius: 6px; border: 1px solid var(--border); background: var(--panel); color: var(--text); cursor: pointer; }
.etf-dr-x:hover { border-color: var(--accent); }
.etf-dr-b { overflow-y: auto; padding: 6px 16px 26px; font-size: 12.5px; line-height: 1.55; }
.etf-dr-b > h4 { margin: 18px 0 6px; font-size: 12px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.etf-dr-b > p { margin: 6px 0; }
.etf-dr-s { padding: 7px 0 5px; border-bottom: 1px solid var(--row-border); }
.etf-dr-s > b { display: block; margin-bottom: 1px; font-size: 13px; font-weight: 750; }
.etf-dr-s > p { margin: 0; }
.etf-dr-g { margin: 0 0 10px; }
.etf-dr-g > b { display: block; margin: 8px 0 3px; font-size: 12px; font-weight: 750; color: var(--etf-acc); }
.etf-dr-g dl { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 3px 12px; margin: 0; }
.etf-dr-g dt { font-weight: 650; }
.etf-dr-g dd { margin: 0; }

/* ─── laptop / split pane ─── */
@media (max-width: 1280px) {
  .etf-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* with the market chips line 1 is ~1,150 px: below that it scrolls sideways rather than wrap into a third line */
  .etf-ctl { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
}
/* narrower: each filter line stays ONE line and scrolls sideways */
@media (max-width: 1100px) {
  .etf-ctl, .etf-l2 { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; padding-bottom: 2px; }
  .etf-qbox { flex: 0 0 230px; }
  .etf-fgrid { grid-template-columns: minmax(0, 1fr); }
  .etf-expo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ─── phone ─── */
@media (max-width: 600px) {
  .etf-tab { padding: 0 10px 16px; }
  .etf-chrome { position: static; margin: 0 -10px 10px; padding: 5px 10px 6px; }   /* three lines are too tall to pin on a phone */
  .etf-sec { scroll-margin-top: 8px; }
  .etf-pages { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .etf-pages::-webkit-scrollbar { display: none; }
  .etf-page { padding: 3px 9px; font-size: 12.5px; }
  .etf-fresh { display: none; }
  .etf-qbox { flex: 0 0 200px; }
  .etf-mks { max-width: none; }   /* the whole line scrolls sideways; the chips never clip */
  .etf-mks .etf-sg { padding: 3px 6px; }
  .etf-q, .etf-hq, .etf-cq { font-size: 16px; }
  .etf-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .etf-tile > b { font-size: 16px; }
  .etf-dt .etf-idc { max-width: 132px; }
  .etf-dt td.etf-nmc { max-width: 150px; }
  .etf-fcol .etf-fr { grid-template-columns: 48px minmax(0, 1fr) 96px 48px; gap: 6px; }
  .etf-expo { grid-template-columns: minmax(0, 1fr); }
  .etf-fact { grid-template-columns: 96px minmax(0, 1fr); }
  .etf-fsym { font-size: 19px; }
  .etf-howb { margin-left: 0; }
  .etf-drawer { width: 100vw; }
  .etf-dr-g dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .etf-dr-g dd { margin-bottom: 6px; }
  /* the SVG charts keep a legible size and scroll inside their section */
  #etf-chart, #etf-cmpc, .etf-quadw { overflow-x: auto; }
  .etf-chart { min-width: 560px; }
  .etf-quad { min-width: 460px; }
}
