/* Layout: fixed sidebar rail + scrolling work surface; dense tables, severity stripes encode state. */
:root {
  --bg: #f3f5f8; --panel: #ffffff; --panel-2: #f8f9fb; --ink: #121721; --muted: #596273; --line: #e1e5ec; --line-2: #eef1f5;
  --accent: #0d6b66; --accent-ink: #ffffff; --accent-soft: #e2f2f0;
  --ok: #1d7f47; --ok-soft: #e3f4ea; --warn: #9a6408; --warn-soft: #fdf1dc; --bad: #b8322b; --bad-soft: #fbe6e4; --info: #2a63c9; --info-soft: #e6eefb; --mute: #6b7384; --mute-soft: #eef0f4;
  --side: #10161f; --side-ink: #c9d1dd; --side-on: #ffffff; --side-hl: #1d2836;
  --shadow: 0 1px 2px rgba(16,22,31,.06), 0 4px 16px rgba(16,22,31,.04);
  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0c1016; --panel: #141a23; --panel-2: #18202b; --ink: #e6eaf0; --muted: #9aa4b5; --line: #263040; --line-2: #1d2531;
  --accent: #3fb8ad; --accent-ink: #06201e; --accent-soft: #123331;
  --ok: #4cc27d; --ok-soft: #12301f; --warn: #e5a84a; --warn-soft: #33270f; --bad: #f07067; --bad-soft: #3a1714; --info: #74a3f2; --info-soft: #142640; --mute: #8d97a9; --mute-soft: #1e2632;
  --side: #090c11; --side-ink: #a9b3c2; --side-on: #ffffff; --side-hl: #171f2b; --shadow: none; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0c1016; --panel: #141a23; --panel-2: #18202b; --ink: #e6eaf0; --muted: #9aa4b5; --line: #263040; --line-2: #1d2531;
  --accent: #3fb8ad; --accent-ink: #06201e; --accent-soft: #123331;
  --ok: #4cc27d; --ok-soft: #12301f; --warn: #e5a84a; --warn-soft: #33270f; --bad: #f07067; --bad-soft: #3a1714; --info: #74a3f2; --info-soft: #142640; --mute: #8d97a9; --mute-soft: #1e2632;
  --side: #090c11; --side-ink: #a9b3c2; --side-on: #ffffff; --side-hl: #171f2b; --shadow: none; color-scheme: dark; }

html, body { height: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.45; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--panel); }
* { box-sizing: border-box; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: 1.6rem; font-weight: 700; } h3 { font-size: 1rem; font-weight: 650; } h4 { font-size: .92rem; font-weight: 650; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); } .xs { font-size: .78rem; } .strong { font-weight: 650; } .nowrap { white-space: nowrap; }
.tnum, .num, .kpi-v { font-variant-numeric: tabular-nums; }
.c-bad { color: var(--bad); } .c-warn { color: var(--warn); } .c-info { color: var(--info); } .c-ok { color: var(--ok); }
.na { color: var(--muted); font-style: italic; font-size: .82em; }
.row { display: flex; align-items: center; } .wrap { flex-wrap: wrap; } .spread { justify-content: space-between; width: 100%; }
.gap-s { gap: 8px; } .gap-m { gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; } .stack-s { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

/* shell */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
.shell.collapsed { grid-template-columns: 64px minmax(0, 1fr); }
.side { background: var(--side); color: var(--side-ink); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 14px 10px; padding-top: max(14px, env(safe-area-inset-top, 0px)); gap: 4px; overflow-y: auto; z-index: 30; padding-left: max(10px, env(safe-area-inset-left, 0px)); }
.brand { display: flex; gap: 10px; align-items: center; padding: 6px 8px 16px; color: var(--side-on); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.brand-t { font-family: var(--f-display); font-size: .78rem; line-height: 1.15; color: var(--side-ink); } .brand-t b { color: var(--side-on); font-size: .95rem; font-weight: 700; }
.nav, .collapse { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--side-ink); cursor: pointer; text-align: left; font-size: .9rem; white-space: nowrap; }
.nav:hover, .collapse:hover { background: var(--side-hl); color: var(--side-on); }
.nav.on { background: var(--side-hl); color: var(--side-on); box-shadow: inset 3px 0 0 var(--accent); }
.nav svg { flex: none; } .nav-n { margin-left: auto; font-size: .72rem; background: #2a3546; color: #fff; border-radius: 10px; padding: 1px 7px; font-variant-numeric: tabular-nums; } .nav-bad { background: #b8322b; }
.collapse { margin-top: auto; }
.collapsed .nav-l, .collapsed .brand-t, .collapsed .nav-n { display: none; } .collapsed .nav, .collapsed .collapse { justify-content: center; padding: 9px 0; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--panel); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; padding-block: 10px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.top .menu { display: none; }
.search { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; color: var(--muted); }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 0; color: var(--ink); font: inherit; outline: none; }
.search:focus-within { border-color: var(--accent); }
.search-r { position: absolute; top: calc(100% + 4px); left: 0; right: 0; list-style: none; margin: 0; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); z-index: 40; }
.search-r button { width: 100%; text-align: left; display: flex; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; color: var(--ink); }
.search-r button:hover { background: var(--panel-2); }
.top-r { margin-left: auto; display: flex; align-items: center; gap: 8px; } .asof { font-size: .8rem; color: var(--muted); white-space: nowrap; } .asof b { color: var(--ink); }
.banner { display: flex; gap: 10px; align-items: center; background: var(--warn-soft); color: var(--ink); border-bottom: 1px solid var(--line); font-size: .84rem; padding-block: 8px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
.banner-bad { background: var(--bad-soft); }
.content { padding-block: 22px 28px; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); max-width: 1680px; width: 100%; }
.foot { padding: 10px max(20px, env(safe-area-inset-right, 0px)) 18px max(20px, env(safe-area-inset-left, 0px)); }
.scrim { display: none; }

/* page */
.page-h { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-h p { margin-top: 4px; }
.client-h h1 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 8px; padding: 7px 12px; cursor: pointer; font-size: .86rem; font-weight: 550; white-space: nowrap; }
.btn:hover:not(:disabled) { border-color: var(--muted); } .btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 4px 9px; font-size: .78rem; } .btn.ghost { border-color: transparent; background: transparent; padding: 6px 8px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .btn.primary:hover:not(:disabled) { filter: brightness(1.08); border-color: var(--accent); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn.danger-ghost { color: var(--bad); }
.file-btn { position: relative; overflow: hidden; } .file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.link { border: 0; background: none; padding: 0; color: var(--accent); cursor: pointer; text-align: inherit; } .link:hover { text-decoration: underline; } .left { text-align: left; }
.inp { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); padding: 7px 10px; font: inherit; font-size: .88rem; }
select.inp { width: auto; max-width: 100%; padding-right: 26px; } .field select.inp { width: 100%; }
textarea.inp { resize: vertical; } .mono { font-family: var(--f-mono); font-size: .78rem; }
.inp:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--panel); }
.seg button { border: 0; background: transparent; padding: 6px 12px; cursor: pointer; font-size: .84rem; color: var(--muted); } .seg button.on { background: var(--ink); color: var(--panel); }
.radio { display: inline-flex; gap: 6px; align-items: center; font-size: .86rem; }
.form { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px 16px; } .form-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; } .field.wide { grid-column: 1 / -1; }
.field-l { font-size: .76rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; } .field-h { font-size: .74rem; color: var(--muted); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tab { border: 0; background: transparent; padding: 9px 12px; cursor: pointer; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.savebar { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 58px); z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; box-shadow: var(--shadow); }

/* cards and kpis */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.card-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; } .card-a { display: flex; gap: 8px; align-items: center; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-wide { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.kpi { background: var(--panel); padding: 14px 16px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi-l { font-size: .74rem; color: var(--muted); font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.kpi-v { font-family: var(--f-display); font-size: 1.55rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.kpi-s { font-size: .78rem; color: var(--muted); }
.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .kpis-sm .kpi-v { font-size: 1.25rem; } .kpi-bad .kpi-v { color: var(--bad); } .kpi-warn .kpi-v { color: var(--warn); } .kpi-info .kpi-v { color: var(--info); }
.empty { border: 1px dashed var(--line); border-radius: 12px; padding: 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }
.empty strong { color: var(--ink); }
.note { background: var(--info-soft); border-radius: 9px; padding: 10px 12px; font-size: .85rem; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 9px; font-size: .74rem; font-weight: 650; white-space: nowrap; border: 1px solid transparent; }
.pill-ok { background: var(--ok-soft); color: var(--ok); } .pill-warn { background: var(--warn-soft); color: var(--warn); } .pill-bad { background: var(--bad-soft); color: var(--bad); } .pill-info { background: var(--info-soft); color: var(--info); } .pill-mute { background: var(--mute-soft); color: var(--mute); }
.conf { font-size: .72rem; font-weight: 600; padding: 1px 7px; border-radius: 5px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.conf-high { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); } .conf-moderate { color: var(--info); border-color: color-mix(in srgb, var(--info) 40%, transparent); } .conf-low { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 40%, transparent); } .conf-insufficient { color: var(--mute); border-style: dashed; }
.syn { display: inline-block; font-family: var(--f-mono); font-size: .62rem; font-weight: 600; letter-spacing: .08em; padding: 1px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); border: 1px dashed var(--warn); margin-left: 6px; vertical-align: middle; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; } .dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-bad { background: var(--bad); } .dot-mute { background: var(--mute); }
.bg-ok { background: var(--ok); } .bg-warn { background: var(--warn); } .bg-bad { background: var(--bad); } .bg-info { background: var(--info); } .bg-mute { background: var(--mute-soft); } .bg-accent { background: var(--accent); }

/* ring */
.ring { flex: none; } .ring-bg { stroke: var(--line); } .ring-fg { stroke: var(--mute); } .ring-t { font-family: var(--f-display); font-weight: 700; font-size: 13px; fill: var(--ink); }
.tone-ok .ring-fg { stroke: var(--ok); } .tone-info .ring-fg { stroke: var(--info); } .tone-warn .ring-fg { stroke: var(--warn); } .tone-bad .ring-fg { stroke: var(--bad); }

/* tooltip */
.tip { position: relative; display: inline-flex; align-items: center; gap: 4px; cursor: help; }
.tip-i { display: inline-grid; place-items: center; width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); font-size: 9px; color: var(--muted); font-weight: 700; flex: none; text-transform: none; }
.tip-b { position: absolute; left: 0; top: calc(100% + 6px); z-index: 50; width: max-content; max-width: 260px; background: var(--ink); color: var(--panel); padding: 8px 10px; border-radius: 8px; font-size: .76rem; font-weight: 450; line-height: 1.4; text-transform: none; letter-spacing: 0; white-space: normal; opacity: 0; pointer-events: none; transform: translateY(-2px); transition: opacity .12s, transform .12s; text-align: left; }
.tip:hover .tip-b, .tip:focus .tip-b { opacity: 1; transform: none; }

/* filters */
.filters { display: flex; flex-direction: column; gap: 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: .8rem; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; color: var(--ink); }
.chip.on { background: var(--ink); color: var(--panel); border-color: var(--ink); } .chip-n { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .72rem; } .chip.on .chip-n { color: inherit; opacity: .7; } .chip.clear { color: var(--accent); }

/* tables */
.tablewrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); max-width: 100%; } .tablewrap.tall { max-height: 480px; overflow-y: auto; }
.card .tablewrap { border-radius: 8px; }
.tbl { width: 100%; border-collapse: collapse; font-size: .84rem; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: top; }
.tbl thead th { position: sticky; top: 0; background: var(--panel-2); font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 650; white-space: nowrap; z-index: 2; }
.tbl tbody tr:hover td { background: var(--panel-2); } .tbl .num { text-align: right; white-space: nowrap; }
.tbl-compact th, .tbl-compact td { padding: 6px 8px; } .tbl-compact tbody th { font-weight: 550; color: var(--muted); }
.th-b { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; white-space: nowrap; }
.tbl-port td { white-space: nowrap; } .tbl-port td.next { white-space: normal; min-width: 260px; max-width: 340px; font-size: .8rem; }
.sticky-col { position: sticky; left: 0; background: var(--panel); z-index: 1; min-width: 220px; } thead .sticky-col { z-index: 3; background: var(--panel-2); }
.stripe-row td.sticky-col { box-shadow: inset 4px 0 0 var(--stripe, transparent); }
.stripe-bad { --stripe: var(--bad); } .stripe-warn { --stripe: var(--warn); } .stripe-info { --stripe: var(--info); } .stripe-mute { --stripe: var(--line); } .stripe-ok { --stripe: var(--ok); }
.clickable { cursor: pointer; }
.pace { margin-top: 4px; width: 100px; } .pace-track { position: relative; height: 6px; background: var(--line-2); border-radius: 3px; }
.pace-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 3px; } .pace-exp { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .55; } .pace-budget { position: absolute; top: -3px; bottom: -3px; width: 1px; background: var(--muted); }

/* card grid */
.cardgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ccard { text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; box-shadow: inset 4px 0 0 var(--stripe, transparent); color: var(--ink); }
.ccard:hover { border-color: var(--muted); } .ccard-h { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.ccard-k { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .ccard-k div { display: flex; flex-direction: column; } .ccard-k b { font-family: var(--f-display); font-size: 1.05rem; }
.ccard .pace { width: 100%; } .ccard-n { color: var(--muted); }

/* alerts */
.alert { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); box-shadow: inset 4px 0 0 var(--stripe, transparent); overflow: hidden; }
.alert-h { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 16px; border: 0; background: transparent; cursor: pointer; text-align: left; flex-wrap: wrap; }
.alert-t { flex: 1; min-width: 180px; font-weight: 600; } .alert-meta { display: flex; gap: 8px; align-items: center; } .chev { width: 18px; text-align: center; color: var(--muted); font-weight: 700; }
.alert-b { padding: 4px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.alert-dl { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: .86rem; } .alert-dl dt { color: var(--muted); font-weight: 600; font-size: .78rem; padding-top: 2px; } .alert-dl dd { margin: 0; }
.ev { margin: 4px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; } .cite { color: var(--muted); font-family: var(--f-mono); font-size: .92em; }
.checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.check { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: start; font-size: .86rem; } .check:last-child { border-bottom: 0; } .check .pill { justify-self: start; }

/* charts */
.chart { position: relative; } .grid { stroke: var(--line-2); } .axis { fill: var(--muted); font-size: 10px; font-family: var(--f-mono); }
.bar { fill: var(--accent); opacity: .28; } .bar-h { opacity: .55; } .line { stroke: var(--ink); stroke-width: 2; } .line-end { fill: var(--ink); }
.marker { stroke: var(--warn); stroke-dasharray: 3 3; } .marker-t { fill: var(--warn); }
.legend { display: flex; gap: 14px; font-size: .76rem; color: var(--muted); margin-top: 4px; } .legend i { display: inline-block; width: 12px; height: 8px; margin-right: 5px; vertical-align: middle; } .lg-bar { background: var(--accent); opacity: .4; } .lg-line { height: 2px !important; background: var(--ink); }
.chart-tt { position: absolute; top: 4px; width: 140px; background: var(--ink); color: var(--panel); border-radius: 8px; padding: 6px 9px; font-size: .76rem; pointer-events: none; font-variant-numeric: tabular-nums; }
.hbars { display: flex; flex-direction: column; gap: 8px; } .hbar { display: grid; grid-template-columns: minmax(90px, 30%) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: .82rem; }
.hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar-t { position: relative; height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.hbar-f { height: 100%; border-radius: 5px; } .hbar-m { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); } .hbar-v { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--muted); font-size: .78rem; }

/* lists */
.mini { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; } .mini li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rank { margin: 0; padding: 0; list-style: none; counter-reset: rk; display: flex; flex-direction: column; gap: 10px; } .rank li { counter-increment: rk; display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px; align-items: start; } .rank li::before { content: counter(rk); font-family: var(--f-mono); font-size: .78rem; color: var(--muted); padding-top: 2px; } .rank li .tnum { white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; align-items: start; } .timeline .pill { justify-self: start; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; } .step { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.stepn { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; font-family: var(--f-mono); background: var(--mute-soft); color: var(--mute); }
.stepn.tone-ok { background: var(--ok-soft); color: var(--ok); } .stepn.tone-warn { background: var(--warn-soft); color: var(--warn); } .stepn.tone-bad { background: var(--bad-soft); color: var(--bad); }
.prose { max-width: 72ch; display: flex; flex-direction: column; gap: 10px; font-size: .9rem; } .prose ol, .prose ul { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 6px; } .prose h4 { margin-top: 6px; }

/* import */
.dsgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.dsbtn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 12px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; color: var(--ink); } .dsbtn.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.drop { position: relative; border: 1.5px dashed var(--line); border-radius: 12px; padding: 26px; text-align: center; display: flex; flex-direction: column; gap: 4px; cursor: pointer; background: var(--panel-2); } .drop:hover { border-color: var(--accent); } .drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

/* comms */
.copyblock { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; min-width: 0; }
.copyblock-h { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.copytext { margin: 0; padding: 14px; font-family: var(--f-mono); font-size: .76rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow-y: auto; }

/* tasks */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(240px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.col { background: var(--panel-2); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.col-h { display: flex; justify-content: space-between; padding: 2px 4px; font-size: .84rem; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 10px 10px 10px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: inset 4px 0 0 var(--stripe, transparent); }
.tcard select.inp { width: 100%; font-size: .78rem; padding: 4px 8px; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(8,12,18,.5); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--panel); border-radius: 14px; width: min(560px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; border: 1px solid var(--line); } .modal-wide { width: min(860px, 100%); }
.modal-h, .modal-f { padding: 12px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; } .modal-h { border-bottom: 1px solid var(--line); } .modal-f { border-top: 1px solid var(--line); }
.modal-b { padding: 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.toast { position: fixed; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: max(18px, env(safe-area-inset-right, 0px)); z-index: 200; background: var(--ink); color: var(--panel); padding: 10px 14px; border-radius: 10px; font-size: .86rem; box-shadow: var(--shadow); } .toast-bad { background: var(--bad); color: #fff; }
details summary { cursor: pointer; }

@media (max-width: 1100px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid-wide { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 860px) {
  .shell, .shell.collapsed { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 248px; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  .navopen .side { transform: none; } .navopen .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }
  .collapsed .nav-l, .collapsed .brand-t, .collapsed .nav-n { display: initial; } .collapsed .nav { justify-content: flex-start; padding: 8px 10px; } .collapse { display: none; }
  .top .menu { display: inline-flex; } .grid2, .grid3 { grid-template-columns: minmax(0, 1fr); }
  .top { padding-left: max(12px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); gap: 6px; }
  .content, .banner { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .asof { display: none; } h1 { font-size: 1.3rem; }
  .alert-dl { grid-template-columns: minmax(0, 1fr); } .alert-dl dt { padding-top: 6px; }
  .check { grid-template-columns: minmax(0, 1fr); gap: 4px; } .sticky-col { min-width: 170px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi-v { font-size: 1.25rem; }
  .board { grid-auto-columns: minmax(220px, 80%); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
.login-wrap { min-height: 100%; display: grid; place-items: center; padding-block: 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.login { width: min(400px, 100%); gap: 14px; }
.login h1 { font-size: 1.4rem; }
a.btn { text-decoration: none; }

/* M4a setup tab */
.stack-xs { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.h-sub { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 16px 0 4px; }
.progress { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; } .progress > span { display: block; height: 100%; background: var(--ok); }
