/* ═══════════════════════════════════════════════════════════════════════
   Úkoly · Obec Světlá Hora — návrhový systém

   Barvy ze znaku obce: modrý štít (--shield), zlaté slunce (--sun),
   stříbrný měsíc a hvězdy (--paper). Jediný dekorativní prvek je
   „podatelní razítko“ se stavem a datem na detailu úkolu (--stamp,
   fialová razítková barva). Všechno ostatní je klidné a věcné.
   Písmo IBM Plex hostované u aplikace (GDPR) — jako Rozpočet obce.
   ═══════════════════════════════════════════════════════════════════════ */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-latin-ext.d313794bd9fd.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-sans-400-latin.d28498895ed7.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: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-600-latin-ext.d313794bd9fd.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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../fonts/ibm-plex-sans-600-latin.d28498895ed7.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: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-condensed-700-latin-ext.cba6956c6cff.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; }
@font-face { font-family: "IBM Plex Sans Condensed"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../fonts/ibm-plex-sans-condensed-700-latin.072883752a60.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: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin-ext.17a5b2a15bf5.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; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.814fe1615d4d.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; }

/* ── Tokeny ─────────────────────────────────────────────────────────── */

:root {
  --paper: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-3: #e8ecf4;
  --line: #dde2ec;
  --line-strong: #c5ccdb;

  --ink: #141a2e;
  --ink-2: #475069;
  --ink-3: #687189;

  --shield: #1e3a8f;
  --shield-hover: #2b4db3;
  --shield-soft: #e3e9f8;
  --topbar: #1e3a8f;
  --topbar-ink: #ffffff;
  --topbar-muted: #c3cff0;
  --sun: #f0b92b;
  --sun-hover: #f5c84f;
  --sun-ink: #2a1f00;
  --stamp: #4b3aa6;
  --focus: #2f6fe4;

  --ok: #1d7a43;
  --ok-soft: #dff3e6;
  --warn: #9a5b00;
  --warn-soft: #fdf0d5;
  --bad: #a63131;
  --bad-soft: #f9e3e3;

  /* Stavy úkolu: text/tečka + jemné pozadí. Barva nikdy nenese význam sama — vždy s textem. */
  --st-new: #1f5fcf;          --st-new-bg: #e4edfc;
  --st-needs_info: #9a5b00;   --st-needs_info-bg: #fdf0d5;
  --st-planned: #4d55b8;      --st-planned-bg: #e9eafa;
  --st-in_progress: #0d7480;  --st-in_progress-bg: #dcf3f4;
  --st-review: #a03f8c;       --st-review-bg: #f8e4f3;
  --st-done: #1d7a43;         --st-done-bg: #dff3e6;
  --st-rejected: #a63131;     --st-rejected-bg: #f9e3e3;
  --st-muted: #5f6b7d;        --st-muted-bg: #eceff3;

  /* Druhy požadavků */
  --ty-bug: #c0392b;
  --ty-change: #1f5fcf;
  --ty-new_app: #a26f00;
  --ty-task: #3d6b7d;
  --ty-question: #6b4fc0;

  --font-sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-cond: "IBM Plex Sans Condensed", "IBM Plex Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;

  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --shadow-pop: 0 12px 32px rgba(16, 24, 48, 0.16), 0 2px 6px rgba(16, 24, 48, 0.08);

  --gutter: 24px;
  --maxw: 1240px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --paper: #0c1120;
  --surface: #141b2d;
  --surface-2: #182036;
  --surface-3: #1f2842;
  --line: #263049;
  --line-strong: #36425f;
  --ink: #e8ecf5;
  --ink-2: #b3bdd3;
  --ink-3: #8f99b0;
  --shield: #94b1ff;
  --shield-hover: #b4c8ff;
  --shield-soft: #1c2848;
  --topbar: #111a38;
  --topbar-muted: #9fb0dc;
  --stamp: #b2a6ff;
  --focus: #7aa5ff;
  --ok: #5fd08f;   --ok-soft: #133022;
  --warn: #f2bd55; --warn-soft: #33270f;
  --bad: #f08a8a;  --bad-soft: #3a1b1d;
  --st-new: #8db4ff;          --st-new-bg: #172a4d;
  --st-needs_info: #f2bd55;   --st-needs_info-bg: #33270f;
  --st-planned: #aeb3ff;      --st-planned-bg: #22264d;
  --st-in_progress: #5fd2db;  --st-in_progress-bg: #0f3236;
  --st-review: #ee93da;       --st-review-bg: #3a1934;
  --st-done: #5fd08f;         --st-done-bg: #133022;
  --st-rejected: #f08a8a;     --st-rejected-bg: #3a1b1d;
  --st-muted: #a3adbf;        --st-muted-bg: #222a3d;
  --ty-bug: #f08a7e;
  --ty-change: #8db4ff;
  --ty-new_app: #f2bd55;
  --ty-task: #8cc2d4;
  --ty-question: #c2b2ff;
  --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1120;
    --surface: #141b2d;
    --surface-2: #182036;
    --surface-3: #1f2842;
    --line: #263049;
    --line-strong: #36425f;
    --ink: #e8ecf5;
    --ink-2: #b3bdd3;
    --ink-3: #8f99b0;
    --shield: #94b1ff;
    --shield-hover: #b4c8ff;
    --shield-soft: #1c2848;
    --topbar: #111a38;
    --topbar-muted: #9fb0dc;
    --stamp: #b2a6ff;
    --focus: #7aa5ff;
    --ok: #5fd08f;   --ok-soft: #133022;
    --warn: #f2bd55; --warn-soft: #33270f;
    --bad: #f08a8a;  --bad-soft: #3a1b1d;
    --st-new: #8db4ff;          --st-new-bg: #172a4d;
    --st-needs_info: #f2bd55;   --st-needs_info-bg: #33270f;
    --st-planned: #aeb3ff;      --st-planned-bg: #22264d;
    --st-in_progress: #5fd2db;  --st-in_progress-bg: #0f3236;
    --st-review: #ee93da;       --st-review-bg: #3a1934;
    --st-done: #5fd08f;         --st-done-bg: #133022;
    --st-rejected: #f08a8a;     --st-rejected-bg: #3a1b1d;
    --st-muted: #a3adbf;        --st-muted-bg: #222a3d;
    --ty-bug: #f08a7e;
    --ty-change: #8db4ff;
    --ty-new_app: #f2bd55;
    --ty-task: #8cc2d4;
    --ty-question: #c2b2ff;
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 2px 6px rgba(0, 0, 0, 0.3);
    color-scheme: dark;
  }
}

/* ── Základ ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-cond);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  letter-spacing: 0.005em;
}
h1 { font-size: var(--fs-xl); }
h2 { font-size: var(--fs-lg); }
h3 { font-size: var(--fs-md); }
p { margin: 0 0 0.75em; }

a { color: var(--shield); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--shield-hover); }

img, svg { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface);
  padding: 8px 12px; border-radius: var(--r); }
.skip-link:focus { top: 8px; }

.muted { color: var(--ink-3); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ── Horní lišta ─────────────────────────────────────────────────────── */

.topbar {
  background: var(--topbar);
  color: var(--topbar-ink);
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06), 0 2px 12px rgba(10, 20, 50, 0.18);
}
.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--topbar-ink);
  text-decoration: none;
  flex: none;
}
.brand:hover { color: var(--topbar-ink); }
.brand img { width: 34px; height: 34px; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3)); }
.brand-name { font-family: var(--font-cond); font-weight: 700; font-size: 1.35rem; letter-spacing: 0.01em; }
.brand-sub { font-size: var(--fs-sm); color: var(--topbar-muted); padding-left: 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.22); line-height: 1.1; }

.mainnav { display: flex; gap: 2px; align-items: stretch; height: 100%; }
.mainnav a {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--topbar-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--fs-sm);
  position: relative;
}
.mainnav a:hover { color: var(--topbar-ink); }
.mainnav a[aria-current="page"] { color: var(--topbar-ink); }
.mainnav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px; bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--sun);
}

.topsearch {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--r);
  padding: 0 10px;
  height: 36px;
  width: min(260px, 24vw);
  color: var(--topbar-muted);
}
.topsearch:focus-within { background: rgba(255, 255, 255, 0.2); border-color: rgba(255, 255, 255, 0.4); }
.topsearch input[type="search"] {
  border: 0; background: transparent; color: var(--topbar-ink); width: 100%;
  font: inherit; font-size: var(--fs-sm); outline: none; min-width: 0;
  min-height: 0; padding: 0; box-shadow: none; border-radius: 0;
}
.topsearch input[type="search"]:focus { box-shadow: none; }
.topsearch input[type="search"]::-webkit-search-cancel-button { filter: invert(1); opacity: 0.6; }
.topsearch input::placeholder { color: var(--topbar-muted); }

.bell {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 50%;
  color: var(--topbar-ink);
}
.bell:hover { background: rgba(255, 255, 255, 0.12); color: var(--topbar-ink); }
.bell .icon { width: 21px; height: 21px; }
.bell-badge {
  position: absolute;
  top: 2px; right: 0;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--sun);
  color: var(--sun-ink);
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--topbar);
}

.usermenu { position: relative; }
.usermenu-toggle { background: none; border: 0; padding: 2px; border-radius: 50%; cursor: pointer; display: flex; }
.usermenu-toggle .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35); }

.nav-toggle { display: none; background: none; border: 0; color: var(--topbar-ink); padding: 6px; cursor: pointer; }
.nav-toggle .icon { width: 24px; height: 24px; }

/* ── Menu (popover) ─────────────────────────────────────────────────── */

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 250px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-pop);
  padding: 6px;
  z-index: 50;
}
.menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px;
  display: grid; gap: 2px; }
.menu-head span { font-size: var(--fs-sm); color: var(--ink-3); }
.menu-head .role-tag { color: var(--stamp); font-weight: 600; }
.menu a, .menu button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--r);
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  font: inherit;
  font-size: var(--fs-sm);
  cursor: pointer;
  text-align: left;
}
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--ink); }
.menu .icon { color: var(--ink-3); }
.menu form { margin: 0; }

/* ── Stránka ─────────────────────────────────────────────────────────── */

.page {
  flex: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px var(--gutter) 56px;
}
.page-narrow { max-width: 820px; }
.page-wide { max-width: none; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { font-size: var(--fs-2xl); }
.page-head .lede { color: var(--ink-2); margin: 6px 0 0; max-width: 64ch; }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.backlink { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm);
  color: var(--ink-3); text-decoration: none; margin-bottom: 10px; }
.backlink:hover { color: var(--shield); }

.section { margin-top: 32px; }
.section:first-child { margin-top: 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: var(--fs-lg); }
.section-head a { font-size: var(--fs-sm); font-weight: 600; text-decoration: none; }
.count-badge {
  display: inline-block;
  min-width: 1.6em;
  padding: 0 0.45em;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-align: center;
  vertical-align: 0.2em;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.panel-pad { padding: 20px 22px; }
.panel-pad > h2:not(.chart-title) { margin-bottom: 10px; }

.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; }
.layout-detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }

/* ── Tlačítka ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); color: var(--ink); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn .icon { width: 1.1em; height: 1.1em; }

.btn-sun { background: var(--sun); border-color: var(--sun); color: var(--sun-ink); }
.btn-sun:hover { background: var(--sun-hover); border-color: var(--sun-hover); color: var(--sun-ink); }
.btn-primary { background: var(--shield); border-color: var(--shield); color: #fff; }
.btn-primary:hover { background: var(--shield-hover); border-color: var(--shield-hover); color: #fff; }
:root[data-theme="dark"] .btn-primary { color: #0c1120; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #0c1120; } }
.btn-quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn-quiet:hover { background: var(--surface-3); border-color: transparent; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: var(--fs-xs); }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: var(--fs-base); }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: var(--r);
  border: 0;
  background: transparent;
  color: var(--ink-3);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--ink); }

.new-btn { flex: none; }

/* ── Formuláře ───────────────────────────────────────────────────────── */

.field { margin-bottom: 20px; }
.field > label, .field-label {
  display: block;
  font-weight: 600;
  font-size: var(--fs-sm);
  margin-bottom: 6px;
  color: var(--ink);
}
.field .optional { font-weight: 400; color: var(--ink-3); }
.help { font-size: var(--fs-sm); color: var(--ink-3); margin: 6px 0 0; }
.errorlist { list-style: none; margin: 6px 0 0; padding: 0; color: var(--bad); font-size: var(--fs-sm); font-weight: 600; }
.form-errors { background: var(--bad-soft); color: var(--bad); border-radius: var(--r); padding: 10px 14px;
  margin-bottom: 16px; font-weight: 600; font-size: var(--fs-sm); }
.form-errors .errorlist { margin: 0; }

input[type="text"], input[type="search"], input[type="url"], input[type="email"], input[type="date"],
input[type="number"], input[type="password"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-base);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 9px 12px;
  min-height: 42px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
textarea { line-height: 1.5; resize: vertical; min-height: 96px; }
select { padding-right: 32px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23687189' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent);
}
input::placeholder, textarea::placeholder { color: var(--ink-3); opacity: 0.8; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--shield); width: 18px; height: 18px; margin: 0; flex: none; }

/* Volby jako dlaždice (naléhavost, viditelnost, výběr) */
.choices { display: grid; gap: 8px; }
.choices-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  background: var(--surface);
  cursor: pointer;
  font-size: var(--fs-sm);
  line-height: 1.35;
}
.choice:hover { border-color: var(--ink-3); }
.choice:has(input:checked) { border-color: var(--shield); background: var(--shield-soft); box-shadow: inset 0 0 0 1px var(--shield); }
.choice input { margin-top: 1px; }
.choice strong { display: block; font-weight: 600; }
.choice span { color: var(--ink-3); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.checks label { display: inline-flex; gap: 8px; align-items: center; font-size: var(--fs-sm); cursor: pointer; }
.checks ul, .choices ul { list-style: none; margin: 0; padding: 0; display: contents; }

.form-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 24px; }

/* ── Avatary, štítky, stavy ─────────────────────────────────────────── */

.avatar {
  --h: 220;
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: hsl(var(--h) 55% 88%);
  color: hsl(var(--h) 60% 26%);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex: none;
  user-select: none;
}
:root[data-theme="dark"] .avatar { background: hsl(var(--h) 40% 30%); color: hsl(var(--h) 80% 90%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: hsl(var(--h) 40% 30%); color: hsl(var(--h) 80% 90%); } }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 40px; height: 40px; font-size: 14px; }
.avatar-system { background: var(--surface-3); color: var(--ink-3); }

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px 2px 8px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  white-space: nowrap;
  color: var(--st-muted);
  background: var(--st-muted-bg);
  line-height: 1.6;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.status-new { color: var(--st-new); background: var(--st-new-bg); }
.status-needs_info { color: var(--st-needs_info); background: var(--st-needs_info-bg); }
.status-planned { color: var(--st-planned); background: var(--st-planned-bg); }
.status-in_progress { color: var(--st-in_progress); background: var(--st-in_progress-bg); }
.status-review { color: var(--st-review); background: var(--st-review-bg); }
.status-done { color: var(--st-done); background: var(--st-done-bg); }
.status-rejected { color: var(--st-rejected); background: var(--st-rejected-bg); }

.type { display: inline-flex; align-items: center; gap: 5px; font-size: var(--fs-xs); font-weight: 600; color: var(--ink-2); }
.type .icon { width: 15px; height: 15px; }
.type-bug .icon, .ty-bug { color: var(--ty-bug); }
.type-change .icon, .ty-change { color: var(--ty-change); }
.type-new_app .icon, .ty-new_app { color: var(--ty-new_app); }
.type-task .icon, .ty-task { color: var(--ty-task); }
.type-question .icon, .ty-question { color: var(--ty-question); }

.prio { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-xs); font-weight: 600; }
.prio .icon { width: 14px; height: 14px; }
.prio-critical { color: var(--bad); }
.prio-high { color: var(--warn); }
.prio-low { color: var(--ink-3); }

.app-chip { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); font-weight: 600;
  color: var(--ink-2); text-decoration: none; }
a.app-chip:hover { color: var(--shield); }
.app-mono {
  --h: 220;
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
  border-radius: 5px;
  background: hsl(var(--h) 60% 45%);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.app-mono-lg { width: 44px; height: 44px; border-radius: 11px; font-size: 16px; }

.label-chip {
  --c: #64748b;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.7;
  color: color-mix(in srgb, var(--c) 78%, var(--ink));
  background: color-mix(in srgb, var(--c) 14%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
}
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2); font-size: var(--fs-xs); font-weight: 600; margin: 0 6px 6px 0; }
a.chip { text-decoration: none; }
a.chip:hover { background: var(--line); color: var(--ink); }
.chip .icon { width: 13px; height: 13px; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: var(--fs-xs); color: var(--ink-3); }
.meta > span, .meta > a { display: inline-flex; align-items: center; gap: 4px; }
.meta .icon { width: 14px; height: 14px; }
.due-overdue { color: var(--bad); font-weight: 600; }
.due-soon { color: var(--warn); font-weight: 600; }

/* ── Seznam úkolů (rejstřík) ─────────────────────────────────────────── */

.task-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; }
.task-row {
  display: grid;
  grid-template-columns: 4.25rem minmax(0, 1fr) auto;
  gap: 4px 16px;
  align-items: center;
  padding: 14px 18px 14px 14px;
  border-top: 1px solid var(--line);
  position: relative;
}
.task-row:first-child { border-top: 0; }
.task-row:hover { background: var(--surface-2); }
.task-no {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--fs-md);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  text-align: right;
  align-self: start;
  padding-top: 1px;
  white-space: nowrap;
}
.task-no small { font-size: 0.7em; font-weight: 700; margin-right: 1px; }
.task-main { min-width: 0; display: grid; gap: 4px; }
.task-title {
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.task-title::after { content: ""; position: absolute; inset: 0; }   /* celý řádek je klikací */
.task-title:hover { color: var(--shield); }
.task-side { display: flex; align-items: center; gap: 12px; justify-content: flex-end; }
.task-side .meta { justify-content: flex-end; }
.task-row .meta a, .task-row .task-side a { position: relative; z-index: 1; }
.task-row.is-unread .task-title { color: var(--ink); }
.task-row.is-unread::before {
  content: "";
  position: absolute;
  left: 5px; top: 21px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 0 2px var(--surface);
}
.task-row.is-closed .task-title { color: var(--ink-2); font-weight: 400; }

.task-list-compact .task-row { padding: 11px 14px 11px 10px; grid-template-columns: 3.5rem minmax(0, 1fr) auto; }
.task-list-compact .task-no { font-size: var(--fs-base); }

.list-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px;
  font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; }

.empty {
  text-align: left;
  padding: 26px 24px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  color: var(--ink-2);
  background: var(--surface);
}
.empty strong { display: block; color: var(--ink); font-size: var(--fs-md); margin-bottom: 4px; }
.empty p:last-child { margin-bottom: 0; }

/* ── Filtry ─────────────────────────────────────────────────────────── */

.filterbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 14px;
}
.filterbar select, .filterbar input[type="search"] { width: auto; min-height: 38px; font-size: var(--fs-sm); padding-top: 6px; padding-bottom: 6px; }
.filterbar input[type="search"] { min-width: 220px; flex: 1 1 220px; }
.state-tabs { display: flex; gap: 2px; background: var(--surface-3); border-radius: var(--r); padding: 3px; flex-wrap: wrap; }
.state-tabs a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
  text-decoration: none;
}
.state-tabs a:hover { color: var(--ink); }
.state-tabs a[aria-current="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(16, 24, 48, 0.12); }
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 14px; align-items: center; }
.active-chips .chip { margin: 0; }

/* ── Přehled (dashboard) ─────────────────────────────────────────────── */

.hello h1 { font-size: var(--fs-2xl); }
.hello p { color: var(--ink-2); font-size: var(--fs-md); margin: 6px 0 0; max-width: 62ch; }

.summary-sentence {
  font-size: var(--fs-lg);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
  margin: 10px 0 0;
}
.summary-sentence a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--sun);
  white-space: nowrap;
}
.summary-sentence a:hover { color: var(--shield); }
.summary-sentence .alarm { border-bottom-color: var(--bad); }

.quick-new { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
.quick-new a {
  display: grid;
  gap: 4px;
  align-content: start;
  padding: 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}
.quick-new a:hover { border-color: var(--line-strong); background: var(--surface-2); }
.quick-new .icon { width: 24px; height: 24px; margin-bottom: 6px; }
.quick-new strong { font-size: var(--fs-sm); line-height: 1.3; }
.quick-new .qn-text { font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.4; }

.attention {
  border: 1px solid color-mix(in srgb, var(--sun) 65%, var(--line));
  background: color-mix(in srgb, var(--sun) 10%, var(--surface));
  border-radius: var(--r-lg);
  padding: 16px 18px;
}
.attention h2 { font-size: var(--fs-md); margin-bottom: 8px; display: flex; gap: 8px; align-items: center; }
.attention .task-list { border-color: color-mix(in srgb, var(--sun) 40%, var(--line)); }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: var(--fs-sm); }
.feed li:first-child { border-top: 0; }
.feed .feed-text { min-width: 0; }
.feed .feed-text a { color: var(--ink); font-weight: 600; text-decoration: none; }
.feed .feed-text a:hover { color: var(--shield); }
.feed .feed-quote { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.ideas li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0; }
.ideas a { color: var(--ink); font-weight: 600; text-decoration: none; }
.ideas a:hover { color: var(--shield); }
.ideas .meta { margin-top: 2px; }
.vote-count {
  display: grid;
  place-items: center;
  height: 44px;
  border-radius: var(--r);
  background: var(--surface-3);
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--fs-md);
  line-height: 1;
  color: var(--ink);
}
.vote-count small { font-family: var(--font-sans); font-size: 10px; font-weight: 600; color: var(--ink-3); }

/* ── Detail úkolu ───────────────────────────────────────────────────── */

.task-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px; align-items: start; margin-bottom: 26px; }
.task-number {
  font-family: var(--font-cond);
  font-weight: 700;
  font-size: var(--fs-lg);
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
  margin-bottom: 2px;
}
.task-head h1 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem); line-height: 1.12; overflow-wrap: anywhere; }
.task-head .meta { margin-top: 12px; font-size: var(--fs-sm); gap: 6px 16px; }
.task-head .meta .icon { width: 15px; height: 15px; }

/* Podatelní razítko — jediný ozdobný prvek aplikace. */
.stamp {
  --ink: var(--stamp);
  display: inline-grid;
  justify-items: center;
  gap: 1px;
  padding: 8px 16px 7px;
  margin: 6px 6px 0 0;
  border: 3px solid var(--ink);
  border-radius: 12px;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 4px var(--ink);
  color: var(--ink);
  transform: rotate(-4deg);
  opacity: 0.88;
  text-align: center;
  user-select: none;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 0 0 0 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='90'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -2.4 0 0 0 2.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  -webkit-mask-size: 160px 90px;
  mask-size: 160px 90px;
}
.stamp-label { font-family: var(--font-cond); font-weight: 700; font-size: 1.3rem; line-height: 1.1; letter-spacing: 0.02em; }
.stamp-date { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; }
.stamp-done { --ink: var(--st-done); }
.stamp-rejected { --ink: var(--st-rejected); }
.stamp-land { animation: stamp-land 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.25) 0.15s both; }
@keyframes stamp-land {
  0% { transform: rotate(-12deg) scale(1.9); opacity: 0; }
  60% { opacity: 0.95; }
  100% { transform: rotate(-4deg) scale(1); opacity: 0.88; }
}

.created-banner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: var(--ok-soft);
  color: var(--ink);
  margin-bottom: 22px;
  border: 1px solid color-mix(in srgb, var(--ok) 35%, transparent);
}
.created-banner .icon { color: var(--ok); width: 24px; height: 24px; margin-top: 2px; }
.created-banner strong { display: block; font-size: var(--fs-md); }
.created-banner p { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-sm); }

.block { margin-bottom: 28px; }
.block-title {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--ink-2);
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.block-title .icon { color: var(--ink-3); }

.description { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; }
.description .answer + .answer { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.answer h3 { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.answer-source { font-size: var(--fs-sm); overflow-wrap: anywhere; }

.prose { overflow-wrap: anywhere; }
.prose > :last-child { margin-bottom: 0; }
.prose p, .prose ul, .prose ol, .prose pre, .prose blockquote, .prose table { margin: 0 0 0.75em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.2em; }
.prose h1, .prose h2, .prose h3, .prose h4, .prose h5, .prose h6 { font-size: var(--fs-md); margin: 1em 0 0.4em; }
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--surface-3); padding: 0.1em 0.35em; border-radius: 4px; }
.prose pre { background: var(--surface-3); padding: 12px 14px; border-radius: var(--r); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 3px solid var(--line-strong); padding-left: 12px; color: var(--ink-2); }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 4px 10px; }
.mention { font-weight: 600; color: var(--stamp); background: color-mix(in srgb, var(--stamp) 10%, transparent);
  border-radius: 4px; padding: 0 3px; }
.task-ref { font-weight: 600; font-variant-numeric: tabular-nums; }

/* Přílohy */
.attachments { display: flex; flex-wrap: wrap; gap: 10px; }
.att-thumb {
  position: relative;
  display: block;
  width: 132px;
  height: 96px;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-3);
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.att-file {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  border-radius: var(--r);
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
  max-width: 100%;
  font-size: var(--fs-sm);
}
.att-file:hover { border-color: var(--line-strong); color: var(--ink); }
.att-ext {
  display: grid;
  place-items: center;
  width: 34px; height: 40px;
  border-radius: 5px;
  background: var(--shield-soft);
  color: var(--shield);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  flex: none;
}
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 220px; display: block; font-weight: 600; }
.att-size { color: var(--ink-3); font-size: var(--fs-xs); }
.att-wrap { position: relative; }
.att-wrap .att-del { position: absolute; top: -8px; right: -8px; z-index: 2; }
.att-del button {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-3);
  display: grid; place-items: center; cursor: pointer; padding: 0;
  opacity: 0; transition: opacity 0.12s;
}
.att-wrap:hover .att-del button, .att-del button:focus-visible { opacity: 1; }
.att-del button:hover { color: var(--bad); border-color: var(--bad); }
.att-del .icon { width: 13px; height: 13px; }
@media (hover: none) { .att-del button { opacity: 1; } }

/* Kontrolní seznam */
.progress { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--ok); border-radius: 3px; }
.checklist { list-style: none; margin: 10px 0 0; padding: 0; }
.checklist li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist form { margin: 0; display: flex; }
.check-btn {
  width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--line-strong);
  background: var(--surface); display: grid; place-items: center; cursor: pointer; padding: 0; color: #fff; margin-top: 2px;
}
.check-btn.is-done { background: var(--ok); border-color: var(--ok); }
.check-btn .icon { width: 14px; height: 14px; }
.checklist .done-text { color: var(--ink-3); text-decoration: line-through; }
.checklist .item-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inline-add { display: flex; gap: 8px; margin-top: 10px; }
.inline-add input { min-height: 38px; font-size: var(--fs-sm); }

/* Časová osa */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-left: 46px; margin-bottom: 18px; }
.tl-item > .avatar, .tl-dot { position: absolute; left: 0; top: 0; }
.tl-dot {
  left: 9px; top: 6px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--line-strong);
}
.tl-event { font-size: var(--fs-sm); color: var(--ink-2); padding-top: 2px; margin-bottom: 14px; }
.tl-event strong.who { color: var(--ink); font-weight: 600; }
.tl-event .status { vertical-align: 1px; }
.tl-event time { color: var(--ink-3); margin-left: 6px; font-size: var(--fs-xs); }
.tl-event.is-internal { color: var(--stamp); }

.comment { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); scroll-margin-top: 90px; }
.comment-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px 0; font-size: var(--fs-sm); flex-wrap: wrap; }
.comment-head .who { font-weight: 600; }
.comment-head time, .comment-head .edited { color: var(--ink-3); font-size: var(--fs-xs); }
.comment-head .spacer { flex: 1; }
.comment-body { padding: 6px 14px 14px; }
.comment-files { padding: 0 14px 14px; }
.comment.is-internal { background: color-mix(in srgb, var(--stamp) 6%, var(--surface)); border-color: color-mix(in srgb, var(--stamp) 35%, var(--line)); border-style: dashed; }
.comment.is-author { border-left: 3px solid var(--shield); }
.comment.is-new { box-shadow: 0 0 0 2px color-mix(in srgb, var(--sun) 70%, transparent); }
.comment.is-deleted { background: transparent; border-style: dashed; color: var(--ink-3); font-size: var(--fs-sm); padding: 10px 14px; }
.tag-internal, .tag-new, .tag-author {
  font-size: 11px; font-weight: 600; padding: 0 7px; border-radius: 999px; line-height: 1.7;
}
.tag-internal { color: var(--stamp); background: color-mix(in srgb, var(--stamp) 12%, transparent); }
.tag-new { color: var(--sun-ink); background: var(--sun); }
.tag-author { color: var(--shield); background: var(--shield-soft); }

.comment-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; scroll-margin-top: 90px; }
.comment-form-foot { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; justify-content: space-between; margin-top: 12px; }
.comment-form-foot .left { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.comment-form-foot label.inline { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-sm); cursor: pointer; }
.comment-form-foot select { width: auto; min-height: 36px; font-size: var(--fs-sm); padding-top: 5px; padding-bottom: 5px; }

/* Editor (Markdown + přílohy) */
.editor { border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); position: relative; }
.editor:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.editor textarea { border: 0; box-shadow: none !important; border-radius: 0 0 var(--r) var(--r); min-height: 120px; }
.editor-bar { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.editor-bar .tab { background: none; border: 0; padding: 5px 10px; border-radius: 6px; font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3); cursor: pointer; }
.editor-bar .tab[aria-selected="true"] { color: var(--ink); background: var(--surface-3); }
.editor-bar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }
.editor-bar .icon-btn { width: 30px; height: 30px; }
.editor-bar .spacer { flex: 1; }
.editor-bar select { width: auto; min-height: 30px; font-size: var(--fs-xs); padding: 2px 28px 2px 8px; }
.editor-preview { padding: 10px 12px; min-height: 120px; }
.editor-hint { font-size: var(--fs-xs); color: var(--ink-3); padding: 6px 10px; border-top: 1px solid var(--line); display: flex; gap: 12px; flex-wrap: wrap; }
.editor.is-dragover { border-color: var(--shield); background: var(--shield-soft); }
.pending-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); }
.pending-file { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 8px; border-radius: 999px; background: var(--surface-3); font-size: var(--fs-xs); font-weight: 600; max-width: 260px; }
.pending-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pending-file img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }
.pending-file button { border: 0; background: none; color: var(--ink-3); cursor: pointer; display: grid; place-items: center; padding: 2px; border-radius: 50%; }
.pending-file button:hover { color: var(--bad); }
.pending-file .icon { width: 13px; height: 13px; }
.file-pick { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 600; color: var(--shield); cursor: pointer; }
.file-pick input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.suggest {
  position: absolute;
  z-index: 30;
  min-width: 240px;
  max-width: 340px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-pop);
  padding: 4px;
  list-style: none;
  margin: 0;
}
.suggest li { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: var(--fs-sm); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--shield-soft); }
.suggest .muted { font-size: var(--fs-xs); }

/* Boční panel */
.side { display: grid; gap: 14px; position: sticky; top: 76px; }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; scroll-margin-top: 90px; }
.side-box h2 { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.side-box h2 .icon { color: var(--ink-3); }
.side-box .field { margin-bottom: 12px; }
.side-box .field > label { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 4px; }
.side-box select, .side-box input[type="date"], .side-box input[type="number"], .side-box input[type="text"] { min-height: 36px; font-size: var(--fs-sm); padding-top: 6px; padding-bottom: 6px; }
.side-box textarea { min-height: 70px; font-size: var(--fs-sm); }
.side-box .checks { gap: 6px 12px; }
.facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px 12px; margin: 0; font-size: var(--fs-sm); }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.person { display: inline-flex; align-items: center; gap: 8px; }
.watchers { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.vote-box { display: flex; align-items: center; gap: 12px; }
.vote-box .btn.is-on { background: var(--shield-soft); border-color: var(--shield); color: var(--shield); }
.author-actions { display: grid; gap: 8px; }
.author-actions details summary { list-style: none; }
.author-actions details summary::-webkit-details-marker { display: none; }
.author-actions textarea { margin: 8px 0; }
.rating { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.rating input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating label { font-size: 1.6rem; line-height: 1; color: var(--line-strong); cursor: pointer; }
.rating input:checked ~ label, .rating label:hover, .rating label:hover ~ label { color: var(--sun); }
.rating input:focus-visible + label { outline: 2px solid var(--focus); border-radius: 4px; }
.side-note { font-size: var(--fs-xs); color: var(--ink-3); margin: 8px 0 0; }
.linked { list-style: none; margin: 0; padding: 0; font-size: var(--fs-sm); display: grid; gap: 6px; }
.linked li { display: flex; gap: 8px; align-items: baseline; }
.linked li a { overflow-wrap: anywhere; }
.linked form { margin: 0 0 0 auto; }

/* ── Nový požadavek ──────────────────────────────────────────────────── */

.type-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; max-width: 760px; }
.type-option {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  text-decoration: none;
  color: var(--ink);
}
.type-option:hover { border-color: var(--line-strong); background: var(--surface-2); color: var(--ink); }
.type-option:hover .chev { color: var(--shield); transform: translateX(2px); }
.type-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: color-mix(in srgb, currentColor 12%, var(--surface)); }
.type-icon .icon { width: 26px; height: 26px; }
.type-option strong { display: block; font-size: var(--fs-md); font-family: var(--font-cond); font-weight: 700; }
.type-option span { color: var(--ink-2); font-size: var(--fs-sm); }
.type-option .chev { color: var(--ink-3); transition: transform 0.15s; }

.create-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; align-items: start; }
.create-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px 26px; }
.create-tips { position: sticky; top: 80px; font-size: var(--fs-sm); color: var(--ink-2); }
.create-tips h2 { font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.create-tips ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; }
.type-switch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.type-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line);
  font-size: var(--fs-sm); font-weight: 600; text-decoration: none; color: var(--ink-2); background: var(--surface); }
.type-switch a:hover { border-color: var(--line-strong); color: var(--ink); }
.type-switch a[aria-current="page"] { border-color: var(--shield); color: var(--shield); background: var(--shield-soft); }
.type-switch .icon { width: 15px; height: 15px; }
.fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.fieldset + .fieldset { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 4px; }
.fieldset legend { font-family: var(--font-cond); font-weight: 700; font-size: var(--fs-md); padding: 0; margin-bottom: 14px; }
.similar {
  margin-top: 10px;
  border: 1px solid color-mix(in srgb, var(--sun) 55%, var(--line));
  background: color-mix(in srgb, var(--sun) 8%, var(--surface));
  border-radius: var(--r);
  padding: 10px 12px;
  font-size: var(--fs-sm);
}
.similar strong { display: block; margin-bottom: 6px; }
.similar ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.similar li { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }

/* ── Nástěnka ───────────────────────────────────────────────────────── */

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(210px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  scroll-snap-type: x proximity;
  align-items: start;
}
.board-col { background: var(--surface-3); border-radius: var(--r-lg); padding: 10px; min-height: 240px; scroll-snap-align: start; }
.board-col.is-over { box-shadow: inset 0 0 0 2px var(--shield); background: var(--shield-soft); }
.board-col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 4px 10px; }
.board-col-head .count-badge { background: var(--surface); }
.board-cards { display: grid; gap: 8px; min-height: 60px; }
.card {
  display: grid;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 10px 12px;
  cursor: grab;
  position: relative;
}
.card:hover { border-color: var(--line-strong); }
.card.is-dragging { opacity: 0.45; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.card-no { font-family: var(--font-cond); font-weight: 700; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.card a.card-title { color: var(--ink); font-weight: 600; text-decoration: none; font-size: var(--fs-sm); line-height: 1.35; overflow-wrap: anywhere; }
.card a.card-title:hover { color: var(--shield); }
.card .meta { gap: 4px 10px; }
.card-prio-critical { border-left: 3px solid var(--bad); }
.card-prio-high { border-left: 3px solid var(--warn); }

/* ── Aplikace ───────────────────────────────────────────────────────── */

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.app-card { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; padding: 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); text-decoration: none; color: var(--ink); align-items: start; }
.app-card:hover { border-color: var(--line-strong); color: var(--ink); }
.app-card strong { display: block; font-size: var(--fs-base); }
.app-card p { color: var(--ink-3); font-size: var(--fs-sm); margin: 2px 0 8px; }
.app-card.is-inactive { opacity: 0.6; }

/* ── Tabulky, výkaz, statistiky ─────────────────────────────────────── */

.table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); background: var(--surface); }
.table th, .table td { padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-weight: 600; color: var(--ink-3); font-size: var(--fs-xs); background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tr.day-row td { background: var(--surface-2); font-weight: 600; color: var(--ink-2); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-lg); }
.table-wrap .table tr:last-child td { border-bottom: 0; }


.hbar { display: grid; grid-template-columns: minmax(110px, 30%) minmax(0, 1fr) 4ch; gap: 10px; align-items: center; font-size: var(--fs-sm); padding: 4px 0; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 12px; border-radius: 0 4px 4px 0; background: transparent; }
.hbar-fill { display: block; height: 100%; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--shield); }
.hbar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ── Upozornění ─────────────────────────────────────────────────────── */

.notif-list { list-style: none; margin: 0; padding: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.notif { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); position: relative; }
.notif:first-child { border-top: 0; }
.notif:hover { background: var(--surface-2); }
.notif a.notif-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.notif a.notif-link::after { content: ""; position: absolute; inset: 0; }
.notif .notif-task { font-size: var(--fs-sm); color: var(--ink-2); }
.notif .notif-excerpt { font-size: var(--fs-sm); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif.is-unread { background: color-mix(in srgb, var(--sun) 7%, var(--surface)); }
.notif.is-unread::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sun); }
.notif time { font-size: var(--fs-xs); color: var(--ink-3); white-space: nowrap; }

/* ── Toasty ─────────────────────────────────────────────────────────── */

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 12px 12px 16px;
  border-radius: var(--r-lg);
  background: var(--ink);
  color: var(--paper);
  box-shadow: var(--shadow-pop);
  font-size: var(--fs-sm);
  font-weight: 600;
  animation: toast-in 0.25s ease-out both;
}
.toast-error { background: var(--bad); color: #fff; }
.toast-close { margin-left: auto; background: none; border: 0; color: inherit; opacity: 0.7; cursor: pointer; padding: 0; display: grid; }
.toast-close:hover { opacity: 1; }
.toast.is-leaving { animation: toast-out 0.2s ease-in both; }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes toast-out { to { transform: translateY(8px); opacity: 0; } }

/* ── Dialog, lightbox ───────────────────────────────────────────────── */

dialog {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  color: var(--ink);
  padding: 20px 22px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: var(--shadow-pop);
}
dialog::backdrop { background: rgba(10, 16, 32, 0.45); }
dialog h2 { font-size: var(--fs-lg); margin-bottom: 10px; }
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8, 12, 24, 0.88); display: grid; place-items: center; padding: 24px; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: var(--r); box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5); background: #fff; }
.lightbox-bar { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.lightbox-bar a, .lightbox-bar button { color: #fff; background: rgba(255, 255, 255, 0.12); border: 0; border-radius: var(--r); padding: 8px 12px; cursor: pointer; font: inherit; font-size: var(--fs-sm); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.lightbox-caption { color: #fff; font-size: var(--fs-sm); margin-top: 10px; text-align: center; }

/* ── Přihlášení ─────────────────────────────────────────────────────── */

.login-page { flex: 1; display: grid; justify-items: center; align-content: start;
  padding: clamp(48px, 11vh, 120px) 16px 48px;
  background: linear-gradient(180deg, var(--topbar) 0, var(--topbar) 230px, var(--paper) 230px); }
.login-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 30px 30px 26px; box-shadow: var(--shadow-pop); }
.login-card .crest { width: 72px; height: 72px; display: block; margin-bottom: 16px; }
.login-card h1 { font-size: var(--fs-2xl); }
.login-card .lede { color: var(--ink-2); margin: 8px 0 22px; }
.login-note { margin-top: 18px; font-size: var(--fs-sm); color: var(--ink-3); }
.notice { padding: 10px 14px; border-radius: var(--r); font-size: var(--fs-sm); margin-bottom: 16px; font-weight: 600; }
.notice-ok { background: var(--ok-soft); color: var(--ok); }
.notice-bad { background: var(--bad-soft); color: var(--bad); }
.notice-info { background: var(--shield-soft); color: var(--shield); }

/* ── Patička ────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--line); color: var(--ink-3); font-size: var(--fs-xs); }
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 16px var(--gutter); display: flex; gap: 8px 20px; flex-wrap: wrap; align-items: center; }
.footer a { color: var(--ink-3); }
.footer a:hover { color: var(--shield); }
.footer .grow { flex: 1; }

.kbd { font-family: var(--font-mono); font-size: 0.8em; padding: 1px 6px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); }
.snippet { position: relative; }
.snippet pre { background: var(--surface-3); border-radius: var(--r); padding: 12px 14px; overflow-x: auto; font-family: var(--font-mono); font-size: var(--fs-xs); margin: 6px 0 12px; }
.snippet .copy { position: absolute; top: 6px; right: 6px; }

.people-table select { min-height: 34px; font-size: var(--fs-sm); padding-top: 4px; padding-bottom: 4px; }

/* ── Responzivita ───────────────────────────────────────────────────── */

@media (max-width: 1100px) {
  .quick-new { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .topsearch { width: 180px; }
}

@media (max-width: 980px) {
  .layout-detail, .create-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; }
  .create-tips { position: static; order: -1; }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
}

@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .topbar-inner { gap: 10px; }
  .nav-toggle { display: block; order: 10; }
  .mainnav {
    display: none;
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    height: auto;
    background: var(--topbar);
    padding: 8px var(--gutter) 14px;
    box-shadow: 0 10px 20px rgba(10, 20, 50, 0.25);
  }
  .mainnav.is-open { display: flex; }
  .mainnav a { padding: 12px 4px; font-size: var(--fs-base); }
  .mainnav a[aria-current="page"]::after { left: 0; right: auto; width: 3px; top: 10px; bottom: 10px; height: auto; border-radius: 3px; }
  .topsearch { display: none; }
  .new-btn { margin-left: auto; }
  .new-btn span { display: none; }
  .new-btn { width: 40px; padding: 0; }
  .page { padding-top: 20px; }
  .page-head h1, .hello h1 { font-size: var(--fs-xl); }
  .summary-sentence { font-size: var(--fs-md); }
  .task-row { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 12px 14px 12px 16px; }
  .task-no { text-align: left; font-size: var(--fs-sm); padding: 0; }
  .task-side { justify-content: flex-start; }
  .task-list-compact .task-row { grid-template-columns: minmax(0, 1fr); }
  .task-head { grid-template-columns: minmax(0, 1fr); }
  .task-head .stamp { justify-self: start; }
  .quick-new { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .type-option { grid-template-columns: 40px minmax(0, 1fr); padding: 14px 16px; }
  .type-option .chev { display: none; }
  .create-form { padding: 18px 16px; }
  .hbar { grid-template-columns: minmax(90px, 36%) minmax(0, 1fr) 4ch; }
  .filterbar select { flex: 1 1 140px; }
  .timeline::before { left: 11px; }
  .tl-item { padding-left: 34px; }
  .tl-item > .avatar { width: 24px; height: 24px; font-size: 10px; }
  .tl-dot { left: 5px; }
}

@media (max-width: 560px) {
  .quick-new .qn-text { display: none; }
  .quick-new a { padding: 12px; }
  .quick-new a:last-child { grid-column: 1 / -1; }
  .footer-keys { display: none; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; transition-duration: 0.001ms !important; }
}

@media print {
  .topbar, .footer, .toasts, .no-print, .page-head-actions { display: none !important; }
  body { background: #fff; }
  .page { padding: 0; max-width: none; }
  .table-wrap { border: 0; }
}

/* ── Grafy (statistiky) ─────────────────────────────────────────────────
   Paleta = výchozí validovaná sada (slot 1 modrá, slot 2 oranžová), stejná
   jako v Rozpočtu obce; prošla validate_palette.js pro světlý (#ffffff)
   i tmavý (#141b2d) povrch. Text nikdy nenese barvu řady. */

.viz { --series-1: #2a78d6; --series-2: #eb6834; }
:root[data-theme="dark"] .viz { --series-1: #3987e5; --series-2: #d95926; }
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) .viz { --series-1: #3987e5; --series-2: #d95926; } }

.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; display: grid; gap: 2px; align-content: start; }
.stat-label { font-size: var(--fs-sm); color: var(--ink-2); }
.stat-value { font-family: var(--font-sans); font-weight: 600; font-size: var(--fs-xl); line-height: 1.2; color: var(--ink); }
.stat-note { font-size: var(--fs-xs); color: var(--ink-3); }
.chart-title { font-family: var(--font-sans); font-size: var(--fs-md); font-weight: 600; }

.colchart { margin: 6px 0 0; }
.colchart-plot { position: relative; height: 210px; margin: 22px 0 0 40px; border-bottom: 1px solid var(--line-strong); }
.colchart-ticks { position: absolute; inset: 0; pointer-events: none; }
.colchart-ticks span { position: absolute; left: 0; right: 0; bottom: calc(var(--v) / var(--top) * 100%); border-top: 1px solid var(--line); }
.colchart-ticks span:first-child { border-top: 0; }
.colchart-ticks span::before { content: attr(data-label); position: absolute; right: calc(100% + 8px); top: -0.65em; font-size: 11px; line-height: 1.2; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.colchart-cols { position: absolute; inset: 0; display: flex; align-items: flex-end; }
.colchart-group { flex: 1; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 2px; border-radius: 4px 4px 0 0; cursor: default; }
.colchart-group:hover, .colchart-group:focus-visible { background: color-mix(in srgb, var(--ink) 6%, transparent); outline: none; }
.col { position: relative; width: min(18px, 40%); height: calc(var(--v) / var(--top) * 100%); border-radius: 4px 4px 0 0; background: var(--series-1); }
.col.s2 { background: var(--series-2); }
.col[data-cap]::after { content: attr(data-cap); position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 600; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.colchart-x { display: flex; margin-left: 40px; }
.colchart-x span { flex: 1; min-width: 0; text-align: center; font-size: 11px; color: var(--ink-3); padding-top: 6px; overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-sm); color: var(--ink-2); margin-top: 12px; }
.legend .key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--series-1); vertical-align: -1px; margin-right: 6px; }
.legend .key.s2 { background: var(--series-2); }
.viz .hbar-fill { background: var(--series-1); }
.viz .hbar-label { color: var(--ink); text-decoration: none; }
.viz .hbar-label:hover { color: var(--shield); }
.viz-table { margin-top: 12px; font-size: var(--fs-sm); }
.viz-table summary { cursor: pointer; color: var(--shield); font-weight: 600; }
.viz-table .table { margin-top: 8px; border: 1px solid var(--line); }
.status-counts { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.status-counts a { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: var(--fs-sm); }

.viz-tip { position: fixed; z-index: 70; pointer-events: none; min-width: 140px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); padding: 8px 10px; font-size: var(--fs-sm); }
.viz-tip-title { font-size: var(--fs-xs); color: var(--ink-3); margin-bottom: 4px; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; }
.viz-tip-row strong { font-variant-numeric: tabular-nums; min-width: 2ch; }
.viz-tip-row span { color: var(--ink-2); }
.viz-tip-line { width: 12px; height: 2px; border-radius: 1px; background: var(--series-1); flex: none; }
.viz-tip-line.s2 { background: var(--series-2); }

@media (max-width: 860px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .colchart-x span:nth-child(even) { visibility: hidden; }
}

html:not(.js) .no-js-hide { display: none; }
.editor-hint .grow { flex: 1; }
.stars { color: var(--sun); letter-spacing: 1px; }
