/* css/base.css
   Created :: 2026-11-01

   Základ: reset, typografie, odkazy, utility. Platí pro aplikaci i login.
   Hodnoty jen z css/tokens.css.
*/

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; min-height: 100%; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ===== Typografie — 14px všude, výjimky jen přes tokeny ===== */
html {
  font-family: var(--font);
  font-size: var(--fs);
  font-weight: var(--fw);
  line-height: var(--lh);
  color: var(--c-text);
  background: var(--bg-page);
  background-color: var(--c-bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body { font-size: var(--fs); }

h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-bold); line-height: var(--lh-tight); color: var(--c-text); }
h1 { font-size: var(--fs-lg); }
h2 { font-size: var(--fs-md); }
h3, h4 { font-size: var(--fs); }

p { margin: 0 0 var(--sp-3); }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0 0 var(--sp-3); padding-left: var(--sp-5); }
strong, b { font-weight: var(--fw-bold); }
small { font-size: var(--fs-sm); }
hr { border: 0; border-top: 1px solid var(--c-border); margin: var(--sp-5) 0; }

code, pre { font-family: var(--font-mono); font-size: var(--fs-sm); }
code { background: var(--c-muted-soft); padding: 1px 5px; border-radius: var(--r-sm); }
pre  { background: var(--c-surface-2); border: 1px solid var(--c-border); border-radius: var(--r); padding: var(--sp-3); white-space: pre-wrap; margin: var(--sp-2) 0 0; }

/* ===== Odkazy =====
   Textový odkaz = <a> bez třídy. Barva textu, podtržení až po najetí myší, nikdy modrá.
   :where() = nulová specificita → jakákoli komponenta (tab, tlačítko, menu) ho přebije.
   2026-11-04 :: Základní pravidlo taky v :where() — obyčejné „a {}" přebíjelo styl textových odkazů a hover nefungoval */
:where(a) { color: inherit; text-decoration: none; }
:where(a:not([class])) {
  color: var(--c-link);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
:where(a:not([class])):hover { text-decoration-line: underline; }

/* ===== Utility ===== */
.muted   { color: var(--c-text-3); }
.text-2  { color: var(--c-text-2); }
.small   { font-size: var(--fs-sm); }
.nowrap  { white-space: nowrap; }
.mono    { font-family: var(--font-mono); font-size: var(--fs-sm); }
.right   { text-align: right; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.hp-field { position: absolute !important; left: -9999px; top: -9999px; }  /* honeypot proti spamu */
