@font-face { font-family: "Inter"; src: url("../fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Policrest — design tokens. Status colors follow the dataviz status palette
   (good/warning/serious/critical) and always ship with a text label. */
:root {
  color-scheme: light;
  --bg: #f5f6f8; --surface: #ffffff; --surface-2: #f3f4f7; --surface-3: #e9ecf1;
  --border: #e3e6eb; --border-strong: #cfd4dc;
  --text: #101828; --text-2: #475467; --muted: #667085;
  --accent: #2a78d6; --accent-ink: #1c5cab; --accent-soft: #e8f1fc;
  --ai: #6250d6; --ai-2: #8b5cf6; --ai-soft: #f1effd; --ai-ink: #4a3aa7;
  --good: #0ca30c; --good-ink: #067a06; --good-soft: #e5f6e5;
  --warn: #fab219; --warn-ink: #8a5a00; --warn-soft: #fff5dc;
  --bad: #d03b3b; --bad-ink: #b42323; --bad-soft: #fdeaea;
  --info: #2a78d6; --info-ink: #1c5cab; --info-soft: #e8f1fc;
  --heat-1: #d9f2d9; --heat-2: #fff1c2; --heat-3: #ffd2b8; --heat-4: #f6b3b3; --heat-ink: #101828;
  --side-bg: #0b1220; --side-text: #c9d1dd; --side-muted: #7d8899; --side-hover: #16213a; --side-active: #1d2c4d;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px -1px rgba(16,24,40,.06), 0 8px 24px -12px rgba(16,24,40,.10);
  --shadow-hover: 0 2px 4px rgba(16,24,40,.05), 0 12px 28px -10px rgba(16,24,40,.18);
  --shadow-lg: 0 24px 48px -12px rgba(16,24,40,.28);
  --card-border: rgba(16,24,40,.06);
  --topbar-h: 65px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0d1117; --surface: #151b24; --surface-2: #1b2230; --surface-3: #232c3c;
    --border: #262f3e; --border-strong: #354156;
    --text: #e8ecf2; --text-2: #b4bdca; --muted: #8b95a5;
    --accent: #3987e5; --accent-ink: #86b6ef; --accent-soft: #15253d;
    --ai: #9085e9; --ai-2: #a78bfa; --ai-soft: #221f3d; --ai-ink: #c4bcf5;
    --good-ink: #5fd35f; --good-soft: #12301a; --warn-ink: #ffcf66; --warn-soft: #33270c;
    --bad-ink: #ff8a8a; --bad-soft: #3a1717; --info-ink: #86b6ef; --info-soft: #15253d;
    --heat-1: #1d4a2a; --heat-2: #5a4a12; --heat-3: #6e3a1e; --heat-4: #7a2424; --heat-ink: #f2f4f7;
    --side-bg: #080c14; --side-hover: #121a2b; --side-active: #18243f;
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -14px rgba(0,0,0,.7); --shadow-hover: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 32px -12px rgba(0,0,0,.8);
    --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.65); --card-border: rgba(255,255,255,.06);
  }
}
/* Explicit choice from the Display menu wins over the OS setting. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0d1117; --surface: #151b24; --surface-2: #1b2230; --surface-3: #232c3c;
    --border: #262f3e; --border-strong: #354156;
    --text: #e8ecf2; --text-2: #b4bdca; --muted: #8b95a5;
    --accent: #3987e5; --accent-ink: #86b6ef; --accent-soft: #15253d;
    --ai: #9085e9; --ai-2: #a78bfa; --ai-soft: #221f3d; --ai-ink: #c4bcf5;
    --good-ink: #5fd35f; --good-soft: #12301a; --warn-ink: #ffcf66; --warn-soft: #33270c;
    --bad-ink: #ff8a8a; --bad-soft: #3a1717; --info-ink: #86b6ef; --info-soft: #15253d;
    --heat-1: #1d4a2a; --heat-2: #5a4a12; --heat-3: #6e3a1e; --heat-4: #7a2424; --heat-ink: #f2f4f7;
    --side-bg: #080c14; --side-hover: #121a2b; --side-active: #18243f;
    --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 8px 24px -14px rgba(0,0,0,.7); --shadow-hover: 0 1px 0 rgba(255,255,255,.04) inset, 0 14px 32px -12px rgba(0,0,0,.8);
    --shadow-lg: 0 24px 48px -12px rgba(0,0,0,.65); --card-border: rgba(255,255,255,.06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
td, .kpi strong, .big-stats strong, .hbar-value, .ring-label strong, .count, .when, time, .tier strong { font-variant-numeric: tabular-nums; }
a { color: var(--accent-ink); text-decoration: none; }
h1 { font-size: 32px; line-height: 1.15; font-weight: 750; letter-spacing: -.025em; margin: 6px 0 8px; }
h2 { font-size: 14px; font-weight: 650; margin: 0; letter-spacing: -.005em; }
h3 { font-size: 14px; margin: 0; }
h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.fine { font-size: 12px; }
.icon { flex: none; vertical-align: -3px; }
kbd { font: 11px var(--font); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--muted); background: var(--surface); }
code { font-size: 12px; background: var(--surface-2); padding: 1px 4px; border-radius: 4px; }

/* ---------- layout ---------- */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 248px; background: var(--side-bg); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; padding: 0 8px 16px; }
.brand em { font-style: normal; color: #86b6ef; font-weight: 700; }
.org { display: flex; gap: 10px; align-items: center; padding: 10px; margin-bottom: 14px; border: 1px solid #1f2a40; border-radius: 10px; background: #0f1829; }
.org b { color: #fff; font-size: 13px; display: block; }
.org small { color: var(--side-muted); font-size: 11px; }
.org-logo { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: linear-gradient(135deg, #2a78d6, #6250d6); color: #fff; font-weight: 700; }
#nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
#nav a { display: flex; align-items: center; gap: 10px; color: var(--side-text); padding: 8px 10px; border-radius: 8px; font-weight: 500; }
#nav a:hover { background: var(--side-hover); color: #fff; }
#nav a.active { background: var(--side-active); color: #fff; box-shadow: inset 2px 0 0 #3987e5; }
#nav a.ai-link .icon { color: #b8aefc; }
#nav a.ai-link span { background: linear-gradient(90deg, #c4bcf5, #93c0f5); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 600; }
.nav-group { margin: 16px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--side-muted); }
.nav-badge { margin-left: auto; background: #d03b3b; color: #fff; font-size: 11px; min-width: 20px; text-align: center; padding: 0 6px; border-radius: 99px; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding: 12px 8px 0; border-top: 1px solid #1f2a40; }
.ai-status { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--side-muted); }
.ai-status.live { color: #b8aefc; }
.link-btn { background: none; border: 0; padding: 0; color: var(--side-muted); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; text-align: left; }
.copilot .link-btn { color: var(--muted); }

.main { margin-left: 248px; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; padding: 12px var(--gutter); background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.search-btn { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); border-radius: 10px; font: inherit; cursor: pointer; text-align: left; }
.search-btn span { flex: 1; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .btn kbd { background: transparent; color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.35); }
.demo-banner { margin: 16px var(--gutter) 0; padding: 8px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn-ink); font-size: 12.5px; }
/* Content is centred and capped at 1536px on wide screens; --gutter keeps edges aligned. */
.main { --gutter: max(32px, calc((100% - 1536px) / 2)); }
#view { padding: 40px var(--gutter) 80px; }
.mobile-only { display: none; }

/* ---------- primitives ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 32px; flex-wrap: wrap; }
.page-head > div:first-child { max-width: 760px; }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.head-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 20px; margin-bottom: 24px; }
.two { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.three { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.two-one { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.card { background: var(--surface); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card.center { display: grid; place-items: center; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { display: flex; align-items: center; gap: 8px; }
.card-head.pad { padding: 20px 22px 0; margin-bottom: 12px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sub { margin: 18px 0 8px; display: flex; gap: 6px; align-items: center; }
.link { display: inline-flex; gap: 4px; align-items: center; font-weight: 600; font-size: 13px; }
.empty { color: var(--muted); text-align: center; padding: 24px 8px; }
.error { color: var(--bad-ink); display: flex; gap: 6px; align-items: center; margin: 10px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; font-size: 13.5px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; white-space: nowrap; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-ink); }
.btn.ai { background: linear-gradient(135deg, var(--ai), #2a78d6); border-color: transparent; color: #fff; box-shadow: 0 4px 14px -6px rgba(98,80,214,.7); }
.btn.ai:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { padding: 12px 22px; font-size: 15px; }
.btn:disabled { opacity: .65; cursor: progress; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px 2px 7px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--text-2); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .9; }
.pill.good { background: var(--good-soft); color: var(--good-ink); }
.pill.warn { background: var(--warn-soft); color: var(--warn-ink); }
.pill.bad { background: var(--bad-soft); color: var(--bad-ink); }
.pill.info { background: var(--info-soft); color: var(--info-ink); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; margin: 2px 4px 2px 0; border: 1px solid var(--border); border-radius: 6px; color: var(--text-2); background: var(--surface); white-space: nowrap; }
.tag.warn { border-color: transparent; background: var(--warn-soft); color: var(--warn-ink); }
.tag.bad { border-color: transparent; background: var(--bad-soft); color: var(--bad-ink); }
.link-tag:hover { border-color: var(--accent); color: var(--accent-ink); }
.ai-badge, .ai-mini { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.ai-badge.live, .ai-mini { background: var(--ai-soft); color: var(--ai-ink); }
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; letter-spacing: .02em; }
.who { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.me .avatar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-strong); }
.bullets { margin: 4px 0 8px; padding-left: 18px; }
.bullets li { margin: 3px 0; }

/* shared workspace */
.sync-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 99px; background: var(--good-soft); color: var(--good-ink); }
.sync-chip[hidden] { display: none; }
.sync-chip.saving { background: var(--info-soft); color: var(--info-ink); }
.sync-chip.error { background: var(--bad-soft); color: var(--bad-ink); }
.sync-chip.readonly { background: var(--surface-3); color: var(--text-2); }
.sync-chip .spinner { width: 11px; height: 11px; }
.demo-banner.shared { background: var(--info-soft); color: var(--info-ink); }
.providers.setup { grid-template-columns: 1fr; margin: 12px 0; }
.providers.setup .provider { text-align: left; font: inherit; background: var(--surface); }
.providers.setup .provider:hover { border-color: var(--accent); background: var(--accent-soft); }

.people { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.people li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; }
.people li .muted { margin-right: auto; }
.add-map input { margin: 0; }

/* Microsoft sign-in */
.btn.ms { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.me { position: relative; }
.user-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; }
.user-menu { position: absolute; right: 0; top: 42px; width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px; z-index: 40; }
.user-id { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.user-id b { display: block; }
.user-id small { color: var(--muted); word-break: break-all; }

/* forms */
label { display: block; font-weight: 600; font-size: 12.5px; color: var(--text-2); margin: 14px 0 0; }
input, select, textarea { display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 14px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; padding: 9px 11px; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, a:focus-visible, tr:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
textarea { min-height: 84px; resize: vertical; }
input[type="checkbox"] { display: inline; width: auto; margin: 0 6px 0 0; accent-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.check { display: flex; align-items: center; font-weight: 500; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar select { width: auto; margin: 0; min-width: 150px; }
.search { position: relative; margin: 0; flex: 1; min-width: 220px; max-width: 360px; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { margin: 0; padding-left: 34px; }
.seg-control { display: inline-flex; background: var(--surface-3); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg-control button, .seg-control a { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13px; color: var(--text-2); cursor: pointer; }
.seg-control .active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.fw-tabs { margin-bottom: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { margin: 0; display: inline-flex; align-items: center; border: 1px solid var(--border-strong); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-weight: 600; color: var(--text); }
.chip:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.toggle { margin: 0; display: inline-flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--text); }

/* tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 11px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 14px; white-space: normal; border-bottom: 1px solid var(--border); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tr[data-href] { cursor: pointer; transition: background .12s; }
tr[data-href]:hover { background: var(--surface-2); }
.cell-title { display: flex; gap: 8px; align-items: baseline; }
.cell-title b { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.cell-title span { font-weight: 600; }
.map-cell { max-width: 260px; }

/* ---------- dashboard ---------- */
.hero { grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); }
.hero-body { display: flex; align-items: center; gap: 24px; }
.hero-trend { flex: 1; min-width: 0; }
.kpi-col { display: grid; gap: 12px; }
.kpi { display: flex; align-items: center; gap: 14px; color: var(--text); padding: 14px 16px; transition: border-color .15s, transform .15s; }
.kpi:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.kpi strong { display: block; font-size: 24px; line-height: 1.1; letter-spacing: -.02em; }
.kpi span:not(.kpi-icon) { color: var(--muted); font-size: 12.5px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.kpi-icon.good { background: var(--good-soft); color: var(--good-ink); }
.kpi-icon.warn { background: var(--warn-soft); color: var(--warn-ink); }
.kpi-icon.bad { background: var(--bad-soft); color: var(--bad-ink); }
.kpi-icon.info { background: var(--info-soft); color: var(--info-ink); }
.fw-grid { grid-template-columns: repeat(auto-fit, minmax(min(196px, 100%), 1fr)); }
.fw-card { padding: 14px; gap: 12px; }
.fw-card { display: flex; align-items: center; gap: 14px; color: var(--text); transition: border-color .15s, transform .15s; }
.fw-card:hover { border-color: var(--accent); transform: translateY(-1px); }
.fw-card > div:nth-child(2) { flex: 1; }
.fw-card .icon { color: var(--muted); }
.fw-card .ring-label strong { font-size: 14px; }
.insight-headline { font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.35; }
.insight-list { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.insight-list li { display: flex; gap: 10px; align-items: flex-start; }
.empty-ai { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 16px; border-radius: 10px; background: linear-gradient(135deg, var(--ai-soft), var(--accent-soft)); }
.ai-feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ai-feats li { display: flex; gap: 8px; align-items: center; color: var(--text-2); }
.ai-feats .icon { color: var(--ai); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.rows li:last-child { border-bottom: 0; }
.rows a { color: var(--text); }
.rows a b { color: var(--muted); font-weight: 600; margin-right: 4px; }
.row-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; }
.timeline, .feed { list-style: none; margin: 0; padding: 0; }
.timeline a { display: flex; gap: 12px; align-items: flex-start; padding: 9px 0; color: var(--text); border-bottom: 1px solid var(--border); }
.timeline li:last-child a { border-bottom: 0; }
.timeline small { display: block; color: var(--muted); font-size: 11.5px; }
.when { flex: none; min-width: 78px; font-size: 12px; font-weight: 700; color: var(--text-2); background: var(--surface-2); border-radius: 6px; padding: 2px 8px; text-align: center; }
.when.warn { background: var(--warn-soft); color: var(--warn-ink); }
.when.bad { background: var(--bad-soft); color: var(--bad-ink); }
.feed li { display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.feed li:last-child { border-bottom: 0; }
.feed .who > span:not(.avatar) { display: none; }
.feed p { margin: 0; font-size: 13px; }
.feed time { grid-column: 2; font-size: 11.5px; color: var(--muted); }

/* getting started */
.onboard { margin-bottom: 16px; }
.onboard-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.onboard-steps a { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); height: 100%; }
.onboard-steps a:hover { border-color: var(--accent); background: var(--accent-soft); }
.onboard-steps .num { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--surface-3); color: var(--text-2); }
.onboard-steps .done .num { background: var(--good); color: #fff; }
.onboard-steps .done b { text-decoration: line-through; color: var(--muted); }
.onboard-steps small { display: block; color: var(--muted); font-size: 12px; }
.onboard-bar { flex: 1; max-width: 220px; }
.trend-empty { display: grid; place-items: center; text-align: center; min-height: 170px; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 16px; }

/* ---------- charts ---------- */
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring-track { stroke: var(--surface-3); }
.ring-value { stroke: var(--accent); transition: stroke-dashoffset .8s ease; }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-label strong { font-size: 28px; letter-spacing: -.03em; line-height: 1; }
.ring-label span { font-size: 11.5px; color: var(--muted); }
.trend { width: 100%; height: auto; display: block; overflow: visible; }
.trend .grid { stroke: var(--border); stroke-width: 1; }
.trend .axis { fill: var(--muted); font-size: 11px; }
.trend .area { fill: var(--accent); opacity: .12; }
.trend .line { stroke: var(--accent); stroke-width: 2.5; }
.trend .dot-last { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.trend .value-label { fill: var(--text); font-size: 12px; font-weight: 700; }
.trend .hit .crosshair, .trend .hit .dot { opacity: 0; transition: opacity .1s; }
.trend .hit .crosshair { stroke: var(--border-strong); stroke-dasharray: 3 3; }
.trend .hit .dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }
.trend .hit:hover .crosshair, .trend .hit:hover .dot { opacity: 1; }
.stack { display: flex; gap: 2px; height: 12px; border-radius: 99px; overflow: hidden; background: var(--surface-3); margin: 6px 0 12px; }
.seg { display: block; height: 100%; min-width: 4px; }
.seg.good, .sw.good { background: var(--good); }
.seg.warn, .sw.warn { background: var(--warn); }
.seg.bad, .sw.bad { background: var(--bad); }
.seg.info, .sw.info { background: var(--accent); }
.seg.neutral, .sw.neutral { background: var(--border-strong); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.heat { display: grid; grid-template-columns: 18px repeat(5, 1fr); gap: 4px; }
.heat-cell { aspect-ratio: 1.5; border: 0; border-radius: 7px; font: inherit; font-weight: 700; font-size: 13px; color: var(--heat-ink); cursor: pointer; transition: transform .1s, box-shadow .1s; }
.heat-cell:hover { transform: scale(1.06); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--border-strong); }
.heat-cell.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.h1 { background: var(--heat-1); } .h2 { background: var(--heat-2); } .h3 { background: var(--heat-3); } .h4 { background: var(--heat-4); }
.heat-axis { display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.heat-caption { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); margin-top: 6px; padding-left: 22px; }
.hbars { display: grid; gap: 10px; margin-bottom: 12px; }
.hbar { display: grid; grid-template-columns: 110px 1fr 44px; gap: 10px; align-items: center; font-size: 13px; }
.hbar-track { display: block; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; flex: 1; }
.hbar-fill { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.hbar-value { font-weight: 700; text-align: right; }
.big-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 12px; }
.big-stats div { display: flex; flex-direction: column; }
.big-stats strong { font-size: 26px; letter-spacing: -.02em; }
.big-stats span { color: var(--muted); font-size: 12px; }
.fw-summary { grid-template-columns: 220px 1fr; }
.fw-summary .big-stats { align-content: center; margin: 0; }
.attest { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.tooltip { position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none; background: #101828; color: #fff; font-size: 12px; font-weight: 500; padding: 6px 9px; border-radius: 7px; max-width: 280px; box-shadow: var(--shadow-lg); }

/* ---------- AI surfaces ---------- */
.ai-cta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0 4px; padding: 12px 14px; border-radius: 10px; background: linear-gradient(135deg, var(--ai-soft), var(--accent-soft)); border: 1px solid color-mix(in srgb, var(--ai) 25%, transparent); }
.ai-cta > div { display: flex; gap: 10px; align-items: flex-start; }
.ai-cta > div > .icon { color: var(--ai); margin-top: 2px; }
.ai-cta p { margin: 0; }
.ai-result { margin: 12px 0; padding: 16px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ai) 35%, transparent); background: color-mix(in srgb, var(--ai-soft) 60%, var(--surface)); animation: rise .25s ease; }
.ai-result-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.ai-thinking { display: flex; gap: 10px; align-items: center; padding: 16px; margin: 12px 0; border-radius: 12px; color: var(--ai-ink); background: var(--ai-soft); font-weight: 600; }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } }
.maturity { display: flex; align-items: center; gap: 4px; margin-bottom: 10px; }
.maturity span { font-size: 12px; color: var(--muted); margin-right: 6px; }
.maturity i { width: 22px; height: 8px; border-radius: 3px; background: var(--surface-3); }
.maturity i.on { background: var(--ai); }
.maturity b { margin: 0 10px 0 6px; }
.recs, .matches { list-style: none; padding: 0; margin: 4px 0; display: grid; gap: 8px; }
.recs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.matches li { display: grid; grid-template-columns: 1fr 140px; gap: 2px 12px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.matches label { margin: 0; font-weight: 500; color: var(--text); display: flex; align-items: center; }
.matches small { grid-column: 1 / -1; }
.conf { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12px; }
.conf .hbar-fill { background: var(--ai); }
.callout { display: flex; gap: 10px; margin-top: 16px; padding: 12px; border-radius: 10px; background: var(--ai-soft); color: var(--ai-ink); }
.callout p { margin: 0; font-size: 13px; }
.run-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 16px; background: linear-gradient(135deg, var(--ai-soft), var(--accent-soft)); }
.run-meta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; color: var(--text-2); font-size: 13px; }
.run-meta span { display: inline-flex; gap: 6px; align-items: center; }
.assess-head { margin-bottom: 16px; }
.assess-headline { font-size: 20px; line-height: 1.35; margin: 6px 0 10px; }
.reasoning { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.reasoning summary { cursor: pointer; font-weight: 600; color: var(--ai-ink); display: flex; gap: 6px; align-items: center; }
.reasoning p { color: var(--text-2); font-size: 13px; white-space: pre-wrap; margin-top: 8px; }
.issues { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.issue-head { display: flex; gap: 8px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.roadmap { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.phase { background: var(--surface-2); border-radius: 10px; padding: 12px; }
.phase h3 { margin-bottom: 10px; }
.road-item { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 4px; justify-items: start; }

/* ---------- audits ---------- */
.stepper { list-style: none; display: flex; padding: 0; margin: 0 0 20px; counter-reset: s; }
.stepper li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); position: relative; text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 14px; left: -50%; width: 100%; height: 2px; background: var(--border); z-index: 0; }
.stepper li:first-child::before { display: none; }
.stepper li.done::before, .stepper li.current::before { background: var(--accent); }
.stepper span { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); font-weight: 700; }
.stepper .done span { background: var(--accent); color: #fff; }
.stepper .current span { background: var(--surface); color: var(--accent-ink); box-shadow: 0 0 0 2px var(--accent); }
.stepper .current { color: var(--text); font-weight: 600; }
.period-bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.period-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--ai)); }
.period-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; gap: 8px; }
.quote { border-left: 3px solid var(--accent); background: var(--surface-2); padding: 10px 14px; border-radius: 0 8px 8px 0; color: var(--text-2); }

/* ---------- evidence & lists ---------- */
.ev-list, .test-list { list-style: none; margin: 8px 0; padding: 0; }
.ev-list li, .test-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.ev-list li div { display: flex; flex-direction: column; }
.test-list li { justify-content: flex-start; flex-wrap: wrap; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 16px; border: 2px dashed var(--border-strong); border-radius: 12px; text-align: center; cursor: pointer; color: var(--text-2); font-weight: 500; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--ai); background: var(--ai-soft); }
.dropzone input { display: none; }
.dropzone .icon { color: var(--ai); }
.meta { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; margin: 14px 0; }
.meta dt { color: var(--muted); font-size: 13px; }
.meta dd { margin: 0; }
.tier-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tier { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; }
.tier strong { font-size: 22px; }

/* ---------- policy mapping ---------- */
.matrix td.mx { text-align: center; white-space: nowrap; }
.matrix td.mx b { font-size: 15px; }
.matrix td.mx small { display: block; font-size: 11px; color: var(--warn-ink); }
.matrix td.full { background: color-mix(in srgb, var(--good-soft) 70%, transparent); }
.matrix td.part { background: color-mix(in srgb, var(--warn-soft) 70%, transparent); }
.matrix td.none { color: var(--muted); }
.pad-x { padding: 10px 18px 14px; margin: 0; }
.right { text-align: right; }
.map-group { margin-bottom: 6px; }
.map-group h4 { display: flex; align-items: center; gap: 8px; }
.req-chip { display: inline-flex; align-items: center; gap: 6px; margin: 3px 6px 3px 0; padding: 3px 4px 3px 9px; border-radius: 7px; font-size: 12.5px; font-weight: 600; }
.req-chip small { font-weight: 500; opacity: .8; }
.req-chip.full { background: var(--good-soft); color: var(--good-ink); }
.req-chip.part { background: var(--warn-soft); color: var(--warn-ink); }
.req-chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; opacity: .6; }
.req-chip button:hover { opacity: 1; }
.add-map { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: end; margin-top: 12px; }
.add-map select { margin: 0; }
.file-btn { margin: 0; cursor: pointer; }
.file-btn input { display: none; }
.chip.sm { padding: 3px 10px; font-size: 12px; }
table.compact td, table.compact th { padding: 8px 10px; }

/* ---------- storage ---------- */
.storage-badge { display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--border); border-radius: 99px; padding: 3px 10px; }
.storage-badge:hover { border-color: var(--accent); color: var(--accent-ink); }
.ai-mini.sp { background: var(--info-soft); color: var(--info-ink); }
.doc-store { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0 4px; padding: 10px 12px; background: var(--surface-2); border-radius: 9px; }
.doc-store > span { margin-right: auto; display: inline-flex; gap: 6px; align-items: center; }
.providers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.provider { margin: 0; display: grid; gap: 6px; padding: 14px; border: 1px solid var(--border-strong); border-radius: 12px; cursor: pointer; color: var(--text); font-weight: 500; position: relative; }
.provider input { position: absolute; opacity: 0; }
.provider.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent); }
.provider.soon { opacity: .55; cursor: not-allowed; }
.provider-icon { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-ink); }
.provider:has(input:focus-visible) { outline: 2px solid var(--accent); }
.steps { margin: 4px 0 8px; padding-left: 20px; display: grid; gap: 8px; }
.steps li.done::marker { color: var(--good); }
.steps li.done > b::after { content: " ✓"; color: var(--good-ink); }
.sp-browse { margin: 12px 0; }
.file-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; max-height: 260px; overflow-y: auto; }
.file-list button { width: 100%; display: flex; gap: 10px; align-items: center; text-align: left; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); cursor: pointer; }
.file-list button:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-list span { flex: 1; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-list small { color: var(--muted); white-space: nowrap; }

.meta-box { margin: 14px 0; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; }
.meta-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.meta-head b { display: inline-flex; gap: 6px; align-items: center; }
.meta-box .meta { margin: 10px 0 6px; }
.warn-text { color: var(--warn-ink); }

/* ---------- cloud reviews ---------- */
.intake { display: grid; gap: 16px; max-width: 980px; }
.form-section { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.form-section h2 { font-size: 17px; margin-bottom: 4px; }
.section-num { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--accent-soft); color: var(--accent-ink); }
.submit-bar { position: sticky; bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: color-mix(in srgb, var(--ai) 35%, transparent); box-shadow: var(--shadow-lg); }
.submit-bar p { margin: 0; }
.report-top { grid-template-columns: 260px 1fr; }
.risk-ring { gap: 10px; text-align: center; align-content: center; }
.back { display: inline-block; margin-bottom: 8px; }
.card-head select { width: auto; margin: 0; max-width: 60%; }
.risk-ring.r-low .ring-value { stroke: var(--good); }
.risk-ring.r-medium .ring-value { stroke: var(--warn); }
.risk-ring.r-high .ring-value, .risk-ring.r-critical .ring-value { stroke: var(--bad); }
.checklist { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 8px; }
.checklist li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 9px; }
.checklist li > span { color: var(--ai); }
.spacer { flex: 1; }
.request-details summary { cursor: pointer; }

/* ---------- connectors & baseline ---------- */
.connector-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; margin-bottom: 16px; }
.connector { color: var(--text); display: grid; gap: 6px; align-content: start; transition: border-color .15s, transform .15s; }
.connector:hover { border-color: var(--accent); transform: translateY(-1px); }
.connector.soon { opacity: .7; }
.connector.on { border-color: color-mix(in srgb, var(--good) 45%, var(--border)); }
.connector-top { display: flex; justify-content: space-between; align-items: center; }
.connector-stats { display: flex; gap: 12px; font-size: 12.5px; font-weight: 600; }
.good-text { color: var(--good-ink); } .bad-text { color: var(--bad-ink); }
.ai-mini.bad-bg { background: var(--bad-soft); color: var(--bad-ink); }
pre.code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 12px; overflow-x: auto; font-size: 12px; }
.findings { margin-top: 6px; }
.findings summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--bad-ink); }
.findings ul { margin: 6px 0; padding-left: 18px; font-size: 13px; }
.bl-stats { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.family { margin-bottom: 14px; }
.rule-row td { padding: 12px 18px; }
.rule-main { width: 100%; }
.rule-meta { margin-top: 4px; }
.rule-sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.src { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--surface-3); color: var(--muted); }
.src.pass { background: var(--good-soft); color: var(--good-ink); }
.src.fail { background: var(--bad-soft); color: var(--bad-ink); }
.src.error, .src.na, .src.pending { background: var(--warn-soft); color: var(--warn-ink); }
.src.off { text-decoration: line-through; opacity: .7; }
.rule-status { white-space: nowrap; text-align: right; }
.inline-select { display: flex; align-items: center; gap: 8px; margin: 0; }
.inline-select select { margin: 0; width: auto; }
.callout a { color: inherit; text-decoration: underline; }

/* ---------- tasks board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(260px, 1fr)); gap: 16px; align-items: start; overflow-x: auto; }
.column { background: var(--surface-2); border-radius: 12px; padding: 12px; min-height: 200px; }
.column header { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 12px; }
.count { background: var(--surface-3); border-radius: 99px; padding: 0 9px; font-size: 12px; font-weight: 700; color: var(--text-2); }
.task { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: grab; }
.task p { font-weight: 600; margin: 8px 0; }
.task-top { display: flex; align-items: center; gap: 6px; }
.task-top .fine { margin-left: auto; }
.task-meta { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.task-meta > span:first-child { flex: 1; min-width: 0; }
.due { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); white-space: nowrap; }
.due.warn { color: var(--warn-ink); } .due.bad { color: var(--bad-ink); font-weight: 700; }
.task-move { display: none; gap: 4px; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.task:hover .task-move, .task:focus-within .task-move { display: flex; }

/* ---------- policy doc ---------- */
.policy-doc { margin-top: 12px; padding: 22px 26px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; font-size: 14px; line-height: 1.6; }
.policy-doc h2 { font-size: 20px; margin-bottom: 4px; }
.policy-doc h4 { color: var(--text); text-transform: none; letter-spacing: 0; font-size: 14px; }

/* ---------- drawer, copilot, palette, toasts ---------- */
.drawer { position: fixed; inset: var(--topbar-h) 0 0 248px; z-index: 50; background: rgba(9, 14, 26, 0); transition: background .18s; }
.drawer.open { background: rgba(9, 14, 26, .45); }
.drawer[hidden] { display: none; }
.drawer-panel { position: absolute; top: 0; right: 0; height: 100%; width: min(620px, 100%); background: var(--surface); overflow-y: auto; padding: 26px 28px 48px; box-shadow: var(--shadow-lg); transform: translateX(24px); opacity: 0; transition: transform .18s ease, opacity .18s ease; }
.drawer.wide .drawer-panel { width: min(860px, 100%); }
.drawer.open .drawer-panel { transform: none; opacity: 1; }
.drawer-close { position: absolute; top: 14px; right: 14px; }
.drawer-head { padding-right: 36px; margin-bottom: 8px; }
.drawer-head h2 { font-size: 21px; margin: 4px 0 10px; letter-spacing: -.02em; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 14px 0 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); padding: 9px 12px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tabs button.active { color: var(--text); border-color: var(--accent); }
.copilot { position: fixed; top: 0; right: 0; bottom: 0; height: 100dvh; max-height: 100%; width: min(420px, 100%); z-index: 60; visibility: hidden; background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.copilot.open { transform: none; visibility: visible; }
.copilot:not(.open) { transition: transform .22s ease, visibility 0s .22s; }
.copilot header { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); background: linear-gradient(135deg, var(--ai-soft), var(--accent-soft)); }
.copilot header small { display: block; color: var(--muted); font-size: 12px; }
.copilot header > div:last-child { display: flex; gap: 8px; align-items: center; }
.copilot-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.copilot-empty { text-align: center; color: var(--text-2); padding: 20px 6px; }
.copilot-empty .icon { color: var(--ai); }
.copilot-empty h3 { margin: 8px 0 4px; font-size: 16px; }
.prompt-list { display: grid; gap: 8px; margin-top: 16px; }
.prompt-list button { text-align: left; font: inherit; font-size: 13px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.prompt-list button:hover { border-color: var(--ai); background: var(--ai-soft); }
.msg { padding: 10px 14px; border-radius: 14px; max-width: 90%; font-size: 13.5px; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0 6px; padding-left: 18px; }
.msg.user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; white-space: pre-wrap; }
.msg.assistant { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 4px; }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.copilot-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.copilot-form textarea { margin: 0; min-height: 44px; }
.palette { width: min(620px, calc(100% - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); margin-top: 12vh; }
.palette::backdrop { background: rgba(9, 14, 26, .45); }
.palette input { margin: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 16px 18px; font-size: 15px; }
.palette input:focus { outline: none; }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; cursor: pointer; }
.palette li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette li small { color: var(--muted); font-size: 12px; }
.palette li.active { background: var(--accent-soft); color: var(--accent-ink); }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 90; display: grid; gap: 8px; justify-items: end; max-width: min(440px, calc(100vw - 32px)); }
.toast { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 10px; background: #101828; color: #fff; font-weight: 600; font-size: 13px; box-shadow: var(--shadow-lg); animation: rise .2s ease; transition: opacity .3s; }
.toast.good .icon { color: #5fd35f; } .toast.bad .icon { color: #ff8a8a; }
.toast.out { opacity: 0; }

/* ---------- density ---------- */
:root[data-density="compact"] body { font-size: 13px; }
:root[data-density="compact"] td { padding: 7px 12px; }
:root[data-density="compact"] th { padding: 8px 12px; }
:root[data-density="compact"] .card { padding: 14px; }
:root[data-density="compact"] .card.flush { padding: 0; }
:root[data-density="compact"] #view { padding-top: 16px; }
:root[data-density="compact"] .page-head { margin-bottom: 14px; }
:root[data-density="compact"] h1 { font-size: 22px; }
:root[data-density="compact"] .grid { gap: 12px; margin-bottom: 12px; }

/* ---------- display menu ---------- */
.display { position: relative; }
.display-menu { position: absolute; right: 0; top: 42px; width: 240px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 12px; z-index: 40; }
.display-menu h4 { margin: 4px 0 6px; }
.display-menu .seg-control { width: 100%; display: flex; }
.display-menu .seg-control button { flex: 1; padding: 5px 6px; font-size: 12px; }

/* ---------- docked detail panel (wide screens) ---------- */
@media (min-width: 1280px) {
  .drawer.docked { inset: var(--topbar-h) 0 0 auto; width: 560px; background: transparent !important; pointer-events: none; }
  .drawer.docked .drawer-panel { pointer-events: auto; width: 560px; border-left: 1px solid var(--border); box-shadow: -12px 0 32px -18px rgba(16,24,40,.35); }
  .drawer.docked.wide, .drawer.docked.wide .drawer-panel { width: 720px; }
  body.has-dock .main { margin-right: 560px; transition: margin-right .18s ease; }
  body.has-dock.dock-wide .main { margin-right: 720px; }
  body.has-dock .main { --gutter: 24px; }
  body.has-dock .map-col, body.has-dock .map-cell, body.has-dock .search-btn span, body.has-dock .search-btn kbd, body.has-dock .kbd-hint { display: none; }
}
tr[data-href].active { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.kbd-hint { font-size: 11.5px; color: var(--muted); }
.kbd-hint kbd { margin: 0 2px; }

/* ---------- bulk selection ---------- */
.sel-col { width: 36px; }
.sel-col input { margin: 0; }
.bulk-bar { position: sticky; top: 66px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 12px; border-radius: 12px; background: var(--text); color: var(--surface); box-shadow: var(--shadow-lg); animation: rise .15s ease; }
.bulk-bar b { margin-right: 6px; }
.bulk-bar select { width: auto; margin: 0; padding: 5px 8px; font-size: 13px; background: var(--surface); color: var(--text); }
.bulk-bar .btn { padding: 5px 10px; font-size: 12.5px; }
.bulk-bar .btn.ghost { color: var(--surface); }
.bulk-bar .btn.ghost:hover { background: rgba(255,255,255,.12); }

/* ---------- suggestions ---------- */
.suggestions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 12px; }
.suggestion { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; padding: 14px; border-radius: 12px; border: 1px solid color-mix(in srgb, var(--ai) 30%, var(--border)); background: linear-gradient(135deg, var(--ai-soft), var(--surface) 70%); animation: rise .2s ease; }
.suggestion .s-icon { grid-row: span 3; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--surface); color: var(--ai); box-shadow: var(--shadow); }
.suggestion b { line-height: 1.35; }
.suggestion details { font-size: 12.5px; color: var(--text-2); }
.suggestion details summary { cursor: pointer; color: var(--ai-ink); font-weight: 600; }
.suggestion .s-actions { display: flex; gap: 6px; margin-top: 6px; }
.suggestion.gone { opacity: 0; transform: scale(.98); transition: opacity .2s, transform .2s; }

/* ---------- home ---------- */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.home-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; margin-top: 16px; }
.work-list { list-style: none; margin: 0; padding: 0; }
.work-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.work-list li:last-child { border-bottom: 0; }
.work-list .grow { flex: 1; min-width: 0; }
.work-list small { display: block; color: var(--muted); }
.work-list a { color: var(--text); font-weight: 600; }
.count-badge { background: var(--surface-3); color: var(--text-2); border-radius: 99px; padding: 0 8px; font-size: 12px; font-weight: 700; }
.exec-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; }
.report-only { display: none; }
.sev-bars { display: grid; gap: 8px; }

@media print {
  @page { margin: 14mm; }
  body { background: #fff; color: #000; }
  .sidebar, .topbar, .demo-banner, .copilot, .drawer, .toasts, .tooltip, .no-print, .seg-control, .head-actions { display: none !important; }
  .main { margin: 0 !important; }
  #view { padding: 0 !important; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; border-color: #ccc; }
  .report-only { display: block; }
  .home-head { display: none; }
  .exec-grid { grid-template-columns: 1fr 1fr; }
  a { color: inherit; }
}

/* ---------- round 2: elevation, motion, states ---------- */
a.card:hover, .fw-card:hover, .kpi:hover { box-shadow: var(--shadow-hover); }
.card-head h2 { font-size: 13.5px; text-transform: none; color: var(--text); }
.page-head p.muted { font-size: 15px; max-width: 70ch; }
.btn.primary { box-shadow: 0 1px 2px rgba(16,24,40,.08), 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); outline: none; }

/* readiness tones: green healthy, amber attention, red critical (same on every page) */
.ring.tone-good .ring-value { stroke: var(--good); }
.ring.tone-warn .ring-value { stroke: var(--warn); }
.ring.tone-bad .ring-value { stroke: var(--bad); }
.hbar-fill { transition: width .8s cubic-bezier(.2,.8,.2,1); }
.hbar-fill.good { background: var(--good); } .hbar-fill.warn { background: var(--warn); } .hbar-fill.bad { background: var(--bad); }
.hbar-track { height: 10px; }
.seg { transition: width .8s cubic-bezier(.2,.8,.2,1); }
.ring-value { transition: stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1); }
.trend .area { fill: url(#trend-fill); opacity: 1; }
.trend .stop-a { stop-color: var(--accent); stop-opacity: .28; }
.trend .stop-b { stop-color: var(--accent); stop-opacity: 0; }
.trend.draw .line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw-line 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
.trend.draw .area, .trend.draw .dot-last, .trend.draw .value-label { animation: fade-in .6s .5s both; }
@keyframes draw-line { to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }
.heat { gap: 6px; }
.heat-cell { border-radius: 10px; transition: transform .15s ease, box-shadow .15s ease, filter .15s, opacity .25s; display: grid; place-items: center; }
.heat-cell span { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 99px; background: color-mix(in srgb, var(--surface) 70%, transparent); font-size: 12.5px; }
.heat-cell:hover { transform: translateY(-1px) scale(1.04); filter: saturate(1.15); }
.heat:has(.heat-cell.sel) .heat-cell:not(.sel) { opacity: .55; }
@media (prefers-reduced-motion: reduce) { .trend.draw .line, .trend.draw .area { animation: none; stroke-dasharray: none; } .hbar-fill, .seg, .ring-value { transition: none; } }

/* empty states */
.empty-state { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 28px 16px; color: var(--text-2); }
.empty-state p { margin: 0; max-width: 36ch; }
.empty-icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.column .empty-state { padding: 22px 8px; }

/* loading skeletons */
.sk { display: block; height: 12px; border-radius: 6px; margin: 8px 0; background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 50%, var(--surface-3) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.sk.block { height: 160px; border-radius: 10px; margin-top: 16px; }
.sk-page { padding-top: 4px; }
.sk-w18 { width: 18%; } .sk-w30 { width: 30%; } .sk-w34 { width: 34%; } .sk-w45 { width: 45%; } .sk-w52 { width: 52%; } .sk-w60 { width: 60%; } .sk-h28 { height: 28px; }
.sk-grid { display: grid; gap: 20px; margin: 24px 0; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.sk-grid.kpis { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.sk-grid.two { grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); }
.sk-card { min-height: 120px; }
.sk-table .sk-row { display: grid; grid-template-columns: 2.5fr 1fr 1fr 1fr; gap: 24px; padding: 14px 22px; border-bottom: 1px solid var(--border); }
.sk-table .sk-row.head { background: var(--surface-2); }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }

/* toasts with Undo */
.toast { padding: 10px 10px 10px 14px; border-radius: 12px; }
.toast span { flex: 1; }
.toast-action { border: 0; background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 700; font-size: 12.5px; padding: 4px 10px; border-radius: 7px; cursor: pointer; }
.toast-action:hover { background: rgba(255,255,255,.24); }
.toast-x { border: 0; background: none; color: rgba(255,255,255,.6); padding: 4px; cursor: pointer; display: grid; border-radius: 6px; }
.toast-x:hover { color: #fff; background: rgba(255,255,255,.1); }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

/* copilot close is always a clear, reachable target */
.copilot-close { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; min-height: 34px; padding: 6px 10px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; }
.copilot-close:hover { background: var(--surface-2); }

/* command palette groups */
.palette li.pal-group { cursor: default; padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.palette li.pal-group:hover { background: none; }
.palette li.pal-empty { cursor: default; }
.palette-foot { display: flex; gap: 14px; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--muted); }

/* product tour */
.tour { position: fixed; inset: 0; z-index: 120; }
.tour-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(9,14,26,.55), 0 0 0 2px var(--accent); transition: all .3s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
.tour-spot.none { box-shadow: 0 0 0 9999px rgba(9,14,26,.55); width: 0 !important; height: 0 !important; }
.tour-pop { position: fixed; background: var(--surface); color: var(--text); border-radius: 14px; padding: 18px; box-shadow: var(--shadow-lg); border: 1px solid var(--card-border); transition: left .3s, top .3s; }
.tour-pop h3 { font-size: 16px; margin: 4px 0 6px; letter-spacing: -.01em; }
.tour-pop p { margin: 0 0 12px; color: var(--text-2); font-size: 13.5px; }
.tour-pop .tour-count { font-size: 11.5px; font-weight: 700; color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tour-actions span { display: flex; gap: 6px; }
.tour-dots { display: flex; gap: 5px; justify-content: center; margin-top: 12px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.tour-dots i.on { background: var(--accent); width: 16px; border-radius: 99px; }
.display-menu .tour-link { margin-top: 10px; width: 100%; }

.fw-card { flex-direction: column; align-items: flex-start; gap: 12px; position: relative; padding: 18px; }
.fw-card > svg.icon { position: absolute; top: 18px; right: 18px; }
.fw-card h3 { font-size: 14.5px; }
.fw-card p { margin: 2px 0 0; font-size: 12.5px; }
.callout + .connector-grid { margin-top: 20px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .two-one, .hero { grid-template-columns: minmax(0, 1fr); }
  .kpi-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .roadmap { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .mobile-only { display: inline-block; }
  .main { --gutter: 16px; }
  .topbar { padding: 10px 16px; gap: 8px; }
  .search-btn span, .search-btn kbd, .topbar .btn kbd, #ask-ai span, .btn.ms span, .sync-chip span:not(.spinner) { display: none; }
  .search-btn { flex: 0; }
  .demo-banner { margin: 12px 16px 0; }
  #view { padding: 18px 16px 48px; }
  h1 { font-size: 22px; }
  .hero-body { flex-direction: column; align-items: stretch; }
  .hero-body .ring { align-self: center; }
  .kpi-col { grid-template-columns: minmax(0, 1fr); }
  .fw-summary { grid-template-columns: minmax(0, 1fr); }
  .big-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board { grid-template-columns: minmax(0, 1fr); }
  .exec-grid { grid-template-columns: minmax(0, 1fr); }
  .bulk-bar { top: 58px; }
  .task-move { display: flex; }
  .drawer-panel { padding: 22px 16px 40px; }
  .meta { grid-template-columns: 100px 1fr; }
  .hbar { grid-template-columns: 90px 1fr 40px; }
  .stepper li { font-size: 0; }
  .stepper li.current { font-size: 11px; }
  .matches li { grid-template-columns: 1fr; }
  .report-top { grid-template-columns: minmax(0, 1fr); }
  .form-section { grid-template-columns: minmax(0, 1fr); }
  .section-num { display: none; }
  .add-map { grid-template-columns: 1fr; }
}

/* ---------- round 2: phones ---------- */
@media (max-width: 1100px) and (min-width: 821px) {
  .drawer { inset: var(--topbar-h) 0 0 248px; }
}
@media (max-width: 820px) {
  .drawer { inset: var(--topbar-h) 0 0 0; }
  #view { padding: 24px 16px 56px; }
  h1 { font-size: 24px; }
  .page-head { margin-bottom: 20px; }
  .grid { gap: 14px; margin-bottom: 16px; }
  .card { padding: 16px; }
  .toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; justify-items: stretch; }
}
/* Below 768px, data tables become stacked cards: each cell labelled with its column. */
@media (max-width: 768px) {
  #view .table-wrap { overflow: visible; }
  #view .table-wrap table, #view .table-wrap tbody { display: block; }
  #view .table-wrap thead { display: none; }
  #view .table-wrap tr { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
  #view .table-wrap td { display: block; padding: 0 !important; border: 0 !important; min-width: 0; }
  #view .table-wrap td:first-child { grid-column: 1 / -1; font-size: 14.5px; }
  #view .table-wrap td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
  #view .table-wrap td:empty, #view .table-wrap td.map-cell { display: none; }
  #view .table-wrap tr { position: relative; }
  #view .table-wrap td.sel-col { position: absolute; top: 14px; right: 16px; }
  #view .table-wrap tr:has(td.sel-col) td:nth-child(2) { grid-column: 1 / -1; padding-right: 32px !important; }
  #view .table-wrap tr[data-href] { cursor: pointer; }
  .heat-cell span { min-width: 20px; height: 20px; font-size: 11.5px; }
  .bl-stats, .kpi-col { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px; }
  .kpi { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .kpi strong { font-size: 20px; }
}
