/* ============================================================================
   24·72 — workbench-style IDE application, Malkan Solutions theme.
   Layered on ../theme.css. Dark Malkan-navy chrome (title bar / activity bar /
   sidebar / tabs / status bar) wrapping a light editor — same anatomy as the
   CRA workbench. Brand blues tuned by eye to the Malkan logo (sky → deep),
   EU-gold accents repurposed to Malkan blue.
   ========================================================================== */
:root {
  /* Malkan brand blue scale (tuned to the logo gradient) — overrides theme.css */
  --blue-950: #0a2747; --blue-900: #0f3a66; --blue-800: #18497d; --blue-700: #1f5d9e;
  --blue-600: #2b7fc4; --blue-500: #2f86cf; --blue-400: #5fb0e0; --blue-200: #aed6f0;
  --blue-100: #d7ebf8; --blue-050: #eef6fc;
  /* repurpose gold accents → Malkan sky-blue (no EU gold in a Malkan app) */
  --gold-500: #3fa0e0; --gold-600: #2b7fc4; --gold-700: #1f5d9e; --gold-050: #eef6fc;
  --mk-gray: #7d8893;            /* the "Solutions" gray */

  /* dark Malkan-navy chrome */
  --ch-titlebar: #0f1826; --ch-bar: #0f1826; --ch-sidebar: #122031; --ch-tab: #16263a;
  --ch-edge: #0a121d; --ch-ink: #d6e2ee; --ch-dim: #8497a8; --ch-faint: #5a6b7d;
  --ch-hover: rgba(255,255,255,0.05); --ch-activebg: rgba(95,176,224,0.16);

  /* chrome metrics */
  --tb-h: 46px; --act-w: 48px; --sb-w: 282px; --sbar-h: 28px; --gap-section: 22px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow: hidden; }
::selection { background: var(--blue-200); }

/* ---------- IDE frame ---------- */
.ide { height: 100vh; overflow: hidden; display: flex; flex-direction: column; background: var(--bg); }
.ide-body { flex: 1; display: flex; min-height: 0; }

/* title bar */
.ide-titlebar { flex: none; height: var(--tb-h); display: flex; align-items: center; gap: 14px;
  padding: 0 14px 0 12px; background: var(--ch-titlebar); border-bottom: 1px solid var(--ch-edge); }
.tb-brand { display: flex; align-items: center; gap: 11px; }
.tb-logo { height: 24px; width: auto; display: block; filter: brightness(1.18) saturate(1.05); }
.tb-brand-div { width: 1px; height: 22px; background: #2a3b50; }
.tb-brand-text { font-family: var(--display); font-size: 16px; font-weight: 800; letter-spacing: 0.01em; color: var(--ch-ink); font-variant-numeric: tabular-nums; }
.tb-brand-text i { font-style: normal; color: var(--blue-400); }
.tb-brand-sub { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ch-faint); }
.tb-spacer { flex: 1; }
.tb-actions { display: flex; align-items: center; gap: 9px; }
.tb-chip { font-family: var(--mono); font-size: 11px; font-weight: 600; color: var(--ch-dim); background: #0a121d; border: 1px solid #243446; padding: 3px 9px; border-radius: 5px; }
.tb-applies { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: 0.04em; color: #0d2b1c; background: #aef0cf; border: 1px solid #7fd8af; padding: 3px 10px; border-radius: 999px; }

/* activity bar */
.ide-activitybar { flex: none; width: var(--act-w); display: flex; flex-direction: column; justify-content: space-between;
  background: var(--ch-bar); border-right: 1px solid var(--ch-edge); padding: 8px 0; }
.act-group { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.act-item { position: relative; width: 40px; height: 40px; display: grid; place-items: center; background: none; border: none;
  cursor: pointer; border-radius: 8px; color: var(--ch-dim); }
.act-item:hover { color: var(--ch-ink); background: var(--ch-hover); }
.act-item.active { color: #fff; }
.act-item.active::before { content: ""; position: absolute; left: -8px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--blue-400); box-shadow: 0 0 8px var(--blue-400); }
.act-item svg { width: 21px; height: 21px; }

/* side bar */
.ide-sidebar { flex: none; width: var(--sb-w); background: var(--ch-sidebar); border-right: 1px solid var(--ch-edge);
  display: flex; flex-direction: column; overflow-y: auto; }
.sb-title { flex: none; padding: 13px 16px 4px; font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ch-faint); }
.sb-prod { padding: 6px 16px 12px; border-bottom: 1px solid var(--ch-edge); }
.sb-prod b { display: block; font-size: 12.5px; color: var(--ch-ink); font-weight: 600; line-height: 1.3; }
.sb-prod span { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--ch-faint); margin-top: 3px; }
.sb-tree { display: flex; flex-direction: column; padding: 8px 0 12px; }
.tree-group { padding: 10px 14px 6px; font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--ch-faint); }
.tree-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 6px 14px; background: none; border: none; cursor: pointer;
  font: inherit; text-align: left; color: var(--ch-dim); border-left: 2px solid transparent; }
.tree-item:hover { background: var(--ch-hover); color: var(--ch-ink); }
.tree-item.active { background: var(--ch-activebg); border-left-color: var(--blue-400); color: #fff; }
.tree-lead { flex: none; width: 14px; text-align: center; font-family: var(--mono); font-size: 12px; color: var(--ch-faint); }
.tree-item.active .tree-lead { color: var(--blue-400); }
.tree-name { flex: 1; font-size: 12.5px; font-family: var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tree-hint { font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.05em; color: var(--ch-faint); }
.sb-foot { margin-top: auto; padding: 14px 16px; font-family: var(--mono); font-size: 9px; line-height: 1.7; color: var(--ch-faint); border-top: 1px solid var(--ch-edge); }

/* status dots (sidebar tree + tabs) */
.st-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ch-faint); }
.st-dot.s-over { background: var(--bad); box-shadow: 0 0 0 2px rgba(177,58,43,0.22); }
.st-dot.s-urgent { background: var(--warn); box-shadow: 0 0 0 2px rgba(148,103,0,0.18); }
.st-dot.s-ok { background: var(--blue-400); box-shadow: 0 0 0 2px rgba(95,176,224,0.22); }
.st-dot.s-filed { background: var(--ok); }

/* editor */
.ide-editor { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.ide-tabs { flex: none; display: flex; align-items: stretch; height: 37px; background: var(--ch-titlebar); border-bottom: 1px solid var(--ch-edge); overflow-x: auto; }
.tab { display: flex; align-items: center; border-right: 1px solid var(--ch-edge); background: var(--ch-tab); }
.tab.active { background: var(--bg); box-shadow: inset 0 2px 0 var(--blue-500); }
.tab-label { display: flex; align-items: center; gap: 8px; padding: 0 8px 0 14px; height: 100%; background: none; border: none; cursor: pointer;
  font: inherit; font-family: var(--mono); font-size: 11.5px; color: var(--ch-dim); white-space: nowrap; }
.tab.active .tab-label { color: var(--ink); }
.tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ch-faint); }
.tab.active .tab-dot { background: var(--blue-500); }
.tab-dot.s-over { background: var(--bad); } .tab-dot.s-urgent { background: var(--warn); }
.tab-dot.s-ok { background: var(--blue-400); } .tab-dot.s-filed { background: var(--ok); }
.tab-close { background: none; border: none; cursor: pointer; color: var(--ch-faint); font-size: 12px; padding: 4px 9px; }
.tab-close:hover { color: var(--ch-ink); background: var(--ch-hover); }
.editor-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.editor-pane { padding: 30px 38px 64px; max-width: 1040px; }

/* status bar */
.ide-statusbar { flex: none; height: var(--sbar-h); display: flex; align-items: center; padding: 0 4px;
  background: linear-gradient(90deg, #18497d, #2b7fc4); color: rgba(255,255,255,0.94); font-family: var(--mono); font-size: 11px; }
.st-item { display: inline-flex; align-items: center; gap: 6px; padding: 0 11px; height: 100%; white-space: nowrap; }
.st-accent { font-weight: 700; }
.st-muted { color: rgba(255,255,255,0.66); }
.st-spacer { flex: 1; }

/* ============================ light editor views =========================== */
.t-mono { font-family: var(--mono); font-size: 11px; color: var(--gray-600); letter-spacing: 0.02em; }
.t-pill { display: inline-flex; align-items: center; font-family: var(--mono); font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: var(--gray-100); color: var(--gray-600); }
.t-pill.ok { background: var(--ok-bg); color: var(--ok); }
.t-pill.warn { background: var(--warn-bg); color: var(--warn); }
.t-pill.bad { background: var(--bad-bg); color: var(--bad); }
.t-pill.neutral { background: var(--gray-100); color: var(--gray-600); }

.btn-primary { appearance: none; cursor: pointer; font-family: var(--display); font-weight: 700; font-size: 14px;
  padding: 11px 18px; border-radius: var(--radius-sm); color: #fff; border: none;
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); box-shadow: 0 8px 20px rgba(31,93,158,0.28); transition: transform .12s, filter .12s; }
.btn-primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary.sm { padding: 7px 13px; font-size: 12.5px; }
.btn-ghost { appearance: none; cursor: pointer; font-family: var(--display); font-size: 13px; font-weight: 600; color: var(--blue-700);
  background: var(--paper); border: 1px solid var(--gray-300); padding: 8px 14px; border-radius: var(--radius-sm); transition: border-color .12s, box-shadow .12s; }
.btn-ghost:hover { border-color: var(--blue-400); box-shadow: 0 4px 12px rgba(16,43,69,0.07); }
.btn-ghost.sm { padding: 6px 11px; font-size: 12px; }
.nav-proc { color: var(--blue-700); }

/* dashboard */
.dash-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.dash-h { margin: 0; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--ink); }
.dash-sub { margin: 5px 0 0; font-size: 13.5px; color: var(--gray-600); max-width: 70ch; }
.evt-card { display: flex; width: 100%; text-align: left; cursor: pointer; background: var(--paper); border: 1px solid var(--gray-200);
  border-radius: var(--radius-md); padding: 0; margin-bottom: 11px; overflow: hidden; font: inherit; box-shadow: var(--shadow-1); transition: transform .14s, box-shadow .14s, border-color .14s; }
.evt-card:hover { transform: translateY(-1px); border-color: var(--blue-200); box-shadow: var(--shadow-2); }
.evt-card-led { width: 5px; flex: none; background: var(--gray-300); }
.led-over .evt-card-led { background: var(--bad); }
.led-urgent .evt-card-led { background: var(--warn); }
.led-ok .evt-card-led { background: var(--blue-500); }
.led-filed .evt-card-led { background: var(--ok); }
.evt-card-main { padding: 15px 18px 16px; flex: 1; min-width: 0; }
.evt-card-top { display: flex; align-items: center; gap: 10px; }
.evt-card-title { font-weight: 700; font-size: 15.5px; margin: 9px 0 11px; color: var(--ink); }
.evt-card-clocks { display: flex; gap: 8px; flex-wrap: wrap; }
.clk-mini { display: inline-flex; align-items: baseline; gap: 7px; font-family: var(--mono); font-size: 12px; padding: 4px 10px;
  border-radius: 6px; background: var(--gray-100); border: 1px solid var(--gray-200); color: var(--gray-600); font-variant-numeric: tabular-nums; }
.clk-mini i { font-style: normal; font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); }
.clk-mini.over { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.clk-mini.urgent { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.clk-mini.ok { background: var(--blue-050); color: var(--blue-700); border-color: var(--blue-100); }
.clk-mini.filed { color: var(--ok); background: var(--ok-bg); border-color: transparent; }

/* triage */
.panel { background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 22px 24px; box-shadow: var(--shadow-1); }
.panel-head { display: flex; align-items: center; justify-content: space-between; }
.panel-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 21px; }
.triage-lede { font-size: 13.5px; color: var(--gray-600); margin: 7px 0 18px; }
.q-card { border: 1px solid var(--gray-200); border-left: 3px solid var(--blue-500); border-radius: var(--radius-md); padding: 20px; background: var(--blue-050); }
.q-card h3 { margin: 0 0 7px; font-family: var(--display); font-size: 18px; }
.q-help { font-size: 13px; color: var(--gray-700); line-height: 1.6; margin: 0 0 18px; }
.q-opts { display: flex; flex-direction: column; gap: 9px; }
.q-opt { text-align: left; font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; padding: 13px 16px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--gray-300); border-radius: var(--radius-sm); transition: border-color .12s, transform .1s, box-shadow .12s; }
.q-opt:hover { border-color: var(--blue-500); transform: translateX(3px); box-shadow: 0 4px 12px rgba(31,93,158,0.1); }
.triage-path { margin-top: 18px; }
.tp-row { display: flex; justify-content: space-between; gap: 16px; font-size: 12.5px; padding: 7px 0; border-bottom: 1px dashed var(--gray-200); }
.tp-row span { color: var(--gray-600); } .tp-row b { text-align: right; }
.verdict { border-radius: var(--radius-md); padding: 20px; margin: 16px 0; border: 1px solid var(--gray-200); border-left-width: 3px; }
.verdict.tone-bad { background: var(--bad-bg); border-left-color: var(--bad); }
.verdict.tone-ok { background: var(--ok-bg); border-left-color: var(--ok); }
.verdict.tone-warn { background: var(--warn-bg); border-left-color: var(--warn); }
.verdict h3 { margin: 11px 0 7px; font-family: var(--display); font-size: 19px; }
.verdict p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--gray-700); }
.panel-actions { display: flex; gap: 11px; margin-top: 20px; flex-wrap: wrap; }
.disclaimer { font-family: var(--mono); font-size: 10.5px; color: var(--gray-500); line-height: 1.6; margin: 16px 0 0; }

/* detail */
.detail .back { margin-bottom: 16px; }
.detail-head h2 { margin: 9px 0 7px; font-family: var(--display); font-weight: 800; font-size: 23px; }
.detail-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.detail-sum { font-size: 13.5px; color: var(--gray-600); line-height: 1.6; margin: 0; max-width: 80ch; }
.route-note { margin: 16px 0; font-family: var(--mono); font-size: 12px; color: var(--gray-700); background: var(--blue-050);
  border: 1px solid var(--blue-100); border-radius: var(--radius-sm); padding: 11px 15px; }
.route-note b { color: var(--blue-700); }

/* clock row — light, big tabular countdowns */
.clock-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.clk { cursor: pointer; background: var(--paper); border: 1px solid var(--gray-200); border-top: 3px solid var(--gray-300);
  border-radius: var(--radius-md); padding: 16px 18px; box-shadow: var(--shadow-1); transition: box-shadow .14s; }
.clk.sel { box-shadow: 0 0 0 2px var(--blue-400) inset, var(--shadow-1); }
.clk.over { border-top-color: var(--bad); } .clk.urgent { border-top-color: var(--warn); }
.clk.ok { border-top-color: var(--blue-500); } .clk.filed { border-top-color: var(--ok); opacity: 0.8; }
.clk-cap { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray-500); }
.clk-name { font-family: var(--display); font-weight: 700; font-size: 14px; margin: 4px 0 10px; color: var(--gray-700); }
.clk-time { font-family: var(--display); font-weight: 800; font-size: 27px; font-variant-numeric: tabular-nums; color: var(--ink); line-height: 1; }
.clk.over .clk-time { color: var(--bad); } .clk.urgent .clk-time { color: var(--warn); animation: pulse 1.6s ease-in-out infinite; }
.clk.ok .clk-time { color: var(--blue-700); }
.clk-dl { font-family: var(--mono); font-size: 11px; color: var(--gray-500); margin-top: 5px; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.6; } }

/* drafts */
.draft { margin-top: 16px; background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 18px 20px; box-shadow: var(--shadow-1); }
.draft-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.draft-head h3 { margin: 0; font-family: var(--display); font-size: 17px; }
.draft-req { font-family: var(--mono); font-size: 11px; color: var(--gray-500); }
.draft-btns { display: flex; gap: 9px; }
.draft-body { margin: 13px 0 0; padding: 16px; background: #0f1826; border: 1px solid var(--ch-edge); border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12px; line-height: 1.7; color: #cdd9e6; white-space: pre-wrap; word-break: break-word; }
.draft-rcpt { margin-top: 11px; font-family: var(--mono); font-size: 12px; color: var(--ok); background: var(--ok-bg);
  border: 1px solid #bfe6cf; border-radius: var(--radius-sm); padding: 9px 13px; }
.draft-rcpt b { color: var(--ok); }

/* managed-filing modal */
/* above the demo watermark (z-index 9000) — a modal must not sit under it */
.mf-scrim { position: fixed; inset: 0; z-index: 9100; background: rgba(10,18,29,0.55); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 44px 18px; overflow: auto; }
.mf { width: 100%; max-width: 660px; background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-md); box-shadow: var(--shadow-2); padding: 24px 26px; }
.mf-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.mf-head h2 { margin: 5px 0 0; font-family: var(--display); font-weight: 800; font-size: 20px; }
.mf-route { display: flex; flex-direction: column; gap: 5px; margin: 16px 0; padding: 13px 15px; background: var(--blue-050);
  border: 1px solid var(--blue-100); border-radius: var(--radius-sm); font-size: 12.5px; color: var(--gray-700); }
.mf-route b { color: var(--blue-700); font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; margin-right: 8px; }
.mf-mandate { font-size: 13px; color: var(--gray-700); line-height: 1.6; }
.mf-mandate p { margin: 0 0 7px; } .mf-resp { color: var(--gray-500); font-size: 12.5px; }
.mf-report { max-height: 230px; overflow: auto; margin-top: 4px; }
.mf-signoff { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0 4px; padding: 14px 16px; border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; line-height: 1.55; color: var(--gray-700); transition: border-color .12s, background .12s; }
.mf-signoff.on { border-color: var(--blue-500); background: var(--blue-050); }
.mf-signoff input { margin-top: 3px; width: 17px; height: 17px; flex: none; accent-color: var(--blue-600); }
.mf-actions { display: flex; justify-content: flex-end; gap: 11px; margin-top: 18px; }
.receipt { margin: 16px 0 4px; border: 1px solid #bfe6cf; border-radius: var(--radius-sm); overflow: hidden; }
.rcpt-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 15px; font-size: 13px; border-bottom: 1px solid var(--gray-200); background: var(--ok-bg); }
.rcpt-row:last-child { border-bottom: none; }
.rcpt-row span { color: var(--gray-600); } .rcpt-row b { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink); }

/* reporting advisory */
.adv .back { margin-bottom: 14px; }
.adv-crumb { font-family: var(--mono); font-size: 11.5px; color: var(--gray-500); margin-bottom: 12px; }
.adv-band { background: linear-gradient(135deg, var(--blue-900), var(--blue-600)); color: #fff; border-radius: var(--radius-md); padding: 24px 26px; position: relative; overflow: hidden; }
.adv-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--blue-400); }
.adv-kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--blue-200); }
.adv-band h1 { margin: 9px 0 9px; font-family: var(--display); font-weight: 800; font-size: 28px; line-height: 1.12; }
.adv-meta { font-family: var(--mono); font-size: 11.5px; color: rgba(255,255,255,0.82); }
.adv-alert { margin: 18px 0 8px; padding: 15px 19px; background: var(--paper); border: 1px solid var(--gray-200); border-left: 3px solid var(--blue-500);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: 13.5px; line-height: 1.65; color: var(--gray-700); box-shadow: var(--shadow-1); }
.adv-alert b { color: var(--ink); }
.adv-sec { margin-top: 28px; }
.adv-sec-h { display: flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 800; font-size: 18px; margin: 0 0 14px; padding-bottom: 9px; border-bottom: 2px solid var(--gray-200); }
.adv-sec-h span { flex: none; width: 27px; height: 27px; display: grid; place-items: center; border-radius: 6px; background: var(--blue-600); color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.adv-sec-h.danger span { background: var(--bad); }
.adv-p { font-size: 13.5px; line-height: 1.65; color: var(--gray-700); margin: 0; }
.adv-demo { font-family: var(--mono); font-size: 11px; color: var(--gray-500); margin: 11px 0 0; }
.adv-dl { display: grid; grid-template-columns: 1fr; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.adv-dt { background: var(--blue-050); padding: 11px 15px 4px; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.adv-dt em { font-style: normal; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--blue-700); margin-left: 7px; }
.adv-dd { padding: 0 15px 13px; font-size: 13px; line-height: 1.6; color: var(--gray-700); border-bottom: 1px solid var(--gray-200); background: var(--blue-050); }
.adv-dd:last-child { border-bottom: none; }
.adv-penalty { padding: 15px 19px; background: var(--bad-bg); border: 1px solid #f0ccc5; border-left: 3px solid var(--bad); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--bad); font-family: var(--mono); font-weight: 700; font-size: 14px; }

/* advisory flowchart */
.flow { display: flex; flex-direction: column; gap: 0; }
.flow-node { display: flex; gap: 15px; align-items: flex-start; background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 17px; box-shadow: var(--shadow-1); }
.flow-node.fn-deadline { border-left: 4px solid var(--blue-500); }
.flow-node.fn-decision { border-left: 4px solid var(--warn); background: var(--warn-bg); }
.flow-node.fn-event { border-left: 4px solid var(--gray-400); }
.fn-cap { flex: none; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 8px; background: var(--blue-600); color: #fff; font-family: var(--mono); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.fn-decision .fn-cap { background: var(--warn); } .fn-event .fn-cap { background: var(--gray-500); }
.fn-body { flex: 1; min-width: 0; }
.fn-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fn-top b { font-family: var(--display); font-size: 15px; }
.fn-cite { font-family: var(--mono); font-size: 10px; font-weight: 700; color: var(--blue-700); background: var(--blue-050); padding: 2px 7px; border-radius: 4px; }
.flow-node p { margin: 5px 0 0; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.flow-arrow { width: 2px; height: 20px; background: var(--gray-300); margin: 0 0 0 40px; }
.flow-split { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 12px; margin: 11px 0; }
.flow-offramp { display: flex; gap: 12px; align-items: flex-start; background: var(--ok-bg); border: 1px dashed #9fd9ba; border-radius: var(--radius-md); padding: 13px 15px; }
.fo-tag { flex: none; font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--ok); background: #d3eede; border-radius: 5px; padding: 4px 9px; }
.fo-body b { font-family: var(--display); font-size: 13.5px; }
.fo-body p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.55; color: var(--gray-600); }
.flow-yes { display: flex; align-items: center; }
.fy-tag { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--blue-700); background: var(--blue-050); border: 1px solid var(--blue-100); border-radius: var(--radius-sm); padding: 11px 13px; }
.flow-sink { margin-top: 17px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.fs-main, .fs-side { font-size: 12.5px; line-height: 1.6; padding: 13px 15px; border-radius: var(--radius-sm); }
.fs-main { background: linear-gradient(135deg, var(--blue-600), var(--blue-800)); color: #fff; }
.fs-main .fn-cite { background: rgba(255,255,255,0.2); color: #fff; }
.fs-side { background: var(--blue-050); color: var(--gray-700); border: 1px solid var(--blue-100); }

/* explainer diagrams — "what starts the clock" gate */
.gate-src { background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-1); }
.gate-src b { font-family: var(--display); font-size: 15px; }
.gate-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.gate-chips span { font-family: var(--mono); font-size: 10.5px; color: var(--gray-600); background: var(--gray-100); border: 1px solid var(--gray-200); border-radius: 999px; padding: 3px 10px; }
.gate-q { background: var(--warn-bg); border: 1px solid #e7d49a; border-left: 4px solid var(--warn); border-radius: var(--radius-sm); padding: 13px 16px; font-family: var(--display); font-weight: 700; font-size: 15px; color: var(--ink); }
.gate-q i { font-style: normal; font-family: var(--sans); font-weight: 400; font-size: 12.5px; color: var(--gray-600); display: block; margin-top: 3px; }
.gate-split { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 12px 0; }
.gate-no, .gate-yes { border-radius: var(--radius-md); padding: 15px 16px; border: 1px solid var(--gray-200); }
.gate-no { background: var(--ok-bg); border-color: #bfe6cf; }
.gate-yes { background: var(--blue-050); border-color: var(--blue-100); }
.gate-no p, .gate-yes p { margin: 8px 0 0; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.gate-tag { font-family: var(--mono); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.gate-tag.no { color: var(--ok); } .gate-tag.yes { color: var(--blue-700); }
.gate-myth { text-align: center; font-family: var(--display); font-weight: 700; font-size: 14.5px; color: var(--ink); background: var(--gray-100); border: 1px dashed var(--gray-300); border-radius: var(--radius-sm); padding: 12px; }
.gate-myth b { color: var(--bad); }
.gate-example { margin-top: 14px; background: var(--paper); border: 1px solid var(--blue-100); border-left: 4px solid var(--blue-500); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 14px 16px; box-shadow: var(--shadow-1); }
.ge-tag { font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--blue-700); }
.gate-example p { margin: 6px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--gray-700); }

/* component / SBOM duties + multi-report fan-out */
.comp-duties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.duty { border-radius: var(--radius-md); padding: 16px; border: 1px solid var(--gray-200); background: var(--paper); box-shadow: var(--shadow-1); }
.duty.always { border-top: 3px solid var(--gray-500); }
.duty.exploited { border-top: 3px solid var(--bad); }
.duty-cite { font-family: var(--mono); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-500); }
.duty.exploited .duty-cite { color: var(--bad); }
.duty b { display: block; font-family: var(--display); font-size: 15px; margin: 6px 0; }
.duty p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.comp-h { font-family: var(--display); font-weight: 800; font-size: 16px; margin: 26px 0 12px; }
.fan-src { background: var(--bad-bg); border: 1px solid #f0ccc5; border-radius: var(--radius-md); padding: 13px 16px; font-size: 14px; color: var(--ink); }
.fan-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.fan-node { background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 12px 14px; box-shadow: var(--shadow-1); }
.fan-node.you { border-color: var(--blue-200); background: var(--blue-050); }
.fan-node b { display: block; font-family: var(--display); font-size: 13.5px; }
.fan-node span { font-family: var(--mono); font-size: 10.5px; color: var(--gray-600); display: block; margin-top: 4px; }
.fan-sink { margin-top: 11px; background: linear-gradient(135deg, var(--blue-600), var(--blue-800)); color: #fff; border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13px; }
.comp-note { margin-top: 14px; } .comp-note b { color: var(--ink); }

/* submission log */
.log .back { margin-bottom: 16px; }
.log-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.log-stats { display: flex; gap: 10px; flex: none; }
.log-stats div { text-align: center; background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-sm); padding: 9px 16px; min-width: 70px; box-shadow: var(--shadow-1); }
.log-stats b { display: block; font-family: var(--display); font-weight: 800; font-size: 24px; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.log-stats span { font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); }
.log-empty { padding: 34px; text-align: center; color: var(--gray-500); font-size: 13.5px; background: var(--paper); border: 1px dashed var(--gray-300); border-radius: var(--radius-md); }
.log-table { background: var(--paper); border: 1px solid var(--gray-200); border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-1); }
.log-tr { display: grid; grid-template-columns: 1.4fr 1.5fr 1.3fr 0.9fr 1.7fr; gap: 12px; width: 100%; align-items: center; text-align: left;
  font: inherit; background: none; border: none; cursor: pointer; padding: 12px 17px; border-bottom: 1px solid var(--gray-200); transition: background .12s; }
.log-tr:last-child { border-bottom: none; }
button.log-tr:hover { background: var(--blue-050); }
.log-th { background: var(--gray-100); cursor: default; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-500); }
.log-when { font-family: var(--mono); font-size: 12px; color: var(--gray-700); font-variant-numeric: tabular-nums; }
.log-when i { font-style: normal; font-size: 10px; color: var(--gray-400); }
.log-evt { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.log-stage { font-size: 13px; font-weight: 600; color: var(--ink); }
.log-stage i { display: block; font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--gray-500); }
.log-ref { display: flex; flex-direction: column; gap: 2px; }
.log-ref b { font-family: var(--mono); font-size: 12px; color: var(--blue-700); }
.log-ref i { font-style: normal; font-size: 10px; color: var(--gray-500); }

/* ============================================================================
   Start here · product profile · empty state · fix gate
   Added with the own-product mode: the app now has a first-run surface for
   someone who has never heard of the CRA, and a profile they can fill in.
   ========================================================================== */

/* text-only action, used inline in prose */
.btn-link { appearance: none; background: none; border: none; cursor: pointer; padding: 0; margin-left: 6px;
  font: inherit; font-weight: 700; color: var(--blue-700); border-bottom: 1px solid var(--blue-200); }
.btn-link:hover { border-bottom-color: var(--blue-500); }

/* ---- sidebar product card (now a control) ---- */
.sb-prod { display: block; width: 100%; text-align: left; padding: 8px 16px 12px; background: none; border: none;
  border-bottom: 1px solid var(--ch-edge); border-left: 2px solid transparent; cursor: pointer; font: inherit; }
.sb-prod:hover { background: var(--ch-hover); border-left-color: var(--blue-400); }
.sb-prod em { display: inline-block; margin-top: 6px; font-style: normal; font-family: var(--mono); font-size: 8.5px;
  font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ch-faint);
  border: 1px solid #2a3b50; border-radius: 3px; padding: 2px 6px; }
.sb-prod.is-example em { color: #6b5200; background: #ffd617; border-color: #e0ad00; }
.tree-none { padding: 4px 16px 6px; font-family: var(--mono); font-size: 10px; color: var(--ch-faint); }
.sb-reset { display: block; width: 100%; margin-bottom: 12px; padding: 8px 10px; cursor: pointer;
  background: rgba(255,255,255,0.05); border: 1px solid #2a3b50; border-radius: 5px;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.06em; color: var(--ch-ink); text-align: left; }
.sb-reset:hover { background: var(--ch-activebg); border-color: var(--blue-400); }

/* the app title bar is now a link home */
.tb-brand { text-decoration: none; }

/* ---- dashboard empty state ---- */
.dash-empty { margin-top: 8px; padding: 30px 32px; background: var(--paper); border: 1px solid var(--line);
  border-left: 3px solid var(--blue-500); border-radius: var(--radius-lg); box-shadow: var(--shadow-1); }
.de-kick { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gray-500); }
.dash-empty h3 { margin: 10px 0 0; font-family: var(--display); font-size: 21px; font-weight: 800; color: var(--ink); }
.dash-empty > p { margin: 10px 0 0; max-width: 68ch; font-size: 14px; line-height: 1.65; color: var(--gray-700); }
.de-do { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.de-step { padding: 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); }
.de-step b { display: block; font-family: var(--display); font-size: 14px; color: var(--ink); }
.de-step p { margin: 7px 0 13px; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.de-step i { font-style: italic; }
.de-note { margin: 18px 0 0; font-size: 13px; color: var(--gray-700); }

/* ---- final-report gate (vulnerability track) ---- */
.fix-gate { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: var(--gap-section) 0 0;
  padding: 16px 20px; background: var(--judge-bg); border: 1px solid #e6d5ac; border-radius: var(--radius-md); }
.fix-gate b { font-size: 13.5px; color: var(--judge); }
.fix-gate p { margin: 6px 0 0; max-width: 78ch; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.fix-gate button { flex: none; }
.fix-gate.done { background: var(--ok-bg); border-color: #bfe0cc; align-items: flex-start; }
.fix-gate.done b { color: var(--ok); }
.fg-tick { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 12px; font-weight: 700; }

/* ============================ start here =============================== */
.guide { max-width: 82ch; }
.g-hero { padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.g-kick { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--blue-700); display: inline-flex; align-items: center; gap: 9px; }
.g-kick::before { content: ""; width: 18px; height: 2px; background: var(--blue-500); }
.guide h1 { margin: 14px 0 0; font-family: var(--display); font-size: clamp(27px, 3.4vw, 38px); font-weight: 800;
  line-height: 1.12; letter-spacing: -0.02em; color: var(--ink); text-wrap: balance; }
.g-lede { margin: 16px 0 0; font-size: 16px; line-height: 1.65; color: var(--gray-700); max-width: 66ch; }
.g-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.g-sec { margin-top: 38px; }
.g-h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-family: var(--display); font-size: 19px;
  font-weight: 800; color: var(--ink); }
.g-h2 span { flex: none; width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%;
  background: var(--blue-700); color: #fff; font-family: var(--mono); font-size: 11.5px; font-weight: 700; }
.g-p { margin: 0 0 12px; font-size: 14.5px; line-height: 1.7; color: var(--gray-800); max-width: 72ch; }
.g-note { margin: 14px 0 0; font-size: 13px; line-height: 1.6; color: var(--gray-600); font-style: italic; }

.g-faq { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.g-qa { padding: 16px 20px; background: var(--paper); }
.g-q { display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--display); font-size: 14.5px; font-weight: 700; color: var(--ink); }
.g-qa p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.65; color: var(--gray-700); }

.g-split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.g-branch { padding: 16px 18px; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--paper); border-top-width: 3px; }
.g-branch b { display: block; font-family: var(--display); font-size: 13.5px; }
.g-branch p { margin: 7px 0 0; font-size: 13px; line-height: 1.6; color: var(--gray-700); }
.g-branch.no { border-top-color: var(--ok); } .g-branch.no b { color: var(--ok); }
.g-branch.yes { border-top-color: var(--bad); } .g-branch.yes b { color: var(--bad); }

.g-helps { display: grid; gap: 14px; }
.g-help { display: flex; gap: 16px; padding: 18px 20px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md); }
.g-help-n { flex: none; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--blue-400); padding-top: 2px; }
.g-help b { display: block; font-family: var(--display); font-size: 15px; color: var(--ink); }
.g-help p { margin: 7px 0 10px; font-size: 13.5px; line-height: 1.65; color: var(--gray-700); }

.g-story { padding: 20px 22px; background: var(--blue-050); border: 1px solid var(--blue-100); border-radius: var(--radius-md); }
.g-story-tag { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-700); }
.g-story p { margin: 10px 0 0; font-size: 14px; line-height: 1.7; color: var(--gray-800); }
.g-trigger { border-left: 3px solid var(--bad); padding-left: 14px; }
.g-steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 2px; }
.g-steps li { display: flex; gap: 14px; padding: 13px 4px; border-bottom: 1px solid var(--line); }
.g-step-n { flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gray-100); color: var(--gray-600); font-family: var(--mono); font-size: 11px; font-weight: 700; }
.g-steps b { font-family: var(--display); font-size: 14px; color: var(--ink); }
.g-steps p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--gray-700); }

.g-limits { margin: 0; padding: 0 0 0 20px; display: grid; gap: 8px; }
.g-limits li { font-size: 13.5px; line-height: 1.6; color: var(--gray-700); }

/* ============================ product profile =========================== */
.setup { max-width: 78ch; }
/* explicit amber: 2472.css repurposes the gold tokens to Malkan blue */
.setup-switch { margin-top: 6px; padding: 16px 20px; background: #fff8e6; border: 1px solid #ffe08a; border-radius: var(--radius-md); }
.setup-switch b { font-size: 13.5px; color: #6b5200; }
.setup-switch p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--gray-700); }

.setup-form { margin-top: 22px; display: grid; gap: 20px; }
.sf-row { display: block; }
.sf-label { display: flex; align-items: baseline; gap: 9px; font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--ink); }
.sf-label i { font-style: normal; font-family: var(--mono); font-size: 9px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--bad); }
.sf-hint { display: block; margin: 4px 0 9px; font-size: 12.5px; line-height: 1.55; color: var(--gray-600); max-width: 74ch; }
.setup-form input[type=text], .setup-form select {
  width: 100%; max-width: 520px; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--paper); border: 1px solid var(--gray-300); border-radius: var(--radius-sm);
}
.setup-form input:focus, .setup-form select:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-050); }

.ms-grid { display: flex; flex-wrap: wrap; gap: 6px; max-width: 520px; }
.ms-chip { appearance: none; cursor: pointer; padding: 6px 10px; font-family: var(--mono); font-size: 11px; font-weight: 700;
  color: var(--gray-600); background: var(--paper); border: 1px solid var(--gray-300); border-radius: var(--radius-sm); }
.ms-chip:hover { border-color: var(--blue-400); color: var(--blue-700); }
.ms-chip.on { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }

.sf-route { padding: 16px 18px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); }
.sf-route p { margin: 7px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--gray-800); }
.sf-route-note { display: block; margin-top: 9px; font-family: var(--mono); font-size: 10.5px; line-height: 1.6; color: var(--gray-500); }
.sf-actions { display: flex; align-items: center; gap: 14px; }
.sf-saved { font-family: var(--mono); font-size: 11.5px; font-weight: 700; color: var(--ok); }

@media (max-width: 820px) {
  .ide-activitybar { display: none; }
  .clock-row { grid-template-columns: 1fr; } .flow-split, .flow-sink { grid-template-columns: 1fr; }
  .gate-split, .comp-duties, .fan-rows { grid-template-columns: 1fr; }
  .draft-btns { flex-direction: column; } .log-tr { grid-template-columns: 1fr 1fr; gap: 6px; }
  .log-head, .dash-bar { flex-direction: column; align-items: flex-start; }
  .de-do, .g-split { grid-template-columns: 1fr; }
  .fix-gate { flex-direction: column; align-items: flex-start; }
}
