/* H5 — opravy z hodnocení H2 (UI): kontrasty, písmo vstupů na mobilu, dotykové plochy, heatmapa, avatary, štítek Esc, skeleton velkých pohledů.
   Test: node qa/ux_audit.js (kontrast ≥ 4,5:1 u textu, vstupy ≥ 16 px na mobilu, názvy tlačítek a polí, pruhy timeline ≥ 44 px, bublina Beruška nad spodní lištou). */

/* štítky a avatary: tmavší text / sytější pozadí, aby text měl kontrast aspoň 4,5:1 na libovolné barvě projektu či člověka */
.label { background: color-mix(in srgb, var(--c, #64748b) 12%, var(--surface)); color: color-mix(in srgb, var(--c, #64748b) 55%, var(--text)); }
:root[data-theme="dark"] .label { background: color-mix(in srgb, var(--c, #64748b) 24%, var(--surface)); color: color-mix(in srgb, var(--c, #64748b) 40%, #fff); }
.av { background: color-mix(in srgb, var(--c, #64748b) 72%, #000); font-size: max(10px, calc(var(--s) * .38)); }
.av.none { background: var(--surface-2); }
:root[data-theme="dark"] .av { background: color-mix(in srgb, var(--c, #64748b) 62%, #000); }

/* vstupy: na mobilu a tabletu 16 px, ať iOS při zaostření nepřibližuje stránku */
@media (max-width: 992px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]), select, textarea { font-size: 16px; }
}

/* štítek klávesy v hledání se nelámá */
kbd, .kbd { white-space: nowrap; }

/* heatmapa Týmu: pevné stupně (světlý režim: tmavý text na světlých, bílý na sytých; tmavý režim naopak), přetížení = tmavě červená */
.heat-c.h1 { background: #eaf2fc; color: #13191c; } .heat-c.h2 { background: #cfe1f8; color: #13191c; } .heat-c.h3 { background: #9fc3ef; color: #0b1220; }
.heat-c.h4 { background: #5c97e0; color: #0b1220; } .heat-c.h5 { background: #1f63b8; color: #fff; } .heat-c.hx { background: #b91c1c; color: #fff; }
:root[data-theme="dark"] .heat-c.h1 { background: #1d2c40; color: #e8eef0; } :root[data-theme="dark"] .heat-c.h2 { background: #21395a; color: #e8eef0; }
:root[data-theme="dark"] .heat-c.h3 { background: #2c5a93; color: #fff; } :root[data-theme="dark"] .heat-c.h4 { background: #6aa3ea; color: #06101c; }
:root[data-theme="dark"] .heat-c.h5 { background: #9cc3f3; color: #06101c; } :root[data-theme="dark"] .heat-c.hx { background: #f2a5a5; color: #3a0d0d; }

/* timeline: barva pruhu ztmavená, ať je bílý text čitelný na libovolné barvě projektu; „Dnes“ nad 11 px */
.tl-bar { background: color-mix(in srgb, var(--pc) 80%, #000); }
.tl-bar.done { background: color-mix(in srgb, var(--success) 70%, var(--surface)); color: #0b1f12; }
:root[data-theme="dark"] .tl-bar.done { color: #04120a; }
.tl-bar.over { background: var(--danger); }
.tl-today span { font-size: 11px; }
@media (max-width: 768px), (pointer: coarse) and (max-width: 1100px) { .tl-bar .bn { font-size: 13px; } }

/* komentář otevřený odkazem (@zmínka, hledání) je krátce zvýrazněný */
.comment.c-hl { animation: c-hl 3.5s ease-out; border-radius: var(--r); }
@keyframes c-hl { 0%, 60% { background: var(--primary-soft); box-shadow: 0 0 0 3px var(--primary); } 100% { background: transparent; box-shadow: 0 0 0 3px transparent; } }
@media (prefers-reduced-motion: reduce) { .comment.c-hl { animation: none; background: var(--primary-soft); } }

/* tmavý režim: plné červené plochy s bílým textem potřebují tmavší červenou (světlá --danger je určená pro text) */
:root[data-theme="dark"] .badge, :root[data-theme="dark"] .btn.danger.solid, :root[data-theme="dark"] .tl-today, :root[data-theme="dark"] .tl-today span, :root[data-theme="dark"] .tl-bar.over { background: #b91c1c; color: #fff; }
.badge { font-size: 11px; }
@media (max-width: 992px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]):not([type=hidden]), select, textarea { font-size: 16px !important; }
  .bn-item { font-size: 11px; }
}

/* odkazy na lidi a projekty uvnitř textu a tabulek */
.plink { color: inherit; text-decoration: none; } .plink:hover b, .plink:hover { text-decoration: underline; }
.tbl a, .hb-l { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; } .tbl a:hover, .hb-l:hover { text-decoration-color: currentColor; }

/* mobil: oznámení (toasty se tlačítkem Zpět) leží nad bublinou Beruška i nad spodní lištou, aby je bublina nezakrývala */
@media (max-width: 768px) { .toasts { bottom: calc(var(--bottomnav-h) + 72px + env(safe-area-inset-bottom)); } }

/* drobečková navigace projektu */
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 6px; min-width: 0; }
.crumbs a { color: var(--muted); text-decoration: none; } .crumbs a:hover { color: var(--text); text-decoration: underline; }

/* mobil: spodek stránky nechává místo pro bublinu Beruška, ať poslední řádek a jeho tlačítka jdou odrolovat pryč zpod ní */
@media (max-width: 768px) { .page { padding-bottom: calc(var(--bottomnav-h) + 96px + env(safe-area-inset-bottom)); } }
