/* Ferrum Bastion — bastion-web served stylesheet (landing + app).
 * Dark-iron design tokens extracted from sentinel.ferrumsec.com (brand/design-tokens.md), so the
 * served web app matches the suite (Ferrum ID / Sentinel / ResponseLab) AND the self-contained
 * bastion-report — ONE design language (WEB_ARCHITECTURE §8 AssetMode seam). The token block +
 * component language (aurora, glass panels, kicker, pills, edge-chain) are shared VERBATIM with the
 * report's report.css; the landing/nav/hero/feature/download chrome below is served-only.
 *
 * Served mode links this file from /static; the suite fonts are SELF-HOSTED from /static/fonts via
 * the @font-face blocks below (never hotlinked, no CDN — the whole landing is self-contained from
 * /static, satisfied by the strict `font-src 'self'` CSP), the hero texture + logo are served from
 * /static/img via the CSS rules below. No external asset, no Google Fonts link. */

/* Suite type system, self-hosted (font-src 'self'). Each family is ONE variable woff2 covering a
 * weight RANGE — so the served landing/app render in Space Grotesk / JetBrains Mono, matching the
 * air-gapped report (which embeds the same two woff2 as data: URIs). No CDN, no external URL. */
@font-face {
  font-family: "Space Grotesk";
  src: url("/static/fonts/SpaceGrotesk.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/static/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #070a0d;
  --bg-2: #0a0d12;
  --panel: #0d1218;
  --panel-2: #10161d;
  --head: #f1f4f8;
  --text: #c3cbd6;
  --text-dim: #8b96a5;

  --iron: #f1c453;
  --iron-bright: #f8d888;
  --iron-dim: rgba(241, 196, 83, 0.55);
  --gold: #f1c453;
  --green: #3ddc97;
  --warm: #ff8a5d;
  --danger: #ff6b6b;
  --danger-soft: #ffb3b3;

  --hairline: rgba(255, 255, 255, 0.10);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --glass-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  --panel-fill: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  --inset-hi: inset 0 1px 0 rgba(255, 255, 255, 0.10);
  --glass-shadow: 0 18px 50px -18px rgba(0, 0, 0, 0.85), 0 2px 8px rgba(0, 0, 0, 0.4);
  --blur: saturate(140%) blur(18px);

  --radius-xs: 7px;
  --radius-sm: 11px;
  --radius: 16px;
  --maxw: 1180px;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);

  --font-display: "Space Grotesk", "SF Pro Display", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", SFMono-Regular, "Cascadia Code", Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

/* Aurora atmosphere: a fixed radial-gradient stack under all content (design-tokens.md). */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1100px 540px at 78% -8%, rgba(241, 196, 83, 0.13), transparent 60%),
    radial-gradient(900px 600px at 8% 108%, rgba(241, 196, 83, 0.06), transparent 60%),
    radial-gradient(700px 460px at 92% 96%, rgba(255, 138, 93, 0.05), transparent 60%);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  background: var(--bg);
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px 96px; }

a { color: var(--iron); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--iron-bright); text-decoration: underline; }

/* Keyboard focus ring (a11y): a clearly-visible outline for keyboard users only (never on a mouse
 * click), using the existing --iron-bright token so it reads as suite chrome, not a browser default. */
a:focus-visible,
.btn:focus-visible,
.navlink:focus-visible,
button:focus-visible {
  outline: 2px solid var(--iron-bright);
  outline-offset: 2px;
}

/* Skip-to-content link (a11y): off-screen until it takes keyboard focus, then revealed top-left so a
 * keyboard/AT user can jump past the sticky header straight to <main id="main">. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
}
.skip:focus {
  left: 12px;
  top: 12px;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--iron-bright);
  background: var(--panel-2);
  border: 1px solid var(--iron);
  border-radius: var(--radius-xs);
}

/* ---- Staggered page-load reveal ---------------------------------------------------------- */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  animation: reveal-up 0.66s var(--ease-out) forwards;
  /* Cap the cascade: a long findings list must not leave its tail invisible for seconds while the
   * stagger delay runs off. Clamp the per-item delay to <= 1.5s (≈ the first two dozen items). */
  animation-delay: min(calc(var(--stagger, 0) * 55ms + 40ms), 1500ms);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; }
}

/* ---- Kicker / eyebrow -------------------------------------------------------------------- */
.kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-dim);
}
.kicker .on { color: var(--iron); }

/* ---- Header ------------------------------------------------------------------------------ */
.masthead {
  position: relative;
  margin: 30px 0 26px;
  padding: 34px 34px 30px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel-fill), var(--panel);
  box-shadow: var(--glass-shadow);
}
.masthead::before { /* iron-shard hero texture, embedded as a data: URI (--hero-image) */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: var(--hero-image);
  background-size: cover;
  background-position: 100% 50%;
  opacity: 0.22;
  mask-image: linear-gradient(105deg, transparent 8%, #000 70%);
  -webkit-mask-image: linear-gradient(105deg, transparent 8%, #000 70%);
}
.masthead > * { position: relative; z-index: 1; }

.brandrow { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.brandrow img { width: 34px; height: 34px; border-radius: 8px; }
.brandrow .name { font-weight: 600; letter-spacing: 0.02em; color: var(--head); }
.brandrow .name b { color: var(--iron); font-weight: 600; }
.brandrow .sep { flex: 1; }
.brandrow .env {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-align: right;
  line-height: 1.5;
}

.headline {
  display: flex;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}
.headline .lede { flex: 1 1 420px; min-width: 300px; }
.headline h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.06;
  margin: 12px 0 10px;
  color: var(--head);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.headline h1 .accent { color: var(--iron); }
.headline .sub { color: var(--text-dim); max-width: 54ch; margin: 0; }

/* ---- Grade badge ------------------------------------------------------------------------- */
.grade {
  flex: 0 0 auto;
  width: 178px;
  text-align: center;
  padding: 18px 14px 16px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius);
  background: var(--glass-fill), var(--panel-2);
  box-shadow: var(--inset-hi), 0 10px 30px -14px rgba(0, 0, 0, 0.7);
}
.grade .letter {
  font-family: var(--font-display);
  font-size: 78px;
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.02em;
  color: var(--head); /* default; the per-band rule below wins on 0,3,0 specificity */
}
.grade .score { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin-top: 6px; }
.grade .score b { color: var(--text); font-weight: 600; }
.grade .barwrap { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.08); margin-top: 12px; overflow: hidden; }
.grade .bar { height: 100%; border-radius: 3px; }

/* The letter takes its band colour. Doubled `.grade.grade-x` (0,3,0) so the band colour always
 * wins over the generic `.grade .letter` default (0,2,0) regardless of source order — the bug was a
 * later equal-specificity generic rule repainting the letter white. Background is scoped to `.bar`
 * only: the letter is coloured *text*, never a solid block behind the glyph. */
.grade.grade-a .letter { color: var(--green); }
.grade.grade-b .letter { color: var(--gold); }
.grade.grade-c .letter { color: var(--warm); }
.grade.grade-d .letter { color: var(--danger); }
.grade.grade-e .letter { color: var(--danger); }
.grade.grade-f .letter { color: var(--danger); }
.grade.grade-a .bar { background: var(--green); }
.grade.grade-b .bar { background: var(--gold); }
.grade.grade-c .bar { background: var(--warm); }
.grade.grade-d .bar { background: var(--danger); }
.grade.grade-e .bar { background: var(--danger); }
.grade.grade-f .bar { background: var(--danger); }

/* ---- Metric tiles ------------------------------------------------------------------------ */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 22px 0 4px;
}
.tile {
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  background: var(--panel-fill), var(--panel);
}
.tile .n { font-family: var(--font-mono); font-size: 25px; font-weight: 600; color: var(--head); line-height: 1.1; }
.tile .l { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.13em; color: var(--text-dim); margin-top: 4px; }
.tile.sev-critical .n { color: var(--danger); }
.tile.sev-high .n { color: var(--warm); }
.tile.sev-medium .n { color: var(--gold); }
.tile.sev-low .n, .tile.sev-info .n { color: var(--text-dim); }

/* ---- Section scaffolding ----------------------------------------------------------------- */
section { margin-top: 40px; }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.section-head h2 {
  font-size: 21px;
  color: var(--head);
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.01em;
}
.section-head .count { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.section-head .rule { flex: 1; height: 1px; background: var(--hairline); align-self: center; }

.panel {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: var(--panel-fill), var(--panel);
  box-shadow: var(--glass-shadow);
  padding: 22px 24px;
}

/* ---- Trust note (DC is never exposed) ---------------------------------------------------- */
.trust { border-color: rgba(61, 220, 151, 0.24); }
.trust .trust-top { display: flex; align-items: center; gap: 11px; margin-bottom: 6px; }
.trust .trust-top .ico {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 7px;
  display: grid; place-items: center;
  background: rgba(61, 220, 151, 0.12); color: var(--green);
  font-family: var(--font-mono); font-weight: 700;
}
.trust h2 { font-size: 18px; color: var(--head); margin: 0; font-weight: 600; }
.trust > p { color: var(--text-dim); margin: 4px 0 18px; max-width: 78ch; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.trust-card { border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 13px 15px; background: var(--panel-2); }
.trust-card .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--green); margin-bottom: 5px; }
.trust-card .t.iron { color: var(--iron); }
.trust-card p { margin: 0; font-size: 13px; color: var(--text); }
.trust-foot { margin-top: 16px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); }
.trust-foot b { color: var(--green); }
/* Recipient handling note (I-6): the report is a complete Tier-0 attack map — crown-jewel data.
 * Kept deliberately subtle (a quiet gold key, no alarm banner) so it informs without fatiguing. */
.trust-foot.handling { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--hairline); line-height: 1.55; }
.trust-foot.handling b { color: var(--gold); }
.report-foot .handling { color: var(--text-dim); }
.report-foot .handling b { color: var(--gold); }

/* ---- Pills ------------------------------------------------------------------------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.08em;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid currentColor;
}
.pill.sev-critical { color: var(--danger); background: rgba(255, 107, 107, 0.09); }
.pill.sev-high { color: var(--warm); background: rgba(255, 138, 93, 0.09); }
.pill.sev-medium { color: var(--gold); background: rgba(241, 196, 83, 0.09); }
.pill.sev-low, .pill.sev-info { color: var(--text-dim); background: rgba(139, 150, 165, 0.09); }
.pill.resolved { color: var(--green); background: rgba(61, 220, 151, 0.1); }
.pill.ghost { color: var(--text-dim); background: transparent; }
.pill.choke { color: var(--iron); background: rgba(241, 196, 83, 0.1); }
.pill.t0 { color: var(--gold); background: rgba(241, 196, 83, 0.08); }

/* ---- Findings ---------------------------------------------------------------------------- */
.findings { display: flex; flex-direction: column; gap: 12px; }
.finding {
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--text-dim);
  border-radius: var(--radius-sm);
  background: var(--panel-fill), var(--panel);
  overflow: hidden;
}
.finding.sev-critical { border-left-color: var(--danger); }
.finding.sev-high { border-left-color: var(--warm); }
.finding.sev-medium { border-left-color: var(--gold); }
.finding.sev-low, .finding.sev-info { border-left-color: var(--text-dim); }

.finding > summary {
  list-style: none;
  cursor: pointer;
  padding: 15px 18px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 14px;
  align-items: center;
}
.finding > summary::-webkit-details-marker { display: none; }
.finding > summary:hover { background: rgba(255, 255, 255, 0.018); }
.finding .rank { font-family: var(--font-mono); font-size: 19px; font-weight: 600; color: var(--text-dim); text-align: center; }
.finding[open] .rank { color: var(--iron); }
.finding .f-main { min-width: 0; }
.finding .f-title { color: var(--head); font-weight: 600; font-size: 15.5px; line-height: 1.3; }
.finding .f-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 7px; }
.finding .f-meta .rid { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.finding .f-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.finding .prio { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.finding .prio b { color: var(--iron); font-weight: 600; }
.finding .chev { color: var(--text-dim); font-family: var(--font-mono); transition: transform 0.25s var(--ease-out); }
.finding[open] .chev { transform: rotate(90deg); }

.f-body { padding: 4px 18px 20px 18px; border-top: 1px solid var(--hairline); }

.kv { display: grid; grid-template-columns: 130px 1fr; gap: 8px 16px; margin: 4px 0 14px; }
.kv dt { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--text-dim); padding-top: 2px; }
.kv dd { margin: 0; font-size: 13.5px; color: var(--text); }
.kv .mono { font-family: var(--font-mono); font-size: 12.5px; word-break: break-word; }
.kv .basis { color: var(--iron-bright); font-family: var(--font-mono); font-size: 12.5px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-family: var(--font-mono); font-size: 11px;
  padding: 2px 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline-strong);
  color: var(--text); background: var(--panel-2);
}
.tag.attack { color: var(--warm); border-color: rgba(255, 138, 93, 0.3); }
.tag.cwe { color: var(--iron); border-color: rgba(241, 196, 83, 0.3); }

/* ---- Edge chain (foothold -> capability -> Tier-0) --------------------------------------- */
.chain-label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--text-dim); margin: 4px 0 8px; }
.chain {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.22);
  overflow-x: auto;
}
.node-tok {
  padding: 3px 9px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline-strong);
  background: var(--panel-2); color: var(--text);
  white-space: nowrap;
}
.node-tok.foot { border-color: var(--iron-dim); color: var(--iron-bright); }
.node-tok.t0 { border-color: rgba(241, 196, 83, 0.42); color: var(--gold); }
.edge-tok { color: var(--warm); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.edge-tok .arw { color: var(--text-dim); }

.recc {
  margin-top: 14px; padding: 12px 15px;
  border: 1px solid rgba(61, 220, 151, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(61, 220, 151, 0.045);
}
.recc .h { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--green); margin-bottom: 5px; }
.recc p { margin: 0; font-size: 13.5px; color: var(--text); }

.empty { color: var(--text-dim); font-family: var(--font-mono); font-size: 13px; padding: 24px; text-align: center; }

/* ---- Graph ------------------------------------------------------------------------------- */
.graph-panel { padding: 0; overflow: hidden; }
.graph-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(255, 255, 255, 0.015);
}
.graph-toolbar .grow { flex: 1; }
.gbtn {
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--text); background: var(--panel-2);
  border: 1px solid var(--hairline-strong);
  border-radius: var(--radius-xs);
  padding: 6px 11px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.gbtn:hover { border-color: var(--iron-dim); color: var(--iron-bright); }
.gbtn.on { border-color: var(--iron); color: var(--iron-bright); background: rgba(241, 196, 83, 0.1); }
.gbtn.primary { color: var(--bg); background: var(--iron); border-color: var(--iron); font-weight: 600; }
.gbtn.primary:hover { background: var(--iron-bright); }

#graph-stage { position: relative; width: 100%; height: 560px; background:
  radial-gradient(900px 480px at 50% 20%, rgba(241, 196, 83, 0.05), transparent 70%); }
#graph-stage svg { width: 100%; height: 100%; display: block; cursor: grab; }
#graph-stage svg:active { cursor: grabbing; }
/* Edges are drawn as clearly-visible lines with arrowheads (see the arrow markers in graph.js).
 * Base edges use the strong hairline; foothold→Tier-0 path edges are emphasised in --iron. */
#graph-stage .g-edge { stroke: var(--hairline-strong); stroke-width: 1.5; fill: none; }
#graph-stage .g-edge.path { stroke: var(--iron-dim); stroke-width: 2; }
#graph-stage .g-edge.hot { stroke: var(--iron); stroke-width: 2.6; }
#graph-stage .g-edge.dim { stroke: rgba(255, 255, 255, 0.05); }
#graph-stage .g-node { cursor: pointer; }
#graph-stage .g-node circle { stroke: rgba(0, 0, 0, 0.6); stroke-width: 1.4; transition: opacity 0.2s; }
#graph-stage .g-node.ring circle { stroke: var(--gold); stroke-width: 2.6; }
#graph-stage .g-node.dim { opacity: 0.22; }
#graph-stage .g-node.hot circle { stroke: var(--iron-bright); stroke-width: 2.8; }
#graph-stage .g-node text {
  font-family: var(--font-mono); font-size: 11px; fill: var(--text);
  paint-order: stroke; stroke: rgba(7, 10, 13, 0.85); stroke-width: 3px;
  pointer-events: none; opacity: 0.9; transition: opacity 0.2s;
}
/* Labels at scale: non-salient labels are hidden by default (a 300-node graph would be an
 * unreadable mat), revealed on hover of their node or once the view is zoomed in (svg.zoomed). */
#graph-stage .g-node.label-min text { opacity: 0; }
#graph-stage .g-node.label-min:hover text { opacity: 1; }
#graph-stage svg.zoomed .g-node.label-min text { opacity: 0.9; }
#graph-stage .g-node.dim text { opacity: 0.15; }
#graph-stage svg.zoomed .g-node.dim.label-min text { opacity: 0.15; }

.g-legend {
  display: flex; flex-wrap: wrap; gap: 14px;
  padding: 11px 16px; border-top: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
}
.g-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.g-legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.g-legend .dot.big { width: 15px; height: 15px; }
.g-legend .dot.faded { opacity: 0.28; }
.g-legend .ringdot { box-shadow: 0 0 0 2px var(--gold); }
.g-legend .sep { width: 1px; height: 12px; background: var(--hairline); }

#g-tooltip {
  position: absolute; pointer-events: none; z-index: 5;
  display: none;
  font-family: var(--font-mono); font-size: 11px;
  padding: 6px 9px; border-radius: var(--radius-xs);
  background: rgba(7, 10, 13, 0.94); border: 1px solid var(--hairline-strong);
  color: var(--text); max-width: 260px;
  box-shadow: 0 8px 22px -8px rgba(0, 0, 0, 0.8);
}
#g-tooltip .tt-edge { color: var(--warm); }
#g-tooltip .tt-sid { color: var(--text-dim); word-break: break-all; }
#g-tooltip .tt-t0 { color: var(--gold); }
.g-noscript { padding: 40px; text-align: center; color: var(--text-dim); font-family: var(--font-mono); font-size: 13px; }

/* ---- Drift ------------------------------------------------------------------------------- */
.drift-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.drift-stat { border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 13px 15px; background: var(--panel-2); }
.drift-stat .n { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--head); }
.drift-stat.new .n { color: var(--warm); }
.drift-stat.resolved .n { color: var(--green); }
.drift-stat .l { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-top: 3px; }
.drift-trend { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin: 4px 0 18px; }
.drift-trend b { color: var(--text); }

.drift-list { display: flex; flex-direction: column; gap: 8px; }
.drift-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  background: var(--panel-fill), var(--panel);
}
.drift-row.is-resolved { border-color: rgba(61, 220, 151, 0.22); }
.drift-row .dr-title { color: var(--text); flex: 1; min-width: 200px; }
.drift-row .dr-title b { color: var(--head); font-weight: 600; }
.drift-row .rid { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.drift-row .ttr { font-family: var(--font-mono); font-size: 11px; color: var(--green); }

/* ---- Footer ------------------------------------------------------------------------------ */
.report-foot {
  margin-top: 48px; padding-top: 22px;
  border-top: 1px solid var(--hairline);
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
}
.report-foot .grow { flex: 1; }
.report-foot b { color: var(--text); font-weight: 600; }

/* ==========================================================================================
 * SERVED-APP CHROME (bastion-web only) — the landing + signed-in app. Built ON the shared tokens
 * above so the served surface and the air-gapped report speak one visual language.
 * ======================================================================================== */

/* ---- Top nav ----------------------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--hairline);
  background: rgba(7, 10, 13, 0.72);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand img { width: 30px; height: 30px; border-radius: 7px; }
.brand .name { font-weight: 600; letter-spacing: 0.01em; color: var(--head); font-size: 16px; }
.brand .name b { color: var(--iron); font-weight: 600; }
.nav .spacer { flex: 1; }
/* The primary-nav landmark wraps the links; keep it a flex row so the landmark adds semantics
 * without changing the layout the links had as bare flex children of .nav-inner. */
.nav-inner nav { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.navlink {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--text-dim); padding: 7px 12px; border-radius: var(--radius-xs);
  transition: color 0.18s, background 0.18s;
}
.navlink:hover { color: var(--iron-bright); text-decoration: none; background: rgba(255, 255, 255, 0.03); }

/* ---- Buttons ----------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 14px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  border: 1px solid var(--iron); color: var(--bg); background: var(--iron);
  cursor: pointer; transition: background 0.18s, border-color 0.18s, transform 0.18s, box-shadow 0.18s;
  box-shadow: 0 10px 30px -14px var(--iron-dim);
}
.btn:hover { background: var(--iron-bright); border-color: var(--iron-bright); text-decoration: none; color: var(--bg); transform: translateY(-1px); }
.btn.lg { font-size: 15.5px; padding: 13px 24px; }
.btn.ghost {
  background: transparent; color: var(--iron-bright);
  border-color: var(--hairline-strong); box-shadow: none;
}
.btn.ghost:hover { background: rgba(241, 196, 83, 0.08); border-color: var(--iron-dim); color: var(--iron-bright); }
.btn.os { font-family: var(--font-mono); font-size: 13px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn .os-ico { font-family: var(--font-mono); font-weight: 700; }

/* ---- Hero -------------------------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; }
.hero::before { /* iron-shard texture from /static/img, masked, over the aurora */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: url("/static/img/ferrum-hero.jpg");
  background-size: cover; background-position: 100% 50%;
  opacity: 0.20;
  mask-image: linear-gradient(115deg, transparent 4%, #000 62%);
  -webkit-mask-image: linear-gradient(115deg, transparent 4%, #000 62%);
}
.hero-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 84px 28px 72px;
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; align-items: center;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-size: clamp(34px, 5.2vw, 58px); line-height: 1.03;
  margin: 16px 0 18px; color: var(--head); font-weight: 700; letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--iron); }
.lead { font-size: 17px; line-height: 1.6; color: var(--text); max-width: 56ch; margin: 0 0 26px; }
.lead b { color: var(--head); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.microcopy { margin-top: 18px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); letter-spacing: 0.02em; }
.microcopy b { color: var(--gold); }

/* Hero glass panel — a mini attack-path preview (foothold -> capability -> Tier 0). */
.hero-card {
  border: 1px solid var(--hairline-strong); border-radius: var(--radius);
  background: var(--glass-fill), var(--panel);
  box-shadow: var(--glass-shadow); overflow: hidden;
}
.hero-card .card-top {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px; border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
  background: rgba(255, 255, 255, 0.015);
}
.hero-card .dot3 { width: 9px; height: 9px; border-radius: 50%; background: var(--hairline-strong); }
.hero-card .card-title { color: var(--text); }
.hero-card .live { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--gold); }
.hero-card .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }
.hero-card .card-body { padding: 16px 16px 18px; }
.path-mini { display: flex; flex-direction: column; gap: 9px; }
.path-mini .hop { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; }
.path-mini .hop .lbl { flex: 1; color: var(--text); }
.path-mini .step-ico {
  width: 22px; height: 22px; flex: 0 0 auto; border-radius: 6px; display: grid; place-items: center;
  font-size: 11px; color: var(--iron-bright); border: 1px solid var(--iron-dim); background: rgba(241, 196, 83, 0.08);
}
.path-mini .hop.t0 .step-ico { color: var(--gold); border-color: rgba(241, 196, 83, 0.42); background: rgba(241, 196, 83, 0.08); }
.path-mini .hop .edge { color: var(--warm); font-size: 11px; }
.hero-card .card-foot {
  display: flex; align-items: center; gap: 10px;
  margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--hairline);
  font-family: var(--font-mono); font-size: 11px; color: var(--text-dim);
}
.hero-card .card-foot .score-badge {
  margin-left: auto; font-family: var(--font-display); font-weight: 700; font-size: 20px;
  color: var(--danger); line-height: 1;
}

/* ---- Generic served sections ------------------------------------------------------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 40px 28px; }
.section.tight { padding-top: 8px; }
.section-title { font-size: clamp(24px, 3vw, 32px); color: var(--head); font-weight: 600; letter-spacing: -0.01em; margin: 10px 0 8px; }
.section-lede { color: var(--text-dim); max-width: 66ch; margin: 0 0 26px; font-size: 15.5px; }

/* ---- Trust band (DC is never exposed) — reuses the report's .trust card language ---------- */
.trust-band { position: relative; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); background: rgba(241, 196, 83, 0.02); }
.trust-band .section { padding-top: 44px; padding-bottom: 44px; }
.trust-lead { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.trust-lead .shield {
  width: 30px; height: 30px; flex: 0 0 auto; border-radius: 8px; display: grid; place-items: center;
  background: rgba(241, 196, 83, 0.12); color: var(--gold); font-family: var(--font-mono); font-weight: 700;
}
.trust-headline { color: var(--head); font-weight: 600; font-size: clamp(22px, 3vw, 30px); margin: 0; letter-spacing: -0.01em; }
.trust-headline .on { color: var(--gold); }
.trust-sub { color: var(--text-dim); max-width: 74ch; margin: 6px 0 22px; font-size: 15px; }
.trust-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.trust-card { border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 15px 16px; background: var(--panel-2); }
.trust-card .t { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 6px; display: flex; align-items: center; gap: 7px; }
.trust-card .t.iron { color: var(--iron); }
.trust-card .t .inv { color: var(--text-dim); font-weight: 600; }
.trust-card p { margin: 0; font-size: 13.5px; color: var(--text); line-height: 1.5; }
.trust-foot-band { margin-top: 20px; font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); line-height: 1.6; }
.trust-foot-band b { color: var(--gold); }

/* ---- Feature grid (what Bastion detects) ------------------------------------------------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.feature {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--panel-fill), var(--panel); padding: 20px 20px 22px;
  transition: border-color 0.2s, transform 0.2s;
}
.feature:hover { border-color: var(--iron-dim); transform: translateY(-2px); }
.feature .ix { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: var(--iron); }
.feature h3 { color: var(--head); font-size: 17px; font-weight: 600; margin: 10px 0 8px; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.feature .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip {
  font-family: var(--font-mono); font-size: 10.5px; color: var(--text);
  padding: 2px 8px; border-radius: var(--radius-xs);
  border: 1px solid var(--hairline-strong); background: var(--panel-2);
}
.chip.attack { color: var(--warm); border-color: rgba(255, 138, 93, 0.3); }
.chip.esc { color: var(--iron); border-color: rgba(241, 196, 83, 0.3); }

/* ---- Download (collector) ---------------------------------------------------------------- */
.download-band { border-top: 1px solid var(--hairline); background: rgba(241, 196, 83, 0.025); }
.download-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.download-os { display: flex; flex-wrap: wrap; gap: 14px; }
.dl-card {
  border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm);
  background: var(--panel-2); padding: 16px 18px; min-width: 180px;
}
.dl-card .os-name { display: flex; align-items: center; gap: 9px; color: var(--head); font-weight: 600; margin-bottom: 4px; }
.dl-card .os-glyph { font-family: var(--font-mono); color: var(--iron-bright); font-weight: 700; }
.dl-card .os-note { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-bottom: 12px; }
.dl-card .btn { width: 100%; justify-content: center; }
.download-note { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); margin-top: 16px; line-height: 1.6; }
.download-note b { color: var(--iron); }

/* ---- Footer ------------------------------------------------------------------------------ */
.site-foot { border-top: 1px solid var(--hairline); margin-top: 20px; }
.site-foot-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 26px 28px 40px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim);
}
.site-foot-inner .grow { flex: 1; }
.site-foot-inner b { color: var(--text); font-weight: 600; }
.site-foot-inner a { color: var(--text-dim); }
.site-foot-inner a:hover { color: var(--iron-bright); }

/* ---- Signed-in app dashboard (stub — the explorer/portal is S7 part 3b) ------------------- */
.app-wrap { max-width: var(--maxw); margin: 0 auto; padding: 40px 28px 96px; }
.who { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 24px; }
.avatar {
  width: 44px; height: 44px; flex: 0 0 auto; border-radius: 11px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--bg);
  background: var(--iron); box-shadow: 0 10px 24px -12px var(--iron-dim);
}
.who .id .nm { color: var(--head); font-weight: 600; font-size: 17px; }
.who .id .em { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim); }
.who .spacer { flex: 1; }
.ent-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.ent-card { border: 1px solid var(--hairline); border-radius: var(--radius-sm); padding: 15px 16px; background: var(--panel-fill), var(--panel); }
.ent-card .l { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-dim); margin-bottom: 6px; }
.ent-card .v { color: var(--head); font-weight: 600; font-size: 15px; }
.ent-card .v.mono { font-family: var(--font-mono); font-size: 13px; }
.feat-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.stub-note {
  margin-top: 26px; padding: 16px 18px;
  border: 1px solid var(--hairline); border-left: 3px solid var(--iron);
  border-radius: var(--radius-sm); background: var(--panel-fill), var(--panel);
  color: var(--text-dim); font-size: 13.5px;
}
.stub-note b { color: var(--head); font-weight: 600; }
.logout { display: inline; }
.logout button {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--text-dim);
  background: transparent; border: 1px solid var(--hairline-strong); border-radius: var(--radius-xs);
  padding: 8px 14px; cursor: pointer; transition: color 0.18s, border-color 0.18s;
}
.logout button:hover { color: var(--danger-soft); border-color: rgba(255, 107, 107, 0.4); }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; gap: 30px; padding-top: 56px; }
  .hero-card { max-width: 460px; }
  .download-grid { grid-template-columns: 1fr; }
}

/* ---- CSP-clean utilities -----------------------------------------------------------------
 * The suite enforces a strict CSP (`style-src 'self'`, NO 'unsafe-inline'), so NO inline
 * inline style attribute may set the staggered-reveal delay or spacing — these classes replace them.
 * ---------------------------------------------------------------------------------------- */
/* Reveal-cascade stagger: `.sN` sets --stagger; the .reveal delay clamps at 1.5s (stagger 27),
 * so a long findings list maps every row past that onto s27 — one small fixed set, no inline. */
.reveal.s0 { --stagger: 0; }
.reveal.s1 { --stagger: 1; }
.reveal.s2 { --stagger: 2; }
.reveal.s3 { --stagger: 3; }
.reveal.s4 { --stagger: 4; }
.reveal.s5 { --stagger: 5; }
.reveal.s6 { --stagger: 6; }
.reveal.s7 { --stagger: 7; }
.reveal.s8 { --stagger: 8; }
.reveal.s9 { --stagger: 9; }
.reveal.s10 { --stagger: 10; }
.reveal.s11 { --stagger: 11; }
.reveal.s12 { --stagger: 12; }
.reveal.s13 { --stagger: 13; }
.reveal.s14 { --stagger: 14; }
.reveal.s15 { --stagger: 15; }
.reveal.s16 { --stagger: 16; }
.reveal.s17 { --stagger: 17; }
.reveal.s18 { --stagger: 18; }
.reveal.s19 { --stagger: 19; }
.reveal.s20 { --stagger: 20; }
.reveal.s21 { --stagger: 21; }
.reveal.s22 { --stagger: 22; }
.reveal.s23 { --stagger: 23; }
.reveal.s24 { --stagger: 24; }
.reveal.s25 { --stagger: 25; }
.reveal.s26 { --stagger: 26; }
.reveal.s27 { --stagger: 27; }
.center { text-align: center; }
.narrow { max-width: 420px; }
.mb-12 { margin-bottom: 12px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-22 { margin-top: 22px; }
.c-iron { color: var(--iron); }
.c-dim { color: var(--text-dim); }
.btn.disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* Fixed-step 0-100% bar widths (2% granularity — imperceptible, deterministic, CSP-clean).
 * Drives the A-F grade bar (and any future severity/stat bar) from a class, not inline width. */
.gw-0 { width: 0; }
.gw-2 { width: 2%; }
.gw-4 { width: 4%; }
.gw-6 { width: 6%; }
.gw-8 { width: 8%; }
.gw-10 { width: 10%; }
.gw-12 { width: 12%; }
.gw-14 { width: 14%; }
.gw-16 { width: 16%; }
.gw-18 { width: 18%; }
.gw-20 { width: 20%; }
.gw-22 { width: 22%; }
.gw-24 { width: 24%; }
.gw-26 { width: 26%; }
.gw-28 { width: 28%; }
.gw-30 { width: 30%; }
.gw-32 { width: 32%; }
.gw-34 { width: 34%; }
.gw-36 { width: 36%; }
.gw-38 { width: 38%; }
.gw-40 { width: 40%; }
.gw-42 { width: 42%; }
.gw-44 { width: 44%; }
.gw-46 { width: 46%; }
.gw-48 { width: 48%; }
.gw-50 { width: 50%; }
.gw-52 { width: 52%; }
.gw-54 { width: 54%; }
.gw-56 { width: 56%; }
.gw-58 { width: 58%; }
.gw-60 { width: 60%; }
.gw-62 { width: 62%; }
.gw-64 { width: 64%; }
.gw-66 { width: 66%; }
.gw-68 { width: 68%; }
.gw-70 { width: 70%; }
.gw-72 { width: 72%; }
.gw-74 { width: 74%; }
.gw-76 { width: 76%; }
.gw-78 { width: 78%; }
.gw-80 { width: 80%; }
.gw-82 { width: 82%; }
.gw-84 { width: 84%; }
.gw-86 { width: 86%; }
.gw-88 { width: 88%; }
.gw-90 { width: 90%; }
.gw-92 { width: 92%; }
.gw-94 { width: 94%; }
.gw-96 { width: 96%; }
.gw-98 { width: 98%; }
.gw-100 { width: 100%; }

/* Attack-graph legend dots: the swatch colour comes from a class, not an inline background. */
.g-legend .dot.d-critical { background: var(--danger); }
.g-legend .dot.d-high { background: var(--warm); }
.g-legend .dot.d-medium { background: var(--gold); }
.g-legend .dot.d-low { background: var(--text-dim); }
.g-legend .dot.d-user { background: var(--iron-bright); }
.g-legend .dot.d-computer { background: var(--iron); }
.g-legend .dot.d-group { background: var(--iron-dim); }
.g-legend .dot.d-domain { background: var(--gold); }
.g-legend .dot.d-cert { background: var(--green); }
.g-legend .dot.d-container { background: var(--text-dim); }
.g-legend .dot.d-tier0 { background: var(--panel); }

@media (max-width: 680px) {
  .wrap { padding: 0 16px 72px; }
  .masthead { padding: 24px 20px; }
  .finding > summary { grid-template-columns: 32px 1fr; }
  .finding .f-right { grid-column: 1 / -1; align-items: flex-start; text-align: left; flex-direction: row; }
  .kv { grid-template-columns: 1fr; gap: 3px 0; }
  .kv dt { padding-top: 8px; }
  .nav-inner, .section, .hero-inner, .site-foot-inner, .app-wrap { padding-left: 16px; padding-right: 16px; }
  .explore-panels { grid-template-columns: 1fr; }
  .node-cols { grid-template-columns: 1fr; }
}

/* ===================================================================================================
 * Served attack-graph EXPLORER chrome (S7 3b) — the HTMX search / node / pathfinding panels, the
 * findings summary, and the entitlement upgrade panels. Built on the same tokens + component classes
 * as the offline report (ONE design language); only the served-only chrome lives here.
 * =================================================================================================*/
.explore-chrome { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-bottom: 14px; }
.explore-search { flex: 1 1 320px; }
.explore-input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  color: var(--head); font-family: var(--font-mono); font-size: 13px; padding: 10px 13px; outline: none;
}
.explore-input:focus { border-color: var(--iron-dim); }
.explore-input::placeholder { color: var(--text-dim); }
.edge-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.edge-chips .chip { text-decoration: none; cursor: pointer; }
.edge-chips .chip:hover { border-color: var(--iron-dim); color: var(--iron-bright); }

.explore-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.explore-col { min-width: 0; }
.node-panel, .path-panel { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--panel-2); padding: 14px 15px; min-height: 90px; }
.path-form { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.path-form .explore-input { flex: 1 1 180px; }

.hit-list { display: flex; flex-direction: column; gap: 4px; }
.hit, .nbr {
  display: flex; align-items: center; gap: 9px; text-decoration: none; cursor: pointer;
  padding: 7px 9px; border-radius: var(--radius-sm); border: 1px solid transparent; color: var(--text);
}
.hit:hover, .nbr:hover { background: rgba(241, 196, 83, 0.06); border-color: var(--hairline); }
.hit-label, .nbr-label { color: var(--head); font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit-sid { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.hit-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--text-dim); }
.hit-dot.node-user { background: #f8d888; }
.hit-dot.node-computer { background: #f1c453; }
.hit-dot.node-group { background: rgba(241, 196, 83, 0.55); }
.hit-dot.node-domain { background: #f1c453; }
.hit-dot.node-cert_template, .hit-dot.node-enterprise_ca { background: #3ddc97; }
.hit-dot.node-ou, .hit-dot.node-gpo, .hit-dot.node-container { background: #8b96a5; }

.node-head { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-bottom: 12px; }
.node-name { color: var(--head); font-weight: 600; font-size: 16px; }
.node-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); margin: 14px 0 7px; }
.node-findings { display: flex; flex-direction: column; gap: 5px; }
.node-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.nbr { padding: 5px 8px; gap: 8px; }
.nbr-kind { font-family: var(--font-mono); font-size: 10.5px; color: var(--warm); border: 1px solid rgba(255, 138, 93, 0.3); border-radius: 5px; padding: 1px 6px; flex: none; }

.summary-list { display: flex; flex-direction: column; }
.summary-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--hairline); }
.summary-row:last-child { border-bottom: none; }
.summary-row .rank { font-family: var(--font-mono); font-size: 13px; color: var(--text-dim); min-width: 22px; }
.summary-row .s-title { color: var(--head); font-weight: 600; font-size: 14px; }
.summary-row .grow { flex: 1; }
.summary-row .rid { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.summary-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--hairline); }
.summary-cta .em { color: var(--text-dim); font-size: 13px; }

.path-found .path-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }

.upgrade { border-color: rgba(241, 196, 83, 0.28); }
.upgrade h2 { font-size: 19px; color: var(--head); margin: 6px 0 8px; font-weight: 600; }
.upgrade p { color: var(--text-dim); margin: 0 0 18px; max-width: 74ch; line-height: 1.6; }

/* ===================================================================================================
 * Public PRICING page (/pricing) — the SMB-aligned tier ladder. Built on the same dark-iron tokens +
 * component language as the landing (kicker, .btn, .chip, glass panels). The monthly/annual toggle is
 * CSS-ONLY and CSP-clean: two visually-hidden radios drive `:checked` sibling selectors below — no
 * inline style, no inline script (strict `style-src 'self'; script-src 'self'`).
 * =================================================================================================*/
.pricing-head { text-align: center; padding-bottom: 6px; }
.pricing-head .kicker { display: inline-block; }
.pricing-title { max-width: 20ch; margin-left: auto; margin-right: auto; }
.pricing-lede { margin-left: auto; margin-right: auto; }

.pricing-grid-section { padding-top: 8px; }
/* text-align:center centers the inline-flex switch + the note; the grid children reset to left. */
.billing-toggle-wrap { position: relative; text-align: center; }

/* The two radios are visually hidden but kept in the tab order (keyboard-operable via the labels). */
.bill-radio { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; opacity: 0; pointer-events: none; }

.billing-switch {
  position: relative;
  display: inline-flex; align-items: stretch;
  padding: 5px; margin: 0 auto 12px;
  border: 1px solid var(--hairline-strong); border-radius: 999px;
  background: var(--panel-2); box-shadow: var(--inset-hi);
}
.switch-knob {
  position: absolute; top: 5px; left: 5px; bottom: 5px; width: calc(50% - 5px);
  border-radius: 999px; background: var(--iron); z-index: 0;
  box-shadow: 0 6px 18px -8px var(--iron-dim);
  transition: transform 0.28s var(--ease-out);
}
.bill-opt {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 112px; padding: 9px 20px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.02em;
  color: var(--text-dim); cursor: pointer; user-select: none;
  border-radius: 999px; transition: color 0.2s;
}
#bill-annual:checked ~ .billing-switch .switch-knob { transform: translateX(100%); }
#bill-monthly:checked ~ .billing-switch .bill-opt-m,
#bill-annual:checked ~ .billing-switch .bill-opt-a { color: var(--bg); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .switch-knob { transition: none; } }
/* Keyboard focus lands on the hidden radio — surface it as a ring on the matching label. */
#bill-monthly:focus-visible ~ .billing-switch .bill-opt-m,
#bill-annual:focus-visible ~ .billing-switch .bill-opt-a { outline: 2px solid var(--iron-bright); outline-offset: 3px; }

.billing-annual-note { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); margin: 0 auto 24px; }
.billing-annual-note b { color: var(--gold); }

/* ---- Toggle visibility: `.annual-only` hidden by default, revealed when the Annual radio is set;
 *      `.monthly-only` is the inverse. Both price amounts + cadence lines live in the DOM (so the
 *      annual figures are always present), CSS only chooses which is shown. ---------------------- */
.annual-only { display: none; }
#bill-annual:checked ~ .price-grid .monthly-only { display: none; }
#bill-annual:checked ~ .price-grid .annual-only { display: inline-block; }
#bill-annual:checked ~ .billing-annual-note .monthly-only { display: none; }
#bill-annual:checked ~ .billing-annual-note .annual-only { display: inline; }

/* ---- Card grid --------------------------------------------------------------------------------- */
.price-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 16px; padding-top: 20px; align-items: stretch;
}
.price-card {
  position: relative; display: flex; flex-direction: column; text-align: left;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  background: var(--panel-fill), var(--panel); box-shadow: var(--glass-shadow);
  padding: 22px 20px 24px;
  transition: border-color 0.2s, transform 0.2s;
}
.price-card:hover { border-color: var(--iron-dim); transform: translateY(-2px); }
.price-card.featured {
  border-color: var(--iron);
  background: linear-gradient(180deg, rgba(241, 196, 83, 0.07), rgba(241, 196, 83, 0.012)), var(--panel);
  box-shadow: var(--inset-hi), 0 0 0 1px var(--iron-dim), 0 24px 64px -24px rgba(241, 196, 83, 0.5);
}
.ribbon {
  position: absolute; top: 0; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--bg); background: var(--iron); padding: 5px 13px; border-radius: 999px;
  box-shadow: 0 8px 22px -8px var(--iron-dim); white-space: nowrap;
}

.tier-head { margin-bottom: 10px; }
.tier-name { font-family: var(--font-display); font-size: 19px; font-weight: 600; color: var(--head); letter-spacing: -0.01em; }
.tier-tag { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.11em; color: var(--iron); margin-top: 3px; }
.price-card.featured .tier-tag { color: var(--iron-bright); }

.price { margin: 6px 0 0; min-height: 44px; }
/* NB: no explicit `display` here on purpose — `.price-amt` stays inline by default so the equal-
 * specificity `.annual-only { display: none }` wins for `.price-amt.annual-only` (annual hidden until
 * the Annual radio is set). The `:checked` reveal rule (ID specificity) then shows it inline-block. */
.price-amt { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1; color: var(--head); letter-spacing: -0.02em; }
.price-amt .per { font-family: var(--font-mono); font-size: 13px; font-weight: 500; color: var(--text-dim); letter-spacing: 0; margin-left: 3px; }
.price-amt.price-custom { font-size: 30px; color: var(--iron-bright); }

.price-cadence { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); min-height: 16px; margin-top: 4px; }
.price-cadence .annual-only { color: var(--gold); }

.price-sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--text-dim); margin: 12px 0 0; min-height: 32px; line-height: 1.45; }
.price-cta { margin-top: 16px; width: 100%; justify-content: center; }

.feat-intro { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--hairline); }
.feat-intro b { color: var(--head); font-weight: 600; }
.feat-intro.base b { color: var(--iron); }
.feat-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; flex: 1 1 auto; }
.feat-checks li { position: relative; padding-left: 23px; font-size: 13px; color: var(--text); line-height: 1.4; }
.feat-checks li::before {
  content: "\2713"; position: absolute; left: 0; top: 0;
  font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--gold);
}
.price-card.featured .feat-checks li::before { color: var(--iron-bright); }

.pricing-microcopy { text-align: center; margin-top: 22px; }

/* ---- Reinforcing trust line + invariant chips + FAQ -------------------------------------------- */
.pricing-reassure { max-width: 72ch; margin: 0 auto; font-size: 14.5px; color: var(--text-dim); line-height: 1.65; }
.pricing-reassure b { color: var(--head); font-weight: 600; }
.pricing-invariants { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }

.pricing-faq .faq-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.faq-item { border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--panel-2); padding: 16px 18px; }
.faq-item h3 { font-size: 15px; color: var(--head); font-weight: 600; margin: 0 0 6px; letter-spacing: -0.01em; }
.faq-item p { margin: 0; font-size: 13.5px; color: var(--text-dim); line-height: 1.55; }

.pricing-cta-row { justify-content: center; }

/* ---- Landing pricing teaser -------------------------------------------------------------------- */
.pricing-teaser { border-top: 1px solid var(--hairline); background: rgba(241, 196, 83, 0.02); }
.pricing-teaser-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.pricing-teaser-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.pricing-teaser-list li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 12px 16px; border: 1px solid var(--hairline); border-radius: var(--radius-sm);
  background: var(--panel-2);
}
.pricing-teaser-list li.is-flag { border-color: var(--iron); background: linear-gradient(180deg, rgba(241, 196, 83, 0.07), rgba(241, 196, 83, 0.012)), var(--panel-2); }
.pricing-teaser-list .tt-name { color: var(--head); font-weight: 600; font-size: 14px; }
.pricing-teaser-list .tt-price { margin-left: auto; font-family: var(--font-mono); font-size: 15px; font-weight: 600; color: var(--iron-bright); }
.pricing-teaser-list .tt-per { font-size: 11px; color: var(--text-dim); font-weight: 500; }

@media (max-width: 860px) {
  .pricing-teaser-grid { grid-template-columns: 1fr; gap: 26px; }
}

/* ==================================================================================================
 * DESIGN-POSTURE ELEVATION (served-only, S8 polish). A molten-gold "reachability" motif echoing the
 * brand icon — a dark-iron fortress whose ONE reachable path glows to the keep (= exposure to Tier 0).
 * The suite cyan (--iron) stays the SYSTEM / interactive accent; --gold becomes the brand + Tier-0
 * warmth. Every :root token is untouched (byte-shared with the report); every selector below is
 * served-only (it does not exist in report.css, or is scoped under a served-only ancestor), so the
 * offline report is unchanged while the served surfaces gain depth.
 * ================================================================================================ */

/* ---- Brand mark: the fortress silhouette carries its own shape + transparency (no rounded crop) -- */
.brand .brand-mark {
  width: 42px; height: 42px; border-radius: 0;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.6));
  transition: filter 0.25s var(--ease-out), transform 0.25s var(--ease-out);
}
.brand .name { font-size: 17px; }
.brand:hover .brand-mark { filter: drop-shadow(0 3px 12px rgba(241, 196, 83, 0.42)); transform: translateY(-1px); }

/* ---- Attack-graph explorer: a touch more breathing room in the toolbar/search (served-only) ------ */
.app-wrap .graph-toolbar { padding: 16px 18px; gap: 10px; }
.app-wrap .explore-input { padding: 12px 15px; }
.app-wrap .graph-panel .g-legend { padding: 13px 18px; }

/* Node-detail neighbour rows: a long objectSID label must WRAP inside its column, never overflow the
   card. Grid/flex children need min-width:0 to shrink below content; the label wraps (not ellipsis)
   so the full attack target stays readable. Served-only (the node panel is app-only). */
.node-cols, .node-col { min-width: 0; }
.node-col .nbr { align-items: flex-start; min-width: 0; }
.node-col .nbr-label { white-space: normal; overflow: visible; overflow-wrap: anywhere; min-width: 0; flex: 1 1 auto; }

/* ---- Hero: forge-lit atmosphere + the fortress emblem over the live attack-path card ------------- */
.hero::after { /* warm forge-glow (right, behind the emblem) layered over the cyan aurora */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(660px 440px at 79% 34%, rgba(241, 196, 83, 0.11), transparent 62%),
    radial-gradient(520px 380px at 90% 6%, rgba(241, 196, 83, 0.10), transparent 60%);
}
.hero-inner { grid-template-columns: 1.08fr 0.92fr; }

/* Molten headline accent — iron cools into gold, echoing the icon's lit path. */
.hero h1 .accent {
  background: linear-gradient(96deg, var(--iron-bright) 2%, var(--gold) 82%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

.hero-visual { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
.hero-emblem { position: relative; display: grid; place-items: center; padding: 2px 0 20px; }
.hero-emblem::before { /* molten halo — the forge-light behind the fortress */
  content: ""; position: absolute; z-index: 0;
  width: 72%; aspect-ratio: 1 / 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 196, 83, 0.24), rgba(241, 196, 83, 0.06) 46%, transparent 70%);
  filter: blur(5px);
  animation: emblem-glow 5.6s var(--ease-out) infinite;
}
.hero-emblem img {
  position: relative; z-index: 1;
  width: clamp(186px, 25vw, 288px); height: auto;
  filter: drop-shadow(0 20px 44px rgba(0, 0, 0, 0.62)) drop-shadow(0 0 24px rgba(241, 196, 83, 0.15));
  animation: emblem-float 7.5s ease-in-out infinite;
}
@keyframes emblem-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes emblem-glow { 0%, 100% { opacity: 0.6; transform: scale(0.97); } 50% { opacity: 1; transform: scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .hero-emblem img, .hero-emblem::before { animation: none; } }

.hero-card { box-shadow: var(--glass-shadow), 0 0 0 1px rgba(241, 196, 83, 0.06); }
.hero-card .score-badge { text-shadow: 0 0 18px rgba(255, 107, 107, 0.42); }

/* ---- Feature grid: warm the hover so the "what it detects" grid feels forged, not flat ----------- */
.feature .ix { color: var(--gold); }
.feature:hover { border-color: rgba(241, 196, 83, 0.34); box-shadow: 0 18px 44px -26px rgba(241, 196, 83, 0.3); }

/* ---- Internal app (/app): forge-lit atmosphere + a lifted signed-in header + focal grade badge --- */
.app-wrap { position: relative; }
.app-wrap::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(780px 480px at 85% -8%, rgba(241, 196, 83, 0.06), transparent 60%);
}
.who { padding: 2px 2px 20px; border-bottom: 1px solid var(--hairline); margin-bottom: 26px; }
.who .avatar { box-shadow: 0 10px 26px -12px var(--iron-dim), inset 0 1px 0 rgba(255, 255, 255, 0.18); }
/* The A–F posture badge is the page's focal point — give it a faint lit plinth (served-only). */
.masthead .grade { box-shadow: var(--inset-hi), 0 16px 44px -22px rgba(0, 0, 0, 0.8), 0 0 42px -18px rgba(241, 196, 83, 0.14); }
/* Tier-0 reach tile: the number that matters most reads gold (reachability = the product's thesis). */
.tile.t0-reach .n { color: var(--gold); }

@media (max-width: 860px) {
  .hero-emblem { padding-bottom: 8px; }
  .hero-emblem img { width: clamp(150px, 42vw, 220px); }
}

/* ==================================================================================================
 * RESPONSIVE — the served surfaces adapt cleanly to phone/tablet widths (CSP-clean, no JS).
 * ================================================================================================ */
@media (max-width: 820px) {
  /* Nav: brand keeps its row; the links wrap into a tidy full-width row beneath it — never a tall
     right-hand column. The spacer that pushes links right on desktop is removed so the wrap is clean. */
  .nav-inner { flex-wrap: wrap; row-gap: 9px; padding: 11px 18px; }
  .nav .spacer { display: none; }
  .nav-inner nav { width: 100%; justify-content: flex-start; gap: 6px; }
  .navlink { padding: 6px 10px; font-size: 12px; }
  .nav-inner nav .btn { padding: 8px 15px; font-size: 13px; }

  /* Two-column marketing grids collapse to one column. */
  .hero-inner,
  .pricing-teaser-grid,
  .download-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
}

@media (max-width: 560px) {
  .hero-inner { gap: 24px; padding: 36px 18px 40px; }
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); }
  .lead { font-size: 15px; }
  .section { padding: 30px 18px; }
  /* Full-width, tappable CTAs on phones. */
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 auto; justify-content: center; }
  .cta-row .btn.lg { padding: 12px 18px; font-size: 14.5px; }
  /* Download OS cards go full width so the buttons are easy to hit. */
  .download-os { flex-direction: column; }
  .dl-card { min-width: 0; width: 100%; }
  /* Pricing cards already auto-fit to one column at this width; keep the ribbon inside the card. */
  .price-grid { grid-template-columns: 1fr; }
  /* Footer stacks instead of a cramped single row. */
  .site-foot-inner { flex-direction: column; align-items: flex-start; gap: 6px; }
  .site-foot-inner .grow { display: none; }
}

/* --- Mobile burger for the landing shell (CSS-only; the static pages ship no JS) --- */
.bn-nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.bn-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  margin-right: -6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}
.bn-burger span {
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--head);
  transition: transform 0.22s var(--ease-out), opacity 0.18s ease;
}
.bn-nav-toggle:focus-visible + .bn-burger { outline: 2px solid var(--iron-bright); outline-offset: 3px; }
@media (max-width: 820px) {
  .bn-burger { display: flex; }
  .nav-inner > nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 12px 20px 18px;
    background: rgba(7, 10, 13, 0.97);
    background-image: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0));
    -webkit-backdrop-filter: var(--blur);
    backdrop-filter: var(--blur);
    border-bottom: 1px solid var(--hairline);
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.95);
  }
  .bn-nav-toggle:checked ~ nav { display: flex; }
  .bn-nav-toggle:checked ~ .bn-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .bn-nav-toggle:checked ~ .bn-burger span:nth-child(2) { opacity: 0; }
  .bn-nav-toggle:checked ~ .bn-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .nav-inner > nav .navlink,
  .nav-inner > nav .btn {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
  }
}
