/* Rampart - "command centre" theme: a security-operations console.
   Deep navy glass panels with corner brackets, cyan as the signal colour, glowing severity colours,
   monospace figures and labels. A "daylight" variant keeps the same structure in light mode.
   Motion rules (Emil Kowalski): transform/opacity/clip-path only, strong ease-out for enter/exit,
   ease-in-out for movement, UI motion under ~300ms, hover gated to real pointers, reduced-motion respected. */

/* ================================================================ tokens */
:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-press: 160ms; --dur-fast: 150ms; --dur: 220ms; --dur-modal: 250ms;

  --bg: #04070d; --bg-2: #070c16;
  --sidebar: rgba(6, 11, 20, .86);
  --surface: rgba(11, 19, 33, .72); --surface-solid: #0b1321; --surface-2: rgba(22, 36, 58, .55); --hover: rgba(34, 211, 238, .06);
  --border: rgba(56, 189, 248, .13); --border-strong: rgba(56, 189, 248, .28); --bracket: rgba(34, 211, 238, .55);
  --text: #dbe7f5; --muted: #7f93ad; --faint: #4f6079;
  --accent: #22d3ee; --accent-hover: #67e8f9; --accent-soft: rgba(34, 211, 238, .1); --accent-ring: rgba(34, 211, 238, .35); --on-accent: #02131a;
  --glow: 0 0 18px rgba(34, 211, 238, .18);
  --cyan: #22d3ee; --orange: #ff9f43; --violet: #b39dff;
  --crit: #ff4d6d; --crit-bg: rgba(255, 77, 109, .12);
  --high: #ff9f43; --high-bg: rgba(255, 159, 67, .12);
  --med: #ffd166; --med-bg: rgba(255, 209, 102, .11);
  --low: #2ee59d; --low-bg: rgba(46, 229, 157, .1);
  --none-bg: rgba(127, 147, 173, .12);
  --ok: #2ee59d; --warn: #ffd166; --fail: #ff4d6d; --info: #38bdf8;
  --accepted: #b39dff; --accepted-bg: rgba(179, 157, 255, .13);
  --grad: linear-gradient(90deg, #3b82f6, #22d3ee 55%, #ff9f43);
  --gridline: rgba(56, 189, 248, .045);
  --shadow-sm: 0 1px 0 rgba(255, 255, 255, .03) inset;
  --shadow: 0 24px 60px rgba(0, 0, 0, .6), 0 0 0 1px rgba(56, 189, 248, .14);
  --radius: 6px; --radius-sm: 4px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, "SF Mono", ui-monospace, monospace;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #e9eff6; --bg-2: #f3f6fa;
  --sidebar: rgba(248, 250, 253, .9);
  --surface: rgba(255, 255, 255, .82); --surface-solid: #ffffff; --surface-2: rgba(226, 234, 244, .7); --hover: rgba(8, 145, 178, .06);
  --border: rgba(15, 52, 96, .12); --border-strong: rgba(15, 52, 96, .24); --bracket: rgba(8, 145, 178, .6);
  --text: #0c1a2b; --muted: #4f627a; --faint: #8899ae;
  --accent: #0891b2; --accent-hover: #0e7490; --accent-soft: rgba(8, 145, 178, .1); --accent-ring: rgba(8, 145, 178, .25); --on-accent: #fff;
  --glow: 0 0 0 transparent;
  --cyan: #0891b2; --orange: #ea580c; --violet: #6d28d9;
  --crit: #d61f45; --crit-bg: rgba(214, 31, 69, .09); --high: #c2410c; --high-bg: rgba(234, 88, 12, .1); --med: #a16207; --med-bg: rgba(202, 138, 4, .12);
  --low: #047857; --low-bg: rgba(4, 120, 87, .1); --none-bg: rgba(79, 98, 122, .1);
  --ok: #047857; --warn: #a16207; --fail: #d61f45; --info: #0369a1;
  --accepted: #6d28d9; --accepted-bg: rgba(109, 40, 217, .09);
  --grad: linear-gradient(90deg, #2563eb, #0891b2 55%, #ea580c);
  --gridline: rgba(15, 52, 96, .05);
  --shadow-sm: 0 1px 2px rgba(15, 35, 60, .06);
  --shadow: 0 24px 60px rgba(15, 35, 60, .2), 0 0 0 1px rgba(15, 52, 96, .12);
  color-scheme: light;
}

/* ================================================================ base */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 600px at 15% -10%, rgba(34, 211, 238, .08), transparent 60%),
    radial-gradient(900px 600px at 100% 110%, rgba(59, 130, 246, .08), transparent 60%),
    linear-gradient(var(--gridline) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(90deg, var(--gridline) 1px, transparent 1px) 0 0 / 32px 32px,
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
}
/* Faint scan lines over everything (static - decoration shouldn't move). */
body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .012) 0 1px, transparent 1px 3px); }
:root[data-theme="light"] body::after { display: none; }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-fast) ease; }
@media (hover: hover) and (pointer: fine) { a:hover { color: var(--accent-hover); } }
h1, h2, h3 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 26px; letter-spacing: -.02em; }
h2 { font-size: 15px; }
h3 { font-size: 14px; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 1px solid var(--accent); outline-offset: 2px; box-shadow: 0 0 0 4px var(--accent-soft); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
[hidden] { display: none !important; }
/* Monospace figures everywhere numbers matter */
.kpi .value, .big-score, .posture .stat .big, .grade b, .legend b, .meter-row .pct, .table td.num, .upcoming .up b, .chart-legend b, .tabs .count, .clock { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* Corner brackets on panels (pure background, no extra markup) */
.card, .posture, .modal, .auth-card {
  --b: var(--bracket); --bl: 12px;
  background-image:
    linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)),
    linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)),
    linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b)),
    linear-gradient(var(--b), var(--b)), linear-gradient(var(--b), var(--b));
  background-repeat: no-repeat;
  background-size: var(--bl) 1px, 1px var(--bl), var(--bl) 1px, 1px var(--bl), var(--bl) 1px, 1px var(--bl), var(--bl) 1px, 1px var(--bl);
  background-position: 0 0, 0 0, 100% 0, 100% 0, 0 100%, 0 100%, 100% 100%, 100% 100%;
}

/* ================================================================ layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.app::before { content: ""; position: fixed; z-index: 30; left: 0; right: 0; top: 0; height: 2px; background: var(--grad); box-shadow: 0 0 12px rgba(34, 211, 238, .5); }
.workspace { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 40px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
  font: 500 11.5px var(--mono); letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.topbar .sys b { color: var(--text); font-weight: 700; }
.topbar .sys i { font-style: normal; color: var(--accent); margin: 0 8px; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 700; }
.live i { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }
/* Status pulse: state indication for a live connection; slow and small. */
.live i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--ok); animation: pulse 2.4s var(--ease-out) infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .9; } to { transform: scale(3); opacity: 0; } }
.clock { color: var(--muted); letter-spacing: .06em; }

.sidebar { background: var(--sidebar); backdrop-filter: blur(12px); border-right: 1px solid var(--border); padding: 18px 12px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 25; }
.sidebar::after { content: ""; position: absolute; right: -1px; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--accent) 30%, transparent 70%); opacity: .45; pointer-events: none; }
.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 22px; margin-bottom: 8px; border-bottom: 1px solid var(--border); }
.brand-mark { width: 34px; height: 34px; border-radius: 8px; flex: none; display: block; filter: drop-shadow(0 0 10px rgba(34, 211, 238, .35)); }
.brand b { display: block; font: 700 14px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.brand span { font-size: 10.5px; color: var(--muted); display: block; line-height: 1.35; }
.nav { display: flex; flex-direction: column; gap: 2px; position: relative; }
.nav a { display: flex; align-items: center; gap: 11px; white-space: nowrap; height: 38px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--muted); position: relative; z-index: 1; font-weight: 500;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.nav a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .nav a:hover { color: var(--text); background: var(--hover); } }
.nav a.active { color: var(--accent); font-weight: 600; }
.nav a.active svg { color: var(--accent); filter: drop-shadow(0 0 6px var(--accent-ring)); }
.nav svg { width: 18px; height: 18px; flex: none; transition: color var(--dur-fast) ease; }
/* Sliding highlight behind the active item (positioned by JS). */
.nav-ink { position: absolute; left: 0; right: 0; top: 0; height: 38px; border-radius: var(--radius-sm); z-index: 0; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, rgba(34, 211, 238, .16), rgba(34, 211, 238, .03) 80%);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, .18);
  transition: transform var(--dur) var(--ease-in-out), opacity var(--dur-fast) ease; }
.nav-ink::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
:root[data-theme="light"] .nav-ink { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.nav-ink.on { opacity: 1; }
.nav-label { font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); padding: 18px 12px 6px; }
.nav-label::before { content: "// "; color: var(--accent); }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 2px; }
.sidebar-foot .nav-ink { display: none; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px 8px 8px; }
.avatar { width: 32px; height: 32px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font: 700 12px var(--mono); flex: none; box-shadow: inset 0 0 0 1px var(--accent-ring); }
.user-chip b { display: block; font-size: 13px; line-height: 1.3; }
.user-chip span { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.main { min-width: 0; padding: 28px 40px 56px; max-width: 1520px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.page-head h1::before { content: ">"; font-family: var(--mono); color: var(--accent); margin-right: 10px; text-shadow: 0 0 12px var(--accent-ring); }
.crumbs { font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumbs a { color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .crumbs a:hover { color: var(--accent); } }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 32px 0 12px; }
.section-title h2 { font: 600 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text); display: flex; align-items: center; gap: 10px; }
.section-title h2::before { content: ""; width: 8px; height: 8px; background: var(--accent); box-shadow: 0 0 10px var(--accent); transform: rotate(45deg); }
.grid { display: grid; gap: 14px; }
.grid.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.wide-left { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
@media (max-width: 1100px) { .grid.wide-left { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 14px; }
  .sidebar::after { display: none; }
  .brand { padding: 0 12px 0 0; margin: 0; border: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav-ink { display: none; }
  .nav a.active { background: var(--accent-soft); }
  .nav-label, .sidebar-foot .user-chip { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; flex-direction: row; }
  .topbar { padding: 0 16px; }
  .topbar .clock { display: none; }
  .main { padding: 20px 16px 40px; }
  .grid.two { grid-template-columns: 1fr; }
}

/* ================================================================ panels */
.card { position: relative; background-color: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; min-width: 0;
  backdrop-filter: blur(8px); box-shadow: var(--shadow-sm); }
.card.flush { padding: 0; overflow-x: auto; overflow-y: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-head h2 { font: 600 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.card-head h2 svg { color: var(--accent); width: 15px; height: 15px; }
.card-head .sub { color: var(--faint); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.card.flush .card-head { padding: 16px 20px 0; }

/* KPI readouts */
.kpi { overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border-strong); }
.kpi.tone-crit::before, .kpi.tone-fail::before { background: var(--crit); box-shadow: 0 0 12px var(--crit); }
.kpi.tone-high::before { background: var(--high); box-shadow: 0 0 12px var(--high); }
.kpi.tone-ok::before { background: var(--ok); box-shadow: 0 0 12px var(--ok); }
.kpi.tone-info::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.kpi .label { color: var(--muted); font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.kpi .label svg { color: var(--accent); width: 14px; height: 14px; }
.kpi .value { font-size: 30px; font-weight: 600; line-height: 1.15; margin-top: 10px; letter-spacing: -.02em; }
.kpi .value[class*="c-"] { text-shadow: 0 0 22px color-mix(in srgb, currentColor 35%, transparent); }
.kpi .foot { color: var(--muted); font-size: 12px; margin-top: 4px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; flex: none; box-shadow: 0 0 8px currentColor; }
.c-crit { color: var(--crit); } .c-high { color: var(--high); } .c-med { color: var(--med); } .c-low { color: var(--low); }
.c-ok { color: var(--ok); } .c-warn { color: var(--warn); } .c-fail { color: var(--fail); } .c-muted { color: var(--muted); } .c-accent { color: var(--accent); }
.bg-crit { background: var(--crit); color: var(--crit); } .bg-high { background: var(--high); color: var(--high); } .bg-med { background: var(--med); color: var(--med); } .bg-low { background: var(--low); color: var(--low); }
.bg-ok { background: var(--ok); color: var(--ok); } .bg-warn { background: var(--warn); color: var(--warn); } .bg-fail { background: var(--fail); color: var(--fail); } .bg-muted { background: var(--border-strong); }
.empty { padding: 38px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 30px; height: 30px; color: var(--accent); opacity: .7; margin-bottom: 8px; filter: drop-shadow(0 0 8px var(--accent-ring)); }
.empty b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }

/* ================================================================ badges & chips */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 3px; font: 600 10.5px/1.6 var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  background: var(--none-bg); color: var(--muted); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 22%, transparent); }
.badge.Critical, .badge.fail { background: var(--crit-bg); color: var(--crit); }
.badge.High { background: var(--high-bg); color: var(--high); }
.badge.Medium, .badge.warn, .badge.unknown { background: var(--med-bg); color: var(--med); }
.badge.Low, .badge.pass, .badge.ok { background: var(--low-bg); color: var(--low); }
.badge.info, .badge.accent { background: var(--accent-soft); color: var(--accent); }
.badge.accepted { background: var(--accepted-bg); color: var(--accepted); }
.badge.outline { background: transparent; color: var(--muted); }
.badge.Critical::before, .badge.fail::before, .badge.pass::before, .badge.warn::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.status-dot { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); font: 500 11px var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.status-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--faint); }
.status-dot.online::before { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.status-dot.offline::before { background: var(--fail); box-shadow: 0 0 8px var(--fail); }
.chip { display: inline-block; padding: 1px 7px; border-radius: 3px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border); font: 500 11.5px var(--mono); margin: 2px 4px 2px 0; color: var(--text);
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
@media (hover: hover) and (pointer: fine) { a.chip:hover { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-ring); } }

/* ================================================================ buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font: 500 13px var(--font); cursor: pointer; white-space: nowrap;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.btn:active:not(:disabled) { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--accent-soft); border-color: var(--accent-ring); color: var(--accent); box-shadow: var(--glow); }
  .btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--on-accent); box-shadow: 0 0 24px var(--accent-ring); }
  .btn.danger:hover { background: var(--crit-bg); border-color: color-mix(in srgb, var(--crit) 45%, transparent); color: var(--fail); box-shadow: 0 0 16px var(--crit-bg); }
  .btn.ghost:hover { background: var(--accent-soft); color: var(--accent); }
}
.btn:disabled { opacity: .4; cursor: default; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; box-shadow: 0 0 18px var(--accent-ring); }
.btn.danger { color: var(--fail); border-color: color-mix(in srgb, var(--crit) 30%, transparent); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; gap: 6px; }
.btn.sm svg { width: 13px; height: 13px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }

/* ================================================================ forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font: 600 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field .hint, .hint { font-size: 12px; color: var(--faint); }
.input, select.input, textarea.input { height: 38px; padding: 0 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: color-mix(in srgb, var(--bg) 60%, transparent); color: var(--text);
  font: 13.5px var(--font); outline: none; width: 100%; transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
:root[data-theme="light"] .input { background: #fff; }
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 360px; white-space: pre; }
@media (hover: hover) and (pointer: fine) { .input:hover { border-color: var(--accent-ring); } }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 16px var(--accent-soft); }
.input.sm { height: 30px; padding: 0 9px; font-size: 13px; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; color: var(--accent); pointer-events: none; }
.search .input { padding-left: 34px; width: 280px; font-family: var(--mono); font-size: 12.5px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.form-section { margin: 20px 0 12px; padding-top: 16px; border-top: 1px dashed var(--border-strong); font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.form-section::before { content: "// "; }
.form-error { color: var(--fail); font-size: 13px; min-height: 18px; margin-bottom: 4px; }

.switch { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; padding: 6px 0; }
.switch input { appearance: none; width: 40px; height: 22px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border-strong); position: relative; flex: none; cursor: pointer; margin: 0;
  transition: background-color var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 2px; background: var(--muted);
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease; }
.switch input:checked { background: var(--accent-soft); border-color: var(--accent); box-shadow: 0 0 12px var(--accent-soft); }
.switch input:checked::after { transform: translateX(18px); background: var(--accent); box-shadow: 0 0 8px var(--accent); }
.switch:active input::after { transform: scale(0.9); }
.switch:active input:checked::after { transform: translateX(18px) scale(0.9); }
.switch b { display: block; font-weight: 500; }
.switch span { color: var(--muted); font-size: 12.5px; }
input[type="checkbox"].check { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
.radio-list { display: grid; gap: 8px; }
.radio { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer;
  transition: border-color var(--dur-fast) ease, background-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.radio:active { transform: scale(0.99); }
.radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: var(--glow); }
.radio input { margin: 3px 0 0; accent-color: var(--accent); }
.radio b { display: block; font-weight: 600; }
.radio span { color: var(--muted); font-size: 12.5px; }

/* ================================================================ segmented & tabs */
.segmented { display: inline-flex; background: color-mix(in srgb, var(--bg) 55%, transparent); border-radius: var(--radius-sm); padding: 3px; gap: 2px; box-shadow: inset 0 0 0 1px var(--border-strong); }
.segmented button, .segmented a { border: 0; background: transparent; color: var(--muted); padding: 5px 13px; border-radius: 3px; font: 600 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: color var(--dur-fast) ease, background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.segmented button:active, .segmented a:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .segmented button:hover, .segmented a:hover { color: var(--text); } }
.segmented .active { background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.segmented .muted { font-size: 10.5px; }
/* Tabs wrap onto a second row when space is tight, so none are ever hidden off the edge. */
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: 4px 0 22px; position: relative; }
.tabs a { padding: 11px 14px; color: var(--muted); font: 600 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; display: flex; gap: 8px; align-items: center; position: relative;
  transition: color var(--dur-fast) ease; }
@media (hover: hover) and (pointer: fine) { .tabs a:hover { color: var(--text); } }
.tabs a.active { color: var(--accent); text-shadow: 0 0 12px var(--accent-ring); }
.tabs:not(.has-ink) a.active { box-shadow: inset 0 -2px 0 var(--accent); }
.tab-ink { position: absolute; left: 0; top: 0; height: 2px; width: 1px; background: var(--accent); box-shadow: 0 0 10px var(--accent); transform-origin: 0 0; pointer-events: none;
  transition: transform var(--dur) var(--ease-in-out); }
.tabs .count { font-size: 10.5px; padding: 0 6px; border-radius: 3px; background: var(--surface-2); color: var(--muted); letter-spacing: 0; }
.tabs .count.bad { background: var(--crit-bg); color: var(--crit); }

/* ================================================================ tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font: 600 10.5px var(--mono); text-transform: uppercase; letter-spacing: .12em; color: var(--faint); padding: 11px 14px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; user-select: none;
  background: color-mix(in srgb, var(--accent) 4%, transparent); }
.table th.sortable { cursor: pointer; transition: color var(--dur-fast) ease; }
@media (hover: hover) and (pointer: fine) { .table th.sortable:hover { color: var(--accent); } }
.table th .arrow { font-size: 9px; margin-left: 4px; color: var(--accent); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; transition: background-color 120ms ease; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
@media (hover: hover) and (pointer: fine) {
  .table tbody tr:hover td { background: var(--hover); }
  .table tbody tr.clickable:hover td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
}
.table td.num, .table th.num { text-align: right; }
.table td.truncate { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .strong { font-weight: 600; }
.table .muted, .muted { color: var(--muted); font-size: 12.5px; }
.table tr.detail td { background: var(--surface-2); padding: 0; }
.zero { color: var(--faint); font-family: var(--mono); }

/* ================================================================ meters & charts */
.meter { height: 6px; background: var(--surface-2); display: flex; overflow: hidden; min-width: 120px; gap: 2px; border-radius: 1px; box-shadow: inset 0 0 0 1px var(--border); }
.meter > span { height: 100%; box-shadow: 0 0 8px currentColor; }
.meter-row { display: flex; align-items: center; gap: 10px; }
.meter-row .pct { font-weight: 600; min-width: 42px; text-align: right; font-size: 12.5px; }
.donut { display: flex; align-items: center; gap: 26px; }
.donut svg { width: 150px; height: 150px; flex: none; overflow: visible; }
.donut svg circle[stroke-dasharray] { filter: drop-shadow(0 0 5px rgba(34, 211, 238, .25)); }
.donut .centre-num { font: 600 26px var(--mono); fill: var(--text); }
.donut .centre-lbl { font: 600 9.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
.legend { display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.legend div { display: flex; align-items: center; gap: 9px; }
.legend b { margin-left: auto; padding-left: 16px; }
.chart-legend { display: flex; gap: 18px; font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; flex-wrap: wrap; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend b { font-size: 13px; margin-left: 2px; letter-spacing: 0; }
.chart-box { position: relative; width: 100%; }
.chart-box .plot { position: absolute; left: 34px; right: 14px; top: 8px; bottom: 26px; }
.chart-box svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.chart-box svg polyline { filter: drop-shadow(0 0 4px rgba(255, 77, 109, .35)); }
.chart-box .grid-line { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 5; }
.chart-box .y-lbl { position: absolute; right: calc(100% + 10px); transform: translateY(-50%); font: 10.5px var(--mono); color: var(--faint); }
.chart-box .x-lbl { position: absolute; top: calc(100% + 8px); transform: translateX(-50%); font: 10.5px var(--mono); color: var(--faint); white-space: nowrap; text-transform: uppercase; }
.chart-box .x-lbl.first { transform: none; }
.chart-box .x-lbl.last { transform: translateX(-100%); }
.chart-box .end-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; transform: translate(-50%, -50%); }
.chart-box .hover-col { position: absolute; top: 0; bottom: 0; cursor: crosshair; transition: background-color 120ms ease; }
@media (hover: hover) and (pointer: fine) { .chart-box .hover-col:hover { background: linear-gradient(180deg, transparent, var(--accent-soft)); box-shadow: inset 1px 0 0 var(--accent-ring); } }

/* ================================================================ security posture */
.posture { display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center; padding: 24px 28px; border-radius: var(--radius); margin-bottom: 14px; position: relative; overflow: hidden;
  background-color: var(--surface); border: 1px solid var(--border-strong); backdrop-filter: blur(8px); --bl: 18px; }
.posture::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(520px 240px at 0% 50%, rgba(34, 211, 238, .1), transparent 70%), radial-gradient(420px 220px at 100% 100%, rgba(255, 159, 67, .06), transparent 70%); }
.posture::after { content: "LIVE ASSESSMENT"; position: absolute; right: 18px; top: 10px; font: 600 9.5px var(--mono); letter-spacing: .16em; color: var(--faint); }
.legend .dot, .chart-legend .dot { box-shadow: none; }
.posture > * { position: relative; }
.grade { width: 112px; height: 112px; position: relative; display: grid; place-items: center; }
.grade svg { position: absolute; inset: 0; transform: rotate(-90deg); overflow: visible; }
.grade svg circle[stroke-dasharray] { stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(34, 211, 238, .55)); }
.grade b { font-size: 44px; font-weight: 700; line-height: 1; text-shadow: 0 0 24px currentColor; }
.grade span { position: absolute; bottom: 15px; font: 600 9.5px var(--mono); color: var(--muted); letter-spacing: .16em; text-transform: uppercase; }
.posture h2 { font-size: 20px; margin-bottom: 6px; letter-spacing: -.01em; text-shadow: 0 0 20px color-mix(in srgb, currentColor 30%, transparent); }
.posture .crumbs { color: var(--accent); }
.posture .lead { color: var(--muted); max-width: 640px; }
.posture .chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.posture .stat { text-align: right; padding-left: 28px; border-left: 1px dashed var(--border-strong); }
.posture .stat .big { font-size: 40px; font-weight: 700; line-height: 1; color: var(--accent); text-shadow: 0 0 24px var(--accent-ring); }
.posture .stat .small { color: var(--muted); font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-top: 8px; }
@media (max-width: 900px) { .posture { grid-template-columns: 1fr; text-align: left; } .posture .stat { text-align: left; padding: 16px 0 0; border-left: 0; border-top: 1px dashed var(--border-strong); } .posture::after { display: none; } }
.g-A { color: #2ee59d; } .g-B { color: #a3f05a; } .g-C { color: #ffd166; } .g-D { color: #ff9f43; } .g-F { color: #ff4d6d; } .g-none { color: var(--muted); }
:root[data-theme="light"] .g-A { color: #047857; } :root[data-theme="light"] .g-B { color: #4d7c0f; } :root[data-theme="light"] .g-C { color: #a16207; }
:root[data-theme="light"] .g-D { color: #c2410c; } :root[data-theme="light"] .g-F { color: #d61f45; }
:root[data-theme="light"] .grade b, :root[data-theme="light"] .posture h2, :root[data-theme="light"] .kpi .value[class*="c-"], :root[data-theme="light"] .posture .stat .big { text-shadow: none; }

/* ================================================================ CE checklist */
.check-group { margin-bottom: 22px; }
.check-group h3 { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .14em; color: var(--faint); margin: 0 0 8px 2px; }
.check-group h3::before { content: "// "; color: var(--accent); }
.check { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.check:last-child { border-bottom: 0; }
.check .icon { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; margin-top: 1px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent); }
.check .icon svg { width: 13px; height: 13px; }
.check .icon.pass { background: var(--low-bg); color: var(--ok); }
.check .icon.fail { background: var(--crit-bg); color: var(--fail); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 40%, transparent), 0 0 12px var(--crit-bg); }
.check .icon.warn, .check .icon.unknown { background: var(--med-bg); color: var(--warn); }
.check .icon.info { background: var(--accent-soft); color: var(--info); }
.check .icon.accepted { background: var(--accepted-bg); color: var(--accepted); }
.check .icon.locked { background: var(--surface-2); color: var(--muted); }
.badge.locked { background: transparent; color: var(--muted); border: 1px solid var(--border-strong); }
.check .title { font-weight: 600; }
.check .detail { color: var(--muted); margin-top: 2px; }
.check-actions { display: flex; gap: 8px; margin-top: 10px; }
.fix { margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 5%, transparent); box-shadow: inset 2px 0 0 var(--accent); font-size: 13px; }
.fix b { color: var(--accent); font: 700 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; margin-right: 6px; }
.fix.accepted { background: color-mix(in srgb, var(--accepted) 6%, transparent); box-shadow: inset 2px 0 0 var(--accepted); }
.fix.accepted b { color: var(--accepted); }
.device-list { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.device-list a { font: 500 11.5px var(--mono); padding: 2px 8px; border-radius: 3px; background: var(--crit-bg); color: var(--crit); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--crit) 30%, transparent);
  transition: box-shadow var(--dur-fast) ease; }
.device-list a.warn { background: var(--med-bg); color: var(--med); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--med) 30%, transparent); }
@media (hover: hover) and (pointer: fine) { .device-list a:hover { color: var(--crit); box-shadow: inset 0 0 0 1px var(--crit), 0 0 10px var(--crit-bg); } .device-list a.warn:hover { color: var(--med); box-shadow: inset 0 0 0 1px var(--med); } }
.big-score { font-size: 44px; font-weight: 700; line-height: 1; }

/* Drill-down links, disks */
.item-link { color: var(--text); text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat;
  transition: color var(--dur-fast) ease, background-size var(--dur) var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .item-link:hover { color: var(--accent); background-size: 100% 1px; } }
.card-head h2 .item-link { color: inherit; }
.disk { padding: 8px 0; }
.disk + .disk { border-top: 1px dashed var(--border); }
.disk-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.disk-head b { font-family: var(--mono); }
.disk-free { margin-left: auto; font: 500 12px var(--mono); color: var(--muted); }
.disk .meter { height: 8px; }
tr.row-kev td { background: color-mix(in srgb, var(--crit) 6%, transparent); }
tr.row-kev td:first-child { box-shadow: inset 2px 0 0 var(--crit); }
.truncate-inline { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

/* Autotask */
.ticket-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: var(--radius-sm); border: 1px solid var(--accent-ring); background: var(--accent-soft); color: var(--accent); cursor: pointer;
  font: 600 11.5px var(--mono); transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease; }
.ticket-chip svg { width: 12px; height: 12px; }
.ticket-chip span { font-weight: 500; color: var(--muted); }
.ticket-chip.closed { border-color: var(--border); background: transparent; color: var(--muted); }
.ticket-chip:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .ticket-chip:hover { background: color-mix(in srgb, var(--accent) 18%, transparent); } }
.banner .btn { margin-left: auto; flex: none; }
.company-results { display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ticket-notes { display: flex; flex-direction: column; gap: 10px; max-height: 260px; overflow: auto; }
.ticket-note { padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.ticket-note b { margin-right: 8px; }

/* Actively exploited (CISA KEV) */
.badge.kev { background: var(--crit); color: #fff; box-shadow: 0 0 12px color-mix(in srgb, var(--crit) 55%, transparent); }
.badge.kev svg { width: 11px; height: 11px; }
:root[data-theme="light"] .badge.kev { box-shadow: none; }
.card.is-kev { border-color: color-mix(in srgb, var(--crit) 45%, transparent); box-shadow: 0 0 0 1px color-mix(in srgb, var(--crit) 25%, transparent), 0 0 24px var(--crit-bg); --b: var(--crit); }

/* Organisation controls questionnaire */
.control { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.control:last-child { border-bottom: 0; }
.control .icon { width: 24px; height: 24px; border-radius: 4px; display: grid; place-items: center; margin-top: 1px; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 30%, transparent); }
.control .icon svg { width: 13px; height: 13px; }
.control .icon.pass { background: var(--low-bg); color: var(--ok); }
.control .icon.fail { background: var(--crit-bg); color: var(--fail); }
.control .icon.warn { background: var(--med-bg); color: var(--warn); }
.control .icon.outline, .control .icon.unknown { background: var(--none-bg); color: var(--faint); }
.control .title { font-weight: 600; }
.control .detail { color: var(--muted); margin-top: 2px; font-size: 13px; max-width: 760px; }
.control .notes { margin-top: 10px; field-sizing: content; height: auto; min-height: 38px; max-height: 200px; padding: 8px 12px; font-size: 13px; resize: vertical; }
.segmented.answer button { padding: 5px 10px; }
.segmented.answer button.active[data-v="met"] { background: var(--low-bg); color: var(--ok); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent), 0 0 12px var(--low-bg); }
.segmented.answer button.active[data-v="partial"] { background: var(--med-bg); color: var(--warn); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 45%, transparent); }
.segmented.answer button.active[data-v="not_met"] { background: var(--crit-bg); color: var(--fail); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--fail) 45%, transparent), 0 0 12px var(--crit-bg); }
.segmented.answer button.active[data-v="na"] { background: var(--none-bg); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
@media (max-width: 900px) { .control { grid-template-columns: 26px 1fr; } .control > :last-child { grid-column: 2; } }

/* ================================================================ misc components */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--radius-sm); margin-bottom: 18px; box-shadow: inset 2px 0 0 currentColor; }
.banner svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.banner.warn { background: var(--med-bg); color: var(--med); }
.banner.info { background: var(--accent-soft); color: var(--accent); }
.banner.fail { background: var(--crit-bg); color: var(--crit); }
.banner.ok { background: var(--low-bg); color: var(--ok); }
.banner .text { color: var(--text); }
.codebox { position: relative; background: color-mix(in srgb, var(--bg) 80%, transparent); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 12px 52px 12px 14px; font-family: var(--mono); font-size: 12.5px; color: var(--accent);
  overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
:root[data-theme="light"] .codebox { background: #0c1a2b; color: #67e8f9; }
.codebox .copy { position: absolute; top: 8px; right: 8px; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 9px 16px; font-size: 13.5px; }
.kv dt { color: var(--muted); font: 600 10.5px/2 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: spin .6s linear infinite; display: inline-block; vertical-align: middle; filter: drop-shadow(0 0 4px var(--accent-ring)); }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 70px; display: grid; place-items: center; color: var(--muted); }
.loading .spinner { width: 22px; height: 22px; animation: spin .6s linear infinite, fade-in 200ms ease 150ms both; }
.pre { white-space: pre-wrap; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 520px; }
b.done { text-decoration: line-through; color: var(--muted); font-weight: 500; }
.cert-row { display: grid; grid-template-columns: 1fr auto 70px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.cert-row:last-child { border-bottom: 0; }
.cert-row > span:first-child { color: var(--muted); }
.cert-row b { font-family: var(--mono); font-weight: 600; font-size: 13px; }
.cert-row .badge { justify-self: end; }
.totp-enrol { display: flex; gap: 18px; align-items: flex-start; margin: 6px 0 14px; text-align: left; }
.totp-enrol .qr { flex: none; background: #fff; padding: 6px; border-radius: 6px; line-height: 0; box-shadow: 0 0 0 1px var(--accent-ring), 0 0 24px var(--accent-soft); }
.totp-enrol .qr svg { width: 156px; height: 156px; }
.totp-key { display: inline-block; margin-top: 6px; padding: 6px 10px; border-radius: 4px; background: var(--surface-2); color: var(--accent); font-size: 13px; letter-spacing: .08em; user-select: all; word-break: break-all; }
.code-input { font-family: var(--mono); font-size: 22px; letter-spacing: .35em; text-align: center; }
@media (max-width: 560px) { .totp-enrol { flex-direction: column; align-items: center; } }
.upcoming { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.upcoming .up { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: var(--radius-sm); background: color-mix(in srgb, var(--bg) 45%, transparent); box-shadow: inset 2px 0 0 var(--accent), inset 0 0 0 1px var(--border); color: var(--text); font-size: 13px;
  transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.upcoming .up:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .upcoming .up:hover { background: var(--hover); color: var(--text); } }
.upcoming .up b { font-size: 20px; color: var(--accent); text-shadow: 0 0 14px var(--accent-ring); }
.upcoming .up span:not(.muted) { font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.upcoming .up.soon { box-shadow: inset 2px 0 0 var(--warn), inset 0 0 0 1px var(--border); }
.upcoming .up.soon b { color: var(--warn); text-shadow: 0 0 14px var(--med-bg); }
.upcoming .up.past { box-shadow: inset 2px 0 0 var(--fail), inset 0 0 0 1px var(--border); }
.upcoming .up.past b { color: var(--fail); text-shadow: 0 0 14px var(--crit-bg); }
:root[data-theme="light"] .upcoming .up b { text-shadow: none; }

/* ================================================================ modal (occasional: standard motion, centred origin) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 5, 10, .7); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 20px;
  opacity: 1; transition: opacity var(--dur-modal) var(--ease-out); }
:root[data-theme="light"] .modal-backdrop { background: rgba(12, 26, 43, .35); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background-color: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow), 0 0 40px rgba(34, 211, 238, .06);
  transform-origin: center; transition: opacity var(--dur-modal) var(--ease-out), transform var(--dur-modal) var(--ease-out); --bl: 16px; }
@starting-style { .modal-backdrop { opacity: 0; } .modal-backdrop .modal { opacity: 0; transform: scale(0.96); } }
.modal-backdrop[data-closing] { opacity: 0; transition-duration: var(--dur-fast); pointer-events: none; }
.modal-backdrop[data-closing] .modal { opacity: 0; transform: scale(0.97); transition-duration: var(--dur-fast); }
.modal.wide { width: min(820px, 100%); }
.modal-head { padding: 18px 22px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.modal-head h2 { font: 700 12.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.modal-head h2::before { content: "> "; color: var(--accent); }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--border); }

/* ================================================================ toasts (transitions, not keyframes: they stack and interrupt) */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 60; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--surface-solid); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 11px 16px 11px 14px; box-shadow: var(--shadow); min-width: 260px; max-width: 440px; font-size: 13.5px;
  opacity: 1; transform: translateY(0); transition: opacity 400ms ease, transform 400ms ease; }
.toast::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.toast.ok::before { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.toast.error::before { background: var(--fail); box-shadow: 0 0 10px var(--fail); }
@starting-style { .toast { opacity: 0; transform: translateY(100%); } }
.toast[data-leaving] { opacity: 0; transform: translateY(100%); transition-duration: 200ms; transition-timing-function: var(--ease-out); }

/* ================================================================ auth */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; position: relative; overflow: hidden; }
.auth-glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .28; pointer-events: none; }
.auth-glow.g1 { width: 620px; height: 620px; left: -200px; top: -240px; background: #0ea5e9; }
.auth-glow.g2 { width: 480px; height: 480px; right: -160px; bottom: -200px; background: #3b82f6; opacity: .22; }
.auth-glow.g3 { width: 360px; height: 360px; right: 22%; top: -200px; background: #ff9f43; opacity: .1; }
:root[data-theme="light"] .auth-glow { opacity: .12; }
.auth-card { position: relative; width: min(440px, 100%); background-color: var(--surface); backdrop-filter: blur(14px); border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 34px 32px 26px;
  box-shadow: var(--shadow), 0 0 60px rgba(34, 211, 238, .07); overflow: hidden; --bl: 18px; animation: card-in 500ms var(--ease-out) both; }
.auth-card::before { content: "SECURE ACCESS // RAMPART"; position: absolute; left: 0; right: 0; top: 0; padding: 7px 0; text-align: center; font: 600 9.5px var(--mono); letter-spacing: .2em; color: var(--accent);
  background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.auth-card > * { animation: rise 400ms var(--ease-out) both; }
.auth-card > :nth-child(2) { animation-delay: 60ms; } .auth-card > :nth-child(3) { animation-delay: 100ms; } .auth-card > :nth-child(4) { animation-delay: 140ms; }
.auth-card > :nth-child(5) { animation-delay: 180ms; } .auth-card > :nth-child(n+6) { animation-delay: 220ms; }
.auth-logo { display: flex; justify-content: center; margin: 22px 0 22px; }
.auth-logo img { width: 100%; max-width: 330px; height: auto; filter: drop-shadow(0 0 18px rgba(34, 211, 238, .2)); }
.auth-logo .logo-light, :root[data-theme="light"] .auth-logo .logo-dark { display: none; }
:root[data-theme="light"] .auth-logo .logo-light { display: block; }
.auth-card h1 { font: 700 15px var(--mono); letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.auth-card h1::before { content: "> "; color: var(--accent); }
.auth-card .sub { color: var(--muted); margin-bottom: 20px; }
.auth-card .btn { width: 100%; height: 42px; margin-top: 6px; font: 700 12px var(--mono); letter-spacing: .14em; text-transform: uppercase; }
@keyframes card-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }

/* ================================================================ page entrance (navigation only, never on data refresh) */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade-in { from { opacity: 0; } }
.main.enter > * { animation: rise 260ms var(--ease-out) both; }
.main.enter > :nth-child(2) { animation-delay: 40ms; } .main.enter > :nth-child(3) { animation-delay: 80ms; }
.main.enter > :nth-child(4) { animation-delay: 120ms; } .main.enter > :nth-child(5) { animation-delay: 160ms; }
.main.enter > :nth-child(n+6) { animation-delay: 200ms; }
.main.enter .grid.kpis > * { animation: rise 260ms var(--ease-out) both; }
.main.enter .grid.kpis > :nth-child(1) { animation-delay: 80ms; } .main.enter .grid.kpis > :nth-child(2) { animation-delay: 110ms; }
.main.enter .grid.kpis > :nth-child(3) { animation-delay: 140ms; } .main.enter .grid.kpis > :nth-child(4) { animation-delay: 170ms; }
.main.enter .grid.kpis > :nth-child(n+5) { animation-delay: 200ms; }
.main.enter-tab #tab { animation: rise 220ms var(--ease-out) both; }

/* Data draws in on arrival (once per navigation) */
@keyframes draw-arc { from { stroke-dasharray: 0 1000; } }
@keyframes reveal-x { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.main.enter .donut svg circle[stroke-dasharray] { animation: draw-arc 700ms var(--ease-out) 120ms both; }
.main.enter .grade svg circle[stroke-dasharray] { animation: draw-arc 800ms var(--ease-out) 150ms both; }
.main.enter .meter, .main.enter-tab .meter { animation: reveal-x 600ms var(--ease-out) 150ms both; }
.main.enter .chart-box .plot svg { animation: reveal-x 900ms var(--ease-in-out) 150ms both; }
.main.enter .chart-box .end-dot { animation: fade-in 250ms ease 950ms both; }

::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

/* ================================================================ reporting rail (right side) */
.app { grid-template-columns: 240px minmax(0, 1fr) 300px; }
body.rail-off .app { grid-template-columns: 240px minmax(0, 1fr); }
body.rail-off .rail { display: none; }
body.rail-off .rail-toggle { color: var(--muted); }
.rail-toggle { height: 26px; font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.rail { position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden; background: var(--sidebar); backdrop-filter: blur(12px); border-left: 1px solid var(--border);
  padding: 14px 14px 20px; display: flex; flex-direction: column; gap: 18px; z-index: 25; scrollbar-width: thin; }
.rail::before { content: ""; position: absolute; left: -1px; top: 0; bottom: 0; width: 1px; background: linear-gradient(180deg, transparent, var(--accent) 40%, transparent 80%); opacity: .35; pointer-events: none; }
.rail-head { display: flex; align-items: center; gap: 8px; font: 700 11px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text); padding: 6px 4px 10px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.rail-head svg { width: 14px; height: 14px; color: var(--accent); }
.rail-head .rail-scope { margin-left: auto; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 10px; letter-spacing: .08em; color: var(--faint); }
.rail-head .live { font-size: 10px; margin-left: 8px; }
.rail-head .rail-scope:empty { display: none; }
.rail-head .rail-scope:empty + .live { margin-left: auto; }
.rail-sub { font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin: 14px 4px 6px; }
.rail-sub::before { content: "// "; color: var(--accent); }
.rail-link { display: grid; grid-template-columns: 28px 1fr 16px; gap: 10px; align-items: center; padding: 8px 8px; border-radius: var(--radius-sm); color: var(--text);
  transition: background-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.rail-link:active { transform: scale(0.98); }
@media (hover: hover) and (pointer: fine) { .rail-link:hover { background: var(--hover); color: var(--text); } .rail-link:hover .rl-go { color: var(--accent); transform: translateX(2px); } }
.rl-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent-ring); }
.rl-icon svg { width: 14px; height: 14px; }
.rl-text { min-width: 0; }
.rl-text b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rl-text span { display: block; font: 500 10.5px var(--mono); color: var(--faint); letter-spacing: .04em; }
.rl-go { color: var(--faint); transition: color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out); }
.rl-go svg { width: 13px; height: 13px; }
.rail-orgs { display: flex; flex-direction: column; }
.rail-org { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 2px 4px 2px 8px; border-radius: var(--radius-sm); font-size: 13px; }
.rail-org a:first-child { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .rail-org:hover { background: var(--hover); } .rail-org a:first-child:hover { color: var(--accent); } }

/* Activity feed */
.rail-feed { flex: 1; min-height: 0; }
.feed-list { list-style: none; margin: 0; padding: 0; position: relative; }
.feed-list::before { content: ""; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 1px; background: var(--border); }
.feed-item { position: relative; display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: start; padding: 7px 4px; border-radius: var(--radius-sm);
  transition: background-color 1.2s ease; }
.feed-item[data-link] { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .feed-item[data-link]:hover { background: var(--hover); transition-duration: var(--dur-fast); } }
.fi-dot { position: relative; z-index: 1; width: 20px; height: 20px; margin: 0 4px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-solid); box-shadow: inset 0 0 0 1px currentColor; color: var(--muted); }
.fi-dot svg { width: 11px; height: 11px; }
.fi-body { min-width: 0; font-size: 12.5px; line-height: 1.4; }
.fi-text { display: block; overflow-wrap: anywhere; }
.fi-org { display: block; font: 500 10px var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); margin-top: 2px; }
.feed-item time { font: 500 10.5px var(--mono); color: var(--faint); padding-top: 2px; white-space: nowrap; }
.feed-empty { color: var(--muted); font-size: 12.5px; padding: 18px 4px; text-align: center; }
.k-report .fi-dot { color: var(--info); } .k-enrol .fi-dot, .k-control .fi-dot { color: var(--accent); }
.k-alert .fi-dot, .k-fail .fi-dot { color: var(--crit); box-shadow: inset 0 0 0 1px currentColor, 0 0 10px var(--crit-bg); }
.k-alert .fi-text { color: var(--crit); }
.k-ok .fi-dot { color: var(--ok); } .k-task .fi-dot { color: var(--warn); } .k-risk .fi-dot { color: var(--accepted); } .k-staff .fi-dot { color: var(--faint); }
/* New events arrive from the top (occasional, so a standard enter: 260ms, strong ease-out) and briefly glow. */
@keyframes feed-in { from { opacity: 0; transform: translateY(-6px); } }
.feed-item.new { animation: feed-in 260ms var(--ease-out) both; background: var(--accent-soft); }
@media (max-width: 1759px) {
  .app, body.rail-off .app { grid-template-columns: 240px minmax(0, 1fr); }
  body.rail-off .rail, .rail { display: flex; position: fixed; right: 0; top: 0; bottom: 0; height: auto; width: min(320px, 92vw); z-index: 60;
    transform: translateX(105%); visibility: hidden; box-shadow: none; transition: transform 300ms var(--ease-out), visibility 0s linear 300ms, box-shadow 300ms var(--ease-out); }
  body.rail-open .rail { transform: none; visibility: visible; box-shadow: -24px 0 60px rgba(0, 0, 0, .45); transition: transform 300ms var(--ease-out), visibility 0s, box-shadow 300ms var(--ease-out); }
  .rail-toggle, body.rail-off .rail-toggle { color: var(--muted); }
  body.rail-open .rail-toggle { color: var(--accent); }
  .rail-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(2, 8, 16, .45); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
  body.rail-open .rail-backdrop { opacity: 1; pointer-events: auto; }
}
@media (min-width: 1760px) { .rail-backdrop { display: none; } }
@media (max-width: 860px) { .app, body.rail-off .app { grid-template-columns: 1fr; } .main { padding: 20px 16px 40px; } }
/* Medium screens: a little less side padding so tables and cards get more room. */
@media (min-width: 861px) and (max-width: 1440px) { .main { padding: 24px 24px 48px; } }

/* ================================================================ reduced motion: fewer, gentler - keep fades, drop movement */
@media (prefers-reduced-motion: reduce) {
  .main.enter > *, .main.enter .grid.kpis > *, .main.enter-tab #tab, .auth-card, .auth-card > * { animation-name: fade-in; animation-duration: 200ms; }
  .main.enter .donut svg circle[stroke-dasharray], .main.enter .grade svg circle[stroke-dasharray], .main.enter .meter, .main.enter-tab .meter,
  .main.enter .chart-box .plot svg, .main.enter .chart-box .end-dot { animation: none; }
  .live i::after { animation: none; }
  .feed-item.new { animation-name: fade-in; }
  .rail-link:active { transform: none; }
  .btn:active:not(:disabled), .nav a:active, .segmented button:active, .segmented a:active, .upcoming .up:active, .radio:active { transform: none; }
  .nav-ink, .tab-ink { transition: opacity var(--dur-fast) ease; }
  .toast, .toast[data-leaving] { transform: none; }
  @starting-style { .toast { transform: none; } .modal-backdrop .modal { transform: none; } }
  .modal-backdrop[data-closing] .modal { transform: none; }
}

/* ================================================================ printable report (always a clean light page) */
.report { max-width: 980px; margin: 0 auto; }
.report .report-head { display: flex; justify-content: space-between; align-items: flex-start; padding-bottom: 16px; margin-bottom: 20px; border-bottom: 1px solid var(--border-strong); position: relative; }
.report .report-head::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 140px; height: 2px; background: var(--grad); }
.report .no-print { margin-bottom: 18px; }
.report-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; color: var(--muted); font: 600 11px var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.report-brand img { width: 28px; height: 28px; border-radius: 6px; }
.report-brand b { color: var(--text); font-size: 13px; letter-spacing: .14em; }
@media print {
  :root, :root[data-theme="light"] { --bg: #fff; --bg-2: #fff; --surface: #fff; --surface-solid: #fff; --surface-2: #f3f5f8; --border: #dfe3e8; --border-strong: #c8ced6; --bracket: transparent;
    --text: #111; --muted: #555; --faint: #777; --accent: #0369a1; --crit: #b91c1c; --high: #c2410c; --med: #a16207; --low: #15803d; --ok: #15803d; --warn: #a16207; --fail: #b91c1c; }
  body { background: #fff; }
  body::after, .sidebar, .topbar, .rail, .no-print, .toasts, .app::before { display: none !important; }
  .app { display: block; }
  .main { padding: 0; max-width: none; }
  .main.enter * { animation: none !important; }
  .card { break-inside: avoid; box-shadow: none; backdrop-filter: none; }
  * { text-shadow: none !important; filter: none !important; }
  .page-head h1::before { content: none; }
  a { color: inherit; }
}

/* ---------------------------------------------------------------- Microsoft 365 */
.m365-gauge { position: relative; max-width: 260px; margin: 6px auto 0; text-align: center; }
.m365-gauge svg { display: block; width: 100%; }
.m365-gauge svg path:last-child { transition: stroke-dasharray .9s var(--ease-out); }
.m365-gauge .g-num { position: absolute; left: 0; right: 0; bottom: 26px; font: 700 34px var(--mono); color: var(--text); letter-spacing: -.02em; }
.m365-gauge .g-lbl { font: 600 10px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.m365-compare { display: flex; justify-content: center; gap: 28px; margin-top: 14px; flex-wrap: wrap; }
.m365-compare > div { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12px; }
.m365-compare b { font: 700 18px var(--mono); }
.m365-bar { display: inline-block; vertical-align: middle; width: 80px; height: 6px; margin-right: 8px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.m365-bar span { display: block; height: 100%; background: currentColor; box-shadow: 0 0 8px currentColor; }
.tabs a svg { vertical-align: -3px; margin-right: 6px; }

/* ---------------------------------------------------------------- change log */
.changelog { display: grid; gap: 14px; max-width: 920px; }
.release ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.release li { display: grid; grid-template-columns: 84px 1fr; gap: 12px; align-items: baseline; line-height: 1.5; }
.release li .badge { justify-self: start; }

/* ---------------------------------------------------------------- evidence (screenshots) and customer sign-off */
.input-row { display: flex; gap: 8px; align-items: center; }
.input-row .input { flex: 1; min-width: 0; }
.ev-hint { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12px; color: var(--accent); }
.ev-hint svg { width: 13px; height: 13px; flex: none; }
.ev-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.ev-thumb { position: relative; width: 64px; height: 64px; padding: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface-2); overflow: hidden; cursor: zoom-in;
  transition: transform .16s var(--ease-out), border-color .16s var(--ease-out); }
.ev-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-thumb:active { transform: scale(0.96); }
@media (hover: hover) and (pointer: fine) { .ev-thumb:hover { border-color: var(--accent); } }
.ev-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 2px; color: var(--muted); font: 600 10px var(--mono); }
.ev-by { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(2, 19, 26, .75); color: #fff; font: 600 9px var(--mono); letter-spacing: .06em; text-transform: uppercase; padding: 2px 0; text-align: center; }
.ev-full { display: block; text-align: center; }
.ev-full img { max-width: 100%; max-height: 70vh; border-radius: 6px; border: 1px solid var(--border); }
.signoff { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--border-strong); border-radius: 8px; }
.signoff .icon { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.signoff.ok { border-style: solid; border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.signoff.ok .icon { color: var(--ok); background: var(--low-bg); }
.signoff.stale { border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.signoff.stale .icon { color: var(--warn); background: var(--med-bg); }
@media (max-width: 640px) { .signoff { grid-template-columns: 36px 1fr; } .signoff > div:last-child { grid-column: 1 / -1; } .ev-thumb { width: 56px; height: 56px; } }

.rail-close { display: none; align-self: flex-end; }
@media (max-width: 1759px) { .rail-close { display: inline-flex; } }

/* Nice-to-have table columns drop out on narrower screens so tables fit without sideways scrolling. */
@media (max-width: 1440px) { .table .col-opt { display: none; } }
/* Phones: filter buttons wrap instead of pushing the page sideways; summary cards sit two to a row. */
.segmented { max-width: 100%; }
@media (max-width: 860px) { .segmented { flex-wrap: wrap; } }
@media (max-width: 560px) { .grid.kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.kpis .kpi .value { font-size: 24px; } }
@media (min-width: 1760px) and (max-width: 1919px) { body:not(.rail-off) .table .col-opt { display: none; } }

/* ================================================================ questionnaire */
.q-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px 16px; padding: 16px 18px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.q-item:last-child { border-bottom: 0; }
.q-item .icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.q-item .icon svg { width: 14px; height: 14px; }
.q-item .icon.pass { background: var(--low-bg); color: var(--ok); } .q-item .icon.fail { background: var(--crit-bg); color: var(--fail); } .q-item .icon.warn { background: var(--med-bg); color: var(--warn); }
.q-item .title { font-weight: 600; }
.q-item .detail { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.q-answer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.q-text { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; white-space: pre-wrap; font-size: 13px; }
.q-by { font-size: 11.5px; display: inline-flex; align-items: center; gap: 4px; } .q-by svg { width: 12px; height: 12px; }
.q-evidence { border-left: 2px solid var(--border-strong); padding-left: 10px; }
.q-sources { font-size: 12px; color: var(--faint); margin-top: 6px; display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .q-item { grid-template-columns: 26px 1fr; } .q-actions { grid-column: 2; } }

/* ================================================================ policies */
.policy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.policy-card { color: var(--text); transition: transform .16s var(--ease-out), border-color .16s var(--ease-out); }
.policy-card .card-head { align-items: flex-start; } .policy-card h2 { font-size: 14px; }
.policy-card:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .policy-card:hover { border-color: var(--accent-ring); color: var(--text); } }
.policy-doc, .directors, .info-article { max-width: 860px; line-height: 1.65; }
.policy-doc { padding: 34px 40px; }
.policy-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--accent); padding-bottom: 14px; margin-bottom: 8px; }
.policy-head h1 { margin: 4px 0 0; font-size: 24px; }
.policy-doc h2, .info-article h2 { font-size: 16px; margin: 22px 0 6px; }
.policy-doc ul, .info-article ul { padding-left: 20px; } .policy-doc li, .info-article li { margin: 4px 0; }

/* ================================================================ directors' report */
.directors { padding: 32px 38px; }
.dr-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 2px solid var(--accent); padding-bottom: 16px; }
.dr-head h1 { margin: 4px 0; font-size: 26px; }
.dr-grade { font: 700 64px/1 var(--mono); text-align: right; } .dr-grade span { display: block; font: 600 12px var(--font, inherit); color: var(--muted); margin-top: 6px; max-width: 180px; }
.dr-headline { font-size: 17px; font-weight: 600; margin: 18px 0; }
.dr-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 8px; }
.dr-stats > div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.dr-stats b { font: 700 26px var(--mono); } .dr-stats span { font-weight: 600; font-size: 13px; } .dr-stats small { color: var(--muted); font-size: 12px; }
.dr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.directors h2 { font-size: 15px; margin: 22px 0 8px; display: flex; align-items: center; gap: 8px; } .directors h2 svg { color: var(--accent); }
.directors ul { padding-left: 20px; margin: 0; } .directors li { margin: 5px 0; }
.dr-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.dr-dates > div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.dr-dates .soon { border-color: color-mix(in srgb, var(--warn) 50%, transparent); } .dr-dates .past { border-color: color-mix(in srgb, var(--fail) 50%, transparent); }
.dr-dates small { color: var(--muted); }
.dr-why p { margin: 0; color: var(--muted); }
.directors footer { margin-top: 26px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; }
@media (max-width: 760px) { .dr-stats { grid-template-columns: 1fr 1fr; } .dr-cols { grid-template-columns: 1fr; } .directors, .policy-doc { padding: 20px; } }

/* ================================================================ info hub, plans, upgrade prompts */
.info-grid, .info-next { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 14px; }
.info-card { display: flex; flex-direction: column; gap: 6px; color: var(--text); transition: transform .16s var(--ease-out), border-color .16s var(--ease-out); }
.info-card:active { transform: scale(0.99); }
@media (hover: hover) and (pointer: fine) { .info-card:hover { border-color: var(--accent-ring); color: var(--text); } }
.info-icon { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.info-article { padding: 26px 32px; }
.plan-card { margin-bottom: 14px; }
.plan-compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.plan-compare > div { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.plan-compare > div span { color: var(--muted); }
.plan-compare .current { border-color: var(--accent); background: var(--accent-soft); }
.plan-compare em { font: 600 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-style: normal; }
.upgrade-card { max-width: 620px; margin: 10px auto; text-align: center; padding: 30px; }
.upgrade-card .info-icon { margin: 0 auto 10px; }
.tabs a.locked { opacity: .7; } .tabs a.locked svg { width: 12px; height: 12px; }
.nav-count { margin-left: auto; padding: 0 6px; font-size: 10px; }
.nav-support { margin: 14px 10px 0; padding: 10px 12px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.nav-support span { color: var(--faint); font: 600 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.brand-preview { display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.brand-preview img { width: 40px; height: 40px; object-fit: contain; } .brand-preview div { display: flex; flex-direction: column; } .brand-preview span { color: var(--muted); font-size: 12px; }
.ask-btn svg { color: var(--accent); }
.banner.renewal { margin-bottom: 14px; }

/* Printing the directors' report, policies and questionnaire: just the document. */
@media print {
  .directors, .policy-doc, .info-article { border: 0 !important; box-shadow: none !important; padding: 0 !important; max-width: none; background: none !important; }
  .q-actions, .ask-btn, .toolbar, .questionnaire-approval .btn, .tabs, .page-head .actions { display: none !important; }
}

/* Websites tab */
.site-grade { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; font-family: var(--mono); font-weight: 700; font-size: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border-strong); }
.site-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.site-head .site-grade { width: 52px; height: 52px; font-size: 28px; }
.site-head .chips { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.consent { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); cursor: pointer; line-height: 1.5; }
.consent input { margin-top: 3px; flex: none; }

/* Legal links (sign-in page and sidebar) */
.auth-legal, .app-legal { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: 12px; }
.auth-legal { position: relative; margin-top: 18px; }
.app-legal { padding: 0 28px 22px; justify-content: flex-start; }
.auth-legal a, .app-legal a { color: var(--muted); }
.auth-legal a:hover, .app-legal a:hover { color: var(--text); }
