:root {
  --bg: #f4f6fb; --surface: #fff; --ink: #0b1324; --ink2: #27324a; --muted: #5d6b82; --faint: #8b97ab; --line: #e6eaf2;
  --side: #0b1220; --side2: #131c2e; --side-ink: #a9b4c9;
  --accent: #6366f1; --accent-ink: #4338ca; --accent-bg: #eef0ff;
  --ai: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #06b6d4 100%);
  --red: #e11d48; --red-bg: #fff1f3; --amber: #b45309; --amber-bg: #fff7e6; --green: #047857; --green-bg: #e9f9f1;
  --slate-bg: #eef1f6; --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 14.5px/1.55 "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 650; margin: 0; letter-spacing: -.015em; }
h2 { font-size: 16px; font-weight: 650; margin: 0 0 14px; letter-spacing: -.005em; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; } .xs { font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.up { color: var(--green); } .down { color: var(--red); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: var(--side-w, 264px) 1fr; min-height: 100vh; }
.side { background: var(--side); color: var(--side-ink); padding: 22px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; }
.logo { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 650; font-size: 16px; padding: 0 8px; }
.logo .mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ai); display: grid; place-items: center; font-size: 15px; }
.logo small { display: block; color: var(--side-ink); font-weight: 400; font-size: 11.5px; }
.nav a { display: flex; align-items: center; gap: 10px; color: var(--side-ink); padding: 9px 12px; border-radius: 10px; font-size: 14px; }
.nav a:hover { background: var(--side2); color: #fff; text-decoration: none; }
.nav a.on { background: rgba(99, 102, 241, .18); color: #fff; }
.nav svg { width: 17px; height: 17px; opacity: .9; }
.side-sec { border-top: 1px solid #1d2840; padding-top: 16px; }
.side-sec h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6f7c96; margin: 0 8px 8px; font-weight: 600; display: flex; justify-content: space-between; }
.side-sec h4 a { color: #8fa0c4; text-transform: none; letter-spacing: 0; font-weight: 500; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; font-size: 13.5px; color: #cdd5e4; }
.check:hover { background: var(--side2); }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.check .sub { color: #6f7c96; font-size: 11.5px; display: block; }
.src-line { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 13px; color: #cdd5e4; }
.src-line form { margin-left: auto; }
.toggle { width: 30px; height: 17px; border-radius: 999px; border: 0; background: #2a3550; position: relative; cursor: pointer; padding: 0; }
.toggle::after { content: ""; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #8b97ab; transition: .15s; }
.toggle.on { background: var(--accent); } .toggle.on::after { left: 15px; background: #fff; }
.ai-chip { margin-top: auto; background: var(--side2); border-radius: 12px; padding: 12px; font-size: 12px; }
.ai-chip b { color: #fff; font-weight: 600; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #64748b; flex: none; }
.dot.ok { background: #10b981; } .dot.error { background: var(--red); } .dot.off { background: #475569; } .dot.warn { background: #f59e0b; }

.main { min-width: 0; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 36px 8px; flex-wrap: wrap; }
.top .crumb { font-size: 12.5px; color: var(--faint); margin-bottom: 4px; }
.content { padding: 14px 36px 64px; }
.flash { background: var(--accent-bg); color: var(--accent-ink); padding: 10px 16px; border-radius: 12px; margin: 0 36px 4px; font-size: 13.5px; }

/* ---------- building blocks ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.card + .card, .stack > * + * { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.cols-main { grid-template-columns: minmax(0, 1.85fr) minmax(300px, 1fr); align-items: start; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1320px) { .cols-main { grid-template-columns: minmax(0, 1fr); } }
.stack, .grid > * { min-width: 0; }
.grid > .card + .card { margin-top: 0; }
.card:has(> table), .card:has(> details), .card:has(> div > table) { overflow-x: auto; }
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { min-width: 0; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 14px; padding: 10px 16px; overflow: visible; }
  .side .logo small, .side .side-sec, .side .ai-chip, .side .ws, .side details.nav-more { display: none; }
  .side .nav { display: flex; flex-direction: row; gap: 2px; margin: 0; overflow-x: auto; min-width: 0; flex: 1; scrollbar-width: none; }
  .side .nav a { padding: 7px 10px; white-space: nowrap; }
  .side .logo > span:last-child { display: none; }
  .top { padding: 18px 18px 6px; } .content { padding: 12px 18px 48px; }
  .g2, .g3 { grid-template-columns: 1fr; }
}
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
@media (max-width: 1150px) { .kpis { grid-template-columns: repeat(2, 1fr); } }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 26px; font-weight: 650; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--faint); }
.kpi.alert .v { color: var(--red); } .kpi.warn .v { color: var(--amber); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.APPROVED { background: var(--green-bg); color: var(--green); }
.pill.NOT_APPROVED { background: var(--red-bg); color: var(--red); }
.pill.REVIEW { background: var(--amber-bg); color: var(--amber); }
.pill.INFO, .pill.NONE, .pill.NODATA { background: var(--slate-bg); color: var(--muted); }
.pill.big { font-size: 14px; padding: 7px 14px; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--slate-bg); color: var(--muted); font-size: 11.5px; font-weight: 500; }
.btn { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 13.5px; font-weight: 550; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; }
.btn:hover { text-decoration: none; opacity: .92; }
.btn.ghost { background: #fff; color: var(--ink2); border-color: var(--line); }
.btn.ghost:hover { border-color: #cbd3e1; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn.danger { background: #fff; color: var(--red); border-color: #f6c9d2; }
select, input[type=text], input[type=search], input[type=date], input[type=file], textarea {
  font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); width: 100%; }
select:focus, input:focus, textarea:focus { outline: 2px solid rgba(99, 102, 241, .25); border-color: var(--accent); }
label.f { display: block; font-size: 12.5px; color: var(--muted); margin: 0 0 6px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline { display: inline; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 550; font-size: 12px; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid #f0f2f7; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.click { cursor: pointer; } tr.click:hover td { background: #fafbff; }
table.compact td { padding: 8px 10px; font-size: 13.5px; white-space: nowrap; }
td.changed { background: #fff6dd; font-weight: 600; }
.tbl-wrap { max-height: 620px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.tbl-wrap thead th { position: sticky; top: 0; background: #f8f9fc; z-index: 1; }
table.sortable th[data-sort] { cursor: pointer; user-select: none; }
table.sortable th[data-sort]:hover { color: var(--ink); }
table.sortable th[data-dir="asc"]::after { content: " ▲"; font-size: 9px; }
table.sortable th[data-dir="desc"]::after { content: " ▼"; font-size: 9px; }
tr.mark-row td { background: #f5f6ff; }
table.matrix { border-collapse: separate; border-spacing: 4px; width: 100%; }
table.matrix th { font-size: 11.5px; white-space: normal; vertical-align: bottom; border: 0; padding: 4px 6px; min-width: 96px; }
table.matrix td { padding: 0; border: 0; }
table.matrix td.mx-name { padding: 6px 8px; font-weight: 600; font-size: 13px; white-space: nowrap; }
.mx { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 9px; font-size: 12px; text-decoration: none !important; color: var(--ink2); background: var(--slate-bg); min-height: 44px; }
.mx-state { font-weight: 650; }
.mx-text { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.mx.OK { background: #f3faf6; } .mx.OK .mx-state { color: var(--green); }
.mx.NA { background: #f7f8fb; color: var(--faint); }
.mx.APPROVED { background: var(--green-bg); } .mx.APPROVED .mx-state { color: var(--green); }
.mx.REVIEW { background: var(--amber-bg); } .mx.REVIEW .mx-state { color: var(--amber); }
.mx.NOT_APPROVED { background: var(--red-bg); } .mx.NOT_APPROVED .mx-state { color: var(--red); }
.mx:hover { outline: 2px solid rgba(99, 102, 241, .35); }
.case { padding: 14px 0; border-bottom: 1px solid #f0f2f7; } .case:last-child { border-bottom: 0; }
details.card > summary { cursor: pointer; list-style: none; }
pre.md { white-space: pre-wrap; font: 13px/1.6 ui-monospace, Consolas, monospace; color: var(--ink2); margin: 12px 0 0; }
.tbl-wrap tbody tr:hover td { background: #fafbff; }

/* ---------- AI ---------- */
.ai-card { position: relative; border-radius: var(--radius); padding: 1.5px; background: var(--ai); box-shadow: 0 8px 30px rgba(99, 102, 241, .12); }
.ai-card > .in { background: #fff; border-radius: 15px; padding: 22px 24px; }
.ai-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 650; letter-spacing: .04em; text-transform: uppercase; background: var(--ai); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-badge svg { width: 14px; height: 14px; fill: #8b5cf6; }
.ai-head { font-size: 19px; font-weight: 650; letter-spacing: -.01em; margin: 6px 0 10px; line-height: 1.35; }
.ai-text { font-size: 15px; line-height: 1.7; color: var(--ink2); }
.ai-sec { margin-top: 16px; }
.ai-sec .lbl { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.ai-list { margin: 0; padding-left: 18px; color: var(--ink2); } .ai-list li { margin: 3px 0; }
.ai-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--faint); }
.conf { padding: 2px 9px; border-radius: 999px; font-weight: 600; font-size: 11.5px; }
.conf.High { background: var(--green-bg); color: var(--green); } .conf.Medium { background: var(--amber-bg); color: var(--amber); } .conf.Low { background: var(--red-bg); color: var(--red); }
.challenge { margin-top: 14px; padding: 10px 14px; border-radius: 10px; background: var(--amber-bg); color: #7c4a03; font-size: 13.5px; }
.pmq { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: var(--accent-bg); color: var(--accent-ink); font-size: 14px; }
.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f7f8fb 50%, #eef1f6 75%); background-size: 200% 100%; animation: sh 1.2s infinite; border-radius: 8px; height: 13px; margin: 9px 0; }
@keyframes sh { to { background-position: -200% 0; } }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 12.5px; cursor: pointer; color: var(--ink2); }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }

.chat { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.msg { padding: 12px 14px; border-radius: 12px; font-size: 14px; line-height: 1.6; white-space: pre-wrap; }
.msg.user { background: var(--slate-bg); align-self: flex-end; max-width: 85%; }
.msg.assistant { background: #fbfaff; border: 1px solid #ebe8ff; }
.ask-box { display: flex; gap: 8px; margin-top: 12px; }
.ask-box input { flex: 1; }

/* ---------- overview ---------- */
.queue-item { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid #f0f2f7; color: inherit; }
.queue-item:hover { text-decoration: none; background: #fafbff; }
.queue-item:last-child { border-bottom: 0; }
.queue-item .bar { position: static; height: auto; align-self: stretch; border-radius: 4px; background: var(--slate-bg); }
.queue-item .bar.NOT_APPROVED { background: var(--red); } .queue-item .bar.REVIEW { background: #f59e0b; } .queue-item .bar.APPROVED { background: #10b981; }
.qi-title { font-weight: 600; } .qi-title .faint { font-weight: 400; }
.qi-head { color: var(--ink2); margin-top: 2px; }
.qi-comment { color: var(--muted); font-size: 13px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qi-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.qi-change { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
.heat { display: grid; gap: 5px; }
.heat-row { display: grid; grid-template-columns: 120px repeat(var(--n), 1fr); gap: 5px; align-items: center; }
.heat-name { font-size: 12.5px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell { height: 24px; border-radius: 6px; background: var(--slate-bg); display: block; }
.cell.NOT_APPROVED { background: var(--red); } .cell.REVIEW { background: #fbbf24; } .cell.APPROVED { background: #34d399; }
.cell.NODATA { background: transparent; border: 1px dashed var(--line); }
.cell.sel { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat-dates { font-size: 10.5px; color: var(--faint); text-align: center; }
.legend-row { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-top: 12px; flex-wrap: wrap; }
.legend-row i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.health { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f0f2f7; color: inherit; }
.health:last-child { border-bottom: 0; } .health:hover { text-decoration: none; }

/* ---------- investigate ---------- */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink2); font-size: 13.5px; }
.tab:hover { text-decoration: none; border-color: #cbd3e1; }
.tab.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.banner { padding: 11px 16px; border-radius: 12px; font-size: 13.5px; margin-bottom: 16px; display: flex; gap: 10px; align-items: center; }
.banner.warning { background: var(--amber-bg); color: #7c4a03; } .banner.info { background: var(--slate-bg); color: var(--muted); } .banner.error { background: var(--red-bg); color: #9f1239; }
.suggest { text-align: left; }
.suggest .big { margin: 6px 0 12px; }
.rule-comment { font-size: 14px; line-height: 1.65; color: var(--ink2); background: #fafbfd; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; font-size: 13.5px; }
.kv > div:nth-child(odd) { color: var(--muted); } .kv > div:nth-child(even) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
.steps li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.steps li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.steps li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.steps li:last-child::after { display: none; }
.steps .a { font-weight: 650; } .steps .d { color: var(--muted); font-size: 12.5px; }
.issue { padding: 9px 0; border-bottom: 1px solid #f0f2f7; font-size: 13.5px; } .issue:last-child { border-bottom: 0; }
details.cls { border-top: 1px solid #f0f2f7; }
details.cls > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr .6fr; gap: 10px; padding: 11px 4px; font-size: 13.5px; }
details.cls > summary::-webkit-details-marker { display: none; }
details.cls > summary:hover { background: #fafbff; }
details.cls[open] > summary { font-weight: 600; }
.cls-head { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr .6fr; gap: 10px; padding: 0 4px 6px; font-size: 12px; color: var(--muted); }

/* ---------- charts ---------- */
svg.chart { width: 100%; height: 210px; display: block; }
svg.chart .grid { stroke: #eef1f6; stroke-width: 1; }
svg.chart .line { fill: none; stroke: #6366f1; stroke-width: 2.2; stroke-linejoin: round; }
svg.chart .pt { fill: #fff; stroke: #6366f1; stroke-width: 1.6; }
svg.chart .pt.mark { fill: #e11d48; stroke: #fff; stroke-width: 2; }
svg.chart .pt.cmp { fill: #6366f1; }
svg.chart .markline { stroke: #e11d48; stroke-dasharray: 3 3; }
svg.chart .marktext { font-size: 12px; font-weight: 650; fill: #e11d48; }
svg.chart .axis { font-size: 11px; fill: #8b97ab; }
.chart-empty { color: var(--faint); font-size: 13px; padding: 30px 0; text-align: center; }
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: 110px 1fr 110px; gap: 12px; align-items: center; font-size: 13px; }
.bar-label { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { position: relative; height: 18px; }
.bar-axis { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: #d6dce8; }
.bar { position: absolute; top: 0; height: 18px; border-radius: 5px; }
.bar.up { background: linear-gradient(90deg, #34d399, #10b981); } .bar.down { background: linear-gradient(90deg, #fb7185, #e11d48); }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.split { display: flex; height: 12px; border-radius: 6px; overflow: hidden; margin-top: 16px; }
.split span { display: block; height: 100%; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- sources / skills ---------- */
.src-row { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid #f0f2f7; }
.src-row:last-child { border-bottom: 0; }
.src-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.src-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.add-panel summary { list-style: none; cursor: pointer; }
.add-panel summary::-webkit-details-marker { display: none; }
.skill-card { color: inherit; display: block; cursor: pointer; }
.skill-cats-h { margin: 6px 0 10px; }
details.skill-cat { margin: 0 0 12px; padding: 0; }
details.skill-cat > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 10px; row-gap: 2px; align-items: baseline; padding: 14px 18px; }
details.skill-cat > summary::-webkit-details-marker { display: none; }
details.skill-cat > summary::before { content: "▸"; color: var(--faint); grid-row: span 2; }
details.skill-cat[open] > summary::before { content: "▾"; color: var(--ink); }
details.skill-cat > summary > .muted { grid-column: 2; }
details.skill-cat > summary:hover { background: #fafbff; }
.skill-cat-t { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 650; }
details.skill-cat > .grid { padding: 4px 18px 18px; }
.skill-card:hover { text-decoration: none; border-color: #cbd3e1; }
.repo-card { margin-bottom: 18px; }
.fw-asset { --fw: #0e7490; } .fw-market { --fw: #4338ca; } .fw-portfolio { --fw: #047857; }
.fw-trade { --fw: #b45309; } .fw-data { --fw: #be185d; } .fw-governance { --fw: #334155; }
.fw-card, .fw-ex { margin-bottom: 18px; }
.fw-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.fw-tile { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-left: 4px solid var(--fw); border-radius: 12px; color: inherit; background: #fff; }
.fw-tile:hover { text-decoration: none; border-color: #cbd3e1; border-left-color: var(--fw); background: #fafbff; }
.fw-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 650; color: var(--fw); }
.fw-s { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.fw-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.fw-steps li { display: grid; grid-template-columns: 170px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; background: #fafbfd; border-left: 4px solid var(--fw); }
.fw-k { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; color: var(--fw); }
details.skill-cat[class*="fw-"] { border-left: 4px solid var(--fw); }
details.skill-cat[class*="fw-"] .skill-cat-t { color: var(--fw); }
.fw-links { padding: 4px 18px 18px; }
.fw-family { cursor: default; }
.fw-member { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; color: var(--ink); }
.fw-member:hover { text-decoration: none; background: #fafbff; border-color: #cbd3e1; }
@media (max-width: 1100px) { .fw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fw-steps li { grid-template-columns: 1fr; gap: 4px; } }
pre.md { white-space: pre-wrap; font: 14px/1.65 "Segoe UI", system-ui, sans-serif; margin: 0; color: var(--ink2); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }

/* ---------- analysis and market evidence ---------- */
.insights { display: grid; gap: 10px; margin-top: 12px; }
.insight { border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.insight.warn { border-color: #f59e0b; } .insight.ok { border-color: #10b981; } .insight.info { border-color: #94a3b8; }
.ins-title { font-weight: 600; font-size: 13px; }
.ins-text { color: var(--ink2); font-size: 13.5px; margin-top: 2px; }
.ev-note { font-weight: 600; margin: 10px 0; } .ev-note.warn { color: #b45309; }
.ev { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid #f0f2f7; font-size: 13.5px; }
.ev .tag { justify-self: start; } .ev.warn .tag { background: #fef3c7; color: #92400e; } .ev.ok .tag { background: #d1fae5; color: #065f46; }
.msg.assistant > div:first-child { white-space: pre-line; }

/* ---------- compact breach page: collapsible sections ---------- */
details.more > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; color: var(--faint); }
details.more[open] > summary::before { content: "▾"; }
details.more[open] > summary { margin-bottom: 8px; }
.more-title { font-weight: 650; font-size: 15px; }
.more-sub { color: var(--muted); font-size: 13px; }
.warn-text { color: #b45309; }
details.more .sub + .sub { margin-top: 18px; padding-top: 14px; border-top: 1px solid #f0f2f7; }
.chip.xs { font-size: 11.5px; padding: 2px 9px; }
.ev { grid-template-columns: 110px minmax(0, 1fr) auto; align-items: start; }
.ai-more { margin-top: 10px; }
.ai-more > summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* ---------- AI diagnosis ---------- */
.core-issue { font-size: 15px; font-weight: 600; color: var(--ink); margin: 6px 0 4px; }
.diag { display: grid; gap: 6px; }
.diag-row { display: grid; grid-template-columns: 82px minmax(140px, auto) minmax(0, 1fr); gap: 10px; align-items: baseline; font-size: 13.5px; }
.verdict { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; border-radius: 999px; padding: 2px 8px; text-align: center; background: #eef1f6; color: var(--muted); }
.verdict.confirmed { background: #fee2e2; color: #991b1b; } .verdict.likely { background: #fef3c7; color: #92400e; } .verdict.ruled-out { background: #e2e8f0; color: #475569; text-decoration: line-through; }
.owner { margin-top: 8px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.ai-checks { display: grid; gap: 8px; }
.ai-offline { margin-bottom: 10px; padding: 8px 12px; border-radius: 8px; background: #fff4e5; color: #8a4b00; font-size: 13px; }
.ai-check { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 12px; padding: 8px 10px; border-radius: 8px; background: #f7f8fb; font-size: 13.5px; }
.ai-check-q { font-weight: 600; color: var(--ink2); }
.ai-check-a { color: var(--ink); }
@media (max-width: 760px) { .ai-check { grid-template-columns: 1fr; gap: 4px; } }
.tab-group { align-self: center; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); margin: 0 2px 0 10px; }
.tab-group:first-child { margin-left: 0; }
.tab.idle { color: var(--muted); background: #f9fafc; }
.kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #eaeef5; flex-wrap: wrap; }
.seg > a, .seg > button { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 9px; border: 0; background: transparent; color: var(--ink2); font: inherit; font-size: 13.5px; font-weight: 550; cursor: pointer; }
.seg > a:hover { text-decoration: none; background: #f5f7fb; }
.seg > .on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 19, 36, .12); }
.seg.sm > a, .seg.sm > button { padding: 4px 10px; font-size: 12.5px; }
.seg-n { min-width: 20px; padding: 1px 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700; text-align: center; background: var(--slate-bg); color: var(--muted); }
.seg-n.NOT_APPROVED { background: var(--red-bg); color: var(--red); } .seg-n.REVIEW { background: var(--amber-bg); color: var(--amber); }
details.pf { border-bottom: 1px solid #f0f2f7; }
details.pf:last-of-type { border-bottom: 0; }
details.pf > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; }
details.pf > summary::-webkit-details-marker { display: none; }
details.pf > summary .bar { position: static; width: 4px; height: auto; align-self: stretch; border-radius: 4px; background: var(--slate-bg); }
details.pf > summary .bar.NOT_APPROVED { background: var(--red); } details.pf > summary .bar.REVIEW { background: #f59e0b; } details.pf > summary .bar.APPROVED { background: #10b981; }
.pf-name { font-weight: 650; }
.pf-name::before { content: "▸ "; color: var(--faint); font-weight: 400; }
details.pf[open] .pf-name::before { content: "▾ "; }
.pf-counts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.qrow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 12px; padding: 10px 6px 10px 18px; margin: 0 0 6px; border-radius: 10px; color: inherit; }
.qrow .dot { margin-top: 6px; }
.qrow:hover { text-decoration: none; background: #f7f9fd; }
.qrow .qi-change { font-size: 15px; }
[data-queue][data-show="attention"] .qrow.APPROVED, [data-queue][data-show="attention"] .qrow.INFO,
[data-queue][data-show="attention"] details.pf.calm { display: none; }
/* ---------- data quality, lineage, improver ---------- */
.qtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.qtable th { font-size: 11px; color: var(--muted); font-weight: 600; text-align: left; padding: 6px 3px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.qtable th.grp { text-align: center; border-bottom: 2px solid var(--line); }
.qtable td { padding: 6px 3px; border-bottom: 1px solid #f0f2f7; vertical-align: top; }
.qtable td:first-child { min-width: 150px; }
.qtable tr.qdetail td { border-bottom: 1px solid var(--line); padding-top: 0; }
.sc { display: inline-block; min-width: 28px; padding: 1px 4px; border-radius: 6px; font-weight: 650; text-align: center; font-size: 12px; }
.sc.good { background: var(--green-bg); color: var(--green); } .sc.fair { background: var(--amber-bg); color: var(--amber); }
.sc.poor { background: var(--red-bg); color: var(--red); } .sc.na { color: var(--faint); }
.flow { display: flex; gap: 10px; align-items: stretch; flex-wrap: wrap; margin-top: 10px; }
.fnode { flex: 1 1 160px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: #fafbfe; }
.fnode .fl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 4px; }
.farrow { align-self: center; color: var(--faint); font-size: 18px; }
.lf { display: inline-block; width: 18px; text-align: center; font-weight: 700; }
.lf.ok { color: var(--green); } .lf.break { color: var(--red); } .lf.na { color: var(--faint); }
table.lineage td, table.lineage th { white-space: nowrap; }
.lbreak { border-left: 3px solid #f59e0b; background: var(--amber-bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.lbreak.error { border-left-color: var(--red); background: var(--red-bg); }
.lbreak ul { margin: 4px 0; padding-left: 18px; }
pre.diff { background: #0b1324; color: #cbd5e1; border-radius: 10px; padding: 12px 14px; font-size: 12px; overflow-x: auto; line-height: 1.45; }
pre.diff .add { color: #86efac; } pre.diff .del { color: #fca5a5; }
form.fb input[type=text] { width: 100%; }

/* =====================================================================
   v2 design: grouped navigation, health gauges, issue cards, lineage
   pipeline, improvement inbox. Status colours are used only for status.
   ===================================================================== */
:root { --good: #059669; --good-bg: #ecfdf5; --fair: #d97706; --fair-bg: #fffbeb; --poor: #dc2626; --poor-bg: #fef2f2; --na: #94a3b8; }
[hidden] { display: none !important; }
.lede { margin: 6px 0 0; max-width: 760px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.lbl { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.ic { width: 14px; height: 14px; vertical-align: -2px; flex: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn .ic { width: 13px; height: 13px; }

/* navigation */
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-h { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #5b6884; font-weight: 650; margin: 14px 12px 4px; }
.nav-h:first-child { margin-top: 0; }
.nav a { position: relative; }
.nav a.on::before { content: ""; position: absolute; left: -16px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.nbadge { margin-left: auto; min-width: 20px; padding: 1px 7px; border-radius: 999px; background: #f59e0b; color: #1f1300; font-size: 11px; font-weight: 750; text-align: center; }
details.side-sec > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6f7c96; font-weight: 600; padding: 2px 8px 6px; }
details.side-sec > summary::-webkit-details-marker { display: none; }
details.side-sec > summary::after { content: "▸"; margin-left: 6px; color: #5b6884; }
details.side-sec[open] > summary::after { content: "▾"; }
.scope-v { margin-left: auto; text-transform: none; letter-spacing: 0; color: #a9b4c9; font-weight: 500; font-size: 12px; display: inline-flex; align-items: center; }
.scope-all { display: block; font-size: 12px; color: #8fa0c4; padding: 4px 8px; }

/* section headers */
.sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 30px 0 12px; }
.sec-head h2 { margin: 0; font-size: 17px; display: flex; align-items: center; gap: 8px; }
.count-badge { display: inline-block; min-width: 20px; padding: 1px 8px; border-radius: 999px; background: var(--poor-bg); color: var(--poor); font-size: 11.5px; font-weight: 700; text-align: center; }
.count-badge.neutral { background: var(--slate-bg); color: var(--ink2); }
.ok-badge { color: var(--good); }

/* status words and score chips */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 650; white-space: nowrap; background: var(--slate-bg); color: var(--muted); }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.good { background: var(--good-bg); color: var(--good); } .status.fair { background: var(--fair-bg); color: var(--fair); } .status.poor { background: var(--poor-bg); color: var(--poor); }
.sev { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; text-transform: uppercase; letter-spacing: .03em; }
.sev.block { background: var(--poor); color: #fff; } .sev.warn { background: var(--fair-bg); color: var(--fair); }
.sc.good { background: var(--good-bg); color: var(--good); } .sc.fair { background: var(--fair-bg); color: var(--fair); } .sc.poor { background: var(--poor-bg); color: var(--poor); }
.meter { flex: 1; display: block; height: 7px; border-radius: 999px; background: #edf0f5; overflow: hidden; min-width: 50px; }
.meter i { display: block; height: 100%; border-radius: 999px; background: var(--na); }
.meter i.good { background: #10b981; } .meter i.fair { background: #f59e0b; } .meter i.poor { background: #ef4444; }

/* gauge */
svg.gauge { flex: none; }
svg.gauge .g-track { fill: none; stroke: #edf0f5; stroke-width: 9; }
svg.gauge .g-val { fill: none; stroke-width: 9; stroke-linecap: round; stroke: var(--na); transition: stroke-dasharray .6s; }
svg.gauge.good .g-val { stroke: #10b981; } svg.gauge.fair .g-val { stroke: #f59e0b; } svg.gauge.poor .g-val { stroke: #ef4444; }
svg.gauge .g-num { font-size: 23px; font-weight: 700; fill: var(--ink); letter-spacing: -.02em; }
svg.gauge .g-unit { font-size: 9px; fill: var(--faint); }

/* hero cards */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.hero-card { display: flex; gap: 18px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border-top: 3px solid var(--na); }
.hero-card.good { border-top-color: #10b981; } .hero-card.fair { border-top-color: #f59e0b; } .hero-card.poor { border-top-color: #ef4444; }
.hero-body { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.hero-sys { font-size: 16px; font-weight: 650; }
.hero-text { font-size: 13px; color: var(--ink2); }
.mini-dist { display: flex; width: 100%; gap: 4px; margin-top: 2px; flex-wrap: wrap; }
.mini-dist span { font-size: 11px; font-weight: 600; padding: 2px 7px; border-radius: 5px; white-space: nowrap; flex: none !important; }
.mini-dist .good { background: var(--good-bg); color: var(--good); } .mini-dist .fair { background: var(--fair-bg); color: var(--fair); } .mini-dist .poor { background: var(--poor-bg); color: var(--poor); }

/* dimension tiles */
.dim-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.dim-tile { font: inherit; text-align: left; cursor: pointer; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); color: inherit; transition: border-color .15s, box-shadow .15s; }
.dim-tile:hover { border-color: #c7cde0; box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.dim-tile.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.dim-top { display: flex; justify-content: space-between; align-items: center; }
.dim-name { font-weight: 650; font-size: 14px; }
.dim-q { font-size: 12.5px; color: var(--muted); margin: 2px 0 10px; }
.dim-bar { display: grid; grid-template-columns: 58px 1fr 28px; gap: 8px; align-items: center; margin-top: 5px; }
.dim-sys { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dim-v { font-size: 12.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dim-v.good { color: var(--good); } .dim-v.fair { color: var(--fair); } .dim-v.poor { color: var(--poor); } .dim-v.na { color: var(--faint); }

/* issue cards */
.incidents { display: grid; gap: 12px; }
.incident { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid #f59e0b; border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); }
.incident.block { border-left-color: var(--poor); }
.incidents.compact .incident { box-shadow: none; padding: 12px 16px; }
.inc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inc-owner { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--ink2); font-weight: 550; }
h3.inc-title { font-size: 15.5px; font-weight: 650; color: var(--ink); text-transform: none; letter-spacing: -.005em; margin: 8px 0 10px; }
.inc-grid { display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 18px; }
@media (max-width: 1000px) { .inc-grid { grid-template-columns: 1fr; gap: 10px; } }
.inc-foot { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); }
details.how > summary { cursor: pointer; font-size: 12.5px; color: var(--accent-ink); font-weight: 550; list-style: none; padding: 4px 0; }
details.how > summary::-webkit-details-marker { display: none; }
details.how > summary::before { content: "▸ "; } details.how[open] > summary::before { content: "▾ "; }
details.how { margin-top: 8px; }
.inc-foot details.how { margin-top: 0; max-width: 60%; }
.impact { background: #f8fafc; border-radius: 8px; padding: 8px 12px; margin: 8px 0; color: var(--ink2); }
.finding-list { margin: 0 0 4px; padding-left: 18px; color: var(--ink2); }
.finding-list li { margin: 2px 0; }

/* portfolio cards */
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pf-card { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow); color: inherit; border-top: 3px solid var(--na); transition: box-shadow .15s, transform .15s; }
.pf-card:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(16, 24, 40, .1); transform: translateY(-1px); }
.pf-card.good { border-top-color: #10b981; } .pf-card.fair { border-top-color: #f59e0b; } .pf-card.poor { border-top-color: #ef4444; }
.pf-title { font-weight: 650; }
.pf-scores { display: flex; gap: 14px; flex-wrap: wrap; }
.pf-score { display: inline-flex; align-items: center; gap: 6px; }
.pf-score .sc { min-width: 34px; font-size: 13px; padding: 2px 6px; }
.pf-issue { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink2); }
.pf-go { margin-top: auto; font-size: 12.5px; color: var(--accent-ink); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

/* how it works */
.how-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 10px; }
.how-step { display: flex; gap: 10px; align-items: flex-start; }
.how-step .n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-ink); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; }
.how-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; }
.how-strip .how-step { padding: 14px 16px; position: relative; }
.how-strip .how-step + .how-step { border-left: 1px solid var(--line); }
@media (max-width: 1000px) { .how-strip { grid-template-columns: 1fr 1fr; } }

/* portfolio health: check rows */
.dim-sec { margin-top: 18px; }
.dim-sec-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.checks { border-top: 1px solid var(--line); }
details.check-row { border-bottom: 1px solid #f0f2f7; }
details.check-row > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 4px; }
details.check-row > summary::-webkit-details-marker { display: none; }
details.check-row > summary:hover { background: #fafbff; }
.ck-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.check-row.pass .ck-ic { background: var(--good-bg); color: var(--good); }
.check-row.fail .ck-ic { background: var(--fair-bg); color: var(--fair); }
.check-row.fail.block .ck-ic { background: var(--poor-bg); color: var(--poor); }
.ck-main { display: flex; flex-direction: column; min-width: 0; }
.ck-title { font-size: 13.5px; font-weight: 550; }
.check-row.pass .ck-title { color: var(--ink2); font-weight: 450; }
.ck-runs { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.run { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
.run.good { background: var(--good-bg); color: var(--good); } .run.bad { background: var(--poor-bg); color: var(--poor); }
.ck-body { padding: 4px 4px 14px 42px; }

/* lineage */
.legend-inline { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.legend-inline i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 8px; }
.legend-inline i.ok { background: #10b981; } .legend-inline i.bad { background: #ef4444; } .legend-inline i.na { background: #cbd5e1; }
.pipeline { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1.1fr) 28px minmax(0, 1.1fr); align-items: center; margin-top: 16px; }
.pipeline.mini { grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr) 28px minmax(0, 1fr); margin-top: 0; }
@media (max-width: 1100px) { .pipeline, .pipeline.mini { grid-template-columns: 1fr; gap: 8px; } .pedge { height: 16px; } .pedge::after { display: none; } }
.pcol { display: flex; flex-direction: column; gap: 8px; }
.pnode { display: block; border: 1px solid var(--line); border-left: 4px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; background: #fff; color: inherit; }
a.pnode:hover { text-decoration: none; box-shadow: 0 4px 12px rgba(16, 24, 40, .08); }
.pnode.ok { border-left-color: #10b981; } .pnode.bad { border-left-color: #ef4444; background: #fffafa; }
.pn-k { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); font-weight: 650; }
.pn-v { font-weight: 650; font-size: 14px; margin-top: 2px; }
.pn-s { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pedge { position: relative; height: 2px; background: #d6dce8; }
.pedge::after { content: ""; position: absolute; right: -1px; top: -4px; border: 5px solid transparent; border-left: 7px solid #d6dce8; border-right: 0; }
.recon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.recon { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.recon.ok { background: #fbfefd; } .recon.bad { border-color: #fecaca; background: #fffafa; }
.recon-k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.recon-v { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 4px 0 2px; font-variant-numeric: tabular-nums; }
.recon-st { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; color: var(--faint); }
.recon.ok .recon-st { color: var(--good); } .recon.bad .recon-st { color: var(--poor); }
.backing { display: grid; gap: 8px; max-width: 720px; }
.back-row { display: grid; grid-template-columns: 240px 1fr 80px; gap: 12px; align-items: center; }

/* improvements */
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 18px; flex-wrap: wrap; }
.tabbar a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--muted); font-weight: 550; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabbar a:hover { color: var(--ink); text-decoration: none; }
.tabbar a.on { color: var(--ink); border-bottom-color: var(--accent); }
.prop { border-left: 4px solid var(--accent); }
.kind { font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; }
.kind.data { background: var(--accent-bg); color: var(--accent-ink); } .kind.fb { background: #fdf4ff; color: #a21caf; }
.learn { background: #f8f9ff; border: 1px solid #e6e8ff; border-radius: 12px; padding: 12px 14px; margin-bottom: 6px; }
.learn-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1.2fr .8fr; gap: 14px; }
@media (max-width: 1000px) { .learn-grid { grid-template-columns: 1fr 1fr; } }
.wx { list-style: none; margin: 0; padding: 0 0 0 22px; display: flex; flex-direction: column; gap: 14px; border-left: 2px solid var(--line); }
.wx > li { position: relative; margin: 0; }
.wx > li::before { content: ""; position: absolute; left: -31px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--brass, #b08d57); border: 3px solid #fff; }
.wx-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); margin-bottom: 6px; }
.wx h3 { margin: 0 0 4px; }
.wx-fb { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; }
.wx-fb pre.diff { white-space: pre-wrap; }
.prop-form { margin-top: 6px; }
.whatif { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin: 16px 0 10px; padding: 14px 16px; background: #f8f9ff; border: 1px solid #e6e8ff; border-radius: 12px; }
.wi-num .v { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; }
.wi-arrow { color: var(--faint); }
.wi-text { flex: 1; min-width: 260px; }
.improve-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-radius: 12px; background: linear-gradient(90deg, #eef0ff, #f5f3ff); border: 1px solid #e0e3ff; margin-bottom: 18px; font-size: 14px; }

/* overview cards */
.ov-health { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.ov-health .hs { display: flex; align-items: center; gap: 10px; }

/* ---------- simple flow ---------- */
.plist { display: grid; gap: 10px; max-width: 920px; }
.prow { display: grid; grid-template-columns: 4px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 20px 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); color: inherit; overflow: hidden; }
.prow:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(16, 24, 40, .1); }
.prow .bar { position: static; align-self: stretch; height: auto; background: var(--slate-bg); }
.prow .bar.NOT_APPROVED { background: var(--red); } .prow .bar.REVIEW { background: #f59e0b; } .prow .bar.APPROVED { background: #10b981; }
.pr-main { display: flex; flex-direction: column; min-width: 0; }
.pr-name { font-weight: 650; font-size: 16px; }
.pr-sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-aum { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 13.5px; }
.fl-picks { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.fl-pick { font: inherit; font-size: 13.5px; font-weight: 550; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink2); cursor: pointer; }
.fl-pick.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.fl-big { font-size: 22px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; margin: 14px 0 0; color: var(--ink); }
.fl-kpis { display: flex; gap: 34px; flex-wrap: wrap; margin-top: 24px; }
.fl-kv { font-size: 24px; font-weight: 650; font-variant-numeric: tabular-nums; }
@media (max-width: 700px) { .prow { grid-template-columns: 4px 1fr auto; } .pr-aum { display: none; } }

/* flow page: insight, flowchart, drill-down, data checks */
.fl-insight { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--slate-bg); border-radius: var(--radius); padding: 22px 26px; box-shadow: var(--shadow); }
.fl-insight.NOT_APPROVED { border-left-color: var(--red); } .fl-insight.REVIEW { border-left-color: #f59e0b; } .fl-insight.APPROVED { border-left-color: #10b981; }
.fl-insight .fl-big { font-size: 20px; margin-top: 12px; }
.fl-insight .fl-kpis { margin-top: 16px; gap: 28px; }
.fl-insight .fl-kv { font-size: 20px; }
.fl-ai { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fl-ai-text { color: var(--ink2); font-size: 14px; flex: 1; min-width: 240px; }
.fl-cols { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.5fr); gap: 18px; margin-top: 18px; align-items: start; }
@media (max-width: 1150px) { .fl-cols { grid-template-columns: 1fr; } }
.fl-cols > .card + .card { margin-top: 0; }
ol.fc { list-style: none; margin: 4px 0 0; padding: 0; }
ol.fc > li { position: relative; padding-left: 22px; padding-bottom: 14px; }
ol.fc > li::before { content: ""; position: absolute; left: 6px; top: 0; bottom: 0; width: 2px; background: #dfe4ee; }
ol.fc > li:first-child::before { top: 14px; } ol.fc > li:last-child::before { bottom: calc(100% - 14px); }
ol.fc > li::after { content: ""; position: absolute; left: 1px; top: 9px; width: 12px; height: 12px; border-radius: 3px; background: #fff; border: 2px solid #b8c1d3; transform: rotate(45deg); }
ol.fc > li.fc-start::after, ol.fc > li.fc-end::after { transform: none; border-radius: 50%; }
.fc-box { display: block; font-size: 13.5px; color: var(--ink2); }
.fc-start .fc-box { font-weight: 650; color: var(--ink); }
.fc-q details > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.fc-q details > summary::-webkit-details-marker { display: none; }
.fc-q details > summary:hover .fc-box { color: var(--ink); }
.fc-ans { flex: none; font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 6px; background: var(--slate-bg); color: var(--muted); max-width: 45%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-ans.yes { background: var(--accent-bg); color: var(--accent-ink); } .fc-ans.no { background: var(--slate-bg); color: var(--ink2); }
.fc-detail { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.fc-end .fc-box { padding: 10px 12px; border-radius: 10px; background: var(--slate-bg); }
.fc-end.NOT_APPROVED .fc-box { background: var(--red-bg); color: #9f1239; } .fc-end.REVIEW .fc-box { background: var(--amber-bg); color: #7c4a03; } .fc-end.APPROVED .fc-box { background: var(--green-bg); color: var(--green); }
.fc-act { display: block; font-weight: 400; margin-top: 4px; font-size: 13px; }
.fl-bars { display: grid; gap: 8px; max-width: 520px; }
.fl-bar { display: grid; grid-template-columns: 110px 1fr 50px; gap: 10px; align-items: center; }
.fl-grid td { white-space: nowrap; }
.fl-dq { margin-top: 18px; }
.fl-dqrow { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid #f0f2f7; align-items: start; }
.fl-dqrow .sev { justify-self: start; margin-top: 2px; }
.pr-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.bchip { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--slate-bg); color: var(--muted); white-space: nowrap; }
.bchip.NOT_APPROVED { background: var(--red-bg); color: var(--red); } .bchip.REVIEW { background: var(--amber-bg); color: var(--amber); } .bchip.APPROVED { background: var(--green-bg); color: var(--green); }
.pr-line { color: var(--ink2); font-size: 13.5px; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.pick-list { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; margin-top: 10px; }
.pick-item { font: inherit; text-align: left; display: grid; grid-template-columns: 80px minmax(200px, 1fr) minmax(0, 1.6fr); gap: 10px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer; color: inherit; }
.pick-item:hover { border-color: #c7cde0; } .pick-item.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.thr-table input { width: 110px; text-align: right; }

/* ---------- calm layout: one readable column, exception-first ---------- */
.content.narrow { max-width: 1040px; }
.top .seg.sm { margin-right: 6px; }
.sysflow { list-style: none; margin: 0 0 28px; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sysflow li { position: relative; padding: 16px 18px 16px 22px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sysflow li + li { border-left: 1px solid var(--line); }
.sysflow li + li::before { content: ""; position: absolute; left: -7px; top: 50%; width: 12px; height: 12px; background: var(--surface); border-top: 1px solid var(--line); border-right: 1px solid var(--line); transform: translateY(-50%) rotate(45deg); }
.sf-k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); font-weight: 650; }
.sf-v { font-size: 24px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sf-v.sm { font-size: 15px; line-height: 1.3; margin: 5px 0 3px; }
.sf-s { font-size: 12px; color: var(--muted); }
.sf-dec { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-top: 4px; }
.sysflow li.hot .sf-v { color: var(--red); }
@media (max-width: 900px) { .sysflow { grid-template-columns: 1fr 1fr; } .sysflow li + li::before { display: none; } }
.tbl-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 10px; }
.tbl-head h2 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.tbl-head input { width: 240px; }
.cases { display: grid; gap: 8px; }
.case-row { display: grid; grid-template-columns: minmax(170px, 220px) minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 14px 18px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--slate-bg); border-radius: 12px; color: inherit; }
.case-row:hover { text-decoration: none; box-shadow: 0 4px 14px rgba(16, 24, 40, .08); }
.case-row.NOT_APPROVED { border-left-color: var(--red); } .case-row.REVIEW { border-left-color: #f59e0b; } .case-row.APPROVED { border-left-color: #10b981; }
.cr-who { display: flex; flex-direction: column; min-width: 0; }
.cr-what { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.cr-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.cr-line { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .case-row { grid-template-columns: 1fr; } }
details.clear-line { margin-top: 14px; }
details.clear-line > summary { cursor: pointer; font-size: 13.5px; color: var(--muted); list-style: none; }
details.clear-line > summary::before { content: "✓ "; color: var(--green); font-weight: 700; }
.clear-list { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 8px; font-size: 13px; }
.combo { position: relative; width: 300px; }
.combo-list { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; right: 0; max-height: 320px; overflow-y: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 12px 28px rgba(16, 24, 40, .14); padding: 4px; }
.combo-item { font: inherit; width: 100%; display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; padding: 8px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: inherit; font-size: 13.5px; }
.combo-item:hover { background: var(--slate-bg); }
.ci-id { font-weight: 650; color: var(--ink2); }
.ci-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-dots { display: inline-flex; gap: 3px; }
.ci-dots i { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; }
.ci-dots i.NOT_APPROVED { background: var(--red); } .ci-dots i.REVIEW { background: #f59e0b; } .ci-dots i.APPROVED { background: #10b981; } .ci-dots i.OK { background: #d1fae5; }
.fl-step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; margin-top: 16px; }
.fl-step h3 { display: flex; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--ink); margin: 0 0 14px; }
.sn { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-bg); color: var(--accent-ink); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; flex: none; }
.sn.warn { background: var(--amber-bg); color: var(--amber); }
details.fl-step > summary { list-style: none; cursor: pointer; }
details.fl-step > summary::-webkit-details-marker { display: none; }
details.fl-step > summary h3 { margin: 0; }
details.fl-step[open] > summary h3 { margin-bottom: 12px; }
.fl-links { display: flex; gap: 18px; margin-top: 14px; font-size: 13.5px; }
details.nav-more { margin-top: 10px; }
details.nav-more > summary { list-style: none; cursor: pointer; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #5b6884; font-weight: 650; padding: 4px 12px; }
details.nav-more > summary::-webkit-details-marker { display: none; }
details.nav-more > summary::after { content: " ▸"; } details.nav-more[open] > summary::after { content: " ▾"; }

/* =====================================================================
   Theme: institutional "annual report". Navy chrome, warm paper, brass
   accent, serif headings, hairline rules; colour only means status.
   ===================================================================== */
:root {
  --bg: #f6f4ef; --surface: #fffefb; --ink: #13213b; --ink2: #2a3a56; --muted: #5d6879; --faint: #8b93a1; --line: #e2ddd2;
  --side: #0f2238; --side2: #17304d; --side-ink: #b4c1d2;
  --accent: #1f4e79; --accent-ink: #1f4e79; --accent-bg: #e8eff6; --brass: #a8803c; --brass-bg: #f6efe1;
  --ai: linear-gradient(135deg, #1f4e79 0%, #a8803c 100%);
  --red: #a4262c; --red-bg: #f9ecec; --amber: #95620a; --amber-bg: #fbf3e2; --green: #1d6a44; --green-bg: #e8f3ec;
  --poor: #a4262c; --poor-bg: #f9ecec; --fair: #95620a; --fair-bg: #fbf3e2; --good: #1d6a44; --good-bg: #e8f3ec;
  --slate-bg: #efece5; --radius: 6px;
  --shadow: 0 1px 0 rgba(19, 33, 59, .04);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}
body { font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; font-size: 14px; }
h1, h2, .fl-big, .sf-v, .tbl-head h2 { font-family: var(--serif); font-weight: 600; letter-spacing: 0; }
h1 { font-size: 27px; }
h2 { font-size: 18px; }
h3 { font-size: 11.5px; letter-spacing: .09em; color: var(--muted); }
a { color: var(--accent); }

/* chrome */
.side { background: var(--side); border-right: 1px solid #0a1828; }
.logo { font-family: var(--serif); font-size: 17px; letter-spacing: .01em; }
.logo .mark { background: none; border: 1px solid var(--brass); color: var(--brass); border-radius: 4px; }
.nav a { border-radius: 4px; }
.nav a.on { background: rgba(255, 255, 255, .07); }
.nav a.on::before { background: var(--brass); }
.nav-h, details.nav-more > summary { color: #7f93ad; }
.nbadge { background: var(--brass); color: #1b1203; }
.top { padding-top: 30px; border-bottom: 1px solid var(--line); padding-bottom: 16px; margin: 0 36px; padding-left: 0; padding-right: 0; }
.top .crumb { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--brass); font-weight: 600; }
.content { padding-top: 22px; }

/* surfaces */
.card, .fl-step, .fl-insight, .sysflow, .case-row, .hero-card, .dim-tile, .pf-card, .incident, .kpi { border-radius: var(--radius); box-shadow: var(--shadow); border-color: var(--line); background: var(--surface); }
.btn { border-radius: 4px; background: var(--ink); border-color: var(--ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); }
.btn.ghost { background: transparent; }
select, input[type=text], input[type=search], input[type=number], input[type=date], textarea { border-radius: 4px; background: #fff; border-color: #d9d3c6; }
.seg { border-radius: 4px; background: #ebe7de; }
.seg > a, .seg > button { border-radius: 3px; }
.seg > .on { box-shadow: inset 0 -2px 0 var(--brass); }

/* status: small-caps tags, not candy pills */
.pill { border-radius: 3px; text-transform: uppercase; font-size: 10.5px; letter-spacing: .07em; padding: 3px 8px; }
.pill::before { width: 5px; height: 5px; }
.bchip { border-radius: 3px; font-variant-numeric: tabular-nums; }
.sev { border-radius: 3px; }

/* tables: report style */
th { text-transform: uppercase; font-size: 10.5px; letter-spacing: .08em; color: var(--muted); border-bottom: 1px solid var(--ink); }
td { border-bottom: 1px solid #ece8df; }
table.compact tbody tr:nth-child(even) td { background: #faf8f3; }
tr.click:hover td { background: var(--brass-bg) !important; }
td.changed { background: var(--brass-bg) !important; color: var(--ink); font-weight: 650; box-shadow: inset 2px 0 0 var(--brass); }

/* overview: system flow strip and cases */
.sysflow { border-top: 3px solid var(--ink); }
.sysflow li + li::before { background: var(--surface); border-color: var(--line); }
.sf-k { color: var(--brass); letter-spacing: .1em; }
.sf-v { font-size: 28px; color: var(--ink); }
.sf-v.sm { font-size: 16px; }
.sysflow li.hot .sf-v { color: var(--red); }
.tbl-head { border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.case-row { border-left-width: 3px; padding: 14px 18px; }
.case-row:hover { background: #fdfbf6; box-shadow: 0 2px 10px rgba(19, 33, 59, .06); }
.cr-who b { font-family: var(--serif); font-size: 15.5px; font-weight: 600; }
.count-badge.neutral { background: var(--ink); color: #fff; border-radius: 3px; }
details.clear-line > summary::before { color: var(--green); }

/* portfolio page: insight, flowchart, drill-down */
.fl-insight { border-left-width: 4px; padding: 24px 28px; }
.fl-insight .fl-big { font-size: 21px; line-height: 1.45; margin-top: 12px; }
.fl-kv { font-family: var(--serif); }
.fl-ai { border-top-color: var(--line); }
.ai-badge { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--brass); }
.ai-badge svg { fill: var(--brass); }
.fl-pick { border-radius: 4px; background: transparent; }
.fl-pick.on { background: var(--ink); border-color: var(--ink); }
.fl-step h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.sn { background: var(--ink); color: #fff; border-radius: 3px; }
.sn.warn { background: var(--amber); color: #fff; }
ol.fc > li::before { background: #d8d2c4; }
ol.fc > li::after { border-color: var(--ink); background: var(--surface); }
ol.fc > li.fc-start::after { background: var(--ink); }
.fc-ans { border-radius: 3px; text-transform: uppercase; letter-spacing: .05em; font-size: 10.5px; }
.fc-ans.yes { background: var(--ink); color: #fff; }
.fc-ans.no { background: transparent; color: var(--ink2); box-shadow: inset 0 0 0 1px #cfc8b8; }
.fc-end .fc-box { border-radius: 4px; }
.fl-links a { color: var(--accent); font-weight: 600; }
.fl-links a::after { content: " →"; }

/* combobox, thresholds */
.combo-list { border-radius: 6px; border-color: var(--line); }
.combo-item:hover { background: var(--brass-bg); }
.flash { border-radius: 4px; background: var(--brass-bg); color: #5a4214; border-left: 3px solid var(--brass); }
@media (max-width: 900px) { .nav-h { display: none; } .top { margin: 0 18px; } }

/* ---------- portfolio: wide workspace ---------- */
.pf-meta { display: flex; flex-wrap: wrap; gap: 0; margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.pf-meta span + span::before { content: "·"; margin: 0 8px; color: var(--faint); }
.dstep { display: inline-flex; align-items: stretch; border: 1px solid #d9d3c6; border-radius: 4px; background: #fff; }
.dstep select { border: 0; border-radius: 0; width: auto; }
.dstep > a, .dstep > span { display: grid; place-items: center; width: 30px; color: var(--ink); font-size: 17px; text-decoration: none; }
.dstep > span { color: #cfc8b8; }
.dstep > a:hover { background: var(--brass-bg); }
.pf-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line);
  border-top: 3px solid var(--ink); border-radius: var(--radius); margin-bottom: 20px; }
.pf-k { display: flex; flex-direction: column; gap: 4px; padding: 14px 18px; min-width: 0; }
.pf-k + .pf-k { border-left: 1px solid var(--line); }
.pf-k .l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--brass); font-weight: 650; }
.pf-k .v { font-family: var(--serif); font-size: 22px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-k .d { font-size: 12px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pf-k .d i { font-style: normal; color: var(--faint); }
.pf-k .d.up { color: var(--green); } .pf-k .d.down { color: var(--red); }
.pf-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.pf-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px 20px; }
.pf-ph { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 12px; }
.pf-ph h2 { margin: 0; }
.pf-panel h3 { margin: 14px 0 8px; }

/* insights: one line each, open to see why */
details.ins { border-bottom: 1px solid #ece8df; border-left: 3px solid transparent; }
details.ins:last-of-type { border-bottom: 0; }
details.ins.ins-NOT_APPROVED { border-left-color: var(--red); }
details.ins.ins-REVIEW, details.ins.ins-DATA { border-left-color: var(--amber); }
details.ins.ins-APPROVED { border-left-color: var(--green); }
details.ins > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 14px minmax(0, 1fr) auto; gap: 10px;
  align-items: center; padding: 12px 10px; }
details.ins > summary::-webkit-details-marker { display: none; }
details.ins > summary::before { content: "▸"; color: var(--faint); font-size: 11px; }
details.ins[open] > summary::before { content: "▾"; color: var(--ink); }
details.ins > summary:hover { background: #fdfbf6; }
.ins-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ins-t b { font-size: 14px; color: var(--ink); }
.ins-t span { font-size: 13px; color: var(--muted); line-height: 1.45; }
details.ins:not([open]) .ins-t span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ins-body { padding: 4px 12px 16px 34px; }
.ins-kpis { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 4px; margin-bottom: 12px; width: fit-content; }
.ins-kpis > div { display: flex; flex-direction: column; padding: 8px 14px; }
.ins-kpis > div + div { border-left: 1px solid var(--line); }
.ins-kpis span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.ins-kpis b { font-family: var(--serif); font-size: 16px; font-variant-numeric: tabular-nums; }
.ins-why { margin: 0 0 12px; line-height: 1.6; color: var(--ink2); }
.ins-tbl { margin-bottom: 10px; }
.ins-act { margin: 0 0 10px; padding: 8px 12px; background: var(--brass-bg); border-left: 3px solid var(--brass); border-radius: 0 4px 4px 0; font-size: 13px; }
.ins-link { font-weight: 600; font-size: 13px; }
.ins-clear { padding: 14px 12px; border-left: 3px solid var(--green); background: var(--green-bg); border-radius: 0 4px 4px 0; color: var(--ink2); }

/* composition */
.wbars { display: flex; flex-direction: column; gap: 8px; }
.wbar { display: grid; grid-template-columns: minmax(90px, 1.1fr) 2fr 56px; gap: 10px; align-items: center; font-size: 13px; }
.wbar > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wbar i { display: block; height: 8px; background: #efece5; border-radius: 2px; overflow: hidden; }
.wbar i b { display: block; height: 100%; background: var(--accent); }
.wbar em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: var(--ink2); }

/* data table: underline tabs */
.utabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: -11px; }
.utabs a { padding: 6px 12px 10px; color: var(--muted); font-size: 13.5px; text-decoration: none; border-bottom: 2px solid transparent; }
.utabs a:hover { color: var(--ink); }
.utabs a.on { color: var(--ink); font-weight: 650; border-bottom-color: var(--brass); }
.pf-data .tbl-wrap { max-height: 70vh; border-radius: 4px; }
.pf-data .tbl-wrap thead th { background: #f3f0ea; }
@media (max-width: 1250px) { .pf-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pf-k:nth-child(4) { border-left: 0; }
  .pf-k:nth-child(n+4) { border-top: 1px solid var(--line); } .pf-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- ask the analyst: scope rail + conversation ---------- */
.ask-ws { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.ask-rail { position: sticky; top: 16px; padding: 16px 14px; }
.ask-rail .pf-ph { padding: 0 6px 10px; }
.ask-rail input[type=search] { width: 100%; margin-bottom: 8px; }
.scope-list { display: flex; flex-direction: column; max-height: 62vh; overflow: auto; }
.scope { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; text-align: left; width: 100%;
  background: none; border: 0; border-left: 3px solid transparent; border-radius: 0; padding: 9px 10px; cursor: pointer; font: inherit; color: inherit; }
.scope:hover { background: #fdfbf6; }
.scope.on { background: var(--brass-bg); border-left-color: var(--brass); }
.sc-name { display: flex; flex-direction: column; min-width: 0; }
.sc-name b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-name span { font-size: 11.5px; color: var(--faint); }
.sc-n { min-width: 22px; height: 20px; padding: 0 6px; display: grid; place-items: center; border-radius: 3px; font-size: 11.5px; font-weight: 700; }
.sc-n.NOT_APPROVED { background: var(--red-bg); color: var(--red); }
.sc-n.REVIEW { background: var(--amber-bg); color: var(--amber); }
.sc-n.APPROVED, .sc-n.ok { background: var(--green-bg); color: var(--green); }
.ask-main { display: flex; flex-direction: column; min-height: calc(100vh - 210px); padding: 0; }
.ask-thread { flex: 1; padding: 24px 28px; overflow: auto; }
.ask-hello { font-family: var(--serif); font-size: 22px; color: var(--ink); margin: 8px 0 20px; }
.ask-prompts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ask-prompts button { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 14px 16px; background: #fff; cursor: pointer;
  border: 1px solid var(--line); border-top: 2px solid var(--ink); border-radius: 4px; font: inherit; color: inherit; }
.ask-prompts button:hover { border-top-color: var(--brass); background: #fdfbf6; }
.ask-prompts b { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--brass); }
.ask-prompts span { font-size: 13.5px; color: var(--ink2); line-height: 1.45; }
.ask-main .chat { margin-top: 0; gap: 16px; }
.ask-main .msg { border-radius: 4px; }
.ask-main .msg.user { background: var(--ink); color: #fff; max-width: 70%; }
.ask-main .msg.assistant { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brass); }
.ask-composer { border-top: 1px solid var(--line); padding: 14px 28px 18px; background: #faf8f3; border-radius: 0 0 var(--radius) var(--radius); }
.ask-ctx { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.ask-composer .ask-box { margin-top: 0; }
.ask-composer .ask-box input { padding: 11px 14px; font-size: 14.5px; }
@media (max-width: 1000px) { .ask-ws { grid-template-columns: 1fr; } .ask-rail { position: static; } .ask-prompts { grid-template-columns: 1fr 1fr; } }

/* ask: analyst / skills improver switch */
.ask-modes { display: flex; border-bottom: 1px solid var(--line); }
.ask-modes button { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 12px 28px; background: none; border: 0;
  border-bottom: 3px solid transparent; font: inherit; font-weight: 650; font-size: 14px; color: var(--muted); cursor: pointer; text-align: left; }
.ask-modes button span { font-size: 12px; font-weight: 400; color: var(--faint); }
.ask-modes button.on { color: var(--ink); border-bottom-color: var(--brass); }
.ask-ws.imp { grid-template-columns: minmax(0, 1fr); }
.ask-ws.imp .ask-rail { display: none; }

/* ask: one answer = headline, a few points, detail on request */
.ans-learned { margin: -2px 0 10px; padding: 6px 10px; border-left: 3px solid var(--brass); background: var(--brass-bg); font-size: 12.5px; color: var(--ink2); }
.ask-learn { margin: 14px 2px 0; }

/* workflow diagram (SVG) + step panel */
.fd { position: relative; }
.fd-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; background: #fcfbf8; }
.fd-svg { display: block; font-family: inherit; width: 100%; min-width: 780px; height: auto; margin: 0 auto; }
.fd-lane rect { fill: #f4f1ea; stroke: none; }
.fd-lane:nth-of-type(even) rect { fill: #f9f7f2; }
.fd-lane text { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; fill: var(--brass); }
.fd-e { fill: none; stroke: #b7c0cc; stroke-width: 1.8; }
.fd-e.skip { stroke-dasharray: 5 4; }
.fd-e.exit { stroke-dasharray: 4 3; }
.fd-e.on { stroke: var(--ink); stroke-width: 2.6; stroke-dasharray: none; }
.fd-e.on.NOT_APPROVED { stroke: var(--red); } .fd-e.on.REVIEW { stroke: var(--amber); } .fd-e.on.APPROVED { stroke: var(--green); }
.fd-el { font-size: 11.5px; font-weight: 700; fill: #8792a2; }
.fd-el.on { fill: var(--ink); }
.fd-term rect { fill: var(--ink); }
.fd-term text { fill: #fff; font-size: 13.5px; font-weight: 600; }
.fd-tk { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; fill: #d9c08f; }
.fd-n { cursor: pointer; outline: none; }
.fd-n polygon { fill: #fff; stroke: #c5ccd6; stroke-width: 1.6; transition: fill .12s, stroke .12s; }
.fd-n text { font-size: 12.5px; fill: #8a94a3; pointer-events: none; }
.fd-n.on polygon { fill: #fff; stroke: var(--ink); stroke-width: 2.4; }
.fd-n.on text { fill: var(--ink); font-weight: 600; }
.fd-tally .fd-n polygon { stroke: #9aa5b4; } .fd-tally .fd-n text { fill: var(--ink2); }
.fd-n:hover polygon, .fd-n:focus polygon { fill: var(--brass-bg); stroke: var(--brass); stroke-width: 2.6; }
.fd-n.sel polygon { fill: var(--brass-bg); stroke: var(--brass); stroke-width: 3; }
.fd-n.unk polygon { stroke-dasharray: 6 4; }
.fd-no circle { fill: var(--ink); } .fd-no text { fill: #fff !important; font-size: 12px; font-weight: 700; }
.fd-unk { font-size: 11px !important; font-weight: 700; fill: var(--amber) !important; }
.fd-chip rect { fill: var(--ink); } .fd-chip text { fill: #fff !important; font-size: 11.5px !important; font-weight: 700; }
.fd-chip.no rect { fill: #fff; stroke: var(--ink); stroke-width: 1.5; } .fd-chip.no text { fill: var(--ink) !important; }
.fd-chip.val rect { fill: var(--brass); }
.fd-count circle { fill: var(--brass); } .fd-count text { fill: #fff !important; font-size: 12px !important; font-weight: 800; }
.fd-x { cursor: pointer; }
.fd-x rect { fill: #fff; stroke: #cfd5de; stroke-width: 1.5; stroke-dasharray: 5 3; }
.fd-x text { font-size: 12px; fill: #7d8796; }
.fd-x .fd-say { font-weight: 700; }
.fd-x.NOT_APPROVED .fd-say { fill: #b4402f; } .fd-x.REVIEW .fd-say { fill: #a86418; } .fd-x.APPROVED .fd-say { fill: #2d7a4d; }
.fd-tally .fd-x rect { stroke-dasharray: none; }
.fd-x.NOT_APPROVED.taken rect, .fd-tally .fd-x.NOT_APPROVED rect { fill: var(--red-bg); stroke: var(--red); }
.fd-x.REVIEW.taken rect, .fd-tally .fd-x.REVIEW rect { fill: var(--amber-bg); stroke: var(--amber); }
.fd-x.APPROVED.taken rect, .fd-tally .fd-x.APPROVED rect { fill: var(--green-bg); stroke: var(--green); }
.fd-x.taken rect { stroke-width: 2.4; stroke-dasharray: none; }
.fd-x.taken text { fill: var(--ink); }
.fd-end rect { fill: var(--slate-bg); stroke: var(--ink); stroke-width: 2; }
.fd-end.NOT_APPROVED rect { fill: var(--red-bg); stroke: var(--red); } .fd-end.REVIEW rect { fill: var(--amber-bg); stroke: var(--amber); }
.fd-end.APPROVED rect { fill: var(--green-bg); stroke: var(--green); }
.fd-end text { font-size: 13.5px; fill: var(--ink); }
.fd-end .fd-say { font-weight: 700; font-size: 14.5px; }
.fd-end .fd-tk { fill: var(--brass); }
.fd-panel { margin-top: 14px; padding: 14px 18px; border: 1px solid var(--line); border-left: 4px solid var(--brass); border-radius: 0 8px 8px 0; background: #fff; font-size: 14px; line-height: 1.55; }
.fd-panel h4 { margin: 2px 0 8px; font-family: var(--serif); font-size: 17px; }
.fd-panel p { margin: 6px 0; }
.fdp-k { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brass); }
.fdp-warn { color: var(--amber); }
.fdp-who { margin: 4px 0 8px; padding-left: 18px; }
.fdp-ai { margin-top: 10px; }
.fdp-ai .ans-head { font-size: 16px; }

/* portfolio: date selection (one day, several, or a range) + day-by-day table */
.side-grip { position: absolute; top: 0; right: 0; width: 8px; height: 100%; cursor: col-resize; z-index: 30; }
.side-grip::after { content: ""; position: absolute; top: 50%; left: 3px; width: 3px; height: 44px; margin-top: -22px; border-radius: 3px;
  background: rgba(255, 255, 255, .22); transition: background .15s; }
.side-grip:hover::after, .side-grip.on::after { background: var(--brass); }
.side-grip:hover, .side-grip.on { background: rgba(168, 128, 60, .18); }
body.resizing { cursor: col-resize; user-select: none; }
@media (max-width: 900px) { .side-grip { display: none; } }
.dstep-d { padding: 0 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.dpick > summary { min-width: 200px; }
.dpick .pick-pop { width: 300px; }
.dp-quick { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 2px 4px 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; font-size: 13px; font-weight: 600; }
.dp-list { max-height: 260px; }
.dp-day { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px; font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; white-space: nowrap; min-width: 0; }
.dp-day > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dp-day > span b { font-weight: 600; }
.dp-day:hover { background: #fdfbf6; }
.dp-day input[type=checkbox] { flex: none; width: 16px; height: 16px; margin: 0; padding: 0; accent-color: var(--brass); }
.dp-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 10px; margin-top: 6px; border-top: 1px solid var(--line); }
.pf-comp { margin-bottom: 20px; }
.pf-comp-g { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
@media (max-width: 1000px) { .pf-comp-g { grid-template-columns: minmax(0, 1fr); } }
.pf-days td, .pf-days th { padding: 9px 10px; }
.pf-days tr.on td { background: var(--brass-bg); }
.pf-days td:first-child a { font-weight: 600; font-variant-numeric: tabular-nums; }
.ans-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; font-family: var(--serif); font-size: 18px; line-height: 1.4; color: var(--ink); }
.ans-head .conf { flex: none; font-family: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--faint); }
.ans-points { margin: 10px 0 0; padding-left: 18px; font-size: 14.5px; line-height: 1.55; }
.ans-points li + li { margin-top: 4px; }
.ans-more { margin-top: 10px; }
.ans-more summary { cursor: pointer; color: var(--brass); font-size: 13px; font-weight: 600; }
.ans-sec { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--brass-bg); }
.ans-sec b { display: block; font-size: 13px; }
.ans-sec p { margin: 2px 0 0; font-size: 13.5px; color: var(--ink2); }
.ans-links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13.5px; font-weight: 600; }
.ans-next { margin-top: 12px; }
.ans-foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 10px;
  border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
.ans-vote { display: inline-flex; gap: 6px; align-items: center; }
.ans-vote button { padding: 4px 12px; border: 1px solid var(--line); border-radius: 4px; background: #fff; font: inherit; font-size: 12.5px; color: var(--ink2); cursor: pointer; }
.ans-vote button:hover:not(:disabled) { border-color: var(--ink); color: var(--ink); }
.ans-vote button:disabled { opacity: .5; cursor: default; }
.ans-why { display: flex; gap: 8px; margin-top: 10px; }
.ans-why input { flex: 1; }

/* approval flowchart: one case (path only until asked) or many cases (counts) */
.fx { margin-top: 4px; --fx-gap: 46px; }
.fl-fcmeta { margin: -4px 0 12px; }
.fx-term { position: relative; display: inline-flex; align-items: center; gap: 10px; padding: 9px 18px 9px 12px; border-radius: 999px; background: var(--ink);
  color: #fff; font-size: 14px; font-weight: 600; }
.fx-tk { padding: 1px 8px; border-radius: 999px; background: rgba(255, 255, 255, .16); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.fx-st { position: relative; padding: 16px 0 0 50px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brass); }
.fx-st::before { content: ""; position: absolute; left: 25px; top: 0; bottom: -4px; border-left: 2px solid var(--line); }
.fx-sec.on .fx-st::before { border-left-color: var(--ink); }
.fx-row { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); column-gap: var(--fx-gap); align-items: center; padding-top: 20px; }
.fx-row::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 0; border-left: 2px solid var(--line); }
.fx-row::after { content: ""; position: absolute; left: 21px; top: 12px; border: 5px solid transparent; border-top: 6px solid var(--line); }
.fx-row.on::before { border-left-color: var(--ink); } .fx-row.on::after { border-top-color: var(--ink); }
.fx-node { grid-column: 1; position: relative; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 14px 11px 48px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 6px; font-size: 14.5px; line-height: 1.4; cursor: help; outline: none; }
.fx-node::before { content: ""; position: absolute; left: 20px; top: 50%; width: 11px; height: 11px; transform: translateY(-50%) rotate(45deg); border: 2px solid #b8c0cc; background: #fff; }
.fx-node:focus-visible { box-shadow: 0 0 0 3px var(--brass-bg); border-color: var(--brass); }
.fx-row.on .fx-node { border-color: var(--ink); box-shadow: 0 1px 0 rgba(11, 19, 36, .06); }
.fx-row.on .fx-node::before { background: var(--ink); border-color: var(--ink); }
.fx-row.off .fx-node { color: #9aa3b0; border-color: #e3e7ec; }
.fx-row.off .fx-outs { opacity: .5; }
.fx-row.off:hover .fx-node { color: var(--ink2); } .fx-row.off:hover .fx-outs { opacity: .9; }
.fx-row.unk .fx-node { border-style: dashed; }
.fx-q { min-width: 0; }
.fx-unk { display: inline-block; margin-left: 8px; padding: 0 7px; border-radius: 3px; background: var(--amber-bg); color: var(--amber); font-size: 11px; font-style: normal; font-weight: 700; }
.fx-ans, .fx-n { flex: none; padding: 2px 10px; border-radius: 3px; font-size: 12.5px; font-weight: 700; background: var(--ink); color: #fff; max-width: 45%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-ans.no { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.fx-ans.val { background: var(--brass-bg); color: var(--ink); }
.fx-n { min-width: 26px; text-align: center; border-radius: 999px; background: var(--brass); }
.fx-outs { grid-column: 2; display: flex; flex-direction: column; gap: 8px; }
.fx-out { position: relative; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px dashed #cbd2dc; border-radius: 6px; font-size: 13.5px; color: var(--muted); background: #fff; }
.fx-out::before { content: ""; position: absolute; right: 100%; top: 50%; width: calc(var(--fx-gap) - 2px); border-top: 2px dashed #cbd2dc; }
.fx-out::after { content: ""; position: absolute; left: -8px; top: calc(50% - 5px); border: 5px solid transparent; border-left: 6px solid #cbd2dc; }
.fx-when { position: absolute; right: calc(100% + 8px); bottom: calc(50% + 2px); font-size: 11.5px; font-weight: 700; color: var(--muted); }
.fx-ot { flex: 1; }
.fx-on { flex: none; min-width: 24px; padding: 0 7px; border-radius: 999px; background: var(--slate-bg); color: var(--ink); font-size: 12px; font-weight: 700; text-align: center; }
.fx-out.taken { border-style: solid; font-weight: 600; color: var(--ink); }
.fx-out.taken::before { border-top-style: solid; }
.fx-out.taken.NOT_APPROVED { background: var(--red-bg); border-color: var(--red); color: var(--red); }
.fx-out.taken.REVIEW { background: var(--amber-bg); border-color: var(--amber); color: var(--amber); }
.fx-out.taken.APPROVED { background: var(--green-bg); border-color: var(--green); color: var(--green); }
.fx-out.taken.NOT_APPROVED::before { border-top-color: var(--red); } .fx-out.taken.NOT_APPROVED::after { border-left-color: var(--red); }
.fx-out.taken.REVIEW::before { border-top-color: var(--amber); } .fx-out.taken.REVIEW::after { border-left-color: var(--amber); }
.fx-out.taken.APPROVED::before { border-top-color: var(--green); } .fx-out.taken.APPROVED::after { border-left-color: var(--green); }
.fx-short .fx-sec.off, .fx-short .fx-row.off, .fx-short .fx-out:not(.taken) { display: none; }
.fx-tip { display: none; position: absolute; left: 0; top: calc(100% + 6px); z-index: 30; width: min(440px, 80vw); flex-direction: column; gap: 2px;
  padding: 10px 14px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 13px; line-height: 1.5; box-shadow: 0 8px 24px rgba(11, 19, 36, .25); cursor: auto; }
.fx-node:hover .fx-tip, .fx-node:focus .fx-tip { display: flex; }
.fx-tip-k { margin-top: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #d9c08f; }
.fx-tip-k:first-child { margin-top: 0; }
.fx-end { margin-top: 20px; }
.fx-end::before { content: ""; position: absolute; left: 25px; top: -20px; height: 20px; border-left: 2px solid var(--line); }
.fx-case .fx-end::before { border-left-color: var(--ink); }
.fx-end.NOT_APPROVED { background: var(--red); } .fx-end.REVIEW { background: var(--amber); } .fx-end.APPROVED { background: var(--green); }
.fx-tally .fx-end { background: #fff; color: var(--ink); border: 1.5px solid var(--ink); }
.fx-tally .fx-end .fx-tk { background: var(--slate-bg); }
.fx-et { font-weight: 400; opacity: .92; }
.fx-more { display: block; margin: 14px 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: 13.5px; font-weight: 600; color: var(--brass); cursor: pointer; text-decoration: underline; }
.sf-link { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--brass); }

/* decision flow page */
.df-bar { justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.df-tabs { margin-bottom: 0; }
.df-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.df-chart { padding: 18px 24px 22px; }
.df-src { margin-bottom: 12px; }
.df-ends { position: sticky; top: 16px; padding: 18px; }
.df-h { margin: 0 0 12px; font-family: var(--serif); font-size: 16px; font-weight: 600; }
.df-end { border-left: 4px solid var(--line); background: #fff; margin-bottom: 8px; border-radius: 0 4px 4px 0; }
.df-end.NOT_APPROVED { border-left-color: var(--red); } .df-end.REVIEW { border-left-color: var(--amber); } .df-end.APPROVED { border-left-color: var(--green); }
.df-end summary { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; list-style: none; }
.df-end summary::-webkit-details-marker { display: none; }
.df-c { font-size: 22px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.df-t { display: block; font-size: 12.5px; color: var(--muted); }
.df-end ul { margin: 0; padding: 0 12px 10px 58px; list-style: none; font-size: 13.5px; }
.df-end li { padding: 2px 0; }
@media (max-width: 1100px) { .df-grid { grid-template-columns: minmax(0, 1fr); } .df-ends { position: static; } }
@media (max-width: 760px) { .fx { --fx-gap: 20px; } .fx-row { grid-template-columns: minmax(0, 1fr); row-gap: 8px; } .fx-outs { grid-column: 1; padding-left: 48px; } }

/* decision flow: analyst's own chart + editor */
.df-mine { margin-right: 6px; color: var(--brass); }
.df-note { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 10px 14px;
  background: var(--brass-bg); border-left: 3px solid var(--brass); border-radius: 0 4px 4px 0; font-size: 13.5px; }
.df-note form { margin: 0; }
.fe { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.fe-main, .fe-ai { padding: 20px 22px; }
.fe-ai { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 10px; }
.fe-ai textarea { width: 100%; font: inherit; font-size: 14px; line-height: 1.5; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; resize: vertical; }
.fe-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.fe-top label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.fe-top input, .fe-top select { font-size: 15px; padding: 9px 12px; }
.fe-h { margin: 22px 0 4px; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.fe-ai .fe-h { margin-top: 0; }
.fe-help { margin: 0 0 12px; }
.fe-head, .fe-step { display: grid; grid-template-columns: 28px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 8px; align-items: center; }
.fe-head { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding-bottom: 6px; }
.fe-steps { list-style: none; margin: 0 0 12px; padding: 0; counter-reset: fe; display: flex; flex-direction: column; gap: 8px; }
.fe-step { counter-increment: fe; }
.fe-n::before { content: counter(fe); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; }
.fe-step input { width: 100%; padding: 9px 10px; font-size: 14px; }
.fe-x { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 4px; background: #fff; color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer; }
.fe-x:hover { border-color: var(--red); color: var(--red); }
.fe-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.fe-msg { min-height: 1.2em; color: var(--muted); }
.fe-msg.err { color: var(--red); }
@media (max-width: 1100px) { .fe { grid-template-columns: minmax(0, 1fr); } .fe-ai { position: static; } }
.fe-qc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fe-check { width: 100%; padding: 5px 8px; font-size: 12.5px; color: var(--ink2); background: #faf8f3; border: 1px dashed var(--line); border-radius: 4px; }
.fe-step { align-items: start; }
.fe-step > input { margin-top: 0; }
.fe-preview { grid-column: 1 / -1; padding: 18px 22px; }
/* workflows page: filters, outcome cards */
.wf-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }
.wf-bar .wf-p > summary { min-width: 220px; }
.wf-d { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.wf-d select { width: auto; }
.wf-src { margin-left: auto; }
.wf-ends { margin: 14px 0 16px; }
.wf-ends-h { display: flex; gap: 12px; align-items: baseline; margin-bottom: 8px; font-size: 14px; }
.wf-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.wf-cards .df-end { margin: 0; }
@media (max-width: 760px) { .fe-head { display: none; } .fe-step { grid-template-columns: 28px minmax(0, 1fr) 32px; } .fe-step input[name=yes], .fe-step input[name=no] { grid-column: 2; } .fe-top { grid-template-columns: 1fr; } }

/* sidebar: tidy menu + one "Working on" panel (portfolios, sources) */
.side { gap: 18px; }
.nav a { padding: 8px 12px; font-size: 14.5px; }
.nav-h { margin: 16px 12px 4px; color: #8b9cb4; font-size: 11px; }
details.nav-more { margin-top: 10px; }
details.nav-more > summary { list-style: none; cursor: pointer; padding: 6px 12px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; }
details.nav-more > summary::-webkit-details-marker { display: none; }
details.nav-more > summary::after { content: " ▸"; } details.nav-more[open] > summary::after { content: " ▾"; }
.ws { border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.ws-h { display: flex; justify-content: space-between; align-items: baseline; margin: 6px 12px 2px; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .1em; color: #8b9cb4; }
.ws-h a { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: 12px; color: #c7b07e; }
.ws-box { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); border-radius: 6px; }
.ws-box > summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 9px 12px; cursor: pointer; }
.ws-box > summary::-webkit-details-marker { display: none; }
.ws-v { color: #fff; font-size: 13.5px; font-weight: 600; }
.ws-chg { font-size: 12px; color: #c7b07e; }
.ws-box[open] .ws-chg { visibility: hidden; }
.ws-box form { padding: 0 6px 8px; }
.ws-find { width: 100%; margin: 0 0 6px; padding: 7px 10px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, .15); background: rgba(0, 0, 0, .18); color: #fff; font: inherit; font-size: 13px; }
.ws-find::placeholder { color: #8b9cb4; }
.ws-list { max-height: 260px; overflow-y: auto; }
.ws-list .check { padding: 6px 6px; }
.ws-list .check[hidden] { display: none; }
.ws-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 6px 0; border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 6px; }
.ws-link { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: #c7b07e; cursor: pointer; }
.ws-apply { padding: 5px 14px; border: 0; border-radius: 4px; background: var(--brass); color: #fff; font: inherit; font-size: 13px; font-weight: 650; cursor: pointer; }
.ws-src { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 12px; font-size: 13.5px; color: #dbe3ee; margin: 0; }
.ws-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-sw { min-width: 42px; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: transparent; color: #8b9cb4; font: inherit; font-size: 11.5px; font-weight: 700; cursor: pointer; }
.ws-sw.on { background: var(--brass); border-color: var(--brass); color: #fff; }

/* portfolio picker */
.pick { position: relative; }
.pick > summary { list-style: none; display: flex; align-items: center; gap: 14px; padding: 7px 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; min-width: 240px; }
.pick > summary::-webkit-details-marker { display: none; }
.pick > summary:hover, .pick[open] > summary { border-color: var(--ink); }
.pick-cur { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.pick-cur b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.pick-cur span { font-size: 11.5px; color: var(--faint); }
.pick-ch { margin-left: auto; font-size: 12.5px; font-weight: 600; color: var(--brass); white-space: nowrap; }
.pick-pop { position: absolute; left: 0; top: calc(100% + 6px); z-index: 40; width: 380px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 12px 32px rgba(11, 19, 36, .18); padding: 10px; }
@media (min-width: 1200px) { .top .pick-pop { left: auto; right: 0; } }
.pick-pop input:not([type=checkbox]) { width: 100%; padding: 9px 12px; font-size: 14px; margin-bottom: 8px; }
.pick-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; }
.pick-list a { display: flex; justify-content: space-between; gap: 12px; padding: 9px 10px; border-radius: 4px; color: var(--ink); border-left: 3px solid transparent; }
.pick-list a:hover { background: #fdfbf6; text-decoration: none; }
.pick-list a.on { background: var(--brass-bg); border-left-color: var(--brass); }
.pick-list a span { font-size: 12px; color: var(--faint); white-space: nowrap; }
.pick-list a[hidden] { display: none; }
.pick-none { padding: 10px; font-size: 13px; color: var(--faint); }
.ask-modes { display: flex; border-bottom: 1px solid var(--line); }
.ask-modes button { flex: 1; display: flex; flex-direction: column; gap: 2px; padding: 12px 20px; background: none; border: 0;
  border-bottom: 3px solid transparent; cursor: pointer; font: inherit; font-weight: 600; color: var(--muted); text-align: left; }
.ask-modes button span { font-size: 11.5px; font-weight: 400; color: var(--faint); }
.ask-modes button.on { color: var(--ink); border-bottom-color: var(--brass); background: #fdfbf6; }
.ask-ws.imp { grid-template-columns: minmax(0, 1fr); }
.ask-ws.imp .ask-rail { display: none; }
.ans-head { font-family: var(--serif); font-size: 17px; line-height: 1.45; color: var(--ink); display: flex; gap: 10px; align-items: baseline; }
.ans-head .conf { flex: none; font-family: inherit; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.ans-points { margin: 10px 0 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
.ans-more { margin-top: 10px; }
.ans-more summary { cursor: pointer; font-size: 12.5px; color: var(--brass); font-weight: 600; }
.ans-sec { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--line); }
.ans-sec b { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ans-sec p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.55; }
.ans-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; font-weight: 600; }
.ans-next { margin-top: 10px; }
.ans-foot { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-top: 12px; padding-top: 8px;
  border-top: 1px solid var(--line); font-size: 11.5px; color: var(--faint); }
.ans-vote { display: flex; gap: 6px; align-items: center; flex: none; }
.ans-vote button { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 3px 9px; font: inherit; cursor: pointer; color: var(--ink2); }
.ans-vote button:hover:not(:disabled) { border-color: var(--brass); }
.ans-vote button:disabled { opacity: .5; cursor: default; }
.ans-why { display: flex; gap: 8px; margin-top: 8px; }
.ans-why input { flex: 1; }

/* full breach flow */
.story .flow { list-style: none; margin: 14px 0 0; padding: 0; }
.story .stage { display: grid; grid-template-columns: 30px 1fr; gap: 12px; position: relative; padding-bottom: 16px; }
.story .stage:not(:last-child)::before { content: ""; position: absolute; left: 14px; top: 30px; bottom: 0; width: 2px; background: var(--line); }
.story .dot { width: 30px; height: 30px; border-radius: 50%; background: var(--slate-bg); color: var(--muted); font-weight: 650; font-size: 13px; display: grid; place-items: center; }
.story .stage.ok .dot { background: var(--green-bg); color: var(--green); }
.story .stage.warn .dot { background: var(--amber-bg); color: var(--amber); }
.story .stage.error .dot { background: var(--red-bg); color: var(--red); }
.story .st-h { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.story .st-t { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.story .st-a { font-weight: 600; }
.story .st-x { font-size: 13px; color: var(--muted); margin-top: 2px; }
.story .st-rows { margin-top: 6px; }
.story .st-rows > summary { cursor: pointer; font-size: 12.5px; color: var(--muted); }
.story table.st { margin-top: 6px; }
.story table.st td { white-space: normal; font-size: 13px; padding: 6px 8px; }
.story table.st td:first-child { width: 32%; color: var(--ink2); }
.story table.st tr.hop td:first-child { padding-left: 22px; color: var(--muted); }
.story table.st tr.warn td { background: #fff8e8; }
.cause-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cause-form select { width: auto; }
.cause-form input[type=text] { flex: 1; min-width: 180px; }

/* breach review grid */
.rv-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.rv-bar { margin-bottom: 14px; padding: 16px 18px; }
.rv-bar select, .rv-bar input { width: auto; padding: 7px 10px; font-size: 13px; }
.rv-wrap { overflow: auto; max-height: 72vh; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
table.rv { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
table.rv th { position: sticky; top: 0; z-index: 1; background: #f7f9fc; text-align: left; font-weight: 600; color: var(--muted); padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.rv th[data-dir=asc]::after { content: " \25B2"; font-size: 9px; } table.rv th[data-dir=desc]::after { content: " \25BC"; font-size: 9px; }
table.rv td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.rv tbody tr:hover td { background: #fafbfe; }
table.rv .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rv .neg { color: var(--red); }
table.rv .rv-ai { min-width: 280px; max-width: 380px; }
table.rv .rv-state { min-width: 190px; }
.rv-h { font-weight: 600; margin-bottom: 2px; }
.rv-acts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.rv-acts .btn.sm { padding: 3px 8px; font-size: 11.5px; }
.rv-age { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 6px; background: var(--amber-bg); color: var(--amber); font-weight: 600; }
.rv-thumb { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px 7px; cursor: pointer; font-size: 13px; margin-right: 4px; opacity: .55; }
.rv-thumb.on { opacity: 1; border-color: var(--ink2); }
table.rv .rv-cause { min-width: 300px; max-width: 420px; }
.rv-line + .rv-line { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
table.rv .rv-ai .rv-line, table.rv .rv-fb .rv-line, table.rv td.n .rv-line { min-height: 44px; }
.rv-fix { color: var(--green); margin-top: 2px; }
table.rv td.rv-cell a { font-weight: 650; text-decoration: none; padding: 2px 6px; border-radius: 6px; }
table.rv td.rv-cell.NOT_APPROVED a { background: var(--red-bg); color: var(--red); }
table.rv td.rv-cell.REVIEW a { background: var(--amber-bg); color: var(--amber); }
table.rv td.rv-cell.APPROVED a { background: var(--green-bg); color: var(--green); }
.rv-x { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; color: var(--muted); }
tr.rv-drill td { background: #f9fafc; padding: 0; }
.rv-dbox { padding: 12px 16px 16px 46px; max-width: min(1200px, calc(100vw - 96px)); box-sizing: border-box; white-space: normal; position: sticky; left: 0; }
@media (max-width: 900px) { .rv-dbox { padding-left: 12px; } .rv-cols { grid-template-columns: minmax(0, 1fr) !important; } }
.rv-note { line-height: 1.45; }
.sysflow.six { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 16px; }
.rv-act { color: var(--ink2); font-weight: 600; margin: 4px 0; }
.rv-bk { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 12px; }
.rv-dh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-weight: 600; }
.rv-dh .muted { font-weight: 400; font-variant-numeric: tabular-nums; }
.rv-sent { font-size: 14px; line-height: 1.5; }
.rv-market { font-size: 13px; margin: 6px 0 2px; padding: 6px 10px; background: var(--surface-2, #f4f6fa); border-radius: 8px; }
.rv-market a { margin-left: 4px; white-space: nowrap; }
.rv-chain { margin: 0 0 12px; padding: 10px 14px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.rv-chain .rv-sub { margin-top: 0; }
.rv-links { margin: 6px 0 0; padding-left: 0; list-style: none; font-size: 13px; line-height: 1.5; }
.rv-links li { margin: 3px 0; }
.rv-links .pill { margin-right: 4px; }
.rv-flag { margin-top: 6px; font-size: 13px; color: var(--warn, #9a5b00); }
.rv-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(260px, 2fr); gap: 28px; margin-top: 4px; }
.rv-sub { margin: 14px 0 4px; font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
ul.rv-ul { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.5; }
ul.rv-ul li { margin: 3px 0; }
ul.rv-ul li a { font-weight: 600; }
ol.rv-wf { margin: 0; padding-left: 20px; font-size: 13px; }
ol.rv-wf li { margin: 5px 0; }
ol.rv-wf li .pill { margin-left: 4px; }
.rv-wfd { font-size: 12px; color: var(--muted); line-height: 1.45; margin: 2px 0 4px; }
ol.rv-wf li.rv-end { list-style: none; margin-left: -20px; padding-top: 6px; border-top: 1px dashed var(--line); font-weight: 600; }
.rv-fbform { margin-top: 8px; display: grid; gap: 4px; min-width: 240px; max-width: 300px; }
.rv-fbform select, .rv-fbform textarea { width: 100%; font-size: 12.5px; padding: 5px 8px; }
ul.rv-lineage { margin: 0 0 4px; padding-left: 16px; color: var(--muted); }
input.rv-comment { margin-top: 6px; width: 100%; font-size: 12px; padding: 4px 8px; }
input.rv-comment.need { border-color: var(--red); background: var(--red-bg); }
@media (max-width: 900px) { .rv-cols { grid-template-columns: 1fr; } }

/* ---------- ARGUS console ---------- */
.side { gap: 16px; }
.logo { align-items: center; gap: 12px; }
.logo .mark { flex: none; width: 34px; height: 34px; border-radius: 8px; background: #101a2e; border: 1px solid rgba(201, 169, 110, .55);
  color: #d2b77e; display: grid; place-items: center; box-shadow: inset 0 0 0 3px #101a2e, inset 0 0 0 4px rgba(201, 169, 110, .18); }
.logo .mark svg { width: 22px; height: 22px; }
.logo .brand { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.logo .brand b { font-size: 17px; font-weight: 600; letter-spacing: .32em; color: #f3efe6; }
.logo .brand small { font-size: 9.5px; line-height: 1.35; color: #8794ab; margin-top: 4px; letter-spacing: .02em; white-space: normal; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { padding: 7px 12px; font-size: 13.5px; }
.nav a.nav-top { font-weight: 600; margin-bottom: 4px; }
details.nav-g { margin-top: 4px; }
details.nav-g > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 6px 12px; margin: 6px 0 2px;
  border-radius: 8px; user-select: none; }
details.nav-g > summary::-webkit-details-marker { display: none; }
details.nav-g > summary:hover { color: #c9d3e6; background: rgba(255, 255, 255, .03); }
details.nav-g .chev { margin-left: auto; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: rotate(-45deg); transition: transform .15s; opacity: .8; }
details.nav-g[open] .chev { transform: rotate(45deg); }
details.nav-g > a { padding-left: 16px; }
.nav .soon { font-size: 9.5px; letter-spacing: .04em; text-transform: none; padding: 1px 6px; border-radius: 6px; background: #1d2840; color: #8fa0c4; font-weight: 600; }
.nav-off { display: flex; align-items: center; gap: 10px; padding: 7px 12px 7px 16px; border-radius: 10px; font-size: 13.5px; color: #4b5872; cursor: not-allowed; }
.nav-off svg { width: 17px; height: 17px; opacity: .5; }
.me-chip { display: flex; align-items: center; gap: 10px; background: var(--side2); border-radius: 12px; padding: 10px 12px; font-size: 12px; }
.me-chip .me-t { display: flex; flex-direction: column; min-width: 0; color: #fff; }
.me-chip .me-t small { color: var(--side-ink); }
.me-chip a { margin-left: auto; color: #a5b4fc; font-size: 12px; }
.av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--ai); color: #fff; display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }

.login-page { min-height: 100vh; background: #0b1220; }
.login-shell { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); min-height: 100vh; }
.login-hero { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 48px 56px; color: #cdd5e4;
  background: radial-gradient(circle at 15% 0%, rgba(99, 102, 241, .28), transparent 55%), radial-gradient(circle at 90% 100%, rgba(6, 182, 212, .16), transparent 50%), #0b1220; }
.login-brand { display: flex; gap: 14px; align-items: center; }
.login-brand .mark { width: 50px; height: 50px; border-radius: 11px; background: #101a2e; border: 1px solid rgba(201, 169, 110, .6); color: #d2b77e; display: grid; place-items: center; }
.login-brand .mark svg { width: 30px; height: 30px; }
.brand-name { font-size: 26px; font-weight: 600; letter-spacing: .3em; line-height: 1; color: #fff; }
.brand-sub { font-size: 12px; color: var(--side-ink); margin-top: 5px; }
.login-pitch { max-width: 520px; }
.login-pitch h1 { color: #fff; font-size: 34px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 14px; }
.login-pitch p { font-size: 15.5px; color: var(--side-ink); margin: 0 0 22px; }
.login-pitch ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.login-pitch li { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.login-pitch li::before { content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%; background: rgba(99, 102, 241, .22) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='%23a5b4fc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.login-foot { font-size: 12px; color: #6f7c96; }
.login-form { background: var(--surface); display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(32px, 6vw, 88px); }
.login-form h2 { font-size: 24px; margin: 0 0 4px; }
.login-form > .muted { margin: 0 0 22px; }
.login-field { display: grid; gap: 6px; margin-bottom: 14px; font-size: 13px; font-weight: 550; color: var(--ink2); }
.login-field input { width: 100%; padding: 11px 12px; font: inherit; font-size: 14.5px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.login-field input[readonly] { background: #f7f8fc; color: var(--ink2); cursor: default; }
.login-btn { width: 100%; justify-content: center; padding: 11px 14px; font-size: 14.5px; margin-top: 4px; }
.login-btn:disabled { opacity: .85; cursor: progress; }
.login-spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: login-spin .7s linear infinite; }
.login-spin[hidden] { display: none; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-ok { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 11px 14px; border-radius: 10px; background: var(--green-bg); color: var(--green); font-size: 14.5px; margin-top: 4px; }
.login-ok[hidden] { display: none; }
.login-tick { width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.login-note { margin: 18px 0 0; line-height: 1.5; }
@media (max-width: 860px) { .login-shell { grid-template-columns: 1fr; } .login-hero { padding: 32px; } .login-pitch h1 { font-size: 26px; } }

.sec-h { font-size: 15px; margin: 22px 0 10px; }
.rep-band { margin-bottom: 20px; padding: 18px 20px; }
.rep-band-h { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.rep-band-h h2 { margin: 0; font-size: 16px; }
.tbl-scroll { overflow-x: auto; }
table.rep-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.rep-table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em;
  padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.rep-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.rep-table tr:last-child td { border-bottom: 0; }
table.rep-table .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.rep-table .c { text-align: center; }
table.rep-table tbody tr[onclick] { cursor: pointer; }
table.rep-table tbody tr[onclick]:hover, table.rep-table tbody tr.on { background: var(--accent-bg); }
table.rep-table tr.off td, table.rep-table td.off { opacity: .55; }
table.rep-table .pill { margin: 1px 0; }
.perm-mx .yes { color: var(--green); font-weight: 700; }
.rep-pick { display: flex; align-items: center; gap: 6px; }
.rep-pick select { width: auto; }

.run-card { margin-bottom: 16px; padding: 16px 20px; }
.run-h { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.run-g { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.run-g label { display: flex; flex-direction: column; min-width: 200px; }
.run-g .f, .rf-g .f, .thr-targets .f, .rf-members .f { font-size: 12px; color: var(--muted); margin-bottom: 4px; display: block; }
.run-b { display: flex; gap: 8px; }

table.thr-mx { width: 100%; border-collapse: collapse; font-size: 13px; }
table.thr-mx th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
table.thr-mx td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.thr-mx .n { text-align: right; white-space: nowrap; }
table.thr-mx tr.fam td { background: var(--slate-bg); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ink2); padding: 6px 10px; }
table.thr-mx td.off { opacity: .5; }
table.thr-edit input { width: 110px; padding: 6px 8px; font-size: 13px; }
.thr-targets { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.chip-check { display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px;
  background: #fff; cursor: pointer; color: var(--ink2); }
.chip-check input { width: auto; accent-color: var(--accent); }
.chip-check:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
a.chip-check:hover { text-decoration: none; border-color: var(--accent); }

.rep-form h3 { margin-bottom: 8px; }
.rf-g { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: end; }
.rf-g label { display: flex; flex-direction: column; gap: 2px; }
.rf-g .wide { grid-column: 1 / -1; }
.rf-checks, .rf-vis { display: flex; flex-wrap: wrap; gap: 8px; }
.rf-members { margin-top: 12px; display: grid; gap: 6px; }
.rf-m { display: flex; gap: 8px; align-items: center; }

.jr { margin-bottom: 12px; padding: 16px 20px; }
.jr-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
ol.jr-steps { margin: 12px 0 0; padding-left: 0; list-style: none; display: grid; gap: 6px; border-left: 2px solid var(--line); }
ol.jr-steps li { display: flex; gap: 12px; align-items: baseline; padding-left: 14px; position: relative; font-size: 13px; }
ol.jr-steps li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.jr-w { min-width: 110px; font-weight: 600; color: var(--ink2); }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 11.5px; word-break: break-word; }
.audit-t td { font-size: 12.5px; }

.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mx-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
@media (max-width: 1100px) { .mx-2, .rf-g { grid-template-columns: 1fr; } }
.tr-bars { display: flex; gap: 10px; align-items: flex-end; height: 170px; padding-top: 10px; overflow-x: auto; }
.tr-col { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 34px; }
.tr-stack { width: 22px; display: flex; flex-direction: column; border-radius: 5px; overflow: hidden; background: var(--slate-bg); min-height: 2px; }
.tr-stack i, .lg { display: block; }
.tr-stack .auto, .lg.auto { background: #10b981; } .tr-stack .found, .lg.found { background: #6366f1; }
.tr-stack .err, .lg.err { background: var(--red); } .tr-stack .open, .lg.open { background: #f59e0b; }
.lg { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin: 0 4px 0 10px; }
.tr-n { font-size: 12px; font-weight: 600; } .tr-d { font-size: 11px; color: var(--faint); }
.pref-t select { width: auto; min-width: 150px; font-size: 13px; padding: 6px 8px; }

/* ---------- Daybrief: reports first, then portfolios, then the breach journey ---------- */
.db-brief { margin-bottom: 16px; }
.db-line { font-size: 15px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.db-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.db-dot.ok { background: #10b981; box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.db-dot.hot { background: var(--red); box-shadow: 0 0 0 4px rgba(225, 29, 72, .15); }
.db-warn { color: var(--red); font-weight: 600; font-size: 13.5px; }
.db-kpis { margin-bottom: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.db-kpis .sf-v small { font-size: 14px; color: var(--faint); font-weight: 500; }
.db-prog { display: block; height: 6px; border-radius: 4px; background: var(--slate-bg); overflow: hidden; margin-top: 6px; min-width: 70px; }
.db-prog i { display: block; height: 100%; background: #10b981; border-radius: 4px; }
.db-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 12px; }
.db-bar input[type=search] { max-width: 340px; }
.db-rep { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.db-rep.attn { border-left: 4px solid var(--amber); }
.db-rh { display: grid; grid-template-columns: 18px minmax(220px, 1.5fr) minmax(200px, 2fr) 110px 150px 120px auto; gap: 14px; align-items: center;
  padding: 14px 18px; cursor: pointer; }
.db-rh:hover { background: #fafbfe; }
.db-rh:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.db-car { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; }
.db-rep.is-open .db-car { transform: rotate(45deg); }
.db-rn { display: flex; gap: 8px; align-items: center; flex-wrap: nowrap; font-size: 15px; min-width: 0; }
.db-rn b { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.db-rn .tag, .db-rn .bchip { flex: none; }
.db-chks { display: flex; gap: 6px; flex-wrap: wrap; }
.db-chk { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; padding: 3px 4px 3px 9px; border-radius: 8px; background: var(--slate-bg); color: var(--muted); }
.db-chk b { min-width: 20px; text-align: center; padding: 1px 6px; border-radius: 6px; background: #fff; color: var(--ink2); }
.db-chk.APPROVED b { background: var(--green-bg); color: var(--green); } .db-chk.REVIEW b { background: var(--amber-bg); color: var(--amber); }
.db-chk.NOT_APPROVED b { background: var(--red-bg); color: var(--red); }
.db-num { display: flex; flex-direction: column; font-size: 12px; color: var(--faint); } .db-num b { font-size: 18px; color: var(--ink); }
.db-sign { display: flex; flex-direction: column; color: var(--muted); }
.db-act { display: flex; gap: 6px; justify-content: flex-end; }
.db-body { display: none; border-top: 1px solid var(--line); padding: 4px 8px 10px; background: #fcfdff; overflow-x: auto; }
.db-rep.is-open .db-body { display: block; }
.db-pf { width: 100%; }
.db-none { padding: 10px; }
.lu { display: block; height: 4px; border-radius: 3px; background: var(--slate-bg); margin: 5px 0 0 auto; width: 64px; overflow: hidden; }
.lu i { display: block; height: 100%; }
.lu.ok i { background: #94a3b8; } .lu.warn i { background: #f59e0b; } .lu.hit i { background: var(--red); }
ol.jn-steps { display: flex; align-items: center; list-style: none; padding: 6px 2px; margin: 0 0 14px; gap: 0; overflow: visible; }
ol.jn-steps li { display: flex; align-items: center; gap: 8px; flex: 1 1 0; min-width: 0; font-size: 12.5px; color: var(--muted); }
ol.jn-steps li:not(:last-child)::after { content: ""; flex: 1 1 24px; min-width: 16px; height: 2px; background: var(--line); margin: 0 10px; }
ol.jn-steps li.done:not(:last-child)::after { background: #a7e3c4; }
.jn-n { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: var(--slate-bg); color: var(--muted); }
ol.jn-steps li.done .jn-n { background: var(--green); color: #fff; }
ol.jn-steps li.warn .jn-n { background: var(--red); color: #fff; }
ol.jn-steps li.now .jn-n { background: var(--amber); color: #fff; box-shadow: 0 0 0 4px var(--amber-bg); }
.jn-t { font-weight: 650; color: var(--ink2); white-space: nowrap; }
.jn-s { color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-body .rv-dbox { max-width: calc(100vw - var(--side-w, 264px) - 120px); }
@media (max-width: 1200px) { .db-rh { grid-template-columns: 18px 1fr auto; } .db-chks, .db-num, .db-sign { display: none; } }

/* ---------- Approval Workflow ---------- */
.wf-run { margin-bottom: 16px; }
.wf-sh { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.wf-sh .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.wf-pick { margin-top: 14px; }
.wf-pick .f, .wf-custom .f { font-size: 12px; color: var(--muted); display: block; margin-bottom: 6px; }
.wf-oneoff { margin-top: 14px; }
.wf-custom { margin-top: 10px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 12px; background: #fbfcff; }
.wf-res { margin-top: 18px; }
.wf-rcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.wf-rc { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.wf-rc:hover { text-decoration: none; border-color: var(--accent); }
.wf-rc.on { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.wf-rc.empty { opacity: .7; }
.wf-rc-t { font-weight: 600; } .wf-rc-n { font-size: 24px; font-weight: 700; } .wf-rc-n small { font-size: 13px; color: var(--faint); font-weight: 500; }
.wf-rc-o { display: flex; gap: 6px; flex-wrap: wrap; min-height: 22px; } .wf-rc-go { font-size: 12.5px; color: var(--accent-ink); margin-top: auto; }
.wf-hint { margin-top: 18px; }

/* ---------- limits: heat map, early warnings, portfolio limits ---------- */
.hm { display: inline-block; min-width: 46px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: center; }
.hm.low { background: #f1f5f9; color: #64748b; } .hm.mid { background: #e0e7ff; color: #3730a3; }
.hm.amber { background: var(--amber-bg); color: var(--amber); } .hm.hit { background: var(--red-bg); color: var(--red); }
.ew { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ew:last-child { border-bottom: 0; }
.lim-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.lim { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.lim.REVIEW, .lim.NOT_APPROVED { border-color: #f6c9d2; } .lim.APPROVED { border-color: #bfe8d3; }
.lim-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; }
.lim-v { font-size: 18px; font-weight: 650; margin: 6px 0; }
.lim-bar { height: 6px; border-radius: 4px; background: var(--slate-bg); overflow: hidden; margin-bottom: 4px; }
.lim-bar i { display: block; height: 100%; } .lim-bar i.ok { background: #94a3b8; } .lim-bar i.amber { background: #f59e0b; } .lim-bar i.hit { background: var(--red); }
.warn-t { color: var(--amber); font-weight: 600; }

/* workflow editor: breaches it applies to, prerequisites */
.fe-top.fe-top1 { grid-template-columns: minmax(0, 1fr); }
.fe-br { border: 0; padding: 0; margin: 16px 0 0; }
.fe-br legend { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; padding: 0; }
.fe-ready { margin-top: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfe; padding: 12px 14px; }
.fe-ready-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 14px; }
.fe-ready-s { font-size: 11.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.fe-ready-s.ok { background: var(--green-bg); color: var(--green); } .fe-ready-s.bad { background: var(--red-bg); color: var(--red); }
.fe-issues { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fe-iss { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.fe-iss-i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.fe-iss.ok .fe-iss-i { background: var(--green); } .fe-iss.bad .fe-iss-i { background: var(--red); } .fe-iss.info .fe-iss-i { background: #94a3b8; font-style: italic; }
.fe-iss.bad { border-color: #fecdd3; background: var(--red-bg); }
.fe-iss-a { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fe-ack { margin-top: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 900px) { .fe-iss { grid-template-columns: 22px minmax(0, 1fr); } .fe-iss-a { grid-column: 2; justify-content: flex-start; } }
