/* ============================================================================
   Design tokens — one semantic scale, two themes (dark default + light).
   Surfaces layer by elevation (HIG/Material): bg (canvas) < panel (card) <
   panel-2 (nested/hover). Text and accents are tuned for WCAG AA (≥4.5:1 for
   body text on their surface). The whole app references these tokens, so the
   theme switches by re-binding them — no per-component overrides needed.
   ========================================================================= */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b14;          /* primary surface (app canvas)        */
  --bg-2: #0c1322;        /* canvas gradient end                 */
  --panel: #0f1827;       /* secondary surface (cards/panels)    */
  --panel-2: #18202f;     /* tertiary surface (nested / hover)   */
  --line: #25304a;        /* hairline border                     */
  --text: #e8eef9;        /* primary text   (~15:1 on panel)     */
  --muted: #aab7d4;       /* secondary text (~8:1 on panel)      */
  --muted-2: #97a4c4;     /* tertiary text  (~5:1 on panel)      */
  --brand: #5b8cff;
  --brand-2: #7c5bff;
  --agent: #a78bff;
  --good: #2dd4a7;
  --warn: #f5b942;
  --high: #ff8a3d;
  --crit: #ff5470;
  --crit-2: #ff2d55;
  --on-accent: #0a0e16;   /* ink on a bright accent fill         */
  --on-warn: #221a05;     /* ink on the warn (amber) fill        */
  --warn-ink: #f3d18a;    /* amber text for banners on the canvas*/
  --shadow: 0 30px 80px -42px rgba(0,0,0,.85);
  --shadow-sm: 0 12px 30px -16px rgba(0,0,0,.6);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f6fb;          /* soft grey canvas (less glare than pure white) */
  --bg-2: #eceff7;
  --panel: #ffffff;       /* white cards float above the canvas */
  --panel-2: #f5f7fc;
  --line: #dbe2ee;
  --text: #0f1828;        /* ~16:1 on white  */
  --muted: #46546e;       /* ~7:1 on white   */
  --muted-2: #5d6b86;     /* ~5:1 on white   */
  --brand: #2563eb;       /* AA on white     */
  --brand-2: #6d28d9;
  --agent: #7c3aed;
  --good: #047857;
  --warn: #b45309;
  --high: #c2410c;
  --crit: #e11d48;
  --crit-2: #dc2626;
  --on-accent: #ffffff;
  --on-warn: #ffffff;
  --warn-ink: #92400e;
  --shadow: 0 16px 40px -20px rgba(15,23,42,.18);
  --shadow-sm: 0 6px 18px -10px rgba(15,23,42,.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
/* Buttons/inputs default to the OS text color (near-black) — force them to inherit
   the page's light text so no control ever renders invisible black-on-dark. */
button, input, textarea, select { font-family: inherit; color: inherit; }
html, body { height: 100%; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--mono); }

.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(91,140,255,.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(124,91,255,.12), transparent 60%);
  background-color: var(--bg);
}
.grid-bg::after {
  content:''; position:absolute; inset:0;
  background-image:
    linear-gradient(rgba(40,60,100,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(40,60,100,.10) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 60% at 50% 0%, #000 30%, transparent 90%);
}

/* topbar */
.topbar {
  position: relative; z-index: 5; min-height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 32px; border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.brand { display: flex; align-items: center; gap: 10px; }
.logo { color: var(--brand); font-size: 22px; filter: drop-shadow(0 0 10px rgba(91,140,255,.6)); }
.brand-name { font-weight: 800; font-size: 18px; letter-spacing: -.02em; }
.brand-tag { color: var(--muted-2); font-size: 12px; border-left: 1px solid var(--line); padding-left: 10px; margin-left: 4px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-email { color: var(--muted); font-size: 13px; }
.topnav { display: flex; align-items: center; gap: 10px; }
/* every topbar control shares one height + vertical centering → tidy cluster */
.topnav > * { display: inline-flex; align-items: center; height: 32px; }
.nav-pill { font-size: 13px; font-weight: 600; padding: 0 14px; border-radius: 999px; background: rgba(91,140,255,.12); color: var(--brand); border: 1px solid rgba(91,140,255,.25); }
.nav-pill.muted { background: transparent; color: var(--muted-2); border-color: var(--line); }
/* light/dark theme toggle (injected into .topnav by theme.js) */
.theme-toggle { width: 32px; justify-content: center; padding: 0; border-radius: 999px; background: transparent; border: 1px solid var(--line); color: var(--muted); cursor: pointer; font-size: 15px; line-height: 1; }
.theme-toggle:hover { color: var(--text); border-color: var(--brand); }

.view { display: none; position: relative; z-index: 2; }
.view.active { display: block; }

/* nav links + plan pill */
.nav-link { font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; padding: 6px 10px; cursor: pointer; }
.nav-link:hover { color: var(--text); }
a.nav-pill { text-decoration: none; cursor: pointer; }
.nav-pill.ghost { background: transparent; color: var(--muted); border: 1px solid var(--line); cursor: pointer; font-family: inherit; }
.nav-pill.ghost:hover { color: var(--text); border-color: var(--brand); }
.plan-pill { font-size: 12px; font-weight: 700; padding: 0 13px; border-radius: 999px; background: rgba(91,140,255,.12); color: var(--brand); border: 1px solid rgba(91,140,255,.3); }
.plan-pill.govern { background: rgba(124,91,255,.16); color: var(--agent); border-color: rgba(124,91,255,.35); }
.plan-pill.enterprise { background: rgba(45,212,167,.14); color: var(--good); border-color: rgba(45,212,167,.35); }
.domain-input.full { width: 100%; margin: 8px 0 4px; }
.muted { color: var(--muted-2); }

/* ---------- auth ---------- */
.auth-wrap { max-width: 440px; margin: 0 auto; padding: 70px 22px; position: relative; z-index: 2; }
.auth-card { background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 18px; padding: 32px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; }
.auth-sub { color: var(--muted); margin: 8px 0 22px; font-size: 14.5px; }
.auth-card form label { display: block; margin-top: 12px; }
.auth-error { color: var(--crit); font-size: 13.5px; min-height: 18px; margin: 10px 0 4px; }
.btn-primary.full { width: 100%; padding: 14px; justify-content: center; margin-top: 6px; }
.auth-toggle { text-align: center; margin-top: 18px; color: var(--muted); font-size: 14px; }
.auth-toggle a { color: var(--brand); text-decoration: none; font-weight: 600; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted-2); font-size: 12px; margin: 18px 0 14px; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-ghost.full { width: 100%; justify-content: center; padding: 13px; text-align: center; }
.btn-demo { background: rgba(91,140,255,.07); border: 1px solid rgba(91,140,255,.32); color: var(--text); font-weight: 600; gap: 10px; transition: background .15s, border-color .15s, transform .12s, box-shadow .15s; }
.btn-demo:hover { background: rgba(91,140,255,.15); border-color: var(--brand); transform: translateY(-1px); box-shadow: 0 10px 24px -14px rgba(91,140,255,.8); }
.btn-demo .demo-ico { font-size: 16px; line-height: 1; }
.btn-demo .demo-label { font-weight: 600; }
.btn-demo .demo-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--brand); background: rgba(91,140,255,.14); border: 1px solid rgba(91,140,255,.3); padding: 3px 8px; border-radius: 999px; line-height: 1; }
.demo-note { text-align: center; color: var(--muted-2); font-size: 12.5px; margin-top: 10px; line-height: 1.5; }
.demo-cta { text-align: center; margin-top: 16px; color: var(--muted-2); font-size: 14px; }
.linkbtn { background: none; border: none; color: var(--brand); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }
.demo-badge { font-size: 11px; font-weight: 800; letter-spacing: .06em; background: var(--warn); color: var(--on-warn); padding: 0 10px; border-radius: 6px; }
.demo-billing-note { background: rgba(245,185,66,.08); border: 1px solid rgba(245,185,66,.3); color: var(--warn-ink); border-radius: 10px; padding: 12px 14px; font-size: 13.5px; margin-top: 14px; }
.demo-billing-note a { color: var(--brand); }

/* ---------- pricing ---------- */
.pricing-wrap { max-width: 1040px; margin: 0 auto; padding: 56px 22px 80px; position: relative; z-index: 2; }
.pricing-h1 { text-align: center; font-size: 40px; letter-spacing: -.03em; margin-top: 14px; }
.pricing-sub { text-align: center; color: var(--muted); max-width: 600px; margin: 16px auto 0; font-size: 17px; line-height: 1.6; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.plan { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 26px 22px; display: flex; flex-direction: column; }
.plan.popular { border-color: rgba(91,140,255,.5); box-shadow: 0 20px 60px -30px rgba(91,140,255,.6); }
.plan-badge { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.plan-name { font-size: 20px; font-weight: 800; }
.plan-blurb { color: var(--muted); font-size: 14px; margin-top: 4px; }
.plan-price { font-size: 34px; font-weight: 800; letter-spacing: -.02em; margin: 16px 0; white-space: nowrap; }
.plan-cadence { font-size: 14px; font-weight: 500; color: var(--muted-2); }
.plan-cta { width: 100%; margin: 4px 0 0; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 20px; flex: 1; }
.plan-features li { font-size: 14px; color: var(--muted); padding-left: 24px; position: relative; line-height: 1.4; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--good); font-weight: 700; }
/* Roadmap ≠ feature. Deliberately NOT an <li> — that list stamps a green ✓ on every
   item, which is precisely the checkmark an unbuilt control must never get. */
.plan-roadmap { font-size: 12.5px; line-height: 1.45; color: var(--muted-2); margin: -8px 0 18px; padding-left: 24px; position: relative; }
.plan-roadmap::before { content: '○'; position: absolute; left: 0; color: var(--muted-2); }
.pricing-foot { text-align: center; color: var(--muted-2); margin-top: 30px; font-size: 14px; }
.pricing-foot a { color: var(--brand); }

/* ---------- console ---------- */
.console { display: grid; grid-template-columns: 210px 1fr; gap: 0; position: relative; z-index: 2; min-height: calc(100vh - 65px); }
.side { border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.side-tab { background: transparent; border: none; color: var(--muted); text-align: left; font-family: inherit; font-size: 14.5px; font-weight: 600; padding: 11px 14px; border-radius: 10px; cursor: pointer; }
.side-tab:hover { background: var(--panel); color: var(--text); }
.side-tab.active { background: rgba(91,140,255,.12); color: var(--brand); }
.console-main { padding: 30px 34px; max-width: 1080px; }
.loading { color: var(--muted); padding: 40px 0; }
.panel-head h1 { font-size: 28px; letter-spacing: -.02em; }
.panel-sub { color: var(--muted); margin: 6px 0 22px; font-size: 15px; }
.scan-row { display: flex; gap: 10px; max-width: 620px; }
.scan-row .domain-input { flex: 1; margin: 0; }
.err-box { background: rgba(255,84,112,.1); border: 1px solid rgba(255,84,112,.3); color: var(--crit); padding: 14px 16px; border-radius: 10px; margin-top: 16px; }

/* saved scans */
.saved-list { display: flex; flex-direction: column; gap: 8px; }
.saved-item { display: flex; align-items: center; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; cursor: pointer; font-family: inherit; text-align: left; }
.saved-item:hover { border-color: var(--brand); }
.saved-grade { font-size: 22px; font-weight: 800; width: 26px; }
.saved-domain { font-size: 15px; font-weight: 600; flex: 1; }
.saved-meta { color: var(--muted-2); font-size: 13px; }

/* policy / audit tables */
.ptable { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ptable-row { display: grid; grid-template-columns: 1.4fr .8fr 1.2fr 1.2fr 90px; gap: 12px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 14px; }
.ptable.audit .ptable-row { grid-template-columns: 50px 1.2fr 1.4fr 1.4fr 1.4fr; }
.ptable.keys .ptable-row { grid-template-columns: 1.4fr 1fr 1.2fr 1.2fr; }
.ptable-row:first-child { border-top: none; }
.ptable-row.head { background: var(--bg-2); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.btn-ghost.sm { padding: 6px 12px; font-size: 13px; }

/* prove */
.integrity { padding: 13px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.integrity.ok { background: rgba(45,212,167,.12); color: var(--good); border: 1px solid rgba(45,212,167,.3); }
.integrity.bad { background: rgba(255,84,112,.12); color: var(--crit); border: 1px solid rgba(255,84,112,.3); }
.prove-actions { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.upsell-inline { color: var(--brand); font-size: 13.5px; text-decoration: none; }

/* api keys */
.key-reveal { background: rgba(45,212,167,.08); border: 1px dashed rgba(45,212,167,.4); padding: 12px 14px; border-radius: 10px; margin-top: 14px; font-size: 13.5px; word-break: break-all; }

/* billing */
.billing-card { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.billing-now { display: flex; flex-direction: column; flex: 1; min-width: 240px; }
.bn-label { font-size: 12px; color: var(--muted-2); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.bn-plan { font-size: 26px; font-weight: 800; margin: 6px 0; }
.bn-status { color: var(--muted); font-size: 14px; }
.bn-ents { display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; max-width: 420px; }
.ent { font-size: 12px; padding: 5px 10px; border-radius: 8px; border: 1px solid var(--line); }
.ent.on { background: rgba(45,212,167,.1); color: var(--good); }
.ent.off { color: var(--muted-2); }

/* ---------- overview dashboard ---------- */
.ov-hero { display: grid; grid-template-columns: 280px 1fr; gap: 14px; margin-bottom: 16px; }
.ov-grade { display: flex; align-items: center; gap: 16px; background: var(--panel); border: 1px solid var(--line); border-left-width: 4px; border-radius: 14px; padding: 18px 22px; }
.ovg-letter { font-size: 50px; font-weight: 800; line-height: 1; }
.ovg-meta { font-size: 13px; color: var(--muted); }
.ov-flags { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ovflag { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; justify-content: center; }
.ovf-num { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.ovf-lbl { font-size: 12px; color: var(--muted-2); margin-top: 2px; }
.ovflag.critical .ovf-num { color: var(--crit-2); } .ovflag.red .ovf-num { color: var(--crit); }
.ovflag.yellow .ovf-num { color: var(--warn); } .ovflag.green .ovf-num { color: var(--good); }

.ov-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.ovc-head { font-size: 15px; font-weight: 700; margin-bottom: 14px; }
.ov-card.change { background: linear-gradient(180deg, rgba(91,140,255,.06), transparent); }
.change-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.chg-label { font-size: 12px; color: var(--muted-2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.chg-val { font-size: 17px; font-weight: 700; margin-top: 5px; }
.delta { font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.delta.good { background: rgba(45,212,167,.14); color: var(--good); }
.delta.bad { background: rgba(255,84,112,.14); color: var(--crit); }
.delta.flat { color: var(--muted-2); }
.trendchart { display: block; }

.ov-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ov-two > * { min-width: 0; }
.period-body { min-height: 80px; }
.period-tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.ptab { background: var(--bg); border: 1px solid var(--line); color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 14px; border-radius: 8px; cursor: pointer; }
.ptab.active { background: rgba(91,140,255,.14); color: var(--brand); border-color: rgba(91,140,255,.4); }
.period-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.pg-num { font-size: 24px; font-weight: 800; }
.pg-unit { font-size: 13px; font-weight: 600; color: var(--muted-2); }
.pg-lbl { font-size: 11px; color: var(--muted-2); }
.period-sub { font-size: 12.5px; margin-top: 12px; }
.topcats { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.topcat { font-size: 12px; background: var(--bg); border: 1px solid var(--line); padding: 3px 9px; border-radius: 6px; color: var(--muted); }
.topcat b { color: var(--crit); }

.activity-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.activity-stats span { font-size: 12.5px; background: var(--bg); border: 1px solid var(--line); padding: 5px 10px; border-radius: 8px; color: var(--muted); }
.activity-feed { display: flex; flex-direction: column; gap: 6px; }
.af-row { display: grid; grid-template-columns: 1.3fr 1fr auto; gap: 8px; font-size: 12.5px; align-items: center; padding: 5px 0; border-top: 1px solid var(--line); }
.af-act { color: var(--brand); } .af-tgt { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .af-time { color: var(--muted-2); font-size: 11.5px; white-space: nowrap; }
.ver-tag { font-size: 11px; font-weight: 700; font-family: var(--mono); background: rgba(124,91,255,.16); color: var(--agent); padding: 3px 8px; border-radius: 6px; }

@media (max-width: 860px) {
  .ov-hero, .ov-flags, .change-grid, .period-grid, .ov-two { grid-template-columns: 1fr 1fr; }
}

/* upsell / paywall */
.upsell { text-align: center; max-width: 480px; margin: 60px auto; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 18px; padding: 40px 32px; }
.upsell-lock { font-size: 38px; }
.upsell h2 { font-size: 24px; margin: 10px 0; }
.upsell p { color: var(--muted); margin-bottom: 22px; line-height: 1.6; }
.upsell .btn-primary { text-decoration: none; }

@media (max-width: 860px) {
  .plans { grid-template-columns: 1fr; }
  .console { grid-template-columns: 1fr; }
  .side { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); padding: 10px 12px; gap: 6px; }
  .side-tab { flex-shrink: 0; white-space: nowrap; }
  .console-main { padding: 22px 16px; max-width: 100%; }
  /* keep table columns aligned by scrolling horizontally instead of crushing 5 cells into 2 */
  .ptable { overflow-x: auto; }
  .ptable-row { min-width: 560px; }
}

/* ---------- HERO ---------- */
.hero { max-width: 920px; margin: 0 auto; padding: 70px 24px 60px; text-align: center; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .14em; color: var(--brand); margin-bottom: 22px; }
.hero h1 { font-size: 52px; line-height: 1.05; letter-spacing: -.03em; font-weight: 800; }
.grad { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sub { color: var(--muted); font-size: 18px; line-height: 1.6; max-width: 680px; margin: 22px auto 0; }
.trust-line { color: var(--text); font-size: 15px; line-height: 1.55; max-width: 620px; margin: 16px auto 0; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(45,212,167,.06); }
.trust-line b { color: var(--good); }

.connect-card {
  margin: 40px auto 0; max-width: 640px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: 18px; padding: 26px;
  box-shadow: var(--shadow);
  text-align: left;
}
.field-label { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--muted-2); text-transform: uppercase; }
.connect-row { display: flex; gap: 10px; margin-top: 12px; }

/* Demo vs Pilot — two visually distinct doors. The preview is deliberately the
   quieter of the two: it is the worked example, not the product. */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.path { border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; text-align: left; background: rgba(255,255,255,.02); }
.path-real { border-color: rgba(56,189,124,.4); background: rgba(56,189,124,.05); }
.path-tag { font-size: 10.5px; letter-spacing: .12em; font-weight: 700; color: var(--muted-2); margin-bottom: 8px; }
.tag-live { color: var(--good); }
.path-h { font-size: 16px; margin: 0 0 6px; }
.path-p { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0 0 14px; flex: 1; }
.btn-secondary { background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; padding: 12px; }
.btn-secondary:hover { border-color: var(--muted-2); }
.btn-secondary.full { width: 100%; justify-content: center; }
.scan-note { font-size: 13px; color: var(--muted-2); margin-top: 6px; }
/* Says "fictional company" right next to the domain, where the eye already is. */
.fict-chip { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--warn-ink); background: rgba(245,185,66,.12); border: 1px solid rgba(245,185,66,.35); border-radius: 999px; padding: 3px 9px; vertical-align: middle; margin-left: 8px; }
@media (max-width: 720px) { .paths { grid-template-columns: 1fr; } }
.domain-input {
  flex: 1; background: var(--bg); border: 1px solid var(--line); color: var(--text);
  font-size: 16px; font-family: var(--mono); padding: 14px 16px; border-radius: 12px; outline: none;
}
.domain-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(91,140,255,.18); }
/* without this, the browser-default (near-black) placeholder is invisible on the dark input */
.domain-input::placeholder { color: var(--muted-2); opacity: 1; }

/* global keyboard focus ring for all interactive controls */
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-kill:focus-visible,
.nav-pill:focus-visible, .side-tab:focus-visible, .flagcard:focus-visible,
.persona-chip:focus-visible, .ptab:focus-visible, .saved-item:focus-visible,
.drawer-close:focus-visible, .linkbtn:focus-visible, a:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 2px;
}
/* unified button base — works identically for <button> and <a> */
.btn-primary, .btn-ghost, .btn-kill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 15px; line-height: 1;
  padding: 13px 22px; border-radius: 12px; cursor: pointer; white-space: nowrap;
  text-decoration: none; text-align: center;
}
.btn-primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-2)); color: white; border: none;
  transition: transform .12s, box-shadow .12s;
  box-shadow: 0 10px 30px -10px rgba(91,140,255,.7);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 40px -12px rgba(91,140,255,.9); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled, .btn-ghost:disabled, .btn-kill:disabled {
  opacity: .5; cursor: not-allowed; transform: none; box-shadow: none;
}

.connectors { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.conn-chip {
  display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted);
  background: var(--bg); border: 1px solid var(--line); padding: 7px 12px; border-radius: 10px;
}
.conn-chip .tick { color: var(--good); font-size: 11px; }
.reassure { color: var(--muted-2); font-size: 13px; margin-top: 16px; }

.trust-row { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; color: var(--muted-2); font-size: 13px; }
.trust-row .dot { color: var(--line); }

/* ---------- SCANNING ---------- */
.scan-wrap { max-width: 640px; margin: 0 auto; padding: 70px 24px; text-align: center; }
.radar { position: relative; width: 200px; height: 200px; margin: 0 auto 30px; }
.radar-ring { position: absolute; inset: 0; border: 1px solid rgba(91,140,255,.25); border-radius: 50%; }
.radar-ring.r2 { inset: 32px; } .radar-ring.r3 { inset: 64px; }
.radar-sweep {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(91,140,255,.45), transparent 55%);
  animation: spin 1.6s linear infinite;
  mask: radial-gradient(circle, transparent 8%, #000 9%);
}
.radar-core { position: absolute; inset: 0; display: grid; place-items: center; font-size: 34px; color: var(--brand); filter: drop-shadow(0 0 14px rgba(91,140,255,.8)); }
@keyframes spin { to { transform: rotate(360deg); } }
.scan-wrap h2 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.scan-log { margin: 22px auto 0; max-width: 520px; text-align: left; font-family: var(--mono); font-size: 13px; min-height: 150px; }
.scan-log div { color: var(--muted); padding: 3px 0; opacity: 0; animation: fadein .25s forwards; }
.scan-log div .ok { color: var(--good); }
.scan-log div .flag { color: var(--high); }
@keyframes fadein { to { opacity: 1; } }
.scan-bar { height: 6px; background: var(--panel); border-radius: 999px; margin: 26px auto 0; max-width: 520px; overflow: hidden; }
.scan-bar-fill { height: 100%; width: 0%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .3s ease; }

/* ---------- REPORT ---------- */
.report { max-width: 1080px; margin: 0 auto; padding: 38px 24px 80px; }
.report-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin-bottom: 8px; }
.report-head .h-left .rh-kicker { font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.report-head .h-left .rh-title { font-size: 30px; letter-spacing: -.02em; margin-top: 6px; }
.report-head .h-left .rh-title .mono { color: var(--brand); }
.exposure-note { font-size: 11px; color: var(--muted-2); margin-top: 4px; }
.improved { color: var(--good); font-size: 12px; font-weight: 700; }
.grade-pop { animation: gradePop .5s cubic-bezier(.2,1.4,.4,1); }
@keyframes gradePop { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .grade-pop { animation: none; } }
.rb-help { cursor: help; color: var(--muted-2); font-size: 11px; }
.scan-meta { color: var(--muted-2); font-size: 13px; margin-top: 8px; }

.gradecard {
  display: flex; align-items: center; gap: 18px;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: 16px; padding: 16px 22px;
}
.grade-letter { font-size: 46px; font-weight: 800; line-height: 1; }
.grade-meta { font-size: 13px; color: var(--muted); }
.grade-meta b { color: var(--text); font-size: 15px; }

/* headlines */
.headlines { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 26px 0 30px; }
.headline {
  display: flex; gap: 12px; align-items: flex-start;
  background: linear-gradient(180deg, rgba(255,84,112,.07), transparent);
  border: 1px solid var(--line); border-left: 3px solid var(--crit);
  padding: 16px 18px; border-radius: 12px;
}
.headline .ic { font-size: 18px; }
.headline p { font-size: 15px; line-height: 1.4; font-weight: 500; }

/* stat strip */
.stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 32px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.stat .num { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.stat .lbl { font-size: 12px; color: var(--muted-2); margin-top: 4px; }

/* inventory table */
.section-title { font-size: 18px; font-weight: 700; margin: 8px 0 14px; display:flex; align-items:center; gap:10px; }
.section-title .count { font-size: 13px; color: var(--muted-2); font-weight: 500; }
.inv { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.inv-row { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr .8fr 110px; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.inv-row:last-child { border-bottom: none; }
.inv-row.head { background: var(--bg-2); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
.tool-name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tool-sub { color: var(--muted-2); font-size: 12px; margin-top: 2px; }
.badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; letter-spacing: .04em; }
.badge.shadow { background: rgba(255,138,61,.15); color: var(--high); }
.badge.sanctioned { background: rgba(45,212,167,.13); color: var(--good); }
.badge.agent { background: rgba(124,91,255,.16); color: var(--agent); }
.scopes { display: flex; flex-wrap: wrap; gap: 5px; }
.scope { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 2px 7px; border-radius: 6px; }
.region { font-family: var(--mono); font-size: 13px; }
.region.off { color: var(--crit); font-weight: 600; }
.risk-pill { font-size: 12px; font-weight: 700; padding: 5px 6px; border-radius: 8px; text-align: center; width: 100%; max-width: 96px; }
.risk-pill.critical { background: rgba(255,84,112,.16); color: var(--crit); }
.risk-pill.high { background: rgba(255,138,61,.16); color: var(--high); }
.risk-pill.medium { background: rgba(245,185,66,.14); color: var(--warn); }
.risk-pill.low { background: rgba(45,212,167,.13); color: var(--good); }

.tool-note { grid-column: 1 / -1; font-size: 13px; color: var(--high); background: rgba(255,138,61,.06); border: 1px dashed rgba(255,138,61,.3); padding: 8px 12px; border-radius: 8px; margin-top: 4px; }

/* ---------- never-assume / provenance UI ---------- */
.sample-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: rgba(245,185,66,.08); border: 1px solid rgba(245,185,66,.35); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; font-size: 13.5px; line-height: 1.5; margin-bottom: 22px; }
.sample-banner b { color: var(--warn-ink); }
.sb-tag { font-size: 11px; font-weight: 800; letter-spacing: .06em; background: var(--warn); color: var(--on-warn); padding: 3px 8px; border-radius: 6px; }
.modeled-tag { font-size: 10px; font-weight: 700; letter-spacing: .04em; color: var(--muted-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; vertical-align: middle; }

/* detection-confidence chips */
.conf-dot { font-size: 10px; font-weight: 700; letter-spacing: .03em; padding: 2px 7px; border-radius: 999px; text-transform: lowercase; vertical-align: middle; cursor: help; }
.conf-dot.confirmed { background: rgba(45,212,167,.14); color: var(--good); }
.conf-dot.probable { background: rgba(245,185,66,.16); color: var(--warn); }
.conf-dot.possible { background: rgba(130,148,180,.18); color: var(--text); }
.conf-pill { font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.conf-pill.confirmed { background: rgba(45,212,167,.14); color: var(--good); }
.conf-pill.unverified { background: rgba(245,185,66,.16); color: var(--warn); }
.ev-key { color: var(--muted-2); font-weight: 600; }
.region-basis { font-size: 10px; color: var(--muted-2); font-style: italic; }
.src-tag { font-size: 11px; font-weight: 500; color: var(--muted-2); letter-spacing: 0; text-transform: none; }
.evidence-list { margin-top: 4px; }
.evidence-list .muted, .blast .muted { color: var(--muted-2); }

/* explainable score table */
.score-table { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.score-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 13px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.score-row:first-child { border-top: none; }
.score-row .score-pts { font-family: var(--mono); color: var(--text); }
.score-row.total { background: var(--panel-2); font-weight: 700; color: var(--text); }
.score-row.total .score-pts { color: var(--crit); }

/* ---------- holistic flags + findings ---------- */
.flaggrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 16px; }
.flagcard { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 15px; cursor: pointer; text-align: left; font-family: inherit; transition: border-color .12s, transform .1s; }
.flagcard:hover { transform: translateY(-1px); }
.fc-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.fc-lbl { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.flagcard.red .fc-num { color: var(--crit); } .flagcard.red.sel { border-color: var(--crit); }
.flagcard.critical .fc-num { color: var(--crit-2); } .flagcard.critical.sel { border-color: var(--crit-2); }
.flagcard.yellow .fc-num { color: var(--warn); } .flagcard.yellow.sel { border-color: var(--warn); }
.flagcard.green .fc-num { color: var(--good); } .flagcard.green.sel { border-color: var(--good); }
.flagcard.allf .fc-num { color: var(--brand); } .flagcard.allf.sel { border-color: var(--brand); }

.persona-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.persona-label { font-size: 12px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.persona-chip { background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-family: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.persona-chip:hover { color: var(--text); border-color: var(--brand); }
.persona-chip.active { background: rgba(91,140,255,.14); color: var(--brand); border-color: rgba(91,140,255,.4); }
.pc-count { font-size: 11px; opacity: .8; margin-left: 3px; }

.findings { display: flex; flex-direction: column; gap: 10px; margin-bottom: 30px; }
.finding { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.finding-bar { width: 4px; flex-shrink: 0; }
.finding.flag-red .finding-bar { background: var(--crit); }
.finding.flag-yellow .finding-bar { background: var(--warn); }
.finding.flag-green .finding-bar { background: var(--good); }
.finding-main { padding: 14px 18px; }
.finding-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.flag-chip { font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; }
.flag-chip.red { background: rgba(255,84,112,.16); color: var(--crit); }
.flag-chip.yellow { background: rgba(245,185,66,.16); color: var(--warn); }
.flag-chip.green { background: rgba(45,212,167,.14); color: var(--good); }
.crit-chip { font-size: 10px; font-weight: 800; letter-spacing: .05em; padding: 2px 8px; border-radius: 6px; background: var(--crit-2); color: #fff; }
.finding-top .cat { font-size: 12px; color: var(--muted-2); font-weight: 600; }
.finding-title { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; }
.finding-detail { font-size: 13.5px; color: var(--muted); margin-top: 4px; line-height: 1.5; }
.finding-ev { font-size: 12.5px; color: var(--muted-2); margin-top: 7px; font-family: var(--mono); }
.finding-rec { font-size: 13.5px; color: var(--good); margin-top: 8px; }
.finding-rec b { color: var(--text); }
.finding-personas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.fp { font-size: 11px; color: var(--muted); background: var(--bg); border: 1px solid var(--line); padding: 3px 8px; border-radius: 6px; }

@media (max-width: 860px) { .flaggrid { grid-template-columns: repeat(2, 1fr); } }

/* keep long model strings from pushing the risk pill */
.col-model { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Unknown AI Actors (sensor) ---------- */
.kpi-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; }
.kpi.big { border-color: rgba(124,91,255,.35); }
.kpi-num { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.kpi-lbl { font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.btn-primary.sm, .btn-ghost.sm { padding: 7px 13px; font-size: 13px; }
.actor-card { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 10px; }
.actor-bar { width: 4px; flex-shrink: 0; }
.actor-card.flag-red .actor-bar { background: var(--crit); }
.actor-card.flag-yellow .actor-bar { background: var(--warn); }
.actor-card.flag-green .actor-bar { background: var(--good); }
.actor-main { padding: 14px 18px; min-width: 0; flex: 1; }
.actor-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actor-name { font-size: 16px; font-weight: 700; font-family: var(--mono); }
.actor-klass { font-size: 12px; color: var(--muted-2); }
.actor-risk { margin-left: auto; }
.actor-headline { font-size: 14.5px; margin-top: 6px; }
.actor-meta { font-size: 12.5px; color: var(--muted-2); margin-top: 5px; font-family: var(--mono); }
.actor-alt { font-size: 12.5px; color: var(--warn); margin-top: 7px; }
.actor-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.actor-status { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; }
.actor-status.expected { background: rgba(45,212,167,.14); color: var(--good); }
.actor-status.unexpected { background: rgba(245,185,66,.16); color: var(--warn); }
.actor-status.actioned { background: rgba(255,84,112,.16); color: var(--crit); }
.actor-status.dismissed { background: var(--bg); color: var(--muted-2); }
.actor-status.unclassified { background: var(--bg); color: var(--muted-2); border: 1px solid var(--line); }
/* hero — the surprise leads, not the inventory */
.actor-hero { display: flex; align-items: center; gap: 18px; background: linear-gradient(180deg, rgba(255,84,112,.12), rgba(255,84,112,.03)); border: 1px solid rgba(255,84,112,.4); border-radius: 16px; padding: 20px 24px; margin-bottom: 22px; }
.ah-num { font-size: 40px; font-weight: 800; color: var(--crit); line-height: 1; white-space: nowrap; }
.ah-text { font-size: 16px; line-height: 1.5; }
/* forced 4-way classification */
.actor-classify { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.ac-label { font-size: 12px; color: var(--muted-2); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.ac-btn { font-family: inherit; font-size: 13px; font-weight: 600; padding: 6px 13px; border-radius: 8px; cursor: pointer; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.ac-btn:hover { color: var(--text); border-color: var(--brand); }
.ac-btn.is-on { background: rgba(91,140,255,.16); color: var(--brand); border-color: var(--brand); }
.ac-btn.warn.is-on { background: rgba(245,185,66,.16); color: var(--warn); border-color: var(--warn); }
.ac-btn.crit.is-on { background: rgba(255,84,112,.16); color: var(--crit); border-color: var(--crit); }
.ac-btn.ghost { color: var(--muted-2); }
.ac-btn.ghost.is-on { background: var(--surface-2, var(--bg)); color: var(--muted); border-color: var(--line); }

/* --- real log ingest card (drag-drop / Drive link) --- */
.ingest-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin: 6px 0 18px; }
.ingest-head h2 { font-size: 18px; margin: 0 0 4px; }
.ingest-head p { color: var(--muted-2); font-size: 13.5px; margin: 0 0 14px; line-height: 1.55; max-width: 72ch; }
.dropzone { border: 1.5px dashed var(--line); border-radius: 12px; padding: 26px 18px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: rgba(91,140,255,.03); }
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: rgba(91,140,255,.07); outline: none; }
.dropzone.drag { border-color: var(--brand); background: rgba(91,140,255,.14); }
.dz-ico { font-size: 22px; opacity: .85; }
.dz-main { font-weight: 600; margin-top: 6px; }
.dz-link { color: var(--brand); text-decoration: underline; }
.dz-sub { color: var(--muted-2); font-size: 12px; margin-top: 4px; }
.drive-row { display: flex; gap: 8px; margin-top: 12px; }
.drive-row .domain-input { flex: 1; margin: 0; }
.ingest-status { margin-top: 12px; font-size: 13.5px; }
.ingest-status:empty { margin: 0; }
.ingest-status .ok-box { background: rgba(45,212,167,.1); border: 1px solid rgba(45,212,167,.4); color: var(--text); border-radius: 10px; padding: 11px 13px; line-height: 1.5; }
.ingest-status .err-box { background: rgba(255,84,112,.1); border: 1px solid rgba(255,84,112,.4); color: var(--text); border-radius: 10px; padding: 11px 13px; line-height: 1.5; }
.col-chip { display: inline-block; font-family: var(--mono); font-size: 11px; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; margin: 2px 3px 0 0; color: var(--muted); }
.ingest-help { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.ingest-help summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--brand); }
.ingest-help .help-body { color: var(--muted-2); font-size: 13px; line-height: 1.6; margin-top: 10px; }
.ingest-help .help-body ul, .ingest-help .help-body ol { margin: 6px 0 10px; padding-left: 20px; }
.ingest-help .help-body li { margin: 3px 0; }
.ingest-help code { font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.ingest-help .help-priv { margin-top: 8px; color: var(--muted); }
.ingest-sample { margin-top: 14px; }
@media (max-width: 720px) { .kpi-strip { grid-template-columns: 1fr 1fr; } }

/* ---------- trust / security + FAQ page ---------- */
.trust-wrap { max-width: 920px; margin: 0 auto; padding: 56px 22px 80px; position: relative; z-index: 2; }
.trust-banner { max-width: 760px; margin: 22px auto 0; background: rgba(245,185,66,.08); border: 1px solid rgba(245,185,66,.3); color: var(--warn-ink); border-radius: 12px; padding: 14px 18px; font-size: 14px; line-height: 1.55; text-align: center; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 8px; }
.trust-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.trust-card .tc-ic { font-size: 22px; }
.trust-card b { display: block; margin: 8px 0 6px; font-size: 15px; }
.trust-card p { color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.faq { display: flex; flex-direction: column; gap: 8px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.faq summary { cursor: pointer; padding: 14px 18px; font-weight: 600; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted-2); font-weight: 700; font-size: 18px; }
.faq details[open] summary::after { content: '−'; }
.faq summary:hover { color: var(--brand); }
.faq details p { padding: 0 18px 16px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.faq details p a { color: var(--brand); }
.trust-contact { text-align: center; margin-top: 34px; color: var(--muted); font-size: 14.5px; }
.trust-contact a { color: var(--brand); }
@media (max-width: 760px) { .trust-grid { grid-template-columns: 1fr; } }

/* ---------- legal / prose pages ---------- */
.legal-wrap { max-width: 760px; margin: 0 auto; padding: 50px 22px 80px; position: relative; z-index: 2; }
.legal-wrap h1 { font-size: 32px; letter-spacing: -.02em; }
.legal-meta { color: var(--muted-2); font-size: 13.5px; margin: 8px 0 6px; }
.legal-note { background: rgba(245,185,66,.08); border: 1px solid rgba(245,185,66,.3); color: var(--warn-ink); border-radius: 10px; padding: 12px 16px; font-size: 13px; line-height: 1.55; margin: 16px 0 8px; }
.legal { color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal h2 { color: var(--text); font-size: 20px; margin: 30px 0 10px; letter-spacing: -.01em; }
.legal h3 { color: var(--text); font-size: 16px; margin: 20px 0 6px; }
.legal p { margin: 10px 0; }
.legal ul { margin: 10px 0 10px 22px; }
.legal li { margin: 5px 0; }
.legal a { color: var(--brand); }
.legal strong { color: var(--text); }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal th, .legal td { text-align: left; border: 1px solid var(--line); padding: 8px 12px; }
.legal th { background: var(--panel); color: var(--text); }

/* ---------- site footer ---------- */
.site-footer { position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; max-width: 1080px; margin: 50px auto 0; padding: 26px 24px; border-top: 1px solid var(--line); color: var(--muted-2); font-size: 13px; }
.sf-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); }
.sf-brand .logo { font-size: 16px; }
.sf-fine { flex: 1; min-width: 220px; color: var(--muted-2); }
.sf-links { display: flex; flex-wrap: wrap; gap: 16px; }
.sf-links a { color: var(--muted); text-decoration: none; }
.sf-links a:hover { color: var(--text); }
@media (max-width: 600px) { .site-footer { flex-direction: column; align-items: flex-start; } }

/* very small phones — collapse 2-col grids to single column */
@media (max-width: 520px) {
  .ov-hero, .ov-flags, .change-grid, .period-grid, .ov-two, .flaggrid, .stats, .headlines { grid-template-columns: 1fr; }
  .connect-row, .scan-row { flex-direction: column; }
  .connect-row .btn-primary, .scan-row .btn-primary { width: 100%; }
}

/* ---- audit pass: overflow / alignment guards ---- */
.report-head .h-left { min-width: 0; }
.report-head .h-left h1 { overflow-wrap: anywhere; }
.af-row > * { min-width: 0; }
.af-act { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chg-val { overflow: hidden; }
.finding-main { min-width: 0; }
.finding-ev { overflow-wrap: anywhere; }
.tool-name { min-width: 0; }
.drawer-kicker { padding-right: 40px; }
/* col-model: keep it vertically centered in the row (drop the tool-sub nudge) */
.inv-row .col-model { margin-top: 0; }

/* ---------- AHA #1: live data-loss feed ---------- */
.leak-card { background: linear-gradient(180deg, rgba(255,84,112,.10), rgba(255,84,112,.02)); border: 1px solid rgba(255,84,112,.35); border-radius: 14px; padding: 18px 20px; margin: 0 0 26px; }
.leak-head { font-size: 15px; font-weight: 700; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.leak-body { min-width: 0; }
.leak-sub { color: var(--muted-2); font-weight: 500; font-size: 13px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--crit); box-shadow: 0 0 0 0 rgba(255,84,112,.6); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,84,112,.55); } 70% { box-shadow: 0 0 0 10px rgba(255,84,112,0); } 100% { box-shadow: 0 0 0 0 rgba(255,84,112,0); } }
.leak-row { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; padding: 12px 0; border-top: 1px solid rgba(255,84,112,.18); }
.leak-row:first-of-type { border-top: none; }
.leak-sev { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-align: center; padding: 4px 0; border-radius: 6px; align-self: center; }
.leak-row.sev-critical .leak-sev { background: rgba(255,84,112,.2); color: var(--crit); }
.leak-row.sev-high .leak-sev { background: rgba(255,138,61,.2); color: var(--high); }
.leak-row.sev-medium .leak-sev { background: rgba(245,185,66,.18); color: var(--warn); }
.leak-summary { font-size: 15px; font-weight: 600; line-height: 1.35; }
.leak-meta { font-family: var(--mono); font-size: 12px; color: var(--muted-2); margin-top: 3px; }
.leak-detail { font-size: 13px; color: var(--muted); margin-top: 5px; }

/* ---------- AHA #3/#4/#5: risk band ---------- */
.riskband { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 30px; }
.rb-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.rb-label { font-size: 12px; font-weight: 700; color: var(--muted-2); letter-spacing: .04em; }
.rb-big { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 6px; }
.rb-big.crit { color: var(--crit); font-size: 21px; }
.rb-big.high { color: var(--high); }
.rb-meta { font-size: 13px; color: var(--muted); line-height: 1.45; }
.rb-spark { display: flex; align-items: center; gap: 12px; margin: 6px 0; }
.rb-spark svg { overflow: visible; }

/* ---------- inventory rows clickable / contained ---------- */
.inv-row[role="button"] { cursor: pointer; transition: background .12s; }
.inv-row[role="button"]:hover { background: var(--panel-2); }
.inv-row[role="button"]:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.inv-row.is-contained { opacity: .6; }
.inv-row.is-contained .tool-name { text-decoration: line-through; text-decoration-color: var(--muted-2); }
.badge.contained { background: rgba(45,212,167,.16); color: var(--good); }

/* ---------- AHA #2: drawer / overlay / toast ---------- */
.overlay { position: fixed; inset: 0; background: rgba(4,7,13,.6); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 40; }
.overlay.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100%; width: 440px; max-width: 92vw; z-index: 50;
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border-left: 1px solid var(--line);
  box-shadow: var(--shadow); padding: 28px 26px; overflow-y: auto;
  transform: translateX(100%); transition: transform .26s cubic-bezier(.2,.7,.2,1);
}
.drawer.open { transform: translateX(0); }
.drawer-close { position: absolute; top: 18px; right: 18px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); width: 32px; height: 32px; border-radius: 8px; cursor: pointer; font-size: 14px; }
.drawer-close:hover { color: var(--text); border-color: var(--brand); }
.drawer-kicker { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.drawer-title { font-size: 24px; letter-spacing: -.02em; margin: 6px 0 6px; }
.drawer-sub { font-size: 13px; color: var(--muted); }
.drawer-status { margin: 18px 0; padding: 12px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.drawer-status.bad { background: rgba(255,84,112,.12); color: var(--crit); border: 1px solid rgba(255,84,112,.3); }
.drawer-status.ok { background: rgba(45,212,167,.12); color: var(--good); border: 1px solid rgba(45,212,167,.3); }
.drawer-label { font-size: 12px; font-weight: 700; color: var(--muted-2); letter-spacing: .04em; margin: 20px 0 10px; }
.blast { display: flex; flex-wrap: wrap; gap: 8px; }
.blast-chip { font-size: 13px; padding: 6px 11px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.blast-chip.hot { background: rgba(255,84,112,.12); border-color: rgba(255,84,112,.35); color: var(--crit); font-weight: 600; }
.reasons { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.drawer-note { margin-top: 16px; font-size: 13px; color: var(--high); background: rgba(255,138,61,.07); border: 1px dashed rgba(255,138,61,.3); padding: 10px 12px; border-radius: 8px; }
.drawer-actions { margin-top: 26px; }
.btn-kill { width: 100%; padding: 14px; background: linear-gradient(90deg, var(--crit), var(--crit-2)); color: #fff; border: none; box-shadow: 0 12px 30px -12px rgba(255,84,112,.8); transition: transform .12s; }
.btn-kill:hover { transform: translateY(-1px); }
.drawer-foot { font-size: 12px; color: var(--muted-2); margin-top: 12px; text-align: center; }
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); z-index: 60; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); font-weight: 600; font-size: 14px; padding: 13px 20px; border-radius: 12px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* CTA */
.report-cta {
  margin-top: 34px; text-align: center;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: 18px; padding: 34px;
}
.report-cta h3 { font-size: 24px; letter-spacing: -.02em; }
.report-cta p { color: var(--muted); margin: 10px auto 22px; max-width: 560px; }
.cta-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--text); font-weight: 600; }
.btn-ghost:hover { border-color: var(--brand); }

@media (max-width: 860px) {
  .hero h1 { font-size: 36px; }
  .headlines { grid-template-columns: 1fr; }
  .riskband { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .drawer { width: 100%; }
  /* show only Tool and Risk columns; hide the rest on both header and rows */
  .inv-row { grid-template-columns: 1fr 100px; }
  .inv-row .col-scopes, .inv-row .col-region, .inv-row .col-model { display: none; }
}

/* ============================================================================
   Mobile refinements — the layout grids already collapse at 860/720/600/520px
   (see blocks above). This pass handles the chrome those blocks didn't: the
   topbar, oversized headings, and touch-target comfort. All additive; nothing
   here changes the desktop presentation above ~720px.
   ========================================================================= */

/* topbar: trim the generous desktop padding and let the nav cluster wrap so a
   long org name / email never forces a horizontal scrollbar. */
@media (max-width: 720px) {
  .topbar { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .topnav { gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
  /* the brand tagline + signed-in email are context, not controls — drop them
     first when space is tight so the brand and primary actions stay put. */
  .brand-tag { display: none; }
  .user-email { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (max-width: 480px) {
  .topbar { padding: 9px 13px; }
  .user-email { display: none; }
  .nav-link { padding: 6px 7px; }
  /* shrink the big marketing headlines so they don't overflow narrow phones */
  .hero h1 { font-size: 29px; }
  .sub { font-size: 16px; }
  .pricing-h1 { font-size: 30px; }
  .pricing-sub { font-size: 15px; }
  .auth-wrap { padding: 44px 18px; }
  .auth-card { padding: 24px 20px; }
  .report { padding: 28px 16px 64px; }
  .report-head .h-left .rh-title { font-size: 24px; }
  /* one-per-row stats are easier to read than three cramped columns < 480px */
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* Comfortable tap targets on touch devices — pills/tabs/links that are fine
   with a mouse can fall below the ~44px guideline; pad them out on touch only
   so desktop density is untouched. */
@media (hover: none) and (pointer: coarse) {
  .side-tab { padding: 13px 14px; }
  .nav-pill, a.nav-pill { min-height: 38px; }
  .ptab, .persona-chip, .ac-btn { min-height: 36px; }
}

/* Respect users who prefer reduced motion — kill the radar/sweep/fade animations */
@media (prefers-reduced-motion: reduce) {
  .radar-sweep { animation: none; }
  .scan-log div { animation: none; opacity: 1; }
  .btn-primary { transition: none; }
}
