:root {
  color-scheme: light;
  /* shanllamido.de brand: soft neumorphic slate-blue */
  --bg: #e9edf3;
  --surface: #e9edf3;
  --surface-2: #f3f5f9;
  --surface-3: #dfe4ec;
  --ink: #3f4b66;
  --ink-2: #4a5878;
  --ink-3: #5f6f94;
  --line: #d3dae5;
  --line-2: #c5cddb;
  --accent: #3d85bd;
  --accent-2: #6fb0da;
  --accent-ink: #2f6d9e;
  --accent-soft: #d6e6f3;
  --focus: #3d85bd;
  --pos: #1f7a4d;
  --neg: #b23a3a;
  --warn-bg: #f6efe0;
  --warn-ink: #6e5212;
  --neu-dark: #c5cddb;
  --neu-light: #ffffff;
  --raise: 7px 7px 14px var(--neu-dark), -7px -7px 14px var(--neu-light);
  --raise-sm: 4px 4px 9px var(--neu-dark), -4px -4px 9px var(--neu-light);
  --inset: inset 3px 3px 7px var(--neu-dark), inset -3px -3px 7px var(--neu-light);

  /* chart roles (validated reference palette, slot 1 tuned to the brand blue) */
  --series-1: #3d85bd;
  --series-2: #e0703f;
  --series-3: #1baf7a;
  --muted-mark: #b4bfd0;
  --grid: #d9dfe8;
  --axis: #b4bfd0;
  --seq-1: #dbe6f4; --seq-2: #c3d6ee; --seq-3: #93b8e2; --seq-4: #6fb0da; --seq-5: #3d85bd; --seq-6: #2f6d9e; --seq-7: #1f4b73;
  --div-neg-1: #f3d9d6; --div-neg-2: #e9aaa4; --div-neg-3: #dc726b; --div-neg-4: #be3d3d;
  --div-pos-1: #d6e6f3; --div-pos-2: #a9c9e6; --div-pos-3: #6fb0da; --div-pos-4: #3d85bd;
  --div-mid: #f3f5f9;

  --tag-verified-bg: #dcefe4; --tag-verified-ink: #17633d;
  --tag-assumption-bg: #f6ead2; --tag-assumption-ink: #6e5212;
  --tag-synthetic-bg: #e4e1f5; --tag-synthetic-ink: #4b3f99;
  --tag-projection-bg: #d6e6f3; --tag-projection-ink: #2f6d9e;

  --radius: 16px;
  --shadow: var(--raise-sm);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1d2330; --surface: #1d2330; --surface-2: #232a39; --surface-3: #283043;
    --ink: #e6ebf3; --ink-2: #b9c4d8; --ink-3: #8e9bb5; --line: #2c3446; --line-2: #39425a;
    --accent: #6fb0da; --accent-2: #9fcbe8; --accent-ink: #9fcbe8; --accent-soft: #23364d; --focus: #6fb0da;
    --pos: #4cc98a; --neg: #ef8a8a; --warn-bg: #2e2818; --warn-ink: #eacb7d;
    --neu-dark: #141923; --neu-light: #262e3e;
    --series-1: #5ea7d6; --series-2: #d9643a; --series-3: #199e70; --muted-mark: #4a5570; --grid: #2a3244; --axis: #3c465e;
    --seq-1: #1f2b3f; --seq-2: #223a59; --seq-3: #255285; --seq-4: #2f6d9e; --seq-5: #3d85bd; --seq-6: #6fb0da; --seq-7: #b5d6ee;
    --div-neg-1: #3a2529; --div-neg-2: #6b3035; --div-neg-3: #a8433f; --div-neg-4: #e56d6d;
    --div-pos-1: #1f2f45; --div-pos-2: #24456d; --div-pos-3: #2f6d9e; --div-pos-4: #5ea7d6; --div-mid: #262e3e;
    --tag-verified-bg: #16352a; --tag-verified-ink: #7fd6a6; --tag-assumption-bg: #352c14; --tag-assumption-ink: #eacb7d;
    --tag-synthetic-bg: #2a2650; --tag-synthetic-ink: #b8aff0; --tag-projection-bg: #23364d; --tag-projection-ink: #9fcbe8;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1d2330; --surface: #1d2330; --surface-2: #232a39; --surface-3: #283043;
  --ink: #e6ebf3; --ink-2: #b9c4d8; --ink-3: #8e9bb5; --line: #2c3446; --line-2: #39425a;
  --accent: #6fb0da; --accent-2: #9fcbe8; --accent-ink: #9fcbe8; --accent-soft: #23364d; --focus: #6fb0da;
  --pos: #4cc98a; --neg: #ef8a8a; --warn-bg: #2e2818; --warn-ink: #eacb7d;
  --neu-dark: #141923; --neu-light: #262e3e;
  --series-1: #5ea7d6; --series-2: #d9643a; --series-3: #199e70; --muted-mark: #4a5570; --grid: #2a3244; --axis: #3c465e;
  --seq-1: #1f2b3f; --seq-2: #223a59; --seq-3: #255285; --seq-4: #2f6d9e; --seq-5: #3d85bd; --seq-6: #6fb0da; --seq-7: #b5d6ee;
  --div-neg-1: #3a2529; --div-neg-2: #6b3035; --div-neg-3: #a8433f; --div-neg-4: #e56d6d;
  --div-pos-1: #1f2f45; --div-pos-2: #24456d; --div-pos-3: #2f6d9e; --div-pos-4: #5ea7d6; --div-mid: #262e3e;
  --tag-verified-bg: #16352a; --tag-verified-ink: #7fd6a6; --tag-assumption-bg: #352c14; --tag-assumption-ink: #eacb7d;
  --tag-synthetic-bg: #2a2650; --tag-synthetic-ink: #b8aff0; --tag-projection-bg: #23364d; --tag-projection-ink: #9fcbe8;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 50; background: var(--surface); padding: 8px 12px; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px; }
.brand-name { font-weight: 650; font-size: 14px; }
.brand-sub { color: var(--ink-3); font-size: 12px; }
#nav { display: flex; flex-direction: column; gap: 2px; }
#nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-weight: 500; }
#nav a:hover { background: var(--surface-3); color: var(--ink); }
#nav a.active { background: var(--accent-soft); color: var(--accent-ink); }
.nav-k { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line-2); font-size: 11px; font-weight: 600; color: var(--ink-3); flex: none; }
#nav a.active .nav-k { border-color: transparent; background: var(--accent); color: #fff; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-3); }
.legend-title { font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.legend { line-height: 2; }

.main-wrap { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 28px; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar h1 { font-size: 17px; font-weight: 650; }
.subtitle { margin: 2px 0 0; color: var(--ink-2); font-size: 13px; }
.topbar-controls { display: flex; gap: 10px; align-items: center; }
main { padding: 24px 28px 40px; max-width: 1360px; width: 100%; outline: none; }
.foot { padding: 18px 28px 28px; color: var(--ink-3); font-size: 12px; border-top: 1px solid var(--line); max-width: 1360px; }

/* ---------- controls ---------- */
.seg { display: inline-flex; background: var(--surface-3); border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: 500 13px var(--font); padding: 6px 12px; border-radius: 6px; cursor: pointer; white-space: nowrap; }
.seg button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg button:disabled { cursor: default; opacity: .55; }
.seg button:disabled[aria-checked="true"] { opacity: 1; }
.icon-btn, .btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 10px; font: 500 13px var(--font); cursor: pointer; }
.btn:hover, .icon-btn:hover { background: var(--surface-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent-ink); padding: 4px 6px; }
select, input[type="number"], input[type="text"], textarea { font: 13px var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 7px; padding: 6px 8px; }
textarea { width: 100%; resize: vertical; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* ---------- layout primitives ---------- */
.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 760px; }
.eyebrow { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 4px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); min-width: 0; }
.card h3 { font-size: 14px; font-weight: 600; }
.card .card-sub { color: var(--ink-3); font-size: 12.5px; margin: 2px 0 12px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt { margin-top: 16px; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }

.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--warn-bg); color: var(--warn-ink); border-radius: 9px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.notice b { font-weight: 600; }

/* ---------- tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 10.5px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; padding: 1px 6px; border-radius: 4px; white-space: nowrap; vertical-align: 1px; }
.tag::before { font-size: 10px; }
.tag.verified { background: var(--tag-verified-bg); color: var(--tag-verified-ink); }
.tag.verified::before { content: "✓"; }
.tag.assumption { background: var(--tag-assumption-bg); color: var(--tag-assumption-ink); }
.tag.assumption::before { content: "≈"; }
.tag.synthetic { background: var(--tag-synthetic-bg); color: var(--tag-synthetic-ink); }
.tag.synthetic::before { content: "◇"; }
.tag.projection { background: var(--tag-projection-bg); color: var(--tag-projection-ink); }
.tag.projection::before { content: "↗"; }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; position: relative; }
.kpi .k-label { display: flex; justify-content: space-between; gap: 6px; color: var(--ink-2); font-size: 12.5px; font-weight: 500; }
.kpi .k-value { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; margin-top: 6px; line-height: 1.15; }
.kpi .k-sub { color: var(--ink-3); font-size: 12px; margin-top: 4px; }
.kpi.hero { background: var(--surface); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.delta-up { color: var(--pos); font-weight: 600; }
.delta-down { color: var(--neg); font-weight: 600; }
.info { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 10px; color: var(--ink-3); cursor: help; flex: none; font-style: normal; font-weight: 600; }

/* ---------- assumption panel ---------- */
.panel { position: sticky; top: 78px; max-height: calc(100vh - 96px); overflow: auto; }
.ctl-group { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.ctl-group:first-of-type { border-top: 0; margin-top: 0; padding-top: 0; }
.ctl-group h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 600; margin-bottom: 8px; }
.ctl { display: grid; grid-template-columns: 1fr 92px; gap: 2px 10px; align-items: center; margin-bottom: 10px; }
.ctl label { font-size: 12.5px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; }
.ctl input[type="number"] { width: 92px; text-align: right; font-variant-numeric: tabular-nums; }
.ctl input[type="range"] { grid-column: 1 / -1; }
.ctl.overridden label::after { content: "edited"; font-size: 10px; color: var(--tag-assumption-ink); background: var(--tag-assumption-bg); padding: 0 5px; border-radius: 4px; }
.ctl-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 9px; max-height: 560px; }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { position: sticky; top: 0; background: var(--surface-2); font-weight: 600; color: var(--ink-2); cursor: default; z-index: 1; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }
th.sorted::after { content: " ↓"; }
th.sorted.asc::after { content: " ↑"; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:hover { background: var(--surface-2); }
tbody tr.clickable { cursor: pointer; }
tbody tr.selected { background: var(--accent-soft); }
.pill { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; background: var(--surface-3); color: var(--ink-2); }
.pill.top { background: var(--accent); color: #fff; }
.scorebar { display: inline-block; width: 54px; height: 6px; border-radius: 3px; background: var(--surface-3); vertical-align: middle; margin-right: 6px; overflow: hidden; }
.scorebar > i { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }

/* ---------- charts ---------- */
svg.chart { display: block; overflow: visible; font-family: var(--font); }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .ref { stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 3 3; }
.chart .tick { fill: var(--ink-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .label { fill: var(--ink-2); font-size: 12px; }
.chart .label.strong { fill: var(--ink); font-weight: 600; }
.chart .value { fill: var(--ink); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart .value.small { font-size: 11px; }
.chart .bar { fill: var(--series-1); transition: opacity .12s; }
.chart .bar.s2 { fill: var(--series-2); }
.chart .bar.s3 { fill: var(--series-3); }
.chart .bar.muted { fill: var(--muted-mark); }
.chart .bar.seq-2 { fill: var(--seq-7); } .chart .bar.seq-3 { fill: var(--seq-6); } .chart .bar.seq-4 { fill: var(--seq-5); }
.chart .bar.seq-5 { fill: var(--seq-4); } .chart .bar.seq-6 { fill: var(--seq-3); }
.chart .hit { fill: transparent; }
.chart .wf.pos { fill: var(--series-1); } .chart .wf.neg { fill: var(--series-2); } .chart .wf.total { fill: var(--ink-2); }
.chart .connector { stroke: var(--axis); stroke-dasharray: 2 2; }
.chart .dot { fill: var(--muted-mark); stroke: var(--surface); stroke-width: 2; }
.chart .dot.hi { fill: var(--series-1); }
.chart .dot.sel { fill: var(--series-2); }
.chart .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; }
.chart .line.s2 { stroke: var(--series-2); }
.chart .line.s3 { stroke: var(--series-3); }
.chart .hm { stroke: none; }
.chart .hm-na { fill: var(--surface-3); }
.chart .hm-1 { fill: var(--seq-1); } .chart .hm-2 { fill: var(--seq-2); } .chart .hm-3 { fill: var(--seq-3); } .chart .hm-4 { fill: var(--seq-4); }
.chart .hm-5 { fill: var(--seq-5); } .chart .hm-6 { fill: var(--seq-6); } .chart .hm-7 { fill: var(--seq-7); }
.chart .hm-0 { fill: var(--div-mid); }
.chart .hm-neg-1 { fill: var(--div-neg-1); } .chart .hm-neg-2 { fill: var(--div-neg-2); } .chart .hm-neg-3 { fill: var(--div-neg-3); } .chart .hm-neg-4 { fill: var(--div-neg-4); }
.chart .hm-pos-1 { fill: var(--div-pos-1); } .chart .hm-pos-2 { fill: var(--div-pos-2); } .chart .hm-pos-3 { fill: var(--div-pos-3); } .chart .hm-pos-4 { fill: var(--div-pos-4); }
.chart .hover { opacity: .8; }
.chart .hm.hover { stroke: var(--ink); stroke-width: 1.5; opacity: 1; }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin-top: 8px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.sw-1 { background: var(--series-1); } .sw-2 { background: var(--series-2); } .sw-3 { background: var(--series-3); } .sw-m { background: var(--muted-mark); } .sw-t { background: var(--ink-2); }
.sw-neg { background: var(--div-neg-3); } .sw-pos { background: var(--div-pos-3); } .sw-mid { background: var(--div-mid); border: 1px solid var(--line-2); }
.tooltip { position: fixed; z-index: 100; pointer-events: none; opacity: 0; background: var(--ink); color: var(--surface); font-size: 12px; line-height: 1.45; padding: 7px 10px; border-radius: 7px; max-width: 280px; transition: opacity .08s; font-variant-numeric: tabular-nums; box-shadow: 0 6px 20px rgba(0,0,0,.18); }

/* ---------- schedule gantt ---------- */
.gantt { display: grid; grid-template-columns: 170px repeat(6, minmax(0, 1fr)); font-size: 12px; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.gantt > div { border-bottom: 1px solid var(--line); padding: 6px 8px; min-height: 36px; }
.gantt .gh { background: var(--surface-2); font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; }
.gantt .gname { border-right: 1px solid var(--line); }
.gantt .gname b { font-weight: 600; display: block; }
.gantt .gname span { color: var(--ink-3); font-size: 11px; }
.gantt .gday { position: relative; border-left: 1px solid var(--line); padding: 0; }
.gantt .shift { position: absolute; top: 9px; height: 18px; border-radius: 4px; background: var(--series-1); color: #fff; font-size: 10.5px; line-height: 18px; padding: 0 4px; overflow: hidden; white-space: nowrap; }
.gantt .shift.unq { background: var(--seq-3); color: #0b0b0b; }
.gantt .shift .brk { position: absolute; top: 0; bottom: 0; width: 5px; background: repeating-linear-gradient(45deg, rgba(255,255,255,.9) 0 2px, transparent 2px 4px); }
.gantt .off { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, var(--surface-3) 0 4px, transparent 4px 8px); }
.gantt .hours-scale { display: flex; justify-content: space-between; color: var(--ink-3); font-weight: 400; font-size: 10.5px; }

/* ---------- analyst ---------- */
.chat { display: flex; flex-direction: column; gap: 14px; }
.msg { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--surface); }
.msg.user { background: var(--surface-3); border-color: transparent; align-self: flex-end; max-width: 80%; }
.msg h4 { font-size: 13.5px; margin-bottom: 6px; }
.msg p { margin: 6px 0; }
.msg ul { margin: 6px 0; padding-left: 18px; }
.msg details { margin-top: 8px; font-size: 12px; }
.msg summary { cursor: pointer; color: var(--accent-ink); }
.msg pre { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px; font-size: 11.5px; overflow: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); border-radius: 16px; padding: 5px 11px; font: 12.5px var(--font); cursor: pointer; text-align: left; }
.chip:hover { border-color: var(--accent); color: var(--accent-ink); }
.composer { display: flex; gap: 8px; }
.composer input { flex: 1; padding: 10px 12px; font-size: 14px; }
.mode-badge { font-size: 12px; color: var(--ink-3); }

.formula { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 7px; padding: 8px 10px; margin: 6px 0; overflow-x: auto; white-space: pre; }
.list-clean { margin: 0; padding-left: 18px; }
.list-clean li { margin: 4px 0; }
.status { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.status.ok { background: var(--tag-verified-bg); color: var(--tag-verified-ink); }
.status.simp { background: var(--tag-assumption-bg); color: var(--tag-assumption-ink); }
.status.need { background: var(--tag-synthetic-bg); color: var(--tag-synthetic-ink); }
.loading { padding: 60px; text-align: center; color: var(--ink-3); }
.timeline { display: grid; grid-template-columns: 130px 1fr; gap: 8px 14px; font-size: 13px; }
.timeline .wk { font-weight: 600; color: var(--ink-2); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .g-side { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; max-height: none; }
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; padding: 8px 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar-foot { display: none; }
  #nav { flex-direction: row; gap: 4px; }
  #nav a { white-space: nowrap; padding: 6px 9px; font-size: 13px; }
  .topbar { position: static; padding: 12px 16px; flex-direction: column; align-items: flex-start; }
  .topbar-controls { width: 100%; justify-content: space-between; }
  .seg { overflow-x: auto; max-width: calc(100vw - 80px); }
  main { padding: 16px; }
  .foot { padding: 16px; }
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gantt { grid-template-columns: 110px repeat(6, minmax(44px, 1fr)); overflow-x: auto; }
  .msg.user { max-width: 100%; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .seg button { padding: 6px 8px; font-size: 12px; }
}
@media (forced-colors: active) { .chart .bar, .chart .wf, .chart .hm { forced-color-adjust: none; } }

/* ---------- brand layer: shanllamido.de (neumorphic) ---------- */
body { letter-spacing: -0.003em; }
.sidebar { background: var(--bg); border-right: 0; box-shadow: 6px 0 16px -12px var(--neu-dark); }
.brand { flex-direction: column; align-items: flex-start; gap: 2px; padding: 2px 8px 6px; text-decoration: none; }
.brand-name { font-size: 20px; font-weight: 700; color: #5f6f94; letter-spacing: -0.02em; }
:root[data-theme="dark"] .brand-name { color: var(--accent-2); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand-name { color: var(--accent-2); } }
.brand-sub { font-size: 12px; color: var(--ink-3); font-weight: 500; }
#nav a { border-radius: 999px; padding: 8px 12px; color: var(--ink-2); }
#nav a:hover { background: transparent; box-shadow: var(--raise-sm); color: var(--ink); }
#nav a.active { background: linear-gradient(90deg, var(--accent-ink) 0%, var(--accent) 100%); color: #fff; box-shadow: var(--raise-sm); }
.nav-k { border-radius: 50%; border: 0; box-shadow: var(--inset); color: var(--ink-3); }
#nav a.active .nav-k { background: rgba(255,255,255,.22); box-shadow: none; color: #fff; }
.sidebar-foot { border-top: 0; }
.topbar { background: color-mix(in srgb, var(--bg) 90%, transparent); border-bottom: 0; box-shadow: 0 8px 18px -14px var(--neu-dark); }
.topbar h1 { font-weight: 700; color: var(--ink); }
.page-head h2 { font-weight: 700; font-size: 26px; }
.eyebrow { color: var(--accent-ink); letter-spacing: .08em; }
.card, .kpi { background: var(--surface); border: 0; box-shadow: var(--raise-sm); }
.grid, .kpis, .stack { gap: 20px; }
.kpi .k-value { font-size: 23px; font-weight: 700; color: var(--ink); }
.kpi.hero { box-shadow: var(--raise-sm); background: linear-gradient(145deg, color-mix(in srgb, var(--accent-soft) 70%, var(--surface)) 0%, var(--surface) 70%); border: 0; }
.seg { background: var(--bg); border: 0; box-shadow: var(--inset); border-radius: 999px; padding: 4px; }
.seg button { border-radius: 999px; font-weight: 500; font-family: var(--font); }
.seg button[aria-checked="true"] { background: linear-gradient(90deg, var(--accent-ink) 0%, var(--accent) 100%); color: #fff; box-shadow: var(--raise-sm); }
.icon-btn, .btn { background: var(--bg); border: 0; box-shadow: var(--raise-sm); border-radius: 999px; font-family: var(--font); padding: 8px 14px; }
.btn:hover, .icon-btn:hover { background: var(--bg); color: var(--accent-ink); }
.btn:active, .icon-btn:active { box-shadow: var(--inset); }
.btn.primary { background: linear-gradient(90deg, var(--accent-ink) 0%, var(--accent) 100%); color: #fff; }
.btn.ghost { box-shadow: none; background: transparent; }
select, input[type="number"], input[type="text"], textarea { background: var(--bg); border: 0; box-shadow: var(--inset); border-radius: 10px; font-family: var(--font); }
textarea { font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.table-wrap { border: 0; background: var(--surface-2); box-shadow: var(--inset); border-radius: 12px; }
th { background: var(--surface-3); color: var(--ink-2); }
th, td { border-bottom-color: var(--line); }
tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.notice { background: var(--surface-2); box-shadow: var(--inset); border-left: 3px solid #c99a2e; border-radius: 12px; }
.chip { background: var(--bg); border: 0; box-shadow: var(--raise-sm); font-family: var(--font); }
.chip:hover { color: var(--accent-ink); box-shadow: var(--inset); }
.msg { background: var(--surface-2); border: 0; box-shadow: var(--inset); }
.msg.user { background: linear-gradient(90deg, var(--accent-ink) 0%, var(--accent) 100%); color: #fff; box-shadow: var(--raise-sm); }
.formula { background: var(--surface-2); border: 0; box-shadow: var(--inset); }
.gantt { border: 0; box-shadow: var(--inset); background: var(--surface-2); }
.gantt .gh { background: var(--surface-3); }
.pill { background: var(--surface-3); }
.pill.top { background: linear-gradient(90deg, var(--accent-ink) 0%, var(--accent) 100%); }
.scorebar { box-shadow: var(--inset); background: var(--bg); }
.scorebar > i { background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%); }
.tooltip { background: #3f4b66; color: #fff; border-radius: 10px; }
.foot a { color: var(--accent-ink); font-weight: 600; }
.chart .tick, .chart .label { font-family: var(--font); }
@media (max-width: 900px) {
  .brand { flex-direction: row; align-items: center; padding: 0 4px; }
  .brand-name { font-size: 16px; white-space: nowrap; }
  .brand .brand-sub { display: none; }
  .grid, .kpis, .stack { gap: 16px; }
}

/* ---------- recommendation band (first screen) ---------- */
.verdict { padding: 22px 24px; margin-bottom: 14px; background: linear-gradient(150deg, color-mix(in srgb, var(--accent-soft) 75%, var(--surface)) 0%, var(--surface) 60%); }
.verdict-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.verdict-title { font-size: 17px; line-height: 1.45; font-weight: 600; margin-top: 4px; max-width: 900px; }
.verdict-title .status { font-size: 12px; vertical-align: 2px; margin-right: 4px; }
.verdict-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 18px 0 12px; }
.verdict-nums > div { background: var(--surface); box-shadow: var(--raise-sm); border-radius: 14px; padding: 14px 16px; }
.vn-label { font-size: 12.5px; color: var(--ink-2); font-weight: 500; display: flex; gap: 6px; align-items: center; }
.vn-value { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-top: 4px; color: var(--ink); }
.vn-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.verdict-must { margin: 4px 0 0; color: var(--ink-2); }
.challenge { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.challenge-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 22px; margin-top: 8px; }
.challenge-grid .ctl { margin-bottom: 0; }
.evidence-strip { margin: 0 0 18px; color: var(--ink-2); line-height: 1.9; }
.evidence-strip a { color: var(--accent-ink); }
tr.subtotal td { background: color-mix(in srgb, var(--accent-soft) 40%, transparent); }
tr.total td { background: var(--accent-soft); font-size: 13.5px; }
.proof { background: var(--surface-2); box-shadow: var(--inset); border-radius: 12px; padding: 14px 16px; }
.proof-title { font-weight: 600; display: flex; gap: 8px; align-items: center; }
.proof p { margin: 8px 0; }
.proof code, .formula code { font-size: 11.5px; }
#ov-logic td { white-space: normal; }
@media (max-width: 1180px) { .challenge-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .verdict { padding: 16px; }
  .verdict-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .vn-value { font-size: 24px; }
  .challenge-grid { grid-template-columns: minmax(0, 1fr); }
}
#ov-logic .formula { white-space: pre-wrap; }
.ctl-pair .ctl { grid-template-columns: minmax(0, 1fr) 66px; }
.ctl-pair .ctl input[type="number"] { width: 66px; }
.ctl label { min-width: 0; }
.verdict-nums { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.vn-pilot { background: linear-gradient(135deg, var(--accent-ink) 0%, var(--accent) 100%) !important; }
.vn-pilot .vn-label, .vn-pilot .vn-value, .vn-pilot .vn-sub { color: #fff; }
.vn-pilot .info { color: #fff; border-color: rgba(255,255,255,.6); }
.vn-value { font-size: 26px; }
.cf-basis { margin-top: 10px; font-size: 13px; }
.cf-basis summary { cursor: pointer; color: var(--accent-ink); font-weight: 600; }
@media (max-width: 1180px) { .verdict-nums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .verdict-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vn-value { font-size: 22px; } }
