:root {
  --bg: #f3f2ee;
  --surface: #fcfcfb;
  --surface-2: #ebe9e3;
  --ink: #1d1d1b;
  --ink-2: #3d3c39;
  --muted: #6b6a66;
  --line: #dedcd5;
  --accent: #17734a;
  --accent-ink: #0f5134;
  --accent-soft: #dcebe2;
  --neg: #b4432f;
  --slate: #5b7fa6;
  --sheet: #fcfcfb;
  --sheet-line: #e3e1db;
  --shadow: 0 1px 2px rgba(29, 29, 27, .06), 0 4px 16px rgba(29, 29, 27, .05);
  --sans: 'IBM Plex Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --mk-rev: #7a7974; --mk-profit: #17734a; --mk-cost: #ea6a52; --mk-noncash: #5b7fa6;   /* the chart's node colours */
  --warn-ink: #8a4b00;                                   /* a data check that flags a probable error */
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #151514; --surface: #1d1d1b; --surface-2: #2a2927; --ink: #ecebe6; --ink-2: #cfcdc6; --muted: #9a9891;
    --line: #353431; --accent: #5fb88a; --accent-ink: #8fd3ad; --accent-soft: #1f3a2b; --neg: #ee8a75; --slate: #8fb0d6;
    --sheet: #fcfcfb; --sheet-line: #3a3936; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    --mk-rev: #a3a29c; --mk-profit: #5fb88a; --mk-cost: #f08a76; --mk-noncash: #8fb0d6; --warn-ink: #f0b860;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --mk-rev: #a3a29c; --mk-profit: #5fb88a; --mk-cost: #f08a76; --mk-noncash: #8fb0d6; --warn-ink: #f0b860;
  --bg: #151514; --surface: #1d1d1b; --surface-2: #2a2927; --ink: #ecebe6; --ink-2: #cfcdc6; --muted: #9a9891;
  --line: #353431; --accent: #5fb88a; --accent-ink: #8fd3ad; --accent-soft: #1f3a2b; --neg: #ee8a75; --slate: #8fb0d6;
  --sheet: #fcfcfb; --sheet-line: #3a3936; --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.in-app header.top { display: none; }                 /* inside the Android app: its own tabs and toolbar */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--sans);
  font-variant-numeric: tabular-nums;
}
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent); }
h1, h2, h3 { text-wrap: balance; margin: 0; }
h1 { font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -.01em; font-weight: 600; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.wrap { max-width: 1760px; margin: 0 auto; padding-inline: 24px; }
.mono { font-family: var(--mono); font-size: .9em; letter-spacing: .01em; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.pos { color: var(--accent-ink); }
.neg { color: var(--neg); }

/* header */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; min-height: 60px; flex-wrap: wrap; padding-block: 8px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 17px; }
.brand svg { flex: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 6px; font-size: 14px; }
.nav a:hover, .nav a.on { background: var(--surface-2); color: var(--ink); }
.search { position: relative; margin-left: auto; flex: 1 1 240px; max-width: 360px; min-width: 0; }
.search input { width: 100%; font: inherit; font-size: 14px; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.suggest { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); max-height: 360px; overflow: auto; padding: 4px; }
.suggest a { display: flex; gap: 10px; align-items: baseline; padding: 7px 10px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.suggest a:hover, .suggest a.hi { background: var(--surface-2); }
.suggest .mono { color: var(--accent-ink); min-width: 56px; }
.theme-btn { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 8px; width: 36px; height: 36px;
  display: grid; place-items: center; cursor: pointer; }

main { padding-block: 28px 64px; }
.page-head { display: grid; gap: 10px; margin-bottom: 22px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2);
  color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.tag.star { background: var(--accent-soft); color: var(--accent-ink); }
.tag.final { background: var(--accent-soft); color: var(--accent-ink); font-size: 11.5px; font-family: var(--sans); }
.tag.prelim { background: color-mix(in srgb, #c9a227 22%, var(--surface)); color: var(--ink); font-size: 11.5px; font-family: var(--sans); }
.intro { max-width: 78ch; color: var(--ink-2); border-left: 3px solid var(--line); padding: 2px 0 2px 14px; }
.intro .src { display: block; margin-top: 6px; font-size: 12.5px; color: var(--muted); }

/* controls */
.controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 18px 0 12px; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { font: inherit; font-size: 13.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); cursor: pointer; text-decoration: none; white-space: nowrap; }
.pill:hover { border-color: var(--muted); color: var(--ink); }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { font: inherit; font-size: 13.5px; padding: 6px 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--surface-2); color: var(--ink); font-weight: 500; }
.seg button:disabled { color: var(--muted); cursor: not-allowed; opacity: .6; }
.dec-toggle { display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.dec-toggle input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.export { display: flex; gap: 6px; align-items: center; margin-left: auto; }
.export span { font-size: 13px; color: var(--muted); }
.btn { font: inherit; font-size: 13.5px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink); cursor: pointer; }
.btn:hover { border-color: var(--ink-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn[aria-busy="true"] { cursor: progress; }

/* chart + notes */
.stage { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1500px) { .stage { grid-template-columns: minmax(0, 1fr) 340px; } }
.hintline { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: 13.5px; color: var(--muted); margin: -2px 0 10px; }
.sheet { background: var(--sheet); border: 1px solid var(--sheet-line); border-radius: 10px; overflow-x: auto; box-shadow: var(--shadow); min-width: 0; }
.sheet svg { display: block; height: auto; }
.sheet.fit svg { width: max(100%, var(--min-w, 0px)); }
.sheet .node { cursor: pointer; }
.sheet.panzoom.grabbing, .sheet.panzoom.grabbing * { cursor: grabbing !important; user-select: none; }
.pz-hint { color: var(--muted); }
@media (hover: none) { .pz-hint { display: none !important; } }      /* a mouse feature: phones keep pinch and swipe */
.sheet .node .hit { pointer-events: all; }
.sheet .node:hover .bar { filter: brightness(.88); }
.sheet .node.sel .bar { stroke: #1d1d1b; stroke-width: 2; }
.sheet .node:focus { outline: none; }
.sheet .node:focus-visible .bar { stroke: #17734a; stroke-width: 3; }
.sheet svg.has-sel .band { opacity: .28; transition: opacity .15s; }
.sheet svg.has-sel .band.on { opacity: 1; }
.loading { padding: 80px 20px; text-align: center; color: var(--muted); }

.notes { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 18px 20px; display: grid; gap: 12px;
  min-width: 0; position: sticky; top: calc(76px + env(safe-area-inset-top, 0px)); max-height: calc(100vh - 100px); overflow: auto; }
.notes .k { font-size: 20px; font-weight: 600; line-height: 1.25; }
.notes .v { font-size: 14px; color: var(--ink-2); }
.notes .v div + div { color: var(--muted); }
.notes blockquote { margin: 0; padding: 0 0 0 12px; border-left: 3px solid var(--accent); color: var(--ink-2); font-size: 14.5px; }
.notes blockquote h4 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--ink); }
.notes blockquote p + p { margin-top: 8px; }
.notes .src { font-size: 12.5px; color: var(--muted); }
.notes .node-src { font-size: 12.5px; line-height: 1.45; color: var(--ink-2); border-left: 3px solid var(--line);
  padding-left: 10px; display: grid; gap: 4px; }
.notes .node-src p { margin: 0; }
.notes .node-src .eyebrow { font-size: 10.5px; }
.notes .node-src .cite { color: var(--muted); }
.notes .node-src .links { overflow-wrap: anywhere; }
.trend { margin: 2px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.trend figcaption { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 4px; }
.trend .tr-title { color: var(--muted); font-weight: 500; letter-spacing: .02em; }
.trend .tr-read { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.trend svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--sans); }
.trend .tr-axis { stroke: var(--line); stroke-width: 1; }
.trend .tr-col { opacity: .5; transition: opacity .12s; }
.trend .tr-col.cur, .trend .tr-col.on { opacity: 1; }
.trend .tr-line { fill: none; stroke: var(--ink-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .tr-dot { fill: var(--ink-2); stroke: var(--surface); stroke-width: 2; }
.trend .tr-dot.on { r: 5.5; }
.trend .tr-cap { font-size: 10.5px; fill: var(--muted); letter-spacing: .03em; }
.trend .tr-lab { font-size: 11.5px; font-weight: 600; fill: var(--ink-2); font-variant-numeric: tabular-nums; }
.trend .tr-x { font-size: 10.5px; fill: var(--muted); }
.trend .tr-x.cur { fill: var(--ink); font-weight: 600; }
.trend .tr-hit { cursor: pointer; }
.notes .empty { color: var(--muted); font-size: 14px; }
.notes .hint { display: flex; gap: 8px; align-items: baseline; font-size: 14px; color: var(--ink-2); }
@media (max-width: 1499px) {
  .notes { position: fixed; top: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(400px, calc(100vw - 32px));
    max-height: min(62vh, 600px); z-index: 30; box-shadow: 0 8px 32px rgba(20, 20, 19, .22); }
  .notes:not(.open) { display: none; }
}
.dot { width: 9px; height: 9px; border-radius: 50%; background: #17734a; display: inline-block; flex: none; }

/* text sections */
.cols { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); margin-top: 28px; }
@media (min-width: 980px) { .cols { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } }
.prose { display: grid; gap: 12px; max-width: 76ch; color: var(--ink-2); align-content: start; }
.prose h2 { color: var(--ink); }
.note-rule { font-size: 12.5px; color: var(--muted); }
.changes { margin: 0; padding-left: 18px; display: grid; gap: 6px; color: var(--ink-2); }
.facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 16px; font-size: 14px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* tables */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--surface); position: sticky; top: 0; }
td.num, th.num { text-align: right; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
tbody tr[data-href] { cursor: pointer; }
td .co { display: flex; gap: 10px; align-items: baseline; }
td .co .mono { color: var(--accent-ink); min-width: 52px; }
td .name { max-width: 30ch; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: bottom; }
.bar-cell { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.bar-cell i { display: block; height: 8px; background: #7a7974; border-radius: 2px; }

/* home */
.hero { display: grid; gap: 10px; margin-bottom: 28px; max-width: 900px; }
.hero p { color: var(--ink-2); font-size: 16.5px; max-width: 70ch; }
.status { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13.5px; color: var(--muted); }
.status b { color: var(--ink); font-weight: 600; }
.section { margin-top: 36px; display: grid; gap: 14px; }
.section-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.section-head .muted { font-size: 14px; }
.holders h3 { margin-top: 6px; }
.holders .btn { justify-self: start; }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card { display: grid; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); text-decoration: none; min-width: 0; }
.card:hover { border-color: var(--muted); }
.card .t { font-weight: 600; display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.card .t span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .n { font-size: 13.5px; color: var(--muted); }
.card .big { font-size: 22px; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input { font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); }
.checks { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; border: 1px solid var(--line); border-radius: 8px;
  padding: 5px 12px; margin: 0; background: var(--surface); font-size: 14px; }
.checks legend { float: left; padding: 0 10px 0 0; color: var(--muted); font-size: 13px; }
.checks label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; white-space: nowrap; }
.checks input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }
.checks .muted { font-size: 12.5px; }
.cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between;
  padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.cta > div { flex: 1 1 360px; min-width: 0; display: grid; gap: 4px; }
.cta-form, .auth, .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cta-form input, .auth input, .prefs input[type="number"], #add-ticker, #reread-list { font: inherit; font-size: 15px; padding: 8px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); min-width: 0; }
.cta-form input { flex: 1 1 240px; }
.auth { margin: 10px 0; }
.auth label { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.auth input { width: min(340px, 100%); font-size: 16px; }
.btn.follow, .btn.send { padding: 3px 12px; font-size: 13.5px; }
.btn.follow.on { background: var(--accent-soft); border-color: transparent; color: var(--accent-ink); }
.prefs { display: grid; gap: 16px; max-width: 760px; }
.prefs fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px 14px; margin: 0; display: grid; gap: 8px; background: var(--surface); }
.prefs legend { font-weight: 600; padding: 0 6px; }
.prefs label { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14.5px; }
.prefs input[type="checkbox"], .prefs input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.prefs label.long { flex-wrap: nowrap; align-items: flex-start; }
.prefs label.long input { margin-top: 3px; flex: none; }
.prefs label.long span { min-width: 0; }
.prefs .inline-radios { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; font-size: 14.5px; }
.prefs .inline-radios > span { color: var(--ink-2); margin-right: 2px; }
.prefs fieldset > p.small { margin: 2px 0 0; }
/* a choice that belongs to the option above it (what the daily report covers) */
.prefs .sub-choice { display: grid; gap: 6px; margin: -2px 0 4px 24px; padding: 8px 0 8px 12px; border-left: 2px solid var(--line); }
.prefs .sub-choice > span { margin-bottom: 2px; }
.prefs .sub-choice.off { opacity: .6; }             /* alerts "as soon as a chart is out": the choice applies to the daily report */
.prefs .sub-choice.off:hover, .prefs .sub-choice.off:focus-within { opacity: 1; }
#requests { max-width: 760px; }
.foot-links { display: flex; gap: 16px; }
.legal { max-width: 72ch; }
.legal h2 { font-size: 18px; margin: 26px 0 6px; }
.legal p, .legal li { line-height: 1.6; }
.legal ul { padding-left: 20px; }
.grid-checks { display: grid; gap: 6px 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.row.danger { margin-top: 10px; }
.btn.warn { background: var(--neg); border-color: var(--neg); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: 999px; background: var(--accent-soft);
  font: 500 13px var(--mono); }
.chip a { color: var(--accent-ink); text-decoration: none; }
.chip button { border: 0; background: transparent; color: var(--accent-ink); cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 6px; }
.small { font-size: 12.5px; }
.thread-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.thread-actions a.btn { text-decoration: none; display: inline-flex; align-items: center; }
.btn.primary { color: #fff; }
.btn.small { font-size: 12.5px; padding: 3px 9px; }
.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 760px; }
.thread-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.thread pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 15px/1.5 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
.thread-meta b { color: var(--ink-2); font-weight: 500; }
.thread-info { max-width: 760px; margin: 0 0 14px; }
.thread-img { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 2px 0; }
.thread-img span { min-width: 0; }
.thread-img .btn { flex: none; }
.prefs select { font: inherit; font-size: 14.5px; padding: 3px 6px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); }

/* the daily report of one filing date: today and the five days before */
.daily .days { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; max-width: 900px; margin: 0 0 12px; }
.day { font: inherit; text-align: left; display: grid; gap: 1px; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); cursor: pointer; min-width: 0; }
.day b { font-weight: 600; font-size: 14px; color: var(--ink); }
.day span { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.day:hover:not(:disabled) { border-color: var(--muted); }
.day.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.day.on b, .day.on span { color: var(--accent-ink); }
.day:disabled { cursor: not-allowed; opacity: .55; }
.daily > p { max-width: 78ch; }
@media (max-width: 720px) { .daily .days { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.thumbs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 560px), 1fr)); }
.thumb { display: grid; gap: 8px; text-decoration: none; color: var(--ink); }
.thumb .sheet { box-shadow: none; }
.thumb .sheet svg { pointer-events: none; }
.thumb:hover .sheet { border-color: var(--muted); }

/* full fiscal years, "compare any two periods", companies without charts yet */
.pill.year { border-style: dashed; }
.pill.year.on { border-style: solid; }
.pill.cmp { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.pill.cmp.open, .pill.cmp.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.cmp-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-top: 14px; }
.cmp-panel h3 { font-size: 15px; margin: 18px 0 6px; }
.cmp-panel .tbl-wrap { width: fit-content; max-width: 100%; }
.period-grid { width: auto; min-width: 520px; }
.period-grid th, .period-grid td { padding: 4px 6px; text-align: center; }
.period-grid tbody th { text-align: left; font-weight: 500; color: var(--ink-2); white-space: nowrap; position: static;
  text-transform: none; letter-spacing: 0; font-size: 13.5px; }
.period-grid tbody tr:last-child th { border-bottom: 0; }
.period-grid td.none { color: var(--line); }
.pick { display: inline-flex; gap: 6px; align-items: center; padding: 4px 9px; border-radius: 999px; border: 1px solid var(--line);
  font-size: 13px; color: var(--ink-2); cursor: pointer; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pick:hover { border-color: var(--muted); color: var(--ink); }
.pick input { accent-color: var(--accent); margin: 0; width: 14px; height: 14px; }
.pick:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-ink); font-weight: 500; }
.cmp-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.cmp-bar #cmp-sum { margin-right: auto; color: var(--ink-2); }
.cmp-list { margin: 0; padding-left: 18px; font-size: 14px; display: grid; gap: 4px; }
.cmp-head { margin: 18px 0 12px; }
#body > .cmp-wait { margin-top: 18px; }
.cmp-head h2 { margin: 2px 0 4px; font-size: 22px; text-wrap: balance; }
.cmp-head p { margin: 0; font-size: 14px; max-width: 90ch; }
.cmp-wait, .build-box { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 22px 22px 14px; max-width: 760px; }
.cmp-wait h2, .build-box h2 { font-size: 19px; margin: 0 0 6px; text-wrap: balance; }
.cmp-wait .loading { padding: 30px 10px; }
.build-box .row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 4px 0 8px; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }
.suggest a.off .mono { color: var(--muted); }
.suggest a .tag { margin-left: auto; font-size: 11px; padding: 1px 7px; white-space: nowrap; }

/* toast + dialog */
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--ink);
  color: var(--bg); padding: 10px 14px; border-radius: 10px; display: flex; gap: 14px; align-items: center; font-size: 14px; box-shadow: var(--shadow);
  z-index: 40; max-width: calc(100vw - 32px); }
.toast button { font: inherit; background: transparent; color: inherit; border: 1px solid currentColor; border-radius: 6px; padding: 3px 9px; cursor: pointer; }
.dialog { position: fixed; inset: 0; background: rgba(20, 20, 19, .55); display: grid; place-items: center; z-index: 50; padding: 16px; }
.dialog .box { background: var(--surface); border-radius: 12px; padding: 18px; display: grid; gap: 12px; max-width: min(1100px, 100%);
  max-height: calc(100vh - 32px); overflow: auto; }
.dialog img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; background: #fcfcfb; }
.dialog .row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.site-foot { border-top: 1px solid var(--line); padding-block: 22px 36px; color: var(--muted); font-size: 13px; }
.site-foot .wrap { display: grid; gap: 6px; }

@media (max-width: 640px) {
  .wrap { padding-inline: 16px; }
  .export { margin-left: 0; }
  .notes { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}

/* data checks under a chart (pipeline/checks.py): a probable error in amber */
ul.checks { margin: 0; padding-left: 18px; }
ul.checks li { margin: 0 0 4px; }
ul.checks li.warn { color: var(--warn-ink); }
