/* Velín v2. Design systém pro dvě sekce: Můj Hub (inkoustová modrá) a Kairos (mandarinková z webu Kairosu).
   Paleta: břidlicová neutrální dvojice + jeden akcent na sekci. Zelená/jantarová/červená jen pro stavy.
   Grafy mají vlastní pevnou řadu barev (--series-*), stejnou v obou sekcích.
   Žádný JS, žádné externí zdroje, žádné style=. Světlý/tmavý režim přes light-dark();
   <html data-theme="svetly|tmavy"> režim vynutí. Třídy v1 (render.py) fungují dál. */

@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/schibsted-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url(fonts/schibsted-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokeny ---------- */
:root {
  color-scheme: light dark;
  /* plochy: v tmavém režimu dělají hloubku světlejší povrchy, ne stíny */
  --bg: light-dark(oklch(0.965 0.005 250), oklch(0.175 0.012 255));
  --surface: light-dark(oklch(0.995 0.002 250), oklch(0.235 0.015 255));
  --well: light-dark(oklch(0.925 0.008 250), oklch(0.3 0.015 255));
  --hover: light-dark(oklch(0.25 0.02 255 / 0.05), oklch(0.93 0.01 250 / 0.07));
  --text: light-dark(oklch(0.25 0.02 255), oklch(0.93 0.008 250));
  --text-2: light-dark(oklch(0.45 0.02 255), oklch(0.74 0.015 250));
  --line: light-dark(oklch(0.25 0.02 255 / 0.12), oklch(0.93 0.01 250 / 0.12));
  /* akcent sekce Můj Hub (výchozí) */
  --accent: light-dark(oklch(0.47 0.13 258), oklch(0.76 0.105 252));
  --accent-ink: light-dark(oklch(0.42 0.13 258), oklch(0.8 0.1 252));
  --accent-bg: light-dark(oklch(0.93 0.03 258), oklch(0.31 0.045 258));
  --on-accent: light-dark(oklch(0.99 0 0), oklch(0.18 0.02 255));
  /* stavy */
  --ok: light-dark(oklch(0.55 0.12 158), oklch(0.76 0.13 158));
  --warn: light-dark(oklch(0.66 0.14 82), oklch(0.82 0.13 88));
  --bad: light-dark(oklch(0.55 0.18 27), oklch(0.7 0.16 25));
  --off: light-dark(oklch(0.68 0.015 255), oklch(0.55 0.015 255));
  --ok-bg: light-dark(oklch(0.95 0.035 158), oklch(0.28 0.04 158));
  --ok-text: light-dark(oklch(0.36 0.08 158), oklch(0.9 0.06 158));
  --warn-bg: light-dark(oklch(0.94 0.06 88), oklch(0.31 0.05 85));
  --warn-text: light-dark(oklch(0.36 0.07 75), oklch(0.92 0.07 88));
  --bad-bg: light-dark(oklch(0.94 0.035 25), oklch(0.3 0.06 25));
  --bad-text: light-dark(oklch(0.38 0.12 27), oklch(0.9 0.05 25));
  /* grafy: pevné pořadí, ověřeno na barvoslepost proti oběma povrchům */
  --series-1: light-dark(#257de0, #338ced);
  --series-2: light-dark(#f47230, #e76624);
  --series-3: light-dark(#00b894, #00a888);
  --series-4: light-dark(#f2a600, #d28e05);
  --series-0: light-dark(oklch(0.72 0.015 255), oklch(0.5 0.015 255));
  --grid: light-dark(oklch(0.25 0.02 255 / 0.09), oklch(0.93 0.01 250 / 0.1));
  --axis: light-dark(oklch(0.25 0.02 255 / 0.28), oklch(0.93 0.01 250 / 0.3));
  --hm-1: light-dark(#b6d5f8, #0f4a96);
  --hm-2: light-dark(#6aabf1, #2370cd);
  --hm-3: light-dark(#257de0, #519ced);
  --hm-4: light-dark(#0f4a96, #9dc8f7);
  /* míry */
  --r-out: 14px;
  --pad: 14px;
  --r-in: calc(var(--r-out) - 6px);
  --side-w: 248px;
  --ease-out: cubic-bezier(0.22, 0.8, 0.3, 1);
}
:root[data-theme="svetly"] { color-scheme: light; }
:root[data-theme="tmavy"] { color-scheme: dark; }

/* akcent sekce Kairos */
.sec-kairos {
  --accent: light-dark(oklch(0.68 0.165 50), oklch(0.75 0.15 55));
  --accent-ink: light-dark(oklch(0.5 0.14 48), oklch(0.82 0.12 60));
  --accent-bg: light-dark(oklch(0.94 0.04 60), oklch(0.31 0.05 55));
  --on-accent: light-dark(oklch(0.2 0.03 50), oklch(0.18 0.03 50));
}
.sec-hub {
  --accent: light-dark(oklch(0.47 0.13 258), oklch(0.76 0.105 252));
  --accent-ink: light-dark(oklch(0.42 0.13 258), oklch(0.8 0.1 252));
  --accent-bg: light-dark(oklch(0.93 0.03 258), oklch(0.31 0.045 258));
  --on-accent: light-dark(oklch(0.99 0 0), oklch(0.18 0.02 255));
}

/* ---------- základ ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.45 "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-ink); }
svg { flex: none; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 8px; }

button, .btn {
  font: inherit; font-weight: 600; cursor: pointer; border-radius: 10px;
  transition: transform 120ms var(--ease-out), background-color 150ms var(--ease-out);
}
button:active, .btn:active { transform: scale(0.97); }
.btn {
  display: inline-block; padding: 10px 14px; text-decoration: none; color: var(--text);
  border: 1px solid var(--line); background: var(--surface);
}
.btn:hover { background: var(--well); }
.logout button {
  background: transparent; color: var(--text-2); border: 1px solid var(--line);
  padding: 7px 12px; font-size: 14px;
}
.logout button:hover { color: var(--text); background: var(--well); }

.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 21px; font-weight: 750; }
.brand h1 { font-size: 21px; font-weight: 750; letter-spacing: 0; }
.logo { width: 26px; height: 26px; fill: var(--accent); stroke: var(--on-accent); stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; }
.logo path { fill: none; }
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico .fill { fill: currentColor; stroke: none; }
.ico-s { width: 14px; height: 14px; stroke-width: 2; }
.stamp { color: var(--text-2); font-size: 13px; }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center;
  background: var(--warn-bg); color: var(--warn-text); font-size: 12px; font-weight: 700; line-height: 1;
}

/* ---------- v1: hlavička staré jednostránkové verze ---------- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 1; background: var(--bg);
}
main { max-width: 1100px; margin: 0 auto; padding: 16px 16px 48px; }
main > .stamp { margin-bottom: 12px; }
h2 { font-size: 22px; font-weight: 750; margin: 28px 0 10px; }

/* ---------- v2: kostra ---------- */
.v2 .side { display: none; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
}
.topbar .brand { margin-right: auto; }
.tabs {
  position: sticky; top: 0; z-index: 3; background: var(--bg); border-bottom: 1px solid var(--line);
}
.tabs ul {
  display: flex; gap: 2px; margin: 0; padding: 0 16px; list-style: none; overflow-x: auto;
  scrollbar-width: none; scroll-padding-inline: 56px; overscroll-behavior-x: contain;
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 28px), transparent);
}
.tabs ul::-webkit-scrollbar { display: none; }
.tabs li { scroll-margin: 160px 56px 0; }
.tabs a {
  display: flex; align-items: center; gap: 5px; white-space: nowrap; padding: 12px 10px 10px;
  color: var(--text-2); text-decoration: none; font-weight: 600; font-size: 15px;
  border-bottom: 2px solid transparent;
  transition: color 150ms var(--ease-out);
}
.tabs a:hover { color: var(--text); }
.tabs a[aria-current] { color: var(--text); border-bottom-color: var(--accent); }
.tabs li:has(a[aria-current]) { scroll-initial-target: nearest; }
.tabs .ico-s, .side .ico-s { color: var(--text-2); opacity: 0.8; }

.v2 main { max-width: 1120px; margin: 0; padding: 18px 16px calc(92px + env(safe-area-inset-bottom)); }
.phead { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 16px; }
.phead h1 { font-size: 27px; font-weight: 750; line-height: 1.15; text-wrap: balance; }
.lead { flex: 0 0 100%; color: var(--text-2); text-wrap: pretty; }
.pfoot { color: var(--text-2); font-size: 13px; margin-top: 28px; }

.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 4;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  background: var(--surface); border-top: 1px solid var(--line);
}
.dock a {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; border-radius: 12px; color: var(--text-2); text-decoration: none; font-weight: 650;
  transition: background-color 150ms var(--ease-out), transform 120ms var(--ease-out);
}
.dock a:active { transform: scale(0.97); }
.dock a[aria-current] { background: var(--accent-bg); color: var(--text); }
.dock a[aria-current] .ico { color: var(--accent-ink); }

@media (min-width: 1024px) {
  .v2 .topbar, .v2 .tabs, .v2 .dock { display: none; }
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }
  .v2 .side {
    display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100dvh; overflow-y: auto;
    padding: 20px 12px 16px; border-right: 1px solid var(--line);
  }
  .side .brand { padding: 0 10px; }
  .side nav { display: grid; gap: 18px; }
  .side-h { display: flex; align-items: center; gap: 9px; padding: 6px 10px; font-weight: 700; font-size: 16px; color: var(--text-2); }
  .side-sec.is-on .side-h { color: var(--text); }
  .side-sec.is-on .side-h .ico { color: var(--accent-ink); }
  .side ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
  .side li a {
    display: flex; align-items: center; gap: 6px; padding: 7px 10px 7px 41px; border-radius: 9px;
    color: var(--text-2); text-decoration: none; font-weight: 550;
    transition: background-color 150ms var(--ease-out), color 150ms var(--ease-out);
  }
  .side li a:hover { background: var(--hover); color: var(--text); }
  .side li a[aria-current] { background: var(--accent-bg); color: var(--text); font-weight: 650; }
  .side li a .badge { margin-left: auto; }
  .side-foot { margin-top: auto; padding: 0 10px; display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
  .v2 main { padding: 28px 36px 56px; }
  .phead h1 { font-size: 30px; }
}

/* citlivá stránka mimo tailnet */
.tag-lock {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px;
  background: var(--well); color: var(--text-2); font-size: 13px; font-weight: 600;
}
.blocked { max-width: 460px; margin: 8vh auto 0; text-align: center; display: grid; gap: 12px; justify-items: center; }
.blocked-ico { width: 56px; height: 56px; border-radius: 16px; background: var(--well); display: grid; place-items: center; }
.blocked-ico .ico { width: 26px; height: 26px; }
.blocked h2 { margin: 0; text-wrap: balance; }
.blocked p { color: var(--text-2); text-wrap: pretty; }

/* ---------- souhrn nahoře: hlavní informace stránky ---------- */
.summary { border-radius: var(--r-out); padding: 14px var(--pad); margin-bottom: 8px; }
.summary .sh { font-size: 19px; font-weight: 700; text-wrap: balance; }
.summary.s-ok { background: var(--ok-bg); color: var(--ok-text); }
.summary.s-warn { background: var(--warn-bg); color: var(--warn-text); }
.summary.s-bad { background: var(--bad-bg); color: var(--bad-text); }
.summary ul { margin: 6px 0 0; padding-left: 18px; }
.summary li { margin: 2px 0; }

/* ---------- mřížka a bloky ---------- */
.grid { display: grid; gap: 22px 18px; grid-template-columns: minmax(0, 1fr); }
.v2 .grid { margin-top: 22px; }
@media (min-width: 760px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group.wide { grid-column: 1 / -1; }
}
.group { min-width: 0; }
.group h3 {
  font-size: 15px; font-weight: 650; color: var(--text-2); margin: 0 0 6px 2px;
  display: flex; justify-content: space-between; gap: 10px; align-items: baseline;
}
.gnote { font-weight: 400; font-size: 13px; text-align: right; }
.surface {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-out);
  padding: 4px var(--pad);
}

/* ---------- KPI ---------- */
.kpis {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-out);
}
@media (min-width: 620px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .kpis { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); } }
.kpi {
  position: relative; display: grid; align-content: start; gap: 2px; padding: 12px var(--pad) 12px;
  box-shadow: 1px 0 0 var(--line), 0 1px 0 var(--line); color: inherit; text-decoration: none; min-width: 0;
}
a.kpi { transition: background-color 150ms var(--ease-out); }
a.kpi:hover { background: var(--hover); }
.kpi-l { color: var(--text-2); font-size: 13.5px; font-weight: 550; display: flex; align-items: center; gap: 6px; }
.kpi-v { font-size: 27px; font-weight: 700; line-height: 1.15; white-space: nowrap; }
.kpi-u { font-size: 15px; font-weight: 600; color: var(--text-2); margin-left: 4px; }
.kpi-d { font-size: 13px; color: var(--text-2); }
.kpi-a { font-size: 9px; margin-right: 3px; vertical-align: 1px; }
.d-good { color: var(--ok-text); }
.d-bad { color: var(--bad-text); }
.kpi-dl { color: var(--text-2); }
.kpi .spark { margin-top: 6px; }

/* ---------- řádky se stavem ---------- */
.rows { list-style: none; margin: 0; padding: 0; }
.row {
  display: grid; grid-template-columns: 10px 1fr auto; column-gap: 10px; align-items: baseline;
  padding: 9px 0; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); align-self: center; flex: none; }
.s-ok .dot, .t-ok .dot { background: var(--ok); }
.s-warn .dot, .t-warn .dot { background: var(--warn); }
.s-bad .dot, .t-bad .dot { background: var(--bad); }
.s-none .dot, .t-none .dot { background: transparent; border: 1.5px solid var(--off); }
.name { font-weight: 600; overflow-wrap: anywhere; }
.val { text-align: right; font-weight: 600; }
.s-bad .val { color: var(--bad-text); }
.s-off .val { color: var(--text-2); font-weight: 400; }
.meta { grid-column: 2 / -1; color: var(--text-2); font-size: 13px; }
.empty, .na { color: var(--text-2); padding: 10px 0; }
.na span { display: block; font-size: 13px; }
.tag { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.t-bad { color: var(--bad-text); font-weight: 600; }
.t-off { color: var(--text-2); }

/* ---------- měřáky ---------- */
.meter { padding: 10px 0 8px; border-top: 1px solid var(--line); }
.meter:first-child { border-top: 0; }
.mhead { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mhead span:first-child { font-weight: 600; }
.mhead .val { font-weight: 400; color: var(--text-2); font-size: 14px; }
progress {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 6px;
  border: 0; border-radius: 3px; background: var(--well); overflow: hidden; color: var(--ok);
}
progress::-webkit-progress-bar { background: var(--well); border-radius: 3px; }
progress::-webkit-progress-value { background: var(--ok); border-radius: 3px; }
progress::-moz-progress-bar { background: var(--ok); border-radius: 3px; }
.m-warn progress::-webkit-progress-value { background: var(--warn); }
.m-warn progress::-moz-progress-bar { background: var(--warn); }
.m-bad progress::-webkit-progress-value { background: var(--bad); }
.m-bad progress::-moz-progress-bar { background: var(--bad); }

.foot { color: var(--text-2); font-size: 13px; padding: 8px 0 10px; border-top: 1px solid var(--line); }
.foot.commit { color: var(--text); }
.usage { padding: 10px 0; border-top: 1px solid var(--line); }

/* ---------- časové seznamy ---------- */
.times, .journal { list-style: none; margin: 0; padding: 0; }
.times li, .journal li {
  display: grid; grid-template-columns: 7.2em 1fr; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--line);
}
.times li:first-child, .journal li:first-child { border-top: 0; }
.t { color: var(--text-2); font-size: 14px; white-space: nowrap; }
.journal li { grid-template-columns: 6.6em 1fr; }
.txt { overflow-wrap: anywhere; }

/* ---------- tabulky ---------- */
.tbl-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
.tbl th, .tbl td, .chart-data th, .chart-data td { text-align: left; padding: 9px 12px 9px 0; border-top: 1px solid var(--line); vertical-align: baseline; }
.tbl thead th, .chart-data thead th { border-top: 0; color: var(--text-2); font-size: 13px; font-weight: 550; padding-top: 8px; padding-bottom: 6px; }
.tbl tbody th { font-weight: 600; }
.tbl td:last-child, .tbl th:last-child { padding-right: 0; }
.tbl .num, .chart-data td { text-align: right; }
.tbl .spark { width: 72px; height: 22px; display: inline-block; vertical-align: middle; }
.tbl small { display: block; color: var(--text-2); font-weight: 400; font-size: 13px; }
@media (max-width: 639px) {
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .tbl, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; }
  .tbl tr { padding: 10px 0; border-top: 1px solid var(--line); }
  .tbl tbody tr:first-child { border-top: 0; }
  .tbl tbody th, .tbl td { border: 0; padding: 2px 0; }
  .tbl td { display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  .tbl td::before { content: attr(data-label); color: var(--text-2); text-align: left; flex: none; }
  .tbl td:empty { display: none; }
}

/* ---------- grafy ---------- */
.s1 { --c: var(--series-1); }
.s2 { --c: var(--series-2); }
.s3 { --c: var(--series-3); }
.s4 { --c: var(--series-4); }
.s0 { --c: var(--series-0); }
.chart { padding: 12px 0 8px; min-width: 0; }
.plot { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 8px; padding: 6px 5px 0 0; }
.yax {
  display: flex; flex-direction: column; justify-content: space-between; height: 160px; min-width: 1.6em;
  font-size: 12px; line-height: 1; color: var(--text-2); text-align: right; white-space: nowrap;
}
.yax span:first-child { transform: translateY(-50%); }
.yax span:last-child { transform: translateY(50%); }
.ch { display: block; width: 100%; height: 160px; overflow: visible; }
.h-s .ch, .h-s .yax { height: 96px; }
.ch path, .spark path, .hb path { vector-effect: non-scaling-stroke; fill: none; }
.grid-l { stroke: var(--grid); stroke-width: 1px; }
.base-l { stroke: var(--axis); stroke-width: 1px; }
.ln { stroke: var(--c, var(--series-1)); stroke-width: 2px; stroke-linejoin: round; stroke-linecap: round; }
.ch path.area { fill: var(--c); opacity: 0.1; stroke: none; }
.pt { stroke: var(--c, var(--series-1)); stroke-width: 8px; stroke-linecap: round; }
.pt-ring { stroke: var(--surface); stroke-width: 12px; stroke-linecap: round; }
.bar { stroke: var(--c); stroke-linecap: butt; }
.bw-1 .bar { stroke-width: 20px; }
.bw-2 .bar { stroke-width: 12px; }
.bw-3 .bar { stroke-width: 6px; }
.bw-4 .bar { stroke-width: 3px; }
.bw-5 .bar { stroke-width: 1.5px; }
@media (min-width: 760px) {
  .bw-1 .bar { stroke-width: 24px; }
  .bw-2 .bar { stroke-width: 16px; }
  .bw-3 .bar { stroke-width: 9px; }
  .bw-4 .bar { stroke-width: 4px; }
}
.bar.dim { opacity: 0.42; }
.ch-hit { fill: transparent; }
.ch-hit:hover { fill: var(--hover); }
.xax { grid-column: 2; display: flex; justify-content: space-between; gap: 4px; padding-top: 6px; font-size: 12px; color: var(--text-2); }
.xax.each span { flex: 1 1 0; min-width: 0; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-empty { display: grid; place-items: center; min-height: 196px; color: var(--text-2); }
.chart-empty.h-s { min-height: 96px; }
.chart-foot { color: var(--text-2); font-size: 13.5px; padding-top: 10px; }
.chart-foot b { color: var(--text); }

.legend { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13.5px; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend b { color: var(--text); font-weight: 600; }
.key { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

.chart-data { margin-top: 8px; font-size: 13.5px; }
.chart-data summary { cursor: pointer; color: var(--text-2); width: fit-content; padding: 2px 0; }
.chart-data summary:hover { color: var(--text); }
.chart-data .tbl-wrap { max-height: 260px; overflow: auto; margin-top: 4px; }
.chart-data th, .chart-data td { padding-top: 5px; padding-bottom: 5px; font-weight: 400; }

.spark { display: block; width: 100%; height: 26px; overflow: visible; --c: var(--series-0); }
.spark .ln { stroke-width: 1.5px; }
.spark .pt { stroke-width: 6px; stroke: var(--accent); }
.spark-empty { color: var(--text-2); }

.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.hbars li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; align-items: baseline; }
.hb-l { font-weight: 550; overflow-wrap: anywhere; }
.hb-v { font-weight: 600; text-align: right; }
.fn-c { font-weight: 400; color: var(--text-2); font-size: 13px; margin-left: 8px; }
.hb { grid-column: 1 / -1; display: block; width: calc(100% - 8px); margin: 0 4px; height: 8px; overflow: visible; }
.hb-t { stroke: var(--well); stroke-width: 8px; stroke-linecap: round; }
.hb-f { stroke: var(--c); stroke-width: 8px; stroke-linecap: round; }

.heat-wrap { overflow-x: auto; }
.heat { display: block; max-width: none; }
.hm { fill: var(--well); }
.hm-1 { fill: var(--hm-1); background: var(--hm-1); }
.hm-2 { fill: var(--hm-2); background: var(--hm-2); }
.hm-3 { fill: var(--hm-3); background: var(--hm-3); }
.hm-4 { fill: var(--hm-4); background: var(--hm-4); }
.key.hm-0 { background: var(--well); }
.hm-t { fill: var(--text-2); font-size: 10.5px; font-family: inherit; }
.hm-scale { display: flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 12.5px; color: var(--text-2); }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { flex: none; }
.dn, .dn-t { fill: none; stroke-width: 5; }
.dn-t { stroke: var(--well); }
.dn { stroke: var(--c); }
.dn-c { fill: var(--text); font-size: 6.4px; font-weight: 700; font-family: inherit; }
.dn-cl { fill: var(--text-2); font-size: 3.4px; font-family: inherit; }
.donut-wrap .legend { flex: 1 1 150px; flex-direction: column; gap: 7px; margin: 0; }
.donut-wrap .legend li { justify-content: flex-start; }
.donut-wrap .legend b { margin-left: auto; padding-left: 10px; white-space: nowrap; }

/* ---------- přihlášení (v1) ---------- */
.lpage main.login { max-width: 380px; padding-top: 12vh; }
.login .brand { margin-bottom: 18px; justify-content: center; }
.login .brand h1 { font-size: 26px; }
.lform { padding: 18px var(--pad); display: grid; gap: 14px; }
.lform label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
.lform input {
  font: inherit; font-size: 16px; padding: 11px 12px; border-radius: var(--r-in);
  border: 1px solid var(--line); background: var(--bg); color: var(--text);
}
.lform input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.lform button {
  margin-top: 4px; padding: 12px; border: 0; background: var(--accent); color: var(--on-accent); font-size: 16px;
}
.hint { color: var(--text-2); font-size: 13px; margin-top: -6px; }
.err { background: var(--bad-bg); color: var(--bad-text); border-radius: var(--r-in); padding: 10px 12px; font-weight: 600; }
.lpage main.login > h1 { font-size: 22px; margin-bottom: 8px; }
.lpage main.login > p { color: var(--text-2); margin-bottom: 8px; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media (forced-colors: active) {
  .bar, .ln, .hb-f, .dn { stroke: CanvasText; }
  .dot, .key { forced-color-adjust: none; }
}
