:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --line: #e3e6eb;
  --line-strong: #cbd2db;
  --ink: #16202e;
  --ink-2: #5b6675;
  --ink-3: #8a93a1;
  --accent: #1e5eff;
  --accent-ink: #ffffff;
  --navy: #14263f;
  --green: #0a8f5c;
  --green-bg: #e7f6ef;
  --red: #d3362b;
  --red-bg: #fdefec;
  --amber: #b7791f;
  --amber-bg: #faf3e3;
  --shadow: 0 1px 2px rgba(20, 38, 63, .05), 0 6px 18px rgba(20, 38, 63, .05);
  --radius: 10px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .kpi-value, .eyebrow { font-family: "Space Grotesk", "Inter", sans-serif; }

/* Top bar */
.topbar { position: relative; overflow: hidden; color: #fff; padding: 20px 0 0; }
.topbar-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1100px 380px at 12% -120%, rgba(74, 131, 255, .38), transparent 60%),
    radial-gradient(900px 320px at 95% -140%, rgba(55, 192, 232, .3), transparent 55%),
    linear-gradient(180deg, #1c3454 0%, #14263f 60%, #10213a 100%);
}
.topbar-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, .65), transparent 72%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .65), transparent 72%);
}
.topbar-art {
  position: absolute; top: 0; right: 0; height: 100%; width: 66%; z-index: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .25) 40%, #000 78%);
  mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, .25) 40%, #000 78%);
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; z-index: 1;
  background: linear-gradient(90deg, transparent, var(--accent) 25%, #37c0e8 65%, transparent);
  opacity: .9;
}
.topbar-inner {
  position: relative; z-index: 1; max-width: 1240px; margin: 0 auto; padding: 0 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 13px; flex: none;
  background: radial-gradient(130% 130% at 28% 18%, #5b8bff 0%, var(--accent) 48%, #0d3aa0 100%);
  box-shadow: 0 3px 12px rgba(30, 94, 255, .45), inset 0 1px 0 rgba(255, 255, 255, .4), 0 0 0 1px rgba(255, 255, 255, .22);
  display: grid; place-items: center;
}
.brand-mark svg { width: 31px; height: 31px; display: block; }
.bm-blades { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.bm-tower { stroke: #fff; stroke-width: 1.8; stroke-linecap: round; }
.bm-hub { fill: #fff; }
.bm-base { stroke: rgba(255, 255, 255, .8); stroke-width: 1.8; stroke-linecap: round; }
.bm-wave { stroke: rgba(255, 255, 255, .55); stroke-width: 1.6; stroke-linecap: round; }
.bm-sun { fill: rgba(255, 216, 118, .9); }
.topbar h1 { margin: 0; font-family: "Space Grotesk", sans-serif; font-size: 21px; font-weight: 700; letter-spacing: .1px; line-height: 1.1; white-space: nowrap; }
.topbar h1 em { font-style: normal; background: linear-gradient(90deg, #8db4ff 0%, #5ed0ee 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.top-actions .btn {
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  color: #eef3fb; border-radius: 9px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.top-actions .btn:hover { border-color: #fff; background: rgba(255, 255, 255, .14); color: #fff; }

.topbar-stats {
  position: relative; z-index: 1; margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .1);
  background: rgba(255, 255, 255, .035);
}
.topbar-stats-inner {
  max-width: 1240px; margin: 0 auto; padding: 9px 22px;
  display: flex; flex-wrap: wrap; gap: 6px 0; align-items: center;
}
.ts-caption {
  font: 700 9.5px "Inter", sans-serif; letter-spacing: .16em; text-transform: uppercase;
  color: #6f9dff; padding: 0 18px 0 0; border-right: 1px solid rgba(255, 255, 255, .12);
  white-space: nowrap;
}
.ts-item {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 11.5px; color: #9fb0c6; font-weight: 500; font-style: normal;
  padding: 0 18px; border-right: 1px solid rgba(255, 255, 255, .12); white-space: nowrap;
}
.ts-item i { font-style: normal; }
.ts-item:first-child { padding-left: 0; }
.ts-item:last-child { border-right: none; }
.ts-item b { font: 700 13.5px "Space Grotesk", sans-serif; color: #fff; font-variant-numeric: tabular-nums; }
.ts-item.pos b { color: #5be0a4; }
.ts-item.neg b { color: #ff8f86; }

.live-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: #cfdcec; font-weight: 600; }
.live-dot .pulse { width: 8px; height: 8px; border-radius: 50%; background: #37d98a; position: relative; }
.live-dot .pulse::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; background: rgba(55, 217, 138, .5); animation: pulse 2s infinite; }
@keyframes pulse { 0% { transform: scale(.6); opacity: .9; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }

.btn {
  border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  border-radius: 8px; padding: 7px 13px; font: 600 12px/1 "Inter", sans-serif;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost { background: transparent; border-color: rgba(255,255,255,.28); color: #dbe4f0; }
.btn-ghost:hover { border-color: #fff; color: #fff; }
.btn-row { margin-top: 14px; }

/* Layout */
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px; display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }

.sidebar { position: sticky; top: 22px; }
.main { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card-title { margin: 0 0 4px; font-size: 15px; font-weight: 700; color: var(--ink); }
.card-note { margin: 0 0 14px; font-size: 12px; color: var(--ink-3); }
.eyebrow { margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

.field-group h3 { margin: 18px 0 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.field-group:first-child h3 { margin-top: 0; }
.field-group label {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 118px;
  gap: 10px;
  align-items: center;
  margin-bottom: 7px;
  font-size: 12.5px;
  color: var(--ink-2);
}
.field-group label span { color: var(--ink-3); font-size: 11px; white-space: nowrap; }
.field-group label .hint {
  grid-column: 1 / -1;
  margin-top: -3px;
  font-size: 11px;
  color: var(--ink-3);
}

/* Lock toggle next to each number input */
.lctrl { display: flex; align-items: center; gap: 7px; min-width: 0; }
.lctrl input[type="number"] { flex: 1; width: auto; min-width: 0; }
.lock {
  flex: 0 0 auto; width: 20px; height: 20px; padding: 0; border: none;
  background: #eef1f5; border-radius: 6px; font-size: 12px; line-height: 1;
  cursor: pointer; color: var(--ink-3);
  display: inline-flex; align-items: center; justify-content: center;
}
.lock:hover { background: #e3e8ef; color: var(--ink); }
label.locked .lock { background: var(--amber-bg, #fdf3df); color: var(--amber); }
label.locked input[type="number"] { background: #f2f3f5; border-color: var(--line); color: var(--ink-3); cursor: not-allowed; }
label.locked .slider { opacity: .45; }
label.locked .slider::-webkit-slider-thumb { background: #98a2b3; box-shadow: none; cursor: not-allowed; }
label.locked .slider::-moz-range-thumb { background: #98a2b3; box-shadow: none; cursor: not-allowed; }

input[type="number"], select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 8px;
  font: 600 13px/1 "Inter", sans-serif; color: var(--ink); background: #fff; text-align: right;
}
input[type="number"]:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(30, 94, 255, .12); }

/* Range sliders */
.slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 4px; border-radius: 999px;
  background: #dde3ec; outline: none; cursor: pointer;
  grid-column: 1 / -1; margin: 1px 0 11px;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(20, 38, 63, .35);
  cursor: grab;
}
.slider::-webkit-slider-thumb:active { cursor: grabbing; }
.slider::-moz-range-thumb {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(20, 38, 63, .35); cursor: grab;
}

/* Burial depth control */
.burial-dl { display: flex; align-items: center; gap: 12px; flex: 1; }
.burial-dl output {
  font: 700 13px/1 "Space Grotesk", sans-serif; color: var(--accent);
  min-width: 46px; text-align: right; font-variant-numeric: tabular-nums;
}
.select-row label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; white-space: nowrap; }

.nums { font-variant-numeric: tabular-nums; }

/* Verdict */
.verdict { display: flex; align-items: stretch; justify-content: space-between; gap: 22px; border-left: 5px solid var(--ink-3); }
.verdict.good { border-left-color: var(--green); }
.verdict.bad { border-left-color: var(--red); }
.verdict.warn { border-left-color: var(--amber); }
.verdict-left { flex: 1; min-width: 0; padding-right: 4px; }
.verdict h2 {
  margin: 2px 0 12px; font-size: 25px; line-height: 1.15; letter-spacing: -0.015em; font-weight: 700;
  color: var(--ink);
}
.verdict.good h2 { color: var(--green); }
.verdict.bad h2 { color: var(--red); }
.verdict.warn h2 { color: var(--amber); }
.verdict-reason {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: 7px;
}
.verdict-reason li {
  position: relative; padding-left: 18px;
  font-size: 12.5px; color: var(--ink-2); line-height: 1.5;
}
.verdict-reason li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--red);
}
.verdict.warn .verdict-reason li::before { background: var(--amber); }
.verdict.good .verdict-reason li::before { background: var(--green); }
.verdict-right { display: flex; align-items: center; flex: 0 0 auto; }
.verdict-badge {
  font: 700 13px/1 "Space Grotesk", sans-serif; padding: 11px 18px; border-radius: 999px; white-space: nowrap;
}
.verdict-badge.good { background: var(--green-bg); color: var(--green); }
.verdict-badge.bad { background: var(--red-bg); color: var(--red); }
.verdict-badge.warn { background: var(--amber-bg); color: var(--amber); }

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
.kpi { padding: 14px 15px; display: flex; flex-direction: column; min-height: 108px; }
.kpi-label {
  margin: 0 0 8px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-3);
}
.kpi-value { margin: auto 0 8px; font-size: 23px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; font-family: "Space Grotesk", sans-serif; letter-spacing: -0.01em; }
.kpi-value.good { color: var(--green); }
.kpi-value.bad { color: var(--red); }
.kpi-value.warn { color: var(--amber); }
.kpi-sub {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  font-size: 11px; color: var(--ink-3); line-height: 1.35;
}
.chip {
  font: 700 10px/1 "Inter", sans-serif; letter-spacing: .02em; padding: 3px 7px; border-radius: 999px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.chip.gain { background: var(--green-bg); color: var(--green); }
.chip.loss { background: var(--red-bg); color: var(--red); }
.chip.neutral { background: #eef0f4; color: var(--ink-3); }

/* Card head + compare */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 4px; }
.card-head .card-title { margin: 0; }
.card-actions { display: flex; gap: 8px; }
.btn-plain { border-color: var(--line-strong); background: #fff; color: var(--ink-2); }
.btn-plain:hover { border-color: var(--ink); color: var(--ink); }

.cmp-table { border-collapse: collapse; width: 100%; font-size: 12.5px; font-variant-numeric: tabular-nums; margin-top: 10px; }
.cmp-table th, .cmp-table td { padding: 8px 12px; text-align: right; border-top: 1px solid var(--line); }
.cmp-table th:first-child, .cmp-table td:first-child { text-align: left; }
.cmp-table thead th {
  background: var(--navy); color: #cfe0f5; font-weight: 600; font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase;
}
.cmp-table tbody tr:nth-child(even) { background: #fafbfc; }
.cmp-table .metric { font-weight: 600; color: var(--ink-2); }
.cmp-table .delta { font-weight: 700; }
.cmp-table .delta.gain { color: var(--green); }
.cmp-table .delta.loss { color: var(--red); }
.cmp-table .delta.neutral { color: var(--ink-3); }

/* KV grids */
.kv-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 26px; }
.kv-grid.three { grid-template-columns: repeat(3, 1fr); }
.kv-grid.mini { grid-template-columns: repeat(2, 1fr); gap: 6px 16px; font-size: 12px; }
.kv-grid.grid-half { grid-template-columns: 1fr; }
.kv.hlrow { background: #eef4ff; border-radius: 7px; padding: 7px 10px; border-bottom-color: transparent; }
.kv .v.key { color: var(--accent); }

/* What-to-change panel */
.hl-card .card-head { align-items: center; }
.hl-chip { font-style: normal; }
.keypoints { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.mc-item {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px; border: 1px solid var(--line); border-left: 4px solid var(--amber);
  border-radius: 9px; background: #fff;
}
.mc-gates { display: flex; gap: 5px; flex-wrap: wrap; min-width: 0; }
.mc-gate-tag {
  font: 700 11px "Space Grotesk", sans-serif; color: #8a5a10;
  background: var(--amber-bg, #fdf3df); border: 1px solid #f0e2bf;
  border-radius: 999px; padding: 3px 9px; white-space: nowrap;
}
.mc-move {
  font: 700 15px/1.2 "Space Grotesk", sans-serif; color: var(--ink);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  margin-right: auto;
}
.mc-move b { color: var(--accent); font-weight: 700; }
.mc-move .mc-arrow { color: var(--ink-3); font-style: normal; font-weight: 800; margin: 0 3px; }
.mc-pct { font: 600 12.5px "Space Grotesk", sans-serif; color: var(--ink-3); white-space: nowrap; }
.mc-ok {
  padding: 13px 15px; border: 1px solid #bfe6d4; background: var(--green-bg);
  border-radius: 9px; color: var(--green); font: 600 14px/1.4 "Space Grotesk", sans-serif;
}

/* Advisor — reach the investable frame */
.adv-gates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gate-chip {
  display: flex; flex-direction: column; gap: 2px; padding: 8px 12px;
  border-radius: 9px; border: 1px solid var(--line); background: #fcfcfe; min-width: 150px;
}
.gate-chip .gate-name { font: 700 12px/1.2 "Space Grotesk", sans-serif; }
.gate-chip .gate-val { font-size: 11px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.gate-chip.pass { border-color: #bfe6d4; background: #f2fbf7; }
.gate-chip.pass .gate-name { color: var(--green); }
.gate-chip.fail { border-color: #f3c4c0; background: #fef7f6; }
.gate-chip.fail .gate-name { color: var(--red); }
.adv-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.adv-title { font-size: 12px; font-weight: 600; color: var(--ink); margin: 2px 0 0; }
.adv-item {
  display: grid; grid-template-columns: auto 1fr auto; gap: 4px 12px; align-items: center;
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fcfcfe;
}
.adv-item.combo { border-style: dashed; }
.adv-lever { font: 700 13px "Space Grotesk", sans-serif; color: var(--accent); white-space: nowrap; }
.adv-move { font: 600 12px "Space Grotesk", sans-serif; color: var(--ink); font-variant-numeric: tabular-nums; }
.adv-move em { font-style: normal; color: var(--amber); }
.adv-gate { font-size: 11px; color: var(--ink-3); white-space: nowrap; justify-self: end; }
.adv-tip { grid-column: 1 / -1; font-size: 11px; color: var(--ink-2); margin-top: 2px; }
.baseline-id {
  margin: 0 0 10px; font: 600 12px/1.5 "Inter", sans-serif; color: var(--ink-2);
  background: #f4f6fa; border: 1px solid var(--line); border-radius: 7px;
  padding: 7px 10px; display: inline-block;
}
.adv-ok {
  padding: 12px 14px; border-radius: 9px; background: var(--green-bg);
  border: 1px solid #bfe6d4; color: var(--ink); font-size: 12.5px; line-height: 1.5;
}

/* Scenarios & report */
.report-rank { display: flex; align-items: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.report-rank label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.report-rank select {
  border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 8px;
  font: 600 13px "Inter", sans-serif; color: var(--ink); background: #fff;
}
.report-best { font-size: 13px; color: var(--ink); font-weight: 600; }
.report-best b { color: var(--green); }
#scenTable td.cell-best { background: var(--green-bg); font-weight: 700; color: var(--green); }
#scenTable td.cell-worst { background: #fef0ee; color: var(--red); }
#scenTable tr.row-best td { background: #f6f9ff; }
#scenTable tr.row-best td.metric { box-shadow: inset 3px 0 0 var(--accent); }
#scenTable td.metric { position: relative; padding-left: 6px; }
.scen-del {
  border: none; background: none; color: #c3c9d2; cursor: pointer; font-size: 11px;
  padding: 0 6px 0 0; margin-right: 2px; border-radius: 4px;
}
.scen-del:hover { color: var(--red); background: #fef0ee; }
#scenTable sup { color: var(--amber); font-weight: 800; margin-left: 2px; }
#scenTable td.nums { font-variant-numeric: tabular-nums; text-align: right; }
#scenTable td.metric { text-align: left; font-weight: 600; white-space: nowrap; }
.scen-name {
  width: 180px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 6px 8px;
  font: 600 13px "Inter", sans-serif; color: var(--ink); background: #fff;
}
.scen-name::placeholder { color: var(--ink-3); }
.kv {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px;
}
.kv .k { color: var(--ink-2); }
.kv .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.kv .v.good { color: var(--green); }
.kv .v.bad { color: var(--red); }
.kv .v.warn { color: var(--amber); }
.kv .v.hl { color: var(--accent); }

/* Charts */
.chart-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 18px; }
.chart-box h4 { margin: 0 0 8px; font-size: 12.5px; color: var(--ink-2); }
.chart-box svg { width: 100%; height: auto; background: #fcfcfe; border: 1px solid var(--line); border-radius: 8px; }
.chart-note { margin: 6px 0 0; font-size: 11px; color: var(--ink-3); }
.chart-line { fill: none; stroke-width: 2; }
.chart-line.cum { stroke: var(--accent); }
.chart-line.dscr { stroke: var(--green); }
.chart-thresh { stroke: var(--ink-3); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-thresh.lock { stroke: var(--amber); }
.chart-thresh.def { stroke: var(--red); }

/* Duo split */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.duo > * { min-width: 0; }

/* Binding */
.binding-panel { display: flex; flex-direction: column; justify-content: center; }
.binding-answer { margin: 0; font: 700 34px/1.1 "Space Grotesk", sans-serif; color: var(--accent); }
.binding-note { margin: 8px 0 18px; font-size: 12.5px; color: var(--ink-2); }
.constraint-bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 84px; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.bar-label { font-weight: 600; }
.bar-track { height: 10px; background: #eef0f4; border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: 999px; min-width: 0; transition: width .2s; }
.bar-fill.binding { background: var(--amber); }
.bar-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Table */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
.data-table { border-collapse: collapse; width: 100%; min-width: 780px; font-size: 12px; font-variant-numeric: tabular-nums; }
.data-table th {
  background: var(--navy); color: #cfe0f5; text-align: right; padding: 9px 12px;
  font-weight: 600; font-size: 11px; letter-spacing: .03em; position: sticky; top: 0;
}
.data-table th:first-child { text-align: left; }
.data-table td { padding: 7px 12px; text-align: right; border-top: 1px solid var(--line); }
.data-table td:first-child { text-align: left; font-weight: 600; color: var(--ink-2); }
.data-table tbody tr:nth-child(even) { background: #fafbfc; }
.data-table tbody tr.body-row:hover { background: #eef4ff; }
.data-table .na { color: var(--ink-3); }
.data-table .pos { color: var(--green); }
.data-table .neg { color: var(--red); }

/* Sensitivity */
.sens-wrap { display: flex; gap: 0; }
.sens-area { flex: 1; min-width: 0; }
.sens-top {
  margin: 0 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em;
  color: var(--ink-3); text-transform: uppercase; text-align: right; padding-right: 2px;
}
.sens-axis {
  display: flex; align-items: center; justify-content: flex-end;
  writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--ink-3);
  text-transform: uppercase; padding-right: 8px;
}
.sens-grid { display: grid; grid-template-columns: 48px repeat(6, 1fr); gap: 3px; }
.sens-grid .corner { font-size: 10.5px; display: flex; align-items: flex-end; justify-content: flex-end; padding: 0 2px 14px 0; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; text-align: right; }
.sens-grid .rowlab { font-size: 11px; color: var(--ink-2); font-weight: 600; display: flex; align-items: center; justify-content: flex-end; padding-right: 6px; font-variant-numeric: tabular-nums; }
.sens-grid .collab { text-align: center; font-size: 11px; color: var(--ink-2); font-weight: 600; padding-bottom: 2px; font-variant-numeric: tabular-nums; }
.sens-cell {
  border-radius: 6px; padding: 10px 4px; text-align: center;
  font: 700 12px/1.2 "Inter", sans-serif; font-variant-numeric: tabular-nums; color: #fff;
  min-height: 44px; display: grid; place-items: center; border: 1px solid rgba(0,0,0,.04);
}
.sens-cell .pv { font-size: 9px; font-weight: 500; opacity: .85; margin-top: 2px; }
.sens-cell.eq { outline: 2px solid var(--navy); outline-offset: -2px; }

/* Risk */
.risk-panel { border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.risk-panel h4 { margin: 0 0 12px; font-size: 13px; }
.cov-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.cov-item:last-child { border-bottom: 0; }
.cov-item .badge { font: 700 11px/1 "Space Grotesk", sans-serif; padding: 4px 9px; border-radius: 999px; }
.badge.good { background: var(--green-bg); color: var(--green); }
.badge.warn { background: var(--amber-bg); color: var(--amber); }
.badge.bad { background: var(--red-bg); color: var(--red); }

.toggle-row { padding: 7px 0; border-bottom: 1px dashed var(--line); }
.toggle-row:last-child { border-bottom: 0; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.toggle input { display: none; }
.toggle-ui {
  width: 34px; height: 19px; border-radius: 999px; background: var(--line-strong);
  position: relative; transition: background .15s; flex: 0 0 auto;
}
.toggle-ui::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px;
  border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.toggle input:checked + .toggle-ui { background: var(--green); }
.toggle input:checked + .toggle-ui::after { left: 17px; }

.asym-verdict { margin: 12px 0 0; font-size: 12.5px; font-weight: 600; padding: 10px 12px; border-radius: 8px; }
.asym-verdict.ok { background: var(--green-bg); color: var(--green); }
.asym-verdict.warn { background: var(--amber-bg); color: var(--amber); }
.asym-verdict.bad { background: var(--red-bg); color: var(--red); }

.stress-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-top: 16px; }
.stress-out { margin: 8px 0; font: 700 15px/1.4 "Space Grotesk", sans-serif; font-variant-numeric: tabular-nums; }
.stress-out .big { font-size: 20px; display: block; margin-bottom: 4px; }
.select-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12.5px; color: var(--ink-2); }

.foot { color: var(--ink-3); font-size: 11.5px; line-height: 1.6; padding: 4px 2px 0; }

/* responsive */
@media (max-width: 1080px) {
  .wrap { grid-template-columns: 260px 1fr; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .chart-row, .duo, .stress-grid { grid-template-columns: 1fr; }
  .kv-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}