/* SolarMax Monitor – Design-System */
:root {
  color-scheme: light;
  --page: #f6f5f1;
  --surface: #fcfcfb;
  --surface-2: #f1f0eb;
  --surface-3: #e8e7e1;
  --ink: #0b0b0b;
  --ink-2: #52514e;
  --muted: #898781;
  --grid: #e1e0d9;
  --axis: #c3c2b7;
  --border: rgba(11, 11, 11, .09);
  --shadow: 0 1px 2px rgba(20, 18, 10, .04), 0 8px 24px -12px rgba(20, 18, 10, .12);
  --accent: #e8930c;
  --accent-ink: #9a5b00;
  --accent-soft: rgba(232, 147, 12, .12);
  --glow: radial-gradient(1200px 500px at 85% -10%, rgba(245, 165, 36, .16), transparent 60%);
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100;
  --good: #0ca30c; --warn: #fab219; --serious: #ec835a; --crit: #d03b3b;
  --good-ink: #006300;
  --seq-0: #e8f1fc; --seq-1: #b7d3f6; --seq-2: #6da7ec; --seq-3: #2a78d6; --seq-4: #184f95;
  --seq-ink-lo: #0b0b0b; --seq-ink-hi: #ffffff;   /* Schrift auf hellen / dunklen Heatmap-Stufen */
  --cmp: #a3a196;                                  /* Vergleichsjahr (zurückgenommen) */
  --radius: 18px;
  --radius-sm: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #0d0d0c; --surface: #1a1a19; --surface-2: #222220; --surface-3: #2c2c2a;
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781; --grid: #2c2c2a; --axis: #383835;
    --border: rgba(255, 255, 255, .08);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
    --accent: #f5a524; --accent-ink: #f8bd56; --accent-soft: rgba(245, 165, 36, .14);
    --glow: radial-gradient(1200px 520px at 85% -12%, rgba(245, 165, 36, .13), transparent 60%);
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
    --good-ink: #0ca30c;
    --seq-0: #1f2733; --seq-1: #184f95; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #9ec5f4;
    --seq-ink-lo: #f0efec; --seq-ink-hi: #0b0b0b; --cmp: #6d6c66;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #0d0d0c; --surface: #1a1a19; --surface-2: #222220; --surface-3: #2c2c2a;
  --ink: #f0efec; --ink-2: #c3c2b7; --muted: #898781; --grid: #2c2c2a; --axis: #383835;
  --border: rgba(255, 255, 255, .08);
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 32px -16px rgba(0, 0, 0, .6);
  --accent: #f5a524; --accent-ink: #f8bd56; --accent-soft: rgba(245, 165, 36, .14);
  --glow: radial-gradient(1200px 520px at 85% -12%, rgba(245, 165, 36, .13), transparent 60%);
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500;
  --good-ink: #0ca30c;
  --seq-0: #1f2733; --seq-1: #184f95; --seq-2: #2a78d6; --seq-3: #5598e7; --seq-4: #9ec5f4;
  --seq-ink-lo: #f0efec; --seq-ink-hi: #0b0b0b; --cmp: #6d6c66;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--glow), var(--page);
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; font-weight: 650; }
h1 { font-size: 28px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
.muted { color: var(--muted); }
.ink2 { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
/* Grundgröße aller Icons – speziellere Regeln (Buttons, Navigation …) überschreiben sie */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; }

/* Layout */
.app { min-height: 100%; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px; padding: 22px 16px;
  display: flex; flex-direction: column; gap: 22px;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 16px; padding: 0 8px; }
.brand svg { width: 28px; height: 28px; }
.brand b { color: var(--accent); font-weight: 700; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a, .nav .nav-label {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14px;
}
.nav .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 4px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--ink); }
.nav a.active svg { color: var(--accent); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .dot { margin-left: auto; }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; flex: none; }
.sidebar-foot .who { min-width: 0; flex: 1; font-size: 13px; line-height: 1.3; }
.sidebar-foot .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { padding: 28px 32px 48px; max-width: 1440px; outline: none; }
.app.with-nav .main { margin-left: 248px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: none; justify-content: space-around;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; font-size: 11px; text-decoration: none; color: var(--muted); font-weight: 500; }
.tabbar a.active { color: var(--accent); }
.tabbar svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .sidebar { display: none; }
  .app.with-nav .main { margin-left: 0; }
  .tabbar:not([hidden]) { display: flex; }
  .main { padding: calc(16px + env(safe-area-inset-top)) 16px calc(92px + env(safe-area-inset-bottom)); }
  h1 { font-size: 23px; }
}

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); font-size: 14px; margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head .hint { font-size: 13px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1100px) { .cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .cols-2, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* Hero */
.hero {
  display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; margin-bottom: 16px;
}
@media (max-width: 1280px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.live-card { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 22px 20px 18px; }
.live-card::before {
  content: ""; position: absolute; inset: -40% -20% auto; height: 120%;
  background: radial-gradient(closest-side, var(--accent-soft), transparent); pointer-events: none;
}
.gauge { position: relative; width: 230px; height: 150px; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge .track { stroke: var(--surface-3); }
.gauge .fill { stroke: url(#gaugeGrad); transition: stroke-dashoffset 1.2s cubic-bezier(.2, .8, .2, 1); filter: drop-shadow(0 0 10px rgba(245, 165, 36, .35)); }
.gauge .readout { position: absolute; left: 0; right: 0; bottom: 4px; text-align: center; }
.gauge .value { font-size: 42px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.gauge .unit { font-size: 16px; font-weight: 600; color: var(--muted); margin-left: 3px; }
.gauge .of { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.live-meta { margin-top: 14px; display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; justify-content: center; }

.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 560px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .label svg { width: 15px; height: 15px; color: var(--accent); }
.kpi .value { font-size: 26px; font-weight: 680; letter-spacing: -.025em; line-height: 1.1; }
.kpi .value small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 3px; letter-spacing: 0; }
.kpi .foot { font-size: 12.5px; color: var(--ink-2); }
@media (max-width: 560px) { .kpi { padding: 13px 14px; } .kpi .value { font-size: 21px; } }

/* Status */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 550; padding: 3px 10px 3px 8px; border-radius: 99px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.badge svg { width: 14px; height: 14px; }
.badge.good svg { color: var(--good); }
.badge.warn svg { color: var(--warn); }
.badge.crit svg { color: var(--crit); }
.badge.off svg { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; flex: none; }
.dot.on { background: var(--good); box-shadow: 0 0 0 4px color-mix(in srgb, var(--good) 22%, transparent); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--good) 0%, transparent); } }

/* Controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--border);
  background: var(--surface); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 550; font-size: 14px;
  text-decoration: none; transition: background .15s, transform .1s; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: transparent; color: #1b1203; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { color: var(--crit); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.icon { padding: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--border); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 550; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.pager { display: inline-flex; align-items: center; gap: 4px; }
.pager .label { min-width: 120px; text-align: center; font-weight: 600; font-size: 14px; }
.pager input[type="date"], .pager input[type="month"] { border: 0; background: transparent; font-weight: 600; text-align: center; width: 140px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.field input, .field select, .field textarea {
  border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: 15px; color: var(--ink);
  outline: none; transition: border-color .15s, box-shadow .15s; width: 100%;
}
.field input:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form { display: grid; gap: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }

/* Charts */
.chart { width: 100%; height: 320px; }
.chart.tall { height: 360px; }
.chart.short { height: 190px; }
@media (max-width: 760px) { .chart { height: 260px; } .chart.tall { height: 290px; } }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; flex-wrap: wrap; }
.sum { font-size: 13px; color: var(--ink-2); }
.sum b { color: var(--ink); font-size: 15px; }

/* Plant cards (Übersicht) */
.plant-card { text-decoration: none; display: flex; flex-direction: column; gap: 14px; transition: transform .2s, border-color .2s; }
.plant-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.plant-card .top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.plant-card .big { font-size: 34px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.plant-card .big small { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.plant-card .stats { display: flex; gap: 22px; font-size: 13px; color: var(--muted); }
.plant-card .stats b { display: block; color: var(--ink); font-size: 16px; font-weight: 650; }
.plant-card .chart { height: 80px; }

/* Inverter */
.inv { display: flex; flex-direction: column; gap: 14px; }
.inv-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.inv-head .name { display: flex; align-items: center; gap: 9px; }
.inv-head .swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.inv-power { display: flex; align-items: baseline; gap: 6px; }
.inv-power b { font-size: 28px; letter-spacing: -.03em; }
.bar { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #f7c04a, var(--accent)); transition: width 1s; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 12px; }
.metric { background: var(--surface-2); border-radius: 10px; padding: 9px 11px; }
.metric span { display: block; font-size: 11.5px; color: var(--muted); }
.metric b { font-size: 15px; font-weight: 620; }

/* Lists & tables */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--border); align-items: center; font-size: 14px; }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item > svg { width: 20px; height: 20px; flex: none; align-self: flex-start; margin-top: 2px; }
.list-item > svg.muted { color: var(--muted); }
.list-item time { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 550; font-size: 12.5px; }
td.r, th.r { text-align: right; font-variant-numeric: tabular-nums; }

/* Code */
.code { position: relative; }
.code pre { margin: 0; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, monospace; }
.code .btn { position: absolute; top: 8px; right: 8px; padding: 5px 9px; font-size: 12px; }
.key { display: flex; gap: 8px; align-items: center; }
.key code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; font: 13px ui-monospace, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--border); padding: 9px 11px; border-radius: 10px; white-space: nowrap; }

/* Dropzone */
.drop {
  border: 2px dashed var(--axis); border-radius: var(--radius); padding: 40px 20px; text-align: center; cursor: pointer;
  transition: border-color .2s, background .2s; background: var(--surface);
}
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 42px; height: 42px; color: var(--accent); }
.drop h3 { margin-top: 10px; }
.result { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 14px; }

/* Login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: 100%; max-width: 410px; padding: 32px 28px; }
.auth .brand { justify-content: center; margin-bottom: 8px; font-size: 20px; }
.auth .brand svg { width: 40px; height: 40px; }
.auth p { text-align: center; color: var(--muted); margin: 0 0 22px; }
.error { color: var(--crit); font-size: 14px; min-height: 1em; }

/* Misc */
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--axis); }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: 10px; }
@keyframes sk { to { background-position: -200% 0; } }
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: var(--page); padding: 10px 18px; border-radius: 12px; font-size: 14px; font-weight: 550;
  transition: .25s; pointer-events: none; z-index: 100; max-width: calc(100vw - 32px);
}
@media (min-width: 901px) { .toast { bottom: 28px; } }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; cursor: pointer; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-color: var(--accent); }
details.card > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
details.card > summary::-webkit-details-marker { display: none; }
details.card[open] > summary { margin-bottom: 16px; }
.chev { transition: transform .2s; width: 18px; height: 18px; color: var(--muted); }
details[open] .chev { transform: rotate(180deg); }
.fade-in { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; transition: none !important; } }

/* Störungen */
.alert-banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; margin-bottom: 16px; border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--crit) 9%, var(--surface)); border: 1px solid color-mix(in srgb, var(--crit) 35%, transparent); font-size: 14px; }
.alert-banner > svg { width: 20px; height: 20px; color: var(--crit); flex: none; margin-top: 1px; }
.alert-banner .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.alert-banner time { color: var(--muted); font-size: 12.5px; white-space: nowrap; }

/* Schalter */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14px; font-weight: 550; color: var(--ink); }
.switch input { appearance: none; -webkit-appearance: none; width: 42px; height: 24px; border-radius: 99px; background: var(--surface-3);
  position: relative; cursor: pointer; transition: background .2s; flex: none; margin: 0; border: 1px solid var(--border); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .2s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible, .check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }
.field .hint, .hint-text { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.field input:disabled { opacity: .6; }
.field select { appearance: none; -webkit-appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23898781' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px; }
.select-inline { border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 6px 10px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Jahresvergleich */
.cmp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--ink-2); }
.cmp-head .swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.cmp-sum { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 10px; }
.cmp-sum div { font-size: 13px; color: var(--muted); }
.cmp-sum b { display: block; font-size: 17px; color: var(--ink); font-weight: 650; font-variant-numeric: tabular-nums; }
.heat { font-size: 13px; }
.heat th, .heat td { padding: 7px 6px; text-align: right; font-variant-numeric: tabular-nums; }
.heat th:first-child, .heat td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); z-index: 1; font-weight: 650; }
.heat tbody tr { cursor: pointer; }
.heat tbody tr:hover td:first-child { color: var(--accent-ink); }
.heat td.h { border-bottom: 2px solid var(--surface); border-left: 2px solid var(--surface); border-radius: 6px; }
.heat td.h0 { background: var(--seq-0); color: var(--seq-ink-lo); }
.heat td.h1 { background: var(--seq-1); color: var(--seq-ink-lo); }
.heat td.h2 { background: var(--seq-2); color: var(--seq-ink-lo); }
.heat td.h3 { background: var(--seq-3); color: var(--seq-ink-hi); }
.heat td.h4 { background: var(--seq-4); color: var(--seq-ink-hi); }
.heat td.part { font-style: italic; opacity: .75; }
.heat td.sum { font-weight: 650; }
.heat td.delta { color: var(--ink-2); white-space: nowrap; }
.heat tr.sel-a td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.heat tr.sel-b td:first-child { box-shadow: inset 3px 0 0 var(--cmp); }
