/* Ganiam RevOps — design system */
:root {
  color-scheme: light;
  --bg: #f4f3ef;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --surface-3: #f0eee8;
  --line: #e7e4dc;
  --line-2: #d8d4c9;
  --ink: #14161b;
  --ink-2: #4a4f59;
  --ink-3: #868b94;
  --btn: #16181d;
  --btn-ink: #ffffff;
  --accent: #2a78d6;
  --accent-soft: #e7f0fc;
  --series: #2a78d6;
  --series-ghost: #cde2fb;
  --good: #19804a; --good-soft: #e4f3ea;
  --warn: #a86f00; --warn-soft: #fbf0d9;
  --bad: #cc3434; --bad-soft: #fbe8e7;
  --info: #2a78d6; --info-soft: #e7f0fc;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(18, 20, 24, .04), 0 6px 20px rgba(18, 20, 24, .05);
  --shadow-lg: 0 12px 48px rgba(18, 20, 24, .18);
  --sidebar: #fbfaf7;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0e0f11; --surface: #16171a; --surface-2: #1b1c20; --surface-3: #222328;
    --line: #26282d; --line-2: #33363c; --ink: #f1f1ee; --ink-2: #b6b8bd; --ink-3: #7d818a;
    --btn: #f1f1ee; --btn-ink: #121316; --accent: #3987e5; --accent-soft: #1a2940;
    --series: #3987e5; --series-ghost: #1d3558;
    --good: #3fb872; --good-soft: #15291e; --warn: #e0a42b; --warn-soft: #2d2410; --bad: #ec6060; --bad-soft: #321616;
    --info: #3987e5; --info-soft: #1a2940; --sidebar: #121316;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f11; --surface: #16171a; --surface-2: #1b1c20; --surface-3: #222328;
  --line: #26282d; --line-2: #33363c; --ink: #f1f1ee; --ink-2: #b6b8bd; --ink-3: #7d818a;
  --btn: #f1f1ee; --btn-ink: #121316; --accent: #3987e5; --accent-soft: #1a2940;
  --series: #3987e5; --series-ghost: #1d3558;
  --good: #3fb872; --good-soft: #15291e; --warn: #e0a42b; --warn-soft: #2d2410; --bad: #ec6060; --bad-soft: #321616;
  --info: #3987e5; --info-soft: #1a2940; --sidebar: #121316;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01";
}
a { color: inherit; text-decoration: none; }
a.link, .prose a { color: var(--accent); }
a.link:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.ic { flex-shrink: 0; vertical-align: -3px; }
.muted { color: var(--ink-3); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ── Shell ─────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--sidebar);
  border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--btn); color: var(--btn-ink);
  display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: -.02em;
}
.brand b { font-weight: 650; letter-spacing: -.01em; display: block; line-height: 1.1; }
.brand small { color: var(--ink-3); font-size: 11.5px; }
.search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 8px;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-sm); color: var(--ink-3); cursor: pointer; text-align: left;
}
.search-btn kbd, kbd {
  margin-left: auto; font: 500 11px var(--font); color: var(--ink-3); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; background: var(--surface-2);
}
.nav-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500;
}
.nav a:hover { background: var(--surface-3); color: var(--ink); }
.nav a.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav a .count { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.nav a .count.hot { color: var(--bad); font-weight: 600; }
.nav .client-link { padding: 6px 10px; }
.nav .client-link .avatar { width: 22px !important; height: 22px !important; font-size: 9px !important; }
.sidebar-foot { margin-top: auto; display: flex; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 14px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 17px; font-weight: 650; margin: 0; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar .crumb { color: var(--ink-3); font-weight: 500; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.menu-btn { display: none; }
.content { padding: 8px 32px 64px; max-width: 1360px; }

/* ── Primitives ────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.card-h h2, .card-h h3 { margin: 0; font-size: 14px; font-weight: 650; letter-spacing: -.005em; }
.card-h .sub { color: var(--ink-3); font-size: 12.5px; }
.card-h .right { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.card-b { padding: 16px 20px; }
.card-f { padding: 12px 20px; border-top: 1px solid var(--line); }
h2.section { font-size: 13px; font-weight: 650; margin: 28px 0 12px; display: flex; align-items: center; gap: 8px; color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }

.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--surface); font-weight: 550; font-size: 13px; cursor: pointer;
  white-space: nowrap; transition: background .12s, border-color .12s, transform .06s; color: var(--ink);
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--btn); color: var(--btn-ink); border-color: var(--btn); }
.btn.primary:hover { opacity: .9; }
.btn.accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-3); color: var(--ink); }
.btn.danger { color: var(--bad); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 5px; }
.btn.icon { width: 34px; padding: 0; justify-content: center; }
.btn.sm.icon { width: 28px; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2); font-size: 11.5px; font-weight: 550; white-space: nowrap;
}
.chip.cat i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.chip.stage { background: transparent; border: 1px solid var(--line-2); }
.chip.good { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.muted { background: transparent; color: var(--ink-3); padding: 0; }
.chip.dark { background: var(--btn); color: var(--btn-ink); }

.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex-shrink: 0; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent); }
.dot.good { background: var(--good); color: var(--good); }
.dot.warn { background: var(--warn); color: var(--warn); }
.dot.bad { background: var(--bad); color: var(--bad); }
.nav .dot { width: 7px; height: 7px; margin-left: auto; box-shadow: none; }

.avatar {
  display: inline-grid; place-items: center; border-radius: 8px; background: var(--av); color: #fff;
  font-weight: 700; letter-spacing: -.02em; flex-shrink: 0;
}

/* Stat tiles */
.tile { padding: 16px 18px; }
.tile .label { color: var(--ink-3); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.tile .value { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.15; }
.tile .foot { font-size: 12px; color: var(--ink-3); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.delta { font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; gap: 3px; }
.delta.good { color: var(--good); } .delta.bad { color: var(--bad); } .delta.flat { color: var(--ink-3); }

/* Hero */
.hero { padding: 26px 0 18px; display: flex; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.05; margin: 0; letter-spacing: -.01em; }
.hero h1 em { color: var(--ink-3); }
.hero p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }

/* Ship strip */
.strip { display: flex; gap: 4px; align-items: flex-end; }
.strip i { width: 14px; height: 14px; border-radius: 4px; background: var(--surface-3); border: 1px solid var(--line); display: block; }
.strip i.l1 { background: color-mix(in srgb, var(--good) 35%, var(--surface)); border-color: transparent; }
.strip i.l2 { background: color-mix(in srgb, var(--good) 65%, var(--surface)); border-color: transparent; }
.strip i.l3 { background: var(--good); border-color: transparent; }
.strip i.today { outline: 2px solid var(--ink); outline-offset: 1px; }

/* Tasks */
.task { display: flex; align-items: flex-start; gap: 12px; padding: 11px 20px; border-bottom: 1px solid var(--line); transition: background .15s, opacity .3s; }
.task:last-child { border-bottom: 0; }
.task:hover { background: var(--surface-2); }
.task .body { flex: 1; min-width: 0; }
.task .t { font-weight: 520; line-height: 1.4; }
.task .meta { display: flex; gap: 8px; align-items: center; margin-top: 4px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }
.task.done .t { text-decoration: line-through; color: var(--ink-3); }
.task.leaving { opacity: 0; }
.task .acts { opacity: 0; display: flex; gap: 2px; transition: opacity .12s; }
.task:hover .acts { opacity: 1; }
.due { font-size: 12px; font-weight: 600; white-space: nowrap; }
.due.bad { color: var(--bad); } .due.warn { color: var(--warn); } .due.info { color: var(--info); } .due.muted { color: var(--ink-3); font-weight: 500; }
.ck {
  width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--line-2); background: var(--surface); cursor: pointer;
  display: grid; place-items: center; flex-shrink: 0; margin-top: 1px; color: transparent; transition: all .15s;
}
.ck:hover { border-color: var(--good); }
.ck.on { background: var(--good); border-color: var(--good); color: #fff; animation: pop .28s ease; }
@keyframes pop { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.owner-client { color: var(--warn); font-weight: 600; }
.owner-blocked { color: var(--bad); font-weight: 600; }
.group-h { padding: 10px 20px 6px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.group-h.bad { color: var(--bad); }

/* Portfolio cards */
.pcard { display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.pcard:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 10px 30px rgba(18, 20, 24, .08); }
.pcard .top { display: flex; gap: 12px; align-items: center; padding: 16px 18px 10px; }
.pcard .name { font-weight: 650; letter-spacing: -.01em; }
.pcard .model { font-size: 12px; color: var(--ink-3); }
.pcard .ns { padding: 4px 18px 12px; display: flex; align-items: flex-end; gap: 12px; }
.pcard .ns .v { font-size: 24px; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pcard .ns .l { font-size: 12px; color: var(--ink-3); }
.pcard .bneck { margin: 0 18px 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }
.pcard .bneck b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 2px; }
.pcard .foot { margin-top: auto; padding: 10px 18px; border-top: 1px solid var(--line); display: flex; gap: 12px; font-size: 12px; color: var(--ink-3); align-items: center; }
.leakline { margin: 0 18px 12px; font-size: 12.5px; display: flex; gap: 8px; align-items: flex-start; color: var(--ink-2); }
.leakline .ic { color: var(--bad); margin-top: 2px; }

/* Radar list */
.radar { display: flex; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.radar:last-child { border-bottom: 0; }
.radar .rate { margin-left: auto; text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.radar .rate small { display: block; font-weight: 500; color: var(--ink-3); font-size: 11.5px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 0 0 20px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--ink-3); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--ink); }
.tabs a .count { font-size: 11px; background: var(--surface-3); border-radius: 999px; padding: 0 6px; color: var(--ink-2); }

/* Client header */
.chead { display: flex; gap: 16px; align-items: center; padding: 20px 0 16px; flex-wrap: wrap; }
.chead h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 700; }
.chead .facts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.phases { display: flex; gap: 4px; }
.phases span { height: 6px; width: 34px; border-radius: 3px; background: var(--surface-3); border: 1px solid var(--line); }
.phases span.done { background: var(--ink-2); border-color: transparent; }
.phases span.cur { background: var(--accent); border-color: transparent; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 11.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--surface-2); }
.tbl .r, .tbl th.r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl-wrap { overflow-x: auto; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12.5px; font-weight: 550; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 11.5px; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 13.5px; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 84px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.sm { height: 30px; font-size: 12.5px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-sm); padding: 2px; background: var(--surface-2); }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 6px; font-size: 12.5px; font-weight: 550; color: var(--ink-3); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; cursor: pointer; }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(12, 13, 16, .42); backdrop-filter: blur(2px); z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 8vh 16px; overflow-y: auto; }
.modal-bg.open { display: flex; animation: fade .15s ease; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: rise .18s ease; }
.modal.wide { max-width: 780px; }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 10px; }
.modal-h h3 { margin: 0; font-size: 15px; font-weight: 650; }
.modal-b { padding: 18px 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(8px) scale(.99); opacity: 0; } }

.preview-box { margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--ink-2); font-size: 12.5px; display: none; }
.preview-box.show { display: block; }
.preview-box b { color: var(--info); }

/* Command palette */
.palette { max-width: 620px; }
.palette input { border: 0; width: 100%; font-size: 16px; padding: 16px 20px; background: transparent; color: var(--ink); outline: none; border-bottom: 1px solid var(--line); }
.palette .results { max-height: 380px; overflow-y: auto; padding: 6px; }
.palette .item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; color: var(--ink-2); }
.palette .item.on { background: var(--surface-3); color: var(--ink); }
.palette .item small { margin-left: auto; color: var(--ink-3); }
.palette .grp { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); padding: 10px 12px 4px; }

/* Toast */
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { background: var(--btn); color: var(--btn-ink); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); font-size: 13px; max-width: 380px; animation: rise .2s ease; display: flex; gap: 10px; align-items: flex-start; }
.toast.err { background: var(--bad); color: #fff; }
.toast small { display: block; opacity: .7; margin-top: 2px; }

/* Empty */
.empty { text-align: center; padding: 36px 24px; color: var(--ink-3); }
.empty .ic { color: var(--ink-3); margin-bottom: 8px; }
.empty b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; font-size: 14px; }

/* Timeline */
.tl { position: relative; padding: 4px 20px 8px; }
.tl-item { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 6px; top: 26px; bottom: -10px; width: 1px; background: var(--line); }
.tl-item:last-child::before { display: none; }
.tl-dot { width: 13px; height: 13px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2); background: var(--c, var(--ink-3)); position: relative; z-index: 1; }
.tl-item .t { font-weight: 520; }
.tl-item .meta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.tl-day { font-size: 11.5px; font-weight: 650; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 12px 0 2px; }

/* Findings */
.finding { padding: 14px 20px; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.finding:last-child { border-bottom: 0; }
.finding .sev { width: 4px; border-radius: 2px; align-self: stretch; flex-shrink: 0; background: var(--ink-3); }
.finding .sev.critical { background: var(--bad); } .finding .sev.high { background: var(--warn); } .finding .sev.medium { background: var(--accent); } .finding .sev.low { background: var(--line-2); }
.finding.win .sev { background: var(--good); }
.finding .t { font-weight: 600; }
.finding .ev { color: var(--ink-2); font-size: 13px; margin-top: 4px; white-space: pre-line; }
.bneck-card { border-left: 3px solid var(--bad); }
.bneck-card .label { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--bad); display: flex; align-items: center; gap: 6px; }
.bneck-card .text { font-size: 15px; font-weight: 550; line-height: 1.45; margin-top: 6px; letter-spacing: -.005em; }

/* Prose */
.prose { color: var(--ink-2); font-size: 13.5px; }
.prose h3, .prose h4 { color: var(--ink); margin: 16px 0 6px; font-size: 13.5px; }
.prose h3:first-child, .prose h4:first-child { margin-top: 0; }
.prose p { margin: 6px 0; }
.prose ul { margin: 6px 0; padding-left: 18px; }
.prose code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* Dropzone */
.drop { border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--ink-3); cursor: pointer; transition: all .15s; background: var(--surface-2); }
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); color: var(--ink-2); }
.drop b { color: var(--ink); display: block; margin: 6px 0 2px; font-size: 14px; }
.upl-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.upl-item { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 12.5px; background: var(--surface); }

/* Coverage matrix */
.cov { border-collapse: separate; border-spacing: 4px; font-size: 12px; }
.cov th { font-weight: 600; color: var(--ink-3); text-align: left; padding: 2px 6px; white-space: nowrap; }
.cov td { width: 30px; height: 22px; border-radius: 5px; background: var(--surface-3); text-align: center; }
.cov td.on { background: var(--series); color: #fff; font-weight: 600; font-size: 11px; }

/* Sparkline */
.spark { display: block; }
.spark path.l { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.spark path.a { fill: var(--series); opacity: .08; }
.spark circle { fill: var(--series); stroke: var(--surface); stroke-width: 2; }

/* ── Funnel ───────────────────────────────────────────── */
.fx-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.fx-controls .input { width: auto; min-width: 150px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 20px 0; }
.fx-chip { display: inline-flex; gap: 6px; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); font-size: 12px; font-weight: 550; cursor: pointer; color: var(--ink-2); user-select: none; }
.fx-chip.off { background: transparent; color: var(--ink-3); text-decoration: line-through; border-style: dashed; }
.fx-chip i { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.fx { padding: 10px 20px 20px; }
.fx-row { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 150px; gap: 16px; align-items: center; padding: 6px 0; position: relative; border-radius: 8px; }
.fx-row:hover { background: var(--surface-2); }
.fx-name { font-weight: 560; font-size: 13px; line-height: 1.3; padding-left: 8px; }
.fx-name small { display: block; color: var(--ink-3); font-weight: 500; font-size: 11.5px; margin-top: 1px; }
.fx-bar { position: relative; height: 30px; }
.fx-bar .ghost { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series-ghost); border-radius: 0 4px 4px 0; opacity: .7; }
.fx-bar .fill { position: absolute; left: 0; top: 5px; bottom: 5px; background: var(--series); border-radius: 0 4px 4px 0; transition: width .45s cubic-bezier(.2, .8, .2, 1); min-width: 2px; }
.fx-bar .na { position: absolute; inset: 5px 0; border-radius: 4px; border: 1.5px dashed var(--line-2); display: flex; align-items: center; padding-left: 10px; font-size: 11.5px; color: var(--ink-3); background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-3) 6px 7px); }
.fx-val { text-align: right; font-variant-numeric: tabular-nums; padding-right: 8px; }
.fx-val b { font-size: 16px; font-weight: 650; letter-spacing: -.01em; }
.fx-val small { display: block; font-size: 11.5px; color: var(--ink-3); }
.fx-gap { display: grid; grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) 150px; gap: 16px; align-items: center; min-height: 26px; }
.fx-drop { display: flex; align-items: center; flex-wrap: wrap; gap: 2px 8px; font-size: 12px; color: var(--ink-3); padding-left: 2px; }
.fx-drop > * { white-space: nowrap; }
.fx-drop .arrow { width: 1px; height: 18px; background: var(--line-2); margin: 0 6px 0 4px; }
.fx-drop .rate { font-weight: 650; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.fx-drop .bench { font-size: 11.5px; }
.fx-drop .bench.below { color: var(--bad); font-weight: 600; }
.fx-drop .bench.above { color: var(--good); font-weight: 600; }
.fx-gap.leak .fx-drop { color: var(--bad); }
.fx-leak-tag { display: inline-flex; gap: 5px; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 650; }
.fx-legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--ink-3); padding: 0 20px 14px; flex-wrap: wrap; }
.fx-legend i { display: inline-block; width: 12px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 5px; }
.fx-diag { padding: 16px 20px; border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.fx-diag .k { font-size: 11.5px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.fx-diag .v { font-size: 14px; font-weight: 600; margin-top: 3px; line-height: 1.4; }
.fx-diag .v.bad { color: var(--bad); }
.tip { position: fixed; z-index: 300; pointer-events: none; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow-lg); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; min-width: 200px; max-width: 280px; display: none; }
.tip .h { font-weight: 650; margin-bottom: 6px; }
.tip .r { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-2); padding: 1px 0; }
.tip .r b { color: var(--ink); font-variant-numeric: tabular-nums; }

/* Report (print) */
.report-page { background: var(--surface); max-width: 820px; margin: 0 auto; padding: 44px 48px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.report-page h1 { font-size: 24px; letter-spacing: -.02em; margin: 0; }
.report-page h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 26px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.report-page .headline { font-size: 18px; font-weight: 600; line-height: 1.45; letter-spacing: -.01em; }
.report-page [contenteditable]:hover { background: var(--accent-soft); border-radius: 4px; }
.report-page [contenteditable]:focus { outline: 2px solid var(--accent); border-radius: 4px; background: transparent; }
@media print {
  .sidebar, .topbar, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .content { padding: 0; max-width: none; }
  body { background: #fff; }
  .report-page { border: 0; box-shadow: none; padding: 0; max-width: none; }
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar { transform: none; }
  .menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .g2, .g3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .fx-row, .fx-gap { grid-template-columns: minmax(0, 1fr) 96px; }
  .fx-row .fx-bar { grid-column: 1 / -1; grid-row: 2; }
  .fx-gap > div:first-child { display: none; }
  .fx-diag { grid-template-columns: minmax(0, 1fr); }
  .topbar .actions .btn .lbl { display: none; }
  .hero h1 { font-size: 32px; }
  .report-page { padding: 24px 18px; }
}
@media (max-width: 560px) {
  .g4 { grid-template-columns: minmax(0, 1fr); }
}
