/* The scroller spans the window (its scrollbar at the window's edge, not the content's); the content keeps
   to the window's width inside one even side margin (--gutter), every section alike */
.report-page { --gutter: clamp(14px, 3vw, 46px); flex: 1; min-height: 0; overflow: auto; overflow-x: hidden; width: 100%; padding: 22px var(--gutter) 42px; }
.report-intro { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
/* The title band in the theme's own colour, edge to edge (not the photo through it); the site's header and the
   section bar float over the page with a shadow under them, the report scrolling beneath */
.report-page > .report-intro { margin: -22px calc(-1 * var(--gutter)) 0; padding: 22px var(--gutter) 16px; background: var(--bg-solid, var(--bg)); }
body > header.bar { position: relative; z-index: 6; box-shadow: 0 6px 18px rgba(0, 0, 0, .38); }
.report-intro h1 { margin: 1px 0 4px; font-size: clamp(29px, 3.45vw, 44px); line-height: 1.1; letter-spacing: -.035em; }
.report-intro p { margin: 0; max-width: 760px; color: var(--muted); }
.eyebrow { color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
/* The date and the scope: a past day's report (?asof=) or today's, the top N */
.report-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.asof-ctl { display: flex; align-items: center; gap: 3px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.asof-ctl button { border: 0; border-radius: 6px; background: none; color: var(--muted); padding: 7px 10px; min-width: 34px; font: inherit; font-weight: 600; cursor: pointer; }
.asof-ctl button:hover:not(:disabled) { color: var(--text); }
.asof-ctl button:disabled { opacity: .35; cursor: default; }
.asof-ctl input { height: 32px; min-width: 0; padding: 0 8px; font: inherit; font-size: 14px; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; color-scheme: light dark; }
html.asof .asof-today { background: var(--accent); color: var(--on-accent, #fff); }
.asof-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; min-height: 42px; margin: 0 0 12px; padding: 8px 14px; border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--panel)); border-radius: 10px; font-size: 14px; }
.asof-banner[hidden] { display: none; }
.asof-banner .asof-note { flex: 1 1 260px; color: var(--muted); font-size: 12px; }
.asof-banner a { color: var(--accent); font-weight: 600; white-space: nowrap; }
html.asof .report-live::before { color: var(--muted); }
.not-rec { color: var(--muted); font-style: italic; }
.scope-switch { display: flex; flex-wrap: wrap; padding: 4px; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 9px; }
.scope-switch button { border: 0; border-radius: 6px; background: none; color: var(--muted); padding: 7px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.scope-switch button:hover { color: var(--text); }
.scope-switch button.on { background: var(--accent); color: var(--on-accent, #fff); }
.report-live { color: var(--muted); font-size: 12px; margin-left: auto; }
.report-live::before { content: '●'; color: var(--up); margin-right: 6px; }
.report-error { color: var(--neg); border: 1px solid var(--neg); border-radius: 8px; padding: 12px; margin-bottom: 14px; }

/* The section nav sticks to the top of the page's own scroller */
.report-nav { position: sticky; top: -22px; z-index: 5; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 14px;
  padding: 8px var(--gutter); background: var(--panel-solid, var(--panel)); border-bottom: 1px solid var(--line); box-shadow: 0 10px 22px -6px rgba(0, 0, 0, .45); }
.report-nav::-webkit-scrollbar { display: none; }
/* The date and Top N on the bar once the title band is out of view: pinned at its right end, compact */
.rn-tools { position: sticky; right: 0; margin-left: auto; display: none; align-items: center; gap: 6px; padding-left: 12px; background: var(--panel-solid, var(--panel)); }
.rn-tools.on { display: flex; }
.rn-tools .asof-ctl, .rn-tools .scope-switch { padding: 2px; gap: 2px; flex-wrap: nowrap; }
.rn-tools .asof-ctl button, .rn-tools .scope-switch button { padding: 2px 8px; font-size: 12px; line-height: 1.4; min-width: 0; white-space: nowrap; }
.report-nav { align-items: center; } /* (the pills keep their height beside the taller tools) */
.rn-tools .asof-ctl input { height: 22px; font-size: 12px; padding: 0 4px; }
.rn-tools .asof-today { display: none; } /* (the band keeps it; the bar has ‹ date ›) */
.report-nav a { flex: none; color: var(--muted); text-decoration: none; padding: 5px 11px; border-radius: 99px; font-size: 12px; font-weight: 600; border: 1px solid transparent; }
.report-nav a:hover { color: var(--text); border-color: var(--line); }
.report-nav a.on { color: var(--on-accent, #fff); background: var(--accent); }
/* 1080p: the section links sit a touch tighter, so all 24 keep ~100px of slack at 1920px whatever
   the system's fonts (the bar scrolls sideways only as a last resort) */
@media (min-width: 1700px) and (max-width: 2199px) { .report-nav a { padding: 5px 9px; } }
.report-section { scroll-margin-top: 56px; margin-bottom: 18px; }
.section-head { margin: 22px 0 10px; }
.section-head h2 { margin: 2px 0 2px; font-size: 20px; letter-spacing: -.02em; }
.section-head p { margin: 0; }

.report-context { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.report-context button { border: 1px solid var(--line); border-radius: 99px; color: var(--muted); padding: 4px 11px; font: inherit; font-size: 11px; background: var(--panel); cursor: pointer; }
.report-context button:hover { border-color: var(--accent); color: var(--text); }
.report-context b { color: var(--text); margin-left: 4px; }
.report-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.report-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px; min-width: 0; margin-bottom: 10px; }
.report-cards .report-card { margin: 0; padding: 14px 15px; }
.kpi-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 8px; }
.kpi-value { display: block; font-variant-numeric: tabular-nums; font-size: clamp(18px, 1.9vw, 25px); font-weight: 750; line-height: 1; letter-spacing: -.03em; }
.kpi-detail { display: block; color: var(--muted); font-size: 11px; margin-top: 9px; }
.up { color: var(--pos, var(--up)); }.down { color: var(--neg, var(--down)); }.muted { color: var(--muted); font-size: 11px; }
.report-main-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 10px; }
.report-main-grid.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.report-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.report-card h2 { margin: 2px 0 12px; font-size: 17px; letter-spacing: -.02em; }
.report-card h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: -.01em; }
.report-card h4 { margin: 0 0 6px; font-size: 12px; }
.card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.card-heading h3 { margin-bottom: 8px; }
.chart-meta { font-size: 11px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; margin: 8px 0 0; line-height: 1.5; }

/* Everything that opens a drill-down: a pointer and a hover cue */
[data-drill] { cursor: pointer; }
[data-drill]:focus-visible, .breadth-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.report-card.kpi { transition: border-color .12s, transform .12s; }
.report-card.kpi:hover, .mini:hover { border-color: var(--accent); }
.row[data-drill]:hover, tr[data-drill]:hover td, .metric[data-drill]:hover, .bar-row[data-drill]:hover, .dom-legend div:hover, .stat-grid div[data-drill]:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.panel-head[data-drill]:hover h3 { color: var(--accent); }
.panel-head h3::after, .kpi .kpi-label::after { content: ' ›'; color: var(--muted); }

/* Segmented controls */
.seg { display: inline-flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--bg); }
.seg button { border: 0; background: none; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 5px; cursor: pointer; }
.seg button.on { background: var(--line); color: var(--text); }
.tool-btn, .more, .linkish { border: 1px solid var(--line); background: var(--bg); color: var(--text); font: inherit; font-size: 11px; font-weight: 600; border-radius: 6px; padding: 4px 10px; cursor: pointer; }
.tool-btn:hover, .more:hover { border-color: var(--accent); }
.more { display: block; width: 100%; margin-top: 8px; color: var(--muted); }
.linkish { padding: 1px 6px; }

/* Charts */
.chart { position: relative; min-height: 120px; }
.chart .plot { position: relative; }
.chart svg { display: block; overflow: visible; touch-action: pan-y; }
.chart svg:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.chart .grid { stroke: var(--line); stroke-width: 1; opacity: .7; }
.chart .ref { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; opacity: .8; }
.chart .reflabel { fill: var(--muted); font-size: 10px; text-anchor: end; }
.chart .axis0 { stroke: var(--muted); stroke-width: 1; }
.chart .ytick { fill: var(--muted); font-size: 10px; text-anchor: end; font-variant-numeric: tabular-nums; }
.chart .xtick { fill: var(--muted); font-size: 10px; }
.chart .line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .line.dash { stroke-dasharray: 5 4; stroke-width: 1.6; }
.chart .area { opacity: .1; }
.chart .band { opacity: 1; }
.chart .xh { stroke: var(--muted); stroke-width: 1; }
.chart .dots circle { stroke: var(--panel-solid, var(--panel)); stroke-width: 2; }
.chart .hit { fill: transparent; }
.chart.pickable .hit { cursor: pointer; }
.chart .tip { position: absolute; z-index: 3; pointer-events: none; min-width: 140px; max-width: 240px; background: var(--panel-solid, var(--panel)); border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 9px; font-size: 11px; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.chart .tip strong { display: block; margin-bottom: 4px; font-size: 11px; }
.chart .tip div { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.chart .tip div b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; padding-left: 8px; }
.chart .tip i, .legend i { display: inline-block; width: 9px; height: 3px; border-radius: 2px; flex: none; }
.chart .tip em { display: block; margin-top: 4px; color: var(--accent); font-style: normal; font-size: 10px; }
.chart-empty { color: var(--muted); font-size: 12px; padding: 24px 0; margin: 0; text-align: center; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; }
.chart.tall { min-height: 200px; }
.spark { width: 80px; height: 22px; vertical-align: middle; }

/* Overview / history */
.index-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.index-stats span { display: inline-flex; align-items: center; gap: 5px; padding: 2px 4px; border-radius: 5px; }
.index-stats i { width: 12px; height: 3px; border-radius: 2px; }
.index-stats span:hover { background: color-mix(in srgb, var(--accent) 10%, transparent); }
.donut-wrap { display: flex; gap: 22px; align-items: center; padding: 6px 0 4px; }
.donut { flex: none; width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; }
.donut span { width: 102px; height: 102px; border-radius: 50%; background: var(--panel-solid, var(--panel)); display: grid; place-items: center; text-align: center; font-size: 15px; font-weight: 700; pointer-events: none; }
.dom-legend { flex: 1; min-width: 0; display: grid; gap: 3px; }
.dom-legend div { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 11px; padding: 3px 5px; border-radius: 5px; }
.dom-legend b { color: var(--text); font-variant-numeric: tabular-nums; }
.dom-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

/* Breadth */
.breadth-list { display: grid; gap: 4px; }
.breadth-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 92px 98px 92px; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; padding: 6px 8px; border-radius: 8px; cursor: pointer; border: 1px solid transparent; }
.breadth-row:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.breadth-row.on { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, transparent); }
.breadth-row label { color: var(--text); font-weight: 650; cursor: pointer; }
.breadth-track { display: flex; height: 12px; overflow: hidden; background: var(--line); border-radius: 99px; gap: 2px; }
.breadth-track i { display: block; height: 100%; min-width: 0; }
.breadth-track.not-rec-track { background: none; align-items: center; overflow: visible; }
.not-rec-track .not-rec { font-size: 11px; line-height: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.breadth-row[aria-disabled="true"] { cursor: default; }
.breadth-track i:hover { filter: brightness(1.25); }
.seg-up { background: var(--pos, var(--up)); }.seg-flat { background: var(--muted); }.seg-down { background: var(--neg, var(--down)); }
.breadth-count { font-size: 12px; text-align: right; }
.breadth-stat { font-size: 12px; text-align: right; white-space: nowrap; }
.breadth-stat small { color: var(--muted); font-size: 10px; }
.breadth-detail { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.detail-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: start; }
.detail-head h3 { margin: 0 0 3px; }
.detail-head p { margin: 0 0 8px; }
.detail-head .tools { display: flex; gap: 6px; }
.filter-chip { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0; padding: 3px 4px 3px 10px; border: 1px solid var(--accent); border-radius: 99px; font-size: 11px; }
.filter-chip button { border: 0; background: var(--line); color: var(--text); border-radius: 99px; width: 20px; height: 20px; cursor: pointer; }
.side-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 8px; }
.side-head h4 { margin: 0 0 4px; font-size: 13px; }
.list, .leader-list { display: grid; gap: 1px; grid-template-columns: minmax(0, 1fr); }
.row { min-width: 0; }
.list.open { max-height: 420px; overflow: auto; }

/* A row in any list: coin link, name, extras, figure */
.row { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; min-height: 30px; }
.row > * { flex: none; }
.row strong { text-align: right; font-size: 12px; white-space: nowrap; margin-left: auto; }
.row .row-name { flex: 1; min-width: 0; color: var(--muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .coin-link { max-width: 40%; }
.row .row-sub { color: var(--muted); font-size: 11px; white-space: nowrap; }
.row .spark { width: 70px; height: 20px; }
.coin-link { color: var(--text); font-weight: 650; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-link:hover { color: var(--accent); text-decoration: underline; }
.coin-link.plain:hover { color: var(--text); text-decoration: none; }
.lsplit { display: inline-block; width: 46px; height: 6px; border-radius: 99px; background: var(--pos, var(--up)); overflow: hidden; }
.lsplit i { display: block; height: 100%; background: var(--neg, var(--down)); }

/* Trend */
.mini-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.mini { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; display: grid; gap: 4px; min-width: 0; }
.mini span { color: var(--muted); font-size: 11px; }
.mini strong { font-size: 19px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.mini small { color: var(--muted); font-size: 10px; }

/* Returns / risk */
.heat-table { border-collapse: separate; border-spacing: 2px; width: 100%; font-variant-numeric: tabular-nums; font-size: 11px; }
.heat-table th { color: var(--muted); font-weight: 600; font-size: 10px; padding: 3px 4px; white-space: nowrap; }
.heat-table tbody th { text-align: left; }
.heat-table td { text-align: center; padding: 6px 3px; border-radius: 4px; min-width: 34px; white-space: nowrap; }
.heat-table td[data-drill]:hover { outline: 1px solid var(--text); }
.heat-table td.year { font-weight: 700; background: none; }
.heat-table.corr td { min-width: 30px; }
.two-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 8px; }
.two-lists h4 { color: var(--muted); font-weight: 600; }

/* Leaders */
.leader-list { display: grid; gap: 1px; }
.panel-head { margin: -4px -6px 6px; padding: 4px 6px; border-radius: 6px; }
.panel-head h3 { margin: 2px 0 0; }

/* Lists of bars (venues) */
.bars { display: grid; gap: 3px; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 120px) minmax(0, 1fr) 58px; gap: 8px; align-items: center; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.bar-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .meter { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar-row .meter i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.bar-row b { text-align: right; font-variant-numeric: tabular-nums; }

.metric-list { display: grid; gap: 2px; }
.metric { display: flex; align-items: baseline; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 7px 4px; gap: 9px; border-radius: 4px; }
.metric span { color: var(--muted); }.metric strong { text-align: right; font-variant-numeric: tabular-nums; }

/* Tables */
.table-scroll { overflow: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.card-heading.wrap { align-items: center; }
.table-tools { display: flex; gap: 6px; align-items: center; }
.table-tools input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; font: inherit; width: 200px; max-width: 100%; }
.table-tools input:focus { outline: none; border-color: var(--accent); }
.report-table { border-collapse: collapse; width: 100%; min-width: 1500px; text-align: right; font-variant-numeric: tabular-nums; }
.report-table th { color: var(--muted); font-size: 10px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); padding: 6px 6px; white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid, var(--panel)); }
.report-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.report-table th:first-child, .report-table td:first-child { text-align: left; position: sticky; left: 0; background: var(--panel-solid, var(--panel)); z-index: 1; }
.report-table td:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
.report-table td svg { width: 80px; height: 22px; vertical-align: middle; }
.th-sort { border: 0; background: none; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 2px 0; }
.th-sort:hover { color: var(--text); }
.th-info { border: 0; background: none; color: var(--muted); font-size: 10px; cursor: pointer; padding: 0 0 0 2px; opacity: .6; }
.th-info:hover { opacity: 1; color: var(--accent); }
.more-row { margin-top: 6px; }
.mini-table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 12px; }
.mini-table th { color: var(--muted); font-size: 10px; font-weight: 650; text-align: right; padding: 5px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; background: var(--panel-solid, var(--panel)); }
.mini-table td { padding: 6px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.mini-table th:first-child, .mini-table td:first-child, .mini-table th:nth-child(2), .mini-table td:nth-child(2) { text-align: left; }
.mini-table td:nth-child(2) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }

.report-table.sectors { min-width: 760px; }
.report-table.sectors td:last-child, .report-table.sectors th:last-child { text-align: left; font-size: 11px; }
.report-foot { color: var(--muted); font-size: 11px; line-height: 1.6; max-width: 1000px; margin: 18px auto 0; text-align: center; }
/* The page's own footer, last in the scroll: the theme's photo credit sits in it (themes.js puts it in
   footer.foot), so it never floats over the figures */
.report-footbar { margin: 16px calc(-1 * var(--gutter)) -42px; gap: 6px 16px; flex-wrap: wrap; justify-content: center; background: none; }
@media (max-width: 760px) { .report-footbar { margin: 14px -12px -32px; } }

/* ---------- The drill-down drawer: a side drawer on wide screens, a full-screen sheet on phones ---------- */
.drill { position: fixed; inset: 0; z-index: 50; }
.drill[hidden] { display: none; }
.drill-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.drill-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(760px, 92vw); display: flex; flex-direction: column; background: var(--panel-solid, var(--panel));
  border-left: 1px solid var(--line); box-shadow: -18px 0 50px rgba(0, 0, 0, .35); outline: none; animation: drill-in .16s ease-out; }
@keyframes drill-in { from { transform: translateX(24px); opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .drill-panel { animation: none; } }
.drill-top { display: flex; align-items: center; gap: 6px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.drill-top button.drill-close, .drill-top button.drill-back { flex: none; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); font-size: 16px; cursor: pointer; }
.drill-top button[hidden] { display: none; }
.crumbs { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; white-space: nowrap; font-size: 12px; color: var(--muted); }
.crumbs button { border: 0; background: none; color: var(--muted); font: inherit; cursor: pointer; padding: 3px 5px; border-radius: 5px; }
.crumbs button:hover { color: var(--text); background: var(--line); }
.crumbs button[aria-current] { color: var(--text); font-weight: 650; }
.drill-scroll { flex: 1; overflow: auto; padding: 14px 18px 24px; }
.drill-scroll h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.02em; }
.drill-scroll h3 { margin: 18px 0 8px; font-size: 13px; }
.drill-lead { margin: 0 0 6px; color: var(--muted); }
.drill-lead a { color: var(--accent); }
.drill-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--muted); }
.drill .chart { margin: 8px 0; }
.drill .table-scroll { max-height: 60vh; }
html.drill-open .report-page { overflow: hidden; }
/* (its scrollbar's room is kept while a drill-down holds the page still: with a classic scrollbar, Windows
   or macOS set to always show them, hiding it widened the page and every card and line of text shifted) */
.report-page { scrollbar-gutter: stable; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; margin: 6px 0 10px; }
.stat-grid div { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; display: grid; gap: 2px; min-width: 0; }
.stat-grid span { color: var(--muted); font-size: 10px; }
.stat-grid strong { font-size: 14px; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0 2px; }
.seg-tabs button { border: 1px solid var(--line); background: var(--bg); color: var(--muted); border-radius: 99px; font: inherit; font-size: 11px; padding: 3px 9px; cursor: pointer; }
.seg-tabs button.on { border-color: var(--accent); color: var(--text); }
.seg-tabs b { color: var(--text); margin-left: 3px; }
.method { margin-top: 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; }
.method summary { cursor: pointer; color: var(--text); font-weight: 600; }
.method p { line-height: 1.55; }

@media (max-width: 1300px) { .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mini-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .report-main-grid, .report-main-grid.even, .report-grid.two { grid-template-columns: minmax(0, 1fr); }
  .breadth-row { grid-template-columns: 40px minmax(0, 1fr) 76px 86px; gap: 8px; }
  .breadth-stat.hide-sm { display: none; }
}
@media (max-width: 760px) {
  .report-page { padding: 14px 12px 32px; }
  .report-nav { top: -14px; margin: 0 -12px 12px; padding: 7px 12px; }
  .report-page > .report-intro { margin: -14px -12px 0; padding: 14px 12px 12px; }
  .report-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .report-grid { grid-template-columns: minmax(0, 1fr); }
  .mini-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .report-card { padding: 14px 12px; }
  .donut-wrap { justify-content: center; }
  .donut { width: 128px; height: 128px; }
  .donut span { width: 88px; height: 88px; font-size: 13px; }
  .two-lists { grid-template-columns: minmax(0, 1fr); }
  .report-controls { width: 100%; }
  .asof-ctl { width: 100%; }
  .asof-ctl input { flex: 1; }
  .scope-switch { width: 100%; justify-content: space-between; }
  .scope-switch button { padding: 7px 8px; flex: 1; }
  .table-tools { width: 100%; }
  .table-tools input { flex: 1; width: auto; }
  .drill-panel { width: 100vw; border-left: 0; animation-name: drill-up; }
  @keyframes drill-up { from { transform: translateY(30px); opacity: .5; } }
  .drill-scroll { padding: 12px 12px 24px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 420px) {
  .breadth-row { grid-template-columns: 34px minmax(0, 1fr) 64px; gap: 6px; padding: 6px 4px; }
  .breadth-stat { display: none; }
  .kpi-value { font-size: 18px; }
  .row .row-sub, .row .spark { display: none; }
  .bar-row { grid-template-columns: 84px minmax(0, 1fr) 50px; }
}

/* The coin table never scrolls sideways: reports.js picks the columns that fit the box (fixed widths,
   so a refresh patching cells never re-measures them) */
#coins .table-scroll { overflow: visible; }
#coin-table { table-layout: fixed; width: 100%; min-width: 0; font-size: 12px; }
#coin-table th { padding: 6px 4px; line-height: 1.2; vertical-align: bottom; top: 24px; z-index: 2; letter-spacing: .02em; }
#coin-table th:first-child { position: sticky; left: auto; z-index: 2; }
#coin-table td { padding: 6px 5px; overflow: hidden; text-overflow: ellipsis; }
#coin-table td:first-child { position: static; max-width: none; }
#coin-table td svg { width: 100%; max-width: 80px; }
.sort-tools { display: none; gap: 4px; align-items: center; }
#coins.compact .sort-tools { display: inline-flex; }
#coins.compact .col-menu { display: none; }
.coin-pick { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 3px 6px; font: inherit; font-size: 11px; font-weight: 600; max-width: 150px; }
.sort-tools select { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 7px; padding: 5px 6px; font: inherit; font-size: 12px; max-width: 150px; }
.col-menu { position: relative; }
.col-menu summary { list-style: none; }
.col-menu summary::-webkit-details-marker { display: none; }
.col-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 6; width: 290px; max-height: 60vh; overflow: auto; padding: 8px; display: grid; gap: 2px;
  background: var(--panel-solid, var(--panel)); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.col-pop label { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.col-pop label:hover { background: var(--line); }
.col-pop small { margin-left: auto; white-space: nowrap; }
/* Folded rows (narrow boxes): coin, price, 24h on one line; cap, 7d and the year's trend under them */
#coin-table.compact, #coin-table.compact tbody { display: block; }
#coin-table.compact thead { display: none; }
#coin-table.compact tr { display: grid; grid-template-columns: minmax(0, 1fr) auto 72px; column-gap: 10px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
#coin-table.compact td { border: 0; padding: 1px 0; }
#coin-table.compact td[data-col="symbol"] { grid-area: 1 / 1; }
#coin-table.compact td[data-col="price"] { grid-area: 1 / 2; font-weight: 650; }
#coin-table.compact td[data-col="c24h"] { grid-area: 1 / 3; font-weight: 650; }
#coin-table.compact td[data-col="mcap"] { grid-area: 2 / 1; text-align: left; }
#coin-table.compact td[data-col="c7d"] { grid-area: 2 / 2; }
#coin-table.compact td[data-col="spark"] { grid-area: 2 / 3; }
#coin-table.compact td[data-col="mcap"]::before, #coin-table.compact td[data-col="c7d"]::before { content: attr(data-label) ' '; color: var(--muted); font-size: 10px; }
#coin-table.compact td svg { height: 18px; }
.chart { contain: content; }
/* (styles.css's html:has(.bg-wrap) rule, keyed on the theme's attribute: reports.js drops the :has() rules on this page) */
html[data-bg] body { background: transparent; }
#coin-table tr.far { visibility: hidden; }
#coins .table-tools { flex-wrap: wrap; justify-content: flex-end; }
#coins.compact .table-tools input { flex: 1 1 100%; }
#coins.compact .sort-tools { flex: 1; }
#coins.compact .sort-tools select { flex: 1; min-width: 0; width: 100%; max-width: none; }
.col-pop { text-align: left; }
.col-pop label { display: grid; grid-template-columns: 16px minmax(0, 1fr); column-gap: 8px; align-items: start; justify-items: start; white-space: normal; line-height: 1.3; }
.col-pop label input { margin: 1px 0 0; }
.col-pop label small { grid-column: 2; margin: 0; }
/* The top sections' estimated heights from the first paint (reports.js holds every section's, from
   this browser's last visit when it has one, and lets go once the figures are in) */
#market-context { min-height: 25px; } #summary { min-height: 200px; } #recap { min-height: 690px; } #breadth { min-height: 910px; }
@media (max-width: 1700px) { #recap { min-height: 870px; } }
@media (max-width: 1100px) { #recap { min-height: 1020px; } }
@media (max-width: 900px) { #recap { min-height: 1500px; } }
@media (max-width: 760px) { #market-context { min-height: 55px; } #summary { min-height: 430px; } }
@media (max-width: 600px) { #recap { min-height: 2420px; } #breadth { min-height: 1360px; } }
