/* Disclosures — styled on the Filing Flows design system (same tokens, type and header as web/styles.css). */
: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;
  --neg-soft: #f6e3de;
  --slate: #5b7fa6;
  --slate-soft: #e1e9f2;
  --warn-ink: #8a4b00;
  --warn-soft: #f4e7cf;
  --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;
}
@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; --neg-soft: #3a2420;
    --slate: #8fb0d6; --slate-soft: #233040; --warn-ink: #f0b860; --warn-soft: #3a2f1a;
    --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;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --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; --neg-soft: #3a2420;
  --slate: #8fb0d6; --slate-soft: #233040; --warn-ink: #f0b860; --warn-soft: #3a2f1a;
  --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;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
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; margin-bottom: 6px; }
p { margin: 0; }
button, input, select { font: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; }
input:focus, select:focus, button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.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; }
.positive { color: var(--accent-ink); }
.negative { color: var(--neg); }

/* header (identical to the Sankey site) */
.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); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.mode-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; }
.mode-pick select { min-height: 36px; padding: 6px 10px; }
.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; }

/* page */
main { padding-block: 28px 64px; }
.page-head { display: grid; gap: 10px; margin-bottom: 18px; }
.crumbs { font-size: 13px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.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); }
.intro .src:empty { display: none; }

/* module pills (the Sankey site's .pills / .pill) */
.pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 14px; }
.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, .pill.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.modules { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; scrollbar-width: thin; }
@media (min-width: 900px) { .modules { flex-wrap: wrap; overflow: visible; } }
/* in-content pill chips the app renders inside tables */
td .pill, .panel .pill:not(button), .searchbar .pill { display: inline-block; font-size: 12px; padding: 2px 8px; margin: 2px 0; border: 0;
  background: var(--accent-soft); color: var(--accent-ink); cursor: default; }

#notice { font-size: 13.5px; color: var(--ink-2); margin: 0 0 18px; padding: 9px 12px; background: var(--surface-2); border-radius: 8px; line-height: 1.6; }
#notice:empty { display: none; }
#notice.warn { background: var(--warn-soft); color: var(--warn-ink); }

/* sections */
.section-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; margin: 22px 0 14px; }
.sub { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 4px 0 0; max-width: 90ch; }
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft);
  color: var(--accent-ink); font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.toolbar { display: flex; gap: 10px 14px; flex-wrap: wrap; margin: 14px 0; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 150px; flex: 1; }
.field.wide { flex: 2; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--muted); }
select, input { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--ink); min-height: 38px; padding: 7px 11px;
  min-width: 0; max-width: 100%; font-size: 14px; }
input::placeholder { color: var(--muted); }
input:focus, select:focus { border-color: transparent; }
.searchbar { background: var(--surface); border: 1px solid var(--line); padding: 16px; border-radius: 10px; box-shadow: var(--shadow); }

/* toggles (same as the Sankey site) */
.dec-toggle { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-2); cursor: pointer; min-height: 38px; }
.dec-toggle input { accent-color: var(--accent); width: 15px; height: 15px; margin: 0; }

/* metrics */
.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 16px 0; }
.metric { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; min-height: 108px;
  box-shadow: var(--shadow); overflow: hidden; }
.metric:before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--mk-profit); }
.metric:nth-child(2):before { background: var(--mk-noncash); }
.metric:nth-child(3):before { background: var(--mk-cost); }
.metric:nth-child(4):before { background: var(--mk-rev); }
.metric label { font-size: 12.5px; color: var(--muted); display: block; }
.metric strong { font-size: 28px; letter-spacing: -.01em; font-weight: 600; display: block; margin: 6px 0 2px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.metric small { font-size: 12px; color: var(--muted); display: block; line-height: 1.5; }

/* panels and charts */
.charts { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin: 16px 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; min-width: 0; box-shadow: var(--shadow); }
.plot { display: block; width: 100%; height: auto; margin-top: 14px; max-height: 360px; }
.plot g[role=button] { cursor: pointer; }
.plot g[role=button]:hover { opacity: .85; }
.axis { fill: var(--muted); font: 11px var(--sans); }
.gridline { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.chartline { stroke: var(--accent); stroke-width: 2.5; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.legend { font-size: 12.5px; color: var(--muted); }

/* tables (the Sankey site's sheet look) */
.tablebox { overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-top: 14px; max-width: 100%; }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; min-width: 650px; }
td, th { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--surface-2); font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted); white-space: nowrap; position: sticky; top: 0; }
td:first-child { font-weight: 500; min-width: 175px; line-height: 1.5; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }

/* buttons */
.action, .text-button { font: inherit; }
.action { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font-size: 13.5px; color: var(--ink); }
.action:hover { border-color: var(--ink-2); }
.action:disabled { opacity: .55; cursor: not-allowed; }
.text-button { border: 0; background: transparent; padding: 3px; color: var(--accent-ink); font-size: 13.5px; }
.text-button:hover { color: var(--accent); text-decoration: underline; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 12px 0; font-size: 13px; color: var(--muted); }
.pager > span { margin-right: auto; }
.empty { border: 1px dashed var(--line); border-radius: 10px; background: var(--surface); padding: 40px 24px; text-align: center; color: var(--muted); font-size: 14px; line-height: 1.8; }
.explain { padding: 10px 14px; margin: 14px 0; background: var(--surface-2); border-left: 3px solid var(--slate); border-radius: 0 8px 8px 0; font-size: 13px; color: var(--ink-2); line-height: 1.65; }

/* bars, intervals, deltas */
.bar-row { margin: 16px 0; }
.bar-label { display: flex; gap: 10px; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar-label span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 72%; }
.bar-track { height: 7px; background: var(--surface-2); border-radius: 4px; }
.bar-fill { height: 100%; border-radius: 4px; background: var(--accent); }
.delta-row { margin: 16px 0; }
.diverging-track { height: 7px; background: var(--surface-2); border-radius: 3px; position: relative; }
.diverging-track i { position: absolute; height: 100%; border-radius: 3px; }
.diverging-track i.positive, .diverging-track i[style*="right"] { background: var(--mk-profit); }
.diverging-track i.negative { background: var(--mk-cost); }
.zero-line { position: absolute; left: 50%; top: -3px; height: 13px; width: 1px; background: var(--muted); z-index: 1; }
.interval-list { margin-top: 14px; }
.interval-row { display: grid; grid-template-columns: 30px minmax(180px, 1.2fr) minmax(150px, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.asset-rank { font-size: 12px; font-family: var(--mono); color: var(--muted); }
.asset-name strong { font-size: 14px; font-weight: 500; display: block; line-height: 1.5; }
.asset-name small { font-size: 12.5px; color: var(--muted); display: block; margin-top: 3px; }
.asset-interval span { display: block; font-size: 13px; color: var(--ink-2); margin-top: 8px; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.interval-track { height: 9px; background: var(--surface-2); border-radius: 5px; position: relative; }
.interval-track i { position: absolute; height: 9px; background: var(--slate); border-radius: 5px; min-width: 2px; }
.interval-track i:before { content: ''; position: absolute; left: 0; top: -2px; width: 3px; height: 13px; background: var(--accent); border-radius: 2px; }
.interval-track .open-ended { background: linear-gradient(90deg, var(--slate), var(--slate-soft)); }
.interval-axis { display: flex; justify-content: space-between; padding: 10px 0 0; font-size: 12px; color: var(--muted); }

/* coverage, badges, health */
.coverage-strip { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line); padding: 10px 14px; border-radius: 8px;
  font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.coverage-strip strong { font-size: 14px; color: var(--ink); }
.coverage-strip .text-button { margin-left: auto; }
.progress { height: 4px; background: var(--surface-2); flex: 1; min-width: 60px; max-width: 160px; border-radius: 4px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); }
.badge { font-size: 12px; border-radius: 999px; padding: 2px 8px; display: inline-block; background: var(--surface-2); color: var(--ink-2); font-weight: 500; }
.badge.ready { background: var(--accent-soft); color: var(--accent-ink); }
.badge.pending { background: var(--slate-soft); color: var(--slate); }
.badge.error { background: var(--neg-soft); color: var(--neg); }
.error-text { color: var(--neg); font-size: 13px; }
.dot, .live-dot { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.health-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.health-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 20px; box-shadow: var(--shadow); }
.health-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.health-facts { display: flex; gap: 20px; margin: 18px 0; }
.health-facts > div { flex: 1; }
.health-facts strong { display: block; font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.health-facts span { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
details { font-size: 13.5px; line-height: 1.7; margin-top: 12px; }
summary { cursor: pointer; color: var(--accent-ink); }
pre { white-space: pre-wrap; font: 12.5px/1.7 var(--mono); overflow-wrap: anywhere; background: var(--surface-2); padding: 10px 12px; border-radius: 8px; }

/* footer (identical to the Sankey site) */
.site-foot { border-top: 1px solid var(--line); padding: 20px 0 32px; font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
.site-foot .wrap { display: grid; gap: 6px; }
.foot-links { display: flex; gap: 14px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }

/* responsive */
@media (max-width: 1150px) {
  .charts { grid-template-columns: 1fr; }
  .health-list { grid-template-columns: 1fr; }
}
@media (max-width: 800px) {
  .wrap { padding-inline: 16px; }
  main { padding-block: 20px 48px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric strong { font-size: 24px; }
  .interval-row { grid-template-columns: 22px minmax(140px, 1fr) minmax(130px, 1fr); gap: 10px; }
  .section-head { flex-direction: column; }
}
@media (max-width: 520px) {
  .mode-pick .muted { display: none; }
  .metrics { gap: 8px; }
  .metric { padding: 14px; min-height: 96px; }
  .field { min-width: 130px; }
  .interval-row { grid-template-columns: 22px 1fr; }
  .asset-interval { grid-column: 2; }
  .coverage-strip .progress { display: none; }
  .health-facts { gap: 12px; }
  .health-facts strong { font-size: 22px; }
  .plot { max-height: 300px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, a { transition: background .15s, border-color .15s, color .15s; }
}
