/* ==========================================================================
   HASIQ – veřejný web
   Barvy a písmo jsou v proměnných níže; změnou hodnot přebarvíte celý web.
   ========================================================================== */

:root {
  /* Paleta HASIQ v8 (HASIQ_FINAL_PRODUCTION_PACK_v8, 09_SPECS/HASIQ_palette.csv) */
  --navy: #08172d;         /* Primary Navy – patička, tmavé plochy */
  --ink: #142846;          /* Deep Navy – text, nadpisy */
  --ink-2: #4e5d73;        /* vedlejší text */
  --paper: #f7f9fc;        /* Off White – pozadí */
  --surface: #ffffff;      /* panely, formulář */
  --brand: #3b5787;        /* Mid Blue – tlačítka, odkazy, kladné hodnoty */
  --brand-dark: #263e64;   /* Blue Grey */
  --brand-tint: #e6edf7;
  --accent: #9dbfea;       /* Light Steel – zvýraznění na tmavém pozadí */
  --steel: #d9e0e8;        /* Pale Silver */
  --signal: #b7791f;       /* upozornění, záporné odchylky */
  --signal-tint: #f6ead6;
  --rule: #d9e0e8;         /* linky */
  --mist: #eef2f8;         /* světle stříbrná plocha */
  --brand-mid: #5074b3;    /* Medium Blue – přechody, ikony */
  --brand-light: #6f97d5;  /* Highlight Blue – světelné efekty (ne na text) */

  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 6px;
  --radius-lg: 12px;
  --header-h: var(--look-header-h, 72px);   /* výška hlavičky – Vzhled → Rozložení a styl webu (look_header_height) */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow-sm: 0 1px 2px rgba(8, 23, 45, .06), 0 1px 1px rgba(8, 23, 45, .04);
  --shadow: 0 1px 2px rgba(8, 23, 45, .05), 0 12px 28px -14px rgba(8, 23, 45, .22);
  --shadow-lg: 0 2px 4px rgba(8, 23, 45, .05), 0 32px 64px -28px rgba(8, 23, 45, .42);
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  /* patička vždy dole i u krátkých stránek */
  display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh;
}
body > main { flex: 1 0 auto; }

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
.section-ink :focus-visible, .site-footer :focus-visible, .plan-featured :focus-visible { outline-color: var(--accent); }
::selection { background: var(--brand-tint); color: var(--ink); }

h1, h2, h3, h4 { margin: 0; line-height: 1.12; letter-spacing: -0.015em; font-weight: 700; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 4.6vw, 3.75rem); letter-spacing: -0.032em; line-height: 1.05; }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); letter-spacing: -0.025em; }
h3 { font-size: 1.1875rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; z-index: 100; border-radius: 4px; }
.skip:focus { left: 8px; color: #fff; }

/* Malý nadpis nad hlavním nadpisem (úvod, 404) */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 20px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brand);
}
.eyebrow::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, var(--brand), var(--brand-light)); }

/* Tlačítka ---------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em; padding: .78em 1.25em;
  background: var(--brand); color: #fff;
  border: 1px solid var(--brand); border-radius: var(--radius);
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: background-color .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s var(--ease);
}
.btn:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; box-shadow: 0 8px 20px -10px rgba(20, 40, 70, .55); }
.btn:active { transform: translateY(1px); }
.btn-quiet { background: rgba(255, 255, 255, .7); color: var(--ink); border-color: var(--rule); box-shadow: none; }
.btn-quiet:hover { background: var(--surface); color: var(--ink); border-color: #b8c6d6; box-shadow: var(--shadow-sm); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); box-shadow: none; }
.btn-outline:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); border-color: #fff; }
.btn-light:hover { background: var(--brand-tint); color: var(--ink); border-color: var(--brand-tint); }
.btn-small { padding: .55em .95em; font-size: .9375rem; }
.btn-large { padding: .9em 1.45em; font-size: 1.0625rem; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; cursor: progress; transform: none; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .btn:not(.btn-quiet):not(.btn-outline):hover { transform: translateY(-1px); }
}

/* Hlavička ---------------------------------------------------------------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
          backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid rgba(217, 224, 232, .7);
  transition: background-color .25s, box-shadow .25s, border-color .25s;
}
/* Po odscrollování (třídu přidá site.js): plnější pozadí, stín, menší logo */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .96);
  border-bottom-color: var(--rule);
  box-shadow: 0 10px 28px -18px rgba(8, 23, 45, .45);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; flex: none; }
.brand img { height: var(--look-logo-h, 40px); width: auto; transform-origin: left center; transition: transform .25s var(--ease); }
.is-scrolled .brand img { transform: scale(.88); }

.main-nav { display: flex; align-items: center; gap: 28px; }
.main-nav a:not(.btn) {
  position: relative; padding: 6px 0;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .9875rem;
  transition: color .15s;
}
.main-nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.main-nav a:not(.btn):hover { color: var(--brand); }
.main-nav a:not(.btn):hover::after,
.main-nav a.is-active:not(.btn)::after,
.main-nav a[aria-current]:not(.btn)::after { transform: scaleX(1); }
.main-nav a.is-active:not(.btn), .main-nav a[aria-current]:not(.btn) { color: var(--brand); }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: .9375rem; background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: .5em .9em; color: var(--ink); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.nav-toggle:hover { border-color: #b8c6d6; }
/* hlavní výzva vedle tlačítka Menu – jen když je menu sbalené (mobil, kompaktní menu), od 1.7.35 */
.header-cta { display: none; margin-left: auto; margin-right: -14px; white-space: nowrap; }
:where(html.nav-compact) .header-cta { display: inline-flex; }
@media (max-width: 880px) { .header-cta { display: inline-flex; } }
@media (max-width: 400px) {
  .header-inner .brand img { height: 28px; }
  .header-cta { font-size: .8125rem; padding: .45em .7em; margin-right: -16px; }
  .nav-toggle { padding: .5em .7em; }
}
/* Ikona „hamburger“ / křížek – kreslí ji CSS, text tlačítka mění JS */
.nav-toggle::before {
  content: ""; width: 16px; height: 12px; flex: none;
  background:
    linear-gradient(currentColor, currentColor) 0 0 / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 2px no-repeat,
    linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
}
.nav-toggle[aria-expanded="true"]::before {
  width: 14px; height: 14px;
  background:
    linear-gradient(45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(-45deg, transparent calc(50% - 1px), currentColor calc(50% - 1px), currentColor calc(50% + 1px), transparent calc(50% + 1px));
}

@media (max-width: 880px) {
  :root { --header-h: 64px; }
  .brand img { height: 34px; }
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--rule);
    padding: 8px var(--gutter) 24px;
    box-shadow: 0 24px 40px -24px rgba(8, 23, 45, .45);
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto; overscroll-behavior: contain;
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .2s ease, transform .25s var(--ease), visibility 0s linear .25s;
  }
  .main-nav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .25s var(--ease), visibility 0s; }
  .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--mist); font-size: 1.0625rem; }
  .main-nav a:not(.btn)::after { left: -12px; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; transform: scaleY(0); }
  .main-nav a:not(.btn):hover::after,
  .main-nav a.is-active:not(.btn)::after,
  .main-nav a[aria-current]:not(.btn)::after { transform: scaleY(1); }
  .main-nav .btn { margin-top: 18px; padding: .85em 1.2em; }

  /* Otevřené menu: stránka pod ním se neposouvá a ztmaví se */
  html.nav-locked { overflow: hidden; }
  html.nav-locked .site-header { background: var(--surface); }
  html.nav-locked body::after {
    content: ""; position: fixed; inset: 0; z-index: 40;
    background: rgba(8, 23, 45, .38);
  }
}
/* Kompaktní menu na široké obrazovce: položky se do hlavičky nevejdou (třídu nav-compact na <html> přidá site.js
   po změření). Stejná pravidla jako v mobilním bloku výše, jen bez nižší hlavičky a menšího loga.
   :where() nemění specifičnost, takže pořadí pravidel (i v looks.css a jazyky.css) platí stejně jako u mobilu. */
:where(html.nav-compact) .nav-toggle { display: inline-flex; }
:where(html.nav-compact) .main-nav {
  position: absolute; left: 0; right: 0; top: 100%;
  flex-direction: column; align-items: stretch; gap: 0;
  background: var(--surface); border-bottom: 1px solid var(--rule);
  padding: 8px var(--gutter) 24px;
  box-shadow: 0 24px 40px -24px rgba(8, 23, 45, .45);
  max-height: calc(100vh - var(--header-h));
  max-height: calc(100dvh - var(--header-h));
  overflow-y: auto; overscroll-behavior: contain;
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity .2s ease, transform .25s var(--ease), visibility 0s linear .25s;
}
:where(html.nav-compact) .main-nav.open { visibility: visible; opacity: 1; transform: none; transition: opacity .2s ease, transform .25s var(--ease), visibility 0s; }
:where(html.nav-compact) .main-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--mist); font-size: 1.0625rem; }
:where(html.nav-compact) .main-nav a:not(.btn)::after { left: -12px; right: auto; top: 14px; bottom: 14px; width: 3px; height: auto; transform: scaleY(0); }
:where(html.nav-compact) .main-nav a:not(.btn):hover::after,
:where(html.nav-compact) .main-nav a.is-active:not(.btn)::after,
:where(html.nav-compact) .main-nav a[aria-current]:not(.btn)::after { transform: scaleY(1); }
:where(html.nav-compact) .main-nav .btn { margin-top: 18px; padding: .85em 1.2em; }
html.nav-locked:where(.nav-compact) { overflow: hidden; }
html.nav-locked:where(.nav-compact) .site-header { background: var(--surface); }
html.nav-locked:where(.nav-compact) body::after {
  content: ""; position: fixed; inset: 0; z-index: 40;
  background: rgba(8, 23, 45, .38);
}
/* přepnutí plné ↔ kompaktní menu proběhne bez animace (třídu na okamžik přidá site.js) */
html.nav-bez-prechodu .main-nav, html.nav-bez-prechodu .main-nav * { transition: none !important; }
/* na počítači panel u pravého okraje obsahu pod tlačítkem Menu, ne přes celou šířku okna */
@media (min-width: 881px) {
  :where(html.nav-compact) .main-nav {
    left: auto; right: max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter)));
    width: min(400px, calc(100% - 2 * var(--gutter)));
    padding: 8px 28px 24px;
    border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  }
}
/* Položky menu na počítači se nikdy nezalamují na dva řádky – co se nevejde, řeší kompaktní menu */
@media (min-width: 881px) {
  :where(html:not(.nav-compact)) .main-nav { flex-wrap: nowrap; }
  :where(html:not(.nav-compact)) .main-nav a, :where(html:not(.nav-compact)) .nav-sub-toggle { white-space: nowrap; }
}
/* Bez JavaScriptu se položky, které se nevejdou, zalomí do dalšího řádku celé (žádná nezmizí za okrajem) */
@media (min-width: 881px) and (scripting: none) {
  .header-inner { padding-top: 8px; padding-bottom: 8px; }
  .main-nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
}
/* Bez JavaScriptu je menu vždy rozbalené pod logem */
@media (max-width: 880px) and (scripting: none) {
  .header-inner { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .nav-toggle { display: none; }
  .main-nav { position: static; visibility: visible; opacity: 1; transform: none; width: 100%; box-shadow: none; border: 0; padding: 0; max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  .main-nav, .main-nav.open { transition: none; transform: none; }
}

/* Úvod -------------------------------------------------------------------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden; overflow: clip;
  padding: clamp(48px, 7vw, 104px) 0 clamp(64px, 8.5vw, 120px);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(40px, 5.5vw, 80px); align-items: center; }
.hero h1 {
  max-width: 17ch;
  background: linear-gradient(105deg, var(--navy) 0%, var(--ink) 45%, var(--brand) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--ink);
}
@media (forced-colors: active) { .hero h1 { background: none; -webkit-text-fill-color: currentColor; } }
.lead { font-size: clamp(1.0625rem, 1.4vw, 1.1875rem); line-height: 1.62; color: var(--ink-2); max-width: 48ch; margin-top: 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-points { list-style: none; padding: 0; margin: 36px 0 0; display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--ink-2); font-size: .9375rem; }
.hero-points li { display: flex; align-items: center; gap: 9px; }
.hero-points li::before {
  content: ""; width: 18px; height: 18px; flex: none; border-radius: 50%;
  background: var(--brand-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5.5 9.2 2.3 2.3 4.7-5' fill='none' stroke='%233b5787' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
  box-shadow: inset 0 0 0 1px #d0dcee;
}

.hero-visual { position: relative; min-width: 0; }
.hero-shot { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero h1 { max-width: 20ch; }
}

/* Ukázkový přehled (ledger) – působí jako okno aplikace -------------------- */

.ledger-wrap { position: relative; padding-bottom: 22px; }
.ledger-wrap::before {
  /* jemná záře za panelem */
  content: ""; position: absolute; inset: 8% -6% 4% 8%; z-index: -1; border-radius: 40px;
  background: radial-gradient(closest-side, rgba(111, 151, 213, .38), transparent);
  filter: blur(24px);
}
.ledger {
  background: var(--surface);
  border: 1px solid #d3dce8;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, var(--shadow-lg);
  font-size: .9375rem;
}
.ledger p { margin: 0; }

.ledger-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 16px; font-size: .75rem; color: var(--ink-2);
  background: linear-gradient(180deg, #f9fbfe, #f0f4f9);
  border-bottom: 1px solid var(--rule);
}
.ledger-dots { display: inline-flex; gap: 6px; }
.ledger-dots i { width: 9px; height: 9px; border-radius: 50%; background: #c9d4e3; }
.ledger-crumb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ledger-crumb span { color: #9aa7b8; margin: 0 4px; }
.ledger-crumb b { color: var(--ink); font-weight: 600; }
.ledger-seg { display: inline-flex; padding: 2px; border-radius: 6px; background: #e4eaf2; }
.ledger-seg span { padding: 3px 9px; border-radius: 4px; }
.ledger-seg .is-on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: var(--shadow-sm); }

.ledger-body { padding: clamp(18px, 2.4vw, 26px); }
.ledger-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--rule); }
.ledger-title { font-weight: 700; font-size: 1rem; }
.ledger-sub { color: var(--ink-2); font-size: .8125rem; }
.ledger-close { display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: var(--ink-2); text-align: right; }
.ledger-close strong { color: var(--ink); }

@property --done { syntax: "<number>"; inherits: true; initial-value: 0; }
.close-ring {
  --done: .5;
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--brand) calc(var(--done) * 360deg), var(--mist) 0);
  -webkit-mask: radial-gradient(circle, transparent 9px, #000 10px);
          mask: radial-gradient(circle, transparent 9px, #000 10px);
}

.ledger-cash { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.ledger-label { font-size: .8125rem; color: var(--ink-2); }
.ledger-big { font-size: clamp(2rem, 3.6vw, 2.75rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; color: var(--ink); }
.ledger-big .unit { font-size: .4em; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.ledger-delta { font-size: .8125rem; color: var(--brand); font-weight: 600; }
.count { display: inline-block; text-align: right; font-variant-numeric: tabular-nums; }

.spark { flex: none; width: 120px; height: 40px; overflow: visible; }
.spark-line { fill: none; stroke: var(--brand-mid); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.spark-dot { fill: var(--surface); stroke: var(--brand); stroke-width: 2; }

.ledger-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-variant-numeric: tabular-nums; }
.ledger-table caption { text-align: left; font-size: .8125rem; color: var(--ink-2); padding: 14px 0 6px; }
.ledger-table th, .ledger-table td { padding: 9px 0; text-align: left; font-weight: 400; border-bottom: 1px solid var(--mist); }
.ledger-table thead th { font-size: .75rem; color: var(--ink-2); font-weight: 500; border-bottom-color: var(--rule); }
.ledger-table tbody th { font-weight: 600; }
.ledger-table tbody tr { transition: background-color .15s; }
.ledger-table tbody tr:hover { background: #f6f9fd; }
.ledger-table .num { text-align: right; padding-right: 14px; }
.ledger-table tfoot th, .ledger-table tfoot td { border-bottom: 0; border-top: 1px solid var(--ink); font-weight: 700; }
.ledger-table tr.is-flagged th::after {
  content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 7px; border-radius: 50%;
  background: var(--signal); vertical-align: middle;
}
.var-col { width: 34%; }
.var { display: flex; align-items: center; gap: 10px; }
.var-track { position: relative; flex: 1; height: 8px; background: var(--mist); border-radius: 2px; }
.var-track::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--ink-2); }
.var-bar { position: absolute; top: 0; bottom: 0; left: 50%; width: var(--w); background: var(--brand); border-radius: 0 2px 2px 0; transform-origin: left; }
.var-bar.neg { left: auto; right: 50%; background: var(--signal); border-radius: 2px 0 0 2px; transform-origin: right; }
.var-pct { width: 4.6em; text-align: right; font-size: .875rem; white-space: nowrap; }
tfoot .var-col { text-align: right; }

.ledger-note { margin-top: 14px !important; padding: 10px 12px; background: var(--signal-tint); border-radius: 4px; font-size: .8125rem; border-left: 3px solid var(--signal); }

.ledger-live {
  position: absolute; left: clamp(12px, 3vw, 28px); bottom: 0; margin: 0;
  display: inline-flex; align-items: center; gap: 8px; max-width: calc(100% - 24px);
  padding: 8px 14px; border-radius: 999px; font-size: .8125rem; font-weight: 500; color: var(--ink);
  background: rgba(255, 255, 255, .94); border: 1px solid var(--rule); box-shadow: var(--shadow);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #2f8f5b; flex: none; box-shadow: 0 0 0 3px rgba(47, 143, 91, .18); }

@media (prefers-reduced-motion: no-preference) {
  .var-bar { animation: grow .9s var(--ease) .25s both; }
  .ledger-table tbody tr:nth-child(2) .var-bar { animation-delay: .37s; }
  .ledger-table tbody tr:nth-child(3) .var-bar { animation-delay: .49s; }
  .ledger-table tbody tr:nth-child(4) .var-bar { animation-delay: .61s; }
  .close-ring { animation: ring 1.3s var(--ease) .2s both; }
  .spark-line { stroke-dasharray: 1; animation: draw 1.4s var(--ease) .2s both; }
  .spark-area { animation: fade .8s ease 1s both; }
  .spark-dot { animation: fade .4s ease 1.4s both; }
  .live-dot { animation: pulse 2.4s ease-in-out 1.6s 3; }
  .ledger-wrap { animation: rise .8s var(--ease) both; }
  @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes ring { from { --done: 0; } }
  @keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes fade { from { opacity: 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(16px); } }
  @keyframes pulse { 50% { box-shadow: 0 0 0 6px rgba(47, 143, 91, 0); } }
}

@media (max-width: 520px) {
  .ledger-seg { display: none; }
  .ledger-table thead th:nth-child(2), .ledger-table td:nth-child(2) { display: none; }
  .var-track { display: none; }
  .var-col { width: auto; text-align: right; }
  .var { justify-content: flex-end; }
  .spark { width: 84px; }
  .ledger-top { flex-wrap: wrap; }
}

/* Sekce ------------------------------------------------------------------- */

.section { padding: clamp(64px, 8.5vw, 120px) 0; border-top: 1px solid var(--rule); }
.section-ink { background: var(--ink); color: #e6edf5; border-top: 0; }
.section-mist { background: var(--mist); }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 60px); }
.section-head::before, .split-head::before {
  content: ""; display: block; width: 40px; height: 3px; margin-bottom: 22px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
}
.section-ink .section-head::before { background: linear-gradient(90deg, var(--accent), rgba(157, 191, 234, .3)); }
.section-head p { color: var(--ink-2); margin-top: 18px; font-size: 1.125rem; line-height: 1.6; }
.section-ink .section-head p { color: #b8c6d6; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.split-head { position: sticky; top: calc(var(--header-h) + 32px); }
.split-head p { color: var(--ink-2); margin-top: 16px; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split-head { position: static; }
}

/* Objevování při scrollu – třídy přidá site.js; bez JS je vše viditelné */
.reveal {
  opacity: 0; translate: 0 22px;
  transition:
    opacity .7s var(--ease) var(--reveal-delay, 0s),
    translate .7s var(--ease) var(--reveal-delay, 0s),
    transform .25s var(--ease), box-shadow .25s, border-color .25s, background-color .25s;
}
.reveal.is-visible { opacity: 1; translate: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; translate: none; transition: none; } }

/* Karta s jemným zdvihem při najetí (funkce, kroky, tarify, reference) */
.feature, .step, .plan, .ref { transition: transform .25s var(--ease), box-shadow .25s, border-color .25s, background-color .25s; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .feature:hover, .plan:hover, .ref:hover, .step:hover { transform: translateY(-4px); }
}

/* Funkce */
.feature-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(16px, 2vw, 24px); }
.feature {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: clamp(22px, 2.6vw, 30px); box-shadow: var(--shadow-sm);
}
.feature:hover { border-color: #c3d1e5; box-shadow: var(--shadow); }
.feature h3 { margin-bottom: 10px; }
.feature p { color: var(--ink-2); }
.feature .ticks { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--mist); }
.feature-icon {
  display: inline-grid; place-items: center; width: 46px; height: 46px; margin-bottom: 20px;
  border-radius: 11px; color: var(--brand);
  background: linear-gradient(140deg, #f3f7fc 0%, var(--brand-tint) 100%);
  box-shadow: inset 0 0 0 1px #d3deee;
  transition: color .25s, background-color .25s;
}
.feature-icon svg { width: 24px; height: 24px; }
.feature:hover .feature-icon { color: var(--brand-dark); }

.ticks { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; font-size: .9375rem; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: ""; position: absolute; left: 1px; top: .42em; width: 13px; height: 8px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg) scale(.82); transform-origin: center;
}

/* Postup */
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 20px; }
.step {
  counter-increment: step; position: relative;
  padding: 26px 24px 28px; border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02));
  border: 1px solid rgba(157, 191, 234, .18);
}
.step:hover { border-color: rgba(157, 191, 234, .42); background-color: rgba(255, 255, 255, .03); }
.step::before {
  content: counter(step, decimal-leading-zero); display: grid; place-items: center;
  width: 46px; height: 46px; margin-bottom: 22px; border-radius: 50%;
  font-size: 1rem; font-weight: 600; letter-spacing: .02em; line-height: 1;
  color: #fff; font-variant-numeric: tabular-nums;
  background: linear-gradient(140deg, var(--brand-mid), var(--brand-dark));
  box-shadow: 0 0 0 4px rgba(157, 191, 234, .12), 0 8px 20px -8px rgba(0, 0, 0, .5);
}
/* čtyři kroky na tabletu 2 × 2, ne 3 + 1 */
@media (min-width: 560px) and (max-width: 999px) {
  .steps-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* spojnice mezi kroky v jedné řadě */
@media (min-width: 1000px) {
  .steps-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps-3 .step:not(:last-child)::after, .steps-4 .step:not(:last-child)::after {
    content: ""; position: absolute; top: 49px; left: calc(24px + 46px + 12px); right: -8px; height: 1px;
    background: linear-gradient(90deg, rgba(157, 191, 234, .55), rgba(157, 191, 234, .08));
  }
}
.step h3 { color: #fff; margin-bottom: 10px; }
.step p { color: #b8c6d6; }

/* Ceník */
.plans { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); align-items: stretch; }
.plan {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: clamp(24px, 2.6vw, 32px); box-shadow: var(--shadow-sm);
}
.plan:hover { box-shadow: var(--shadow); border-color: #c3d1e5; }
.plan h3 { font-size: 1.25rem; }
.plan-price { margin: 18px 0 14px; padding-bottom: 18px; border-bottom: 1px solid var(--mist); line-height: 1.1; }
.plan-price span { font-size: clamp(1.875rem, 3vw, 2.375rem); font-weight: 700; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.plan-price small { display: inline-block; color: var(--ink-2); font-size: .9375rem; font-weight: 500; }
.plan-for { color: var(--ink-2); font-size: .9375rem; }
.plan .ticks { margin: 16px 0 28px; flex: 1; align-content: start; }
.plan .btn { align-self: stretch; }
.plan-badge {
  position: absolute; top: 0; left: clamp(24px, 2.6vw, 32px); transform: translateY(-50%);
  margin: 0 !important; padding: 5px 12px; border-radius: 999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); background: linear-gradient(90deg, var(--accent), #c4d9f3);
  box-shadow: 0 6px 16px -8px rgba(8, 23, 45, .6);
}
.plan-featured {
  background: radial-gradient(420px 220px at 100% 0%, rgba(111, 151, 213, .28), transparent 70%), linear-gradient(165deg, var(--brand-dark) 0%, var(--ink) 52%, var(--navy) 100%);
  border-color: var(--ink); color: #fff;
  box-shadow: 0 30px 60px -30px rgba(8, 23, 45, .7);
}
.plan-featured:hover { border-color: var(--ink); box-shadow: 0 36px 70px -30px rgba(8, 23, 45, .8); }
.plan-featured .plan-price { border-bottom-color: rgba(157, 191, 234, .2); }
.plan-featured .plan-price small, .plan-featured .plan-for { color: #c3d0df; }
.plan-featured .ticks li::before { border-color: var(--accent); }
/* tři tarify na tabletu pod sebou (2 + 1 by působilo nevyváženě) */
@media (max-width: 899px) {
  .plans-3 { grid-template-columns: minmax(0, 1fr); max-width: 560px; }
}
@media (min-width: 900px) {
  .plans-3 .plan-featured, .plans-4 .plan-featured { margin-block: -14px; padding-block: calc(clamp(24px, 2.6vw, 32px) + 14px); }
}
.fineprint { font-size: .875rem; color: var(--ink-2); margin-top: 20px; }
#cenik > .wrap > .fineprint { margin-top: 32px; }

/* Reference */
.refs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.ref {
  position: relative; margin: 0; display: flex; flex-direction: column;
  padding: clamp(24px, 2.6vw, 32px); border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow-sm);
}
.ref:hover { box-shadow: var(--shadow); }
.ref::before {
  /* uvozovky jako dekorace */
  content: ""; display: block; width: 34px; height: 26px; margin-bottom: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 34 26'%3E%3Cpath d='M0 26V15C0 7.5 4.2 2.3 12 0l1.6 3.4C9.4 5 7.2 7.8 7 11.5h7V26H0Zm19 0V15c0-7.5 4.2-12.7 12-15l1.6 3.4C28.4 5 26.2 7.8 26 11.5h7V26H19Z' fill='%236f97d5' fill-opacity='.55'/%3E%3C/svg%3E") 0 0 / contain no-repeat;
}
.ref blockquote { margin: 0 0 20px; flex: 1; font-size: 1.125rem; line-height: 1.55; }
.ref figcaption { display: flex; flex-direction: column; font-size: .9375rem; padding-top: 16px; border-top: 1px solid var(--mist); }
.ref figcaption span { color: var(--ink-2); }

/* Dotazy */
.faq details { border-top: 1px solid var(--rule); }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 52px 22px 0; position: relative;
  font-weight: 600; font-size: 1.125rem; line-height: 1.4;
  transition: color .15s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--brand); }
.faq summary::before {
  content: ""; position: absolute; right: 0; top: 50%; width: 32px; height: 32px; margin-top: -16px;
  border-radius: 50%; border: 1px solid var(--rule); background: var(--surface);
  transition: border-color .2s, background-color .2s;
}
.faq summary::after {
  content: ""; position: absolute; right: 11px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg); transition: transform .25s var(--ease);
}
.faq summary:hover::before { border-color: #b8c6d6; }
.faq details[open] summary::before { background: var(--brand-tint); border-color: #c3d1e5; }
.faq details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.faq summary:focus-visible { outline-offset: -2px; }
.faq-answer { padding: 0 52px 26px 0; }
.faq-answer p, .faq details > p { color: var(--ink-2); max-width: 64ch; }

/* Kontakt */
.section-contact { background: radial-gradient(700px 360px at 0% 100%, rgba(111, 151, 213, .14), transparent 70%), var(--mist); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact-copy::before {
  content: ""; display: block; width: 40px; height: 3px; margin-bottom: 22px; border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
}
.contact-copy p { color: var(--ink-2); margin-top: 18px; font-size: 1.125rem; max-width: 40ch; }
.contact-direct { margin: 32px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 20px; }
.contact-direct dt { color: var(--ink-2); }
.contact-direct dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }

.contact-form {
  background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: clamp(20px, 3vw, 36px); box-shadow: var(--shadow-lg);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.field { position: relative; margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: .9375rem; margin-bottom: 6px; }
.optional { font-weight: 400; color: var(--ink-2); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid #b8c6d6; border-radius: var(--radius); padding: .72em .85em;
  transition: border-color .15s, box-shadow .15s;
}
.field input::placeholder, .field textarea::placeholder { color: #5f6e84; }
.field textarea { resize: vertical; min-height: 130px; }
.field input:hover, .field textarea:hover { border-color: #8fa2ba; }
.field input:focus, .field textarea:focus { outline: 2px solid transparent; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .2); }
.has-error input, .has-error textarea { border-color: var(--signal); }
.has-error input:focus, .has-error textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(183, 121, 31, .22); }
.field.is-valid input, .field.is-valid textarea { border-color: #8aa6cf; }
.field.is-valid input {
  padding-right: 2.4em;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5 9.2 2.6 2.6L13 6.3' fill='none' stroke='%233b5787' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .7em center / 18px no-repeat;
}
.field-error { display: flex; align-items: flex-start; gap: 6px; color: #8a5a12; font-size: .875rem; margin: 6px 0 0; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; background: var(--signal-tint); color: #8a5a12; font-size: .6875rem; font-weight: 700; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn-submit { min-width: 12em; }

.notice { padding: 12px 14px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500; }
.notice-ok { background: var(--brand-tint); color: #143a66; border-left: 3px solid var(--brand); }
.notice-error { background: var(--signal-tint); color: #6b440b; border-left: 3px solid var(--signal); }

/* Stránky a blog --------------------------------------------------------- */

main:has(> .article:first-child) {
  background: radial-gradient(800px 300px at 90% 0%, rgba(111, 151, 213, .14), transparent 70%), linear-gradient(180deg, #fff 0, var(--paper) 360px);
}
.article { max-width: calc(760px + 2 * var(--gutter)); padding-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(64px, 8vw, 120px); }
.article h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; max-width: 22ch; }
.article-head { margin-bottom: clamp(28px, 4vw, 44px); padding-bottom: clamp(20px, 3vw, 32px); border-bottom: 1px solid var(--rule); }
.article-head h1:last-child { margin-bottom: 0; }
.article .lead { margin-top: 0; margin-bottom: 0; }
.article-cover { margin: 0 0 clamp(28px, 4vw, 44px); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); background: var(--mist); }
.article-cover img { width: 100%; }
.article-back { margin-top: clamp(40px, 5vw, 64px); padding-top: 24px; border-top: 1px solid var(--rule); font-weight: 600; }
.article-back a { text-decoration: none; }
.article-back a:hover { text-decoration: underline; }

.article-404 { text-align: left; min-height: 52vh; display: flex; flex-direction: column; justify-content: center; }
.article-404 .lead { margin-bottom: 0; }
.article-404 .actions { margin-top: 32px; }

.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.15em; }
.prose h2 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin: 1.9em 0 .6em; }
.prose h3 { font-size: 1.25rem; margin: 1.6em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--brand); }
.prose a { text-decoration-thickness: 1px; }
.prose blockquote { margin: 1.6em 0; padding: 14px 20px; border-left: 3px solid var(--brand); background: var(--surface); border-radius: 0 var(--radius) var(--radius) 0; color: var(--ink-2); font-size: 1.125rem; }
.prose img { border-radius: var(--radius); margin: 1.6em 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 2.2em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: .9375rem; font-variant-numeric: tabular-nums; display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 9px 12px 9px 0; text-align: left; }
.prose th { font-weight: 600; }

.post-date { color: var(--ink-2); font-size: .9375rem; margin-bottom: 12px; }
.post-date a { font-weight: 600; text-decoration: none; }
.post-date a:hover { text-decoration: underline; }
.post-list { margin-top: clamp(24px, 4vw, 40px); display: grid; gap: 16px; }
.post-item {
  display: grid; grid-template-columns: 220px 1fr; gap: 28px; align-items: start;
  padding: 24px; border: 1px solid var(--rule); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, border-color .25s, transform .25s var(--ease);
}
.post-item:hover { box-shadow: var(--shadow); border-color: #c3d1e5; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .post-item:hover { transform: translateY(-3px); } }
.post-item:not(:has(.post-cover)) { grid-template-columns: 1fr; }
.post-item h2 { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: 10px; }
.post-item h2 a { color: var(--ink); text-decoration: none; }
.post-item h2 a:hover { color: var(--brand); }
.post-item h2 a:focus-visible { outline-offset: 4px; }
.post-item p { color: var(--ink-2); }
.post-item .post-date { margin-bottom: 8px; font-size: .875rem; }
.post-cover { display: block; border-radius: var(--radius); overflow: hidden; background: var(--mist); }
.post-cover img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; transition: transform .5s var(--ease); }
.post-item:hover .post-cover img { transform: scale(1.03); }
@media (max-width: 640px) { .post-item { grid-template-columns: 1fr; gap: 18px; padding: 18px; } }

/* Přílohy a obrázky v textu ---------------------------------------------- */

/* obrázky vložené editorem: zarovnání vlevo, na střed, vpravo, přes šířku */
.prose::after { content: ""; display: table; clear: both; }
.prose figure { margin: 1.75em 0; }
.prose figure img { margin: 0; }
.prose figcaption { margin-top: 8px; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.prose .align-center { display: table; margin-left: auto; margin-right: auto; }
.prose .align-center figcaption { display: table-caption; caption-side: bottom; text-align: center; }
.prose .align-left { float: left; max-width: 46%; margin: .35em 1.75em 1em 0; }
.prose .align-right { float: right; max-width: 46%; margin: .35em 0 1em 1.75em; }
.prose .align-wide img { width: 100%; }
@media (min-width: 1000px) { .prose .align-wide { margin-left: -80px; margin-right: -80px; } }
@media (max-width: 640px) {
  .prose .align-left, .prose .align-right { float: none; max-width: none; margin: 1.5em 0; }
}

/* odkaz na soubor ke stažení se štítkem typu */
.file-link { --type: var(--brand); text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.file-link::before {
  content: attr(data-type); display: inline-block; min-width: 3.1em; margin-right: .5em; padding: .15em .4em; border-radius: 4px;
  background: var(--type); color: #fff; font-size: .6875rem; font-weight: 800; line-height: 1.4; letter-spacing: .03em;
  text-align: center; text-transform: uppercase; vertical-align: .15em;
}
.file-link[data-type="pdf"] { --type: #a23b2c; }
.file-link:is([data-type="doc"], [data-type="docx"], [data-type="odt"], [data-type="rtf"]) { --type: #2b5797; }
.file-link:is([data-type="xls"], [data-type="xlsx"], [data-type="ods"], [data-type="csv"]) { --type: #23714a; }
.file-link:is([data-type="ppt"], [data-type="pptx"], [data-type="odp"]) { --type: #b5531f; }
.file-link:is([data-type="zip"]) { --type: #6b5a3a; }
.file-link:is([data-type="txt"]) { --type: #5b6b80; }

/* seznam příloh pod textem stránky a článku */
.attachments { clear: both; margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule); }
.attachments h2 { font-size: 1.25rem; margin-bottom: 14px; }
.attachments ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attachments .file-link { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.attachments .file-link::before { margin-right: 0; }
.attachments .file-link:hover { border-color: var(--brand); box-shadow: 0 6px 18px -12px rgba(8, 23, 45, .45); }
.attachments .file-link:hover .attachment-title { color: var(--brand); text-decoration: underline; }
.attachment-title { flex: 1 1 12em; min-width: 0; font-weight: 600; }
.attachment-meta { color: var(--ink-2); font-size: .875rem; white-space: nowrap; }

/* Patička ----------------------------------------------------------------- */

.site-footer {
  position: relative; overflow: hidden;
  background: radial-gradient(900px 320px at 100% 0%, rgba(80, 116, 179, .2), transparent 70%), var(--navy);
  color: #b8c6d6; padding: clamp(48px, 6vw, 72px) 0 28px; font-size: .9375rem;
}
.site-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 191, 234, .45), transparent);
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.site-footer p { margin-bottom: .55em; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px 48px; }
.footer-text { max-width: 36ch; line-height: 1.6; }
.footer-title { color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px !important; }
.footer-col a { overflow-wrap: anywhere; }
.footer-legal {
  position: relative; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 24px;
  margin-top: 44px; padding-top: 20px; font-size: .8125rem;
}
.footer-legal::before { content: ""; position: absolute; top: 0; left: var(--gutter); right: var(--gutter); height: 1px; background: rgba(219, 227, 235, .16); }
.footer-legal p { margin: 0; }
.legal-links a { color: #dbe3eb; }
.article-head .legal-effective { margin-top: 12px; }
@media (max-width: 880px) { .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* Tisk -------------------------------------------------------------------- */

@media print {
  *, *::before, *::after { box-shadow: none !important; text-shadow: none !important; animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  body { background: #fff; color: #000; font-size: 11pt; line-height: 1.5; }
  .site-header { position: static; background: none; border-bottom: 1px solid #999; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-toggle, .main-nav, .skip, .adminbar, .hero-visual, .actions, .contact-form, .footer-logo, .ledger-live { display: none !important; }
  .hero, .section, .section-ink, .section-mist, .section-contact, .site-footer, .plan-featured, .step, main { background: none !important; color: #000 !important; }
  .hero::before, .hero::after, .site-footer::before { display: none; }
  .hero h1 { background: none; -webkit-text-fill-color: currentColor; color: #000; }
  .section { padding: 18pt 0; border-top: 1px solid #ccc; }
  .section-ink .section-head p, .step h3, .step p, .plan-featured .plan-for, .plan-featured .plan-price small, .site-footer, .site-footer a { color: #000 !important; }
  .step::before { background: none; color: #000; border: 1px solid #000; }
  .reveal { opacity: 1 !important; translate: none !important; }
  .feature, .plan, .ref, .step, .post-item { break-inside: avoid; border: 1px solid #bbb; transform: none !important; }
  .faq-answer { display: block; }
  .prose a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #333; }
  .split, .contact-grid, .hero-grid { display: block; }
  .split-head { position: static; }
}

/* Úvod – jemný modrostříbrný přechod a světelné efekty jako v logu ----------- */

.hero {
  background:
    radial-gradient(900px 460px at 88% -10%, rgba(111, 151, 213, .26), transparent 70%),
    radial-gradient(600px 380px at -6% 105%, rgba(157, 191, 234, .22), transparent 70%),
    linear-gradient(180deg, #fff 0%, var(--paper) 100%);
}
/* jemná mřížka jako na milimetrovém papíře, vybledlá k okrajům */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(59, 87, 135, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 87, 135, .07) 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 72% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 72% 40%, #000 20%, transparent 75%);
}
/* stříbrná světelná koule za panelem */
.hero::after {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  width: min(720px, 90vw); aspect-ratio: 1; right: -12%; top: -28%;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%, rgba(157, 191, 234, .45), rgba(111, 151, 213, .12) 45%, transparent 68%);
}
@media (prefers-reduced-motion: no-preference) {
  /* jednorázový náběh světla – žádná nekonečná animace, stránka je v klidu */
  .hero::after { animation: glow 2.4s var(--ease) both; }
  @keyframes glow { from { opacity: 0; transform: translate(6%, -6%) scale(.92); } }
}
.footer-logo { margin-bottom: 16px !important; }
.footer-logo img { height: 44px; width: auto; }
.section-ink { background: radial-gradient(900px 400px at 85% 0%, rgba(111, 151, 213, .22), transparent 70%), linear-gradient(160deg, var(--ink) 0%, var(--navy) 100%); }

/* Správcovská lišta – vidí ji jen přihlášený správce ----------------------- */

.has-adminbar .site-footer { padding-bottom: 92px; }
.adminbar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 90;
  display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 6px 16px;
  width: max-content; max-width: calc(100% - 24px);
  background: var(--ink); color: #dbe3eb; font-size: .875rem; line-height: 1.3;
  padding: 8px 8px 8px 16px; border-radius: 10px;
  box-shadow: 0 12px 32px -12px rgba(9, 35, 71, .55);
}
.adminbar a { color: #fff; font-weight: 600; text-decoration: none; }
.adminbar a:hover { text-decoration: underline; color: #fff; }
.adminbar-state { color: var(--steel); }
.adminbar.is-maint { background: #6b440b; }
.adminbar.is-maint .adminbar-state { color: #f6ead6; }
.adminbar.is-maint .adminbar-state strong { color: #fff; }
.adminbar form { margin: 0; }
.adminbar-btn {
  font: inherit; font-weight: 600; cursor: pointer; color: var(--ink);
  background: #fff; border: 0; border-radius: 6px; padding: 6px 12px;
}
.adminbar-btn:hover { background: var(--brand-tint); }
@media (max-width: 560px) {
  .adminbar { padding: 6px 8px 6px 12px; gap: 4px 12px; font-size: .8125rem; border-radius: 8px; }
  .adminbar-long { display: none; }
}
/* „Upravit tuto stránku“ ve Skladateli webu – plovoucí tlačítko jen pro přihlášeného s právem úprav (od 1.7.14) */
.upravit-web {
  position: fixed; right: 16px; bottom: 76px; z-index: 91; display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 600; font-size: .9375rem;
  text-decoration: none; box-shadow: 0 12px 28px -10px rgba(9, 35, 71, .6);
}
.upravit-web:hover, .upravit-web:focus-visible { background: var(--brand-dark); color: #fff; }
.upravit-web:focus-visible { outline: 3px solid var(--accent, #fff); outline-offset: 2px; }
.upravit-web svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media print { .upravit-web { display: none !important; } }

/* Menu a podmenu ------------------------------------------------------------
   Položky z Administrace → Menu. Podmenu: na počítači rozbalovací panel (myš i klávesnice,
   tlačítko s aria-expanded), na mobilu vnořený seznam v rozbaleném menu. JS: poslední blok v site.js. */

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

.main-nav a[aria-current="page"]:not(.btn),
.main-nav a.is-active:not(.btn),
.main-nav .nav-group.is-active > .nav-parent,
.main-nav .nav-group.is-active > .nav-sub-label { color: var(--brand); }

.nav-group { position: relative; display: flex; align-items: center; gap: 2px; white-space: nowrap; }
.nav-sub-toggle {
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px; border: 0; border-radius: 4px;
  background: none; color: var(--ink); font: inherit; font-weight: 500; font-size: .9875rem; cursor: pointer;
}
.nav-sub-toggle::after {
  content: ""; width: 7px; height: 7px; flex: none;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .15s;
}
.nav-group.is-open > .nav-sub-toggle::after { transform: translateY(1px) rotate(-135deg); }
.nav-sub-toggle:hover { color: var(--brand); }
.nav-sub-label { padding-left: 0; }

.nav-sub { display: none; list-style: none; margin: 0; padding: 0; }
.nav-group.is-open > .nav-sub,
.main-nav:not(.js-sub) .nav-group:hover > .nav-sub,
.main-nav:not(.js-sub) .nav-group:focus-within > .nav-sub { display: block; }

/* rozbalovací panel jen u plného menu na počítači (ne v kompaktním menu – třída nav-compact, site.js) */
@media (min-width: 881px) {
  :where(html:not(.nav-compact)) .nav-sub {
    position: absolute; top: 100%; left: -14px; z-index: 60; min-width: 220px; margin-top: 10px; padding: 8px;
    background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius);
    box-shadow: 0 18px 40px -20px rgba(9, 35, 71, .35);
  }
  /* neviditelný most, aby se podmenu při přejezdu myší dolů nezavřelo */
  :where(html:not(.nav-compact)) .nav-sub::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
  :where(html:not(.nav-compact)) .main-nav .nav-sub a:not(.btn) { display: block; padding: 8px 12px; border-radius: 4px; white-space: nowrap; }
  :where(html:not(.nav-compact)) .main-nav .nav-sub a:not(.btn):hover { background: var(--mist); }
}

@media (max-width: 880px) {
  .main-nav .nav-group { flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--rule); }
  .main-nav .nav-group > .nav-parent { flex: 1; border-bottom: 0; }
  .nav-sub-toggle { padding: 12px 4px 12px 12px; }
  .nav-sub-label { flex: 1; padding-left: 0; justify-content: space-between; text-align: left; }
  .nav-sub { flex-basis: 100%; padding: 0 0 10px 16px; }
  .main-nav .nav-sub a:not(.btn) { display: block; padding: 8px 0; border-bottom: 0; color: var(--ink-2); }
  .main-nav .nav-sub a[aria-current="page"]:not(.btn) { color: var(--brand); }
}
/* kompaktní menu na počítači = stejné jako mobilní (viz Hlavička) */
:where(html.nav-compact) .main-nav .nav-group { flex-wrap: wrap; gap: 0; border-bottom: 1px solid var(--rule); }
:where(html.nav-compact) .main-nav .nav-group > .nav-parent { flex: 1; border-bottom: 0; }
:where(html.nav-compact) .nav-sub-toggle { padding: 12px 4px 12px 12px; }
:where(html.nav-compact) .nav-sub-label { flex: 1; padding-left: 0; justify-content: space-between; text-align: left; }
:where(html.nav-compact) .nav-sub { flex-basis: 100%; padding: 0 0 10px 16px; }
:where(html.nav-compact) .main-nav .nav-sub a:not(.btn) { display: block; padding: 8px 0; border-bottom: 0; color: var(--ink-2); }
:where(html.nav-compact) .main-nav .nav-sub a[aria-current="page"]:not(.btn) { color: var(--brand); }

.site-footer .footer-sub { padding-left: 14px; }
.site-footer .footer-menu-head { color: #fff; font-weight: 600; }

/* Kategorie článků --------------------------------------------------------- */

.blog-cats ul { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.blog-cats a {
  display: inline-block; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--surface); color: var(--ink); font-size: .9375rem; font-weight: 500; text-decoration: none;
}
.blog-cats a:hover { border-color: var(--brand); color: var(--brand); }
.blog-cats a[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.category-intro { margin-bottom: 20px; }
.post-cat { font-weight: 500; }
.post-empty { color: var(--ink-2); padding-top: 24px; }

/* ==========================================================================
   Stránky: rozvržení, sekce, výpis článků a horní lišta (app/sections.php)
   Šablony: templates/page.php, templates/partials/sections/*.php, partials/topbar.php, partials/header_extra.php
   ========================================================================== */

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

/* Horní lišta nad hlavičkou – tenký námořnický pruh s kovovou linkou */
.topbar {
  position: relative; z-index: 51;
  background: var(--navy); color: #b8c6d6; font-size: .8125rem; line-height: 1.3;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 191, 234, .38), transparent);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 36px; }
.topbar-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; margin: 0; }
.topbar-info a { color: #dbe3eb; text-decoration: none; font-variant-numeric: tabular-nums; }
.topbar-nav { margin-left: auto; }
.topbar-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; padding: 0; }
.topbar-nav a { color: #dbe3eb; text-decoration: none; font-weight: 500; letter-spacing: .01em; }
.topbar a:hover, .topbar a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: rgba(157, 191, 234, .7); }
.topbar :focus-visible { outline-color: var(--accent); }
@media (max-width: 880px) { .topbar { display: none; } }

/* Doplňky hlavního menu: odkazy horní lišty jen v mobilním menu, druhé tlačítko */
.nav-extra { display: none; }
.main-nav .header-btn2 { margin-right: -14px; }
@media (max-width: 880px) {
  .nav-extra { display: flex; flex-wrap: wrap; gap: 0 20px; padding: 12px 0 0; }
  .main-nav .nav-extra a:not(.btn) { padding: 8px 0; border-bottom: 0; font-size: .9375rem; color: var(--ink-2); }
  .main-nav .nav-extra a:not(.btn)::after { display: none; }
  .main-nav .header-btn2 { margin-right: 0; }
}
:where(html.nav-compact) .main-nav .header-btn2 { margin-right: 0; }

/* Rozvržení stránky: Široká, S obsahem, Výpis článků, Prezentační */
.article.article-wide, .article.article-toc { max-width: var(--wrap); }
.article-wide .article-head h1, .article-toc .article-head h1 { max-width: 26ch; }

.toc-layout { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 760px); gap: clamp(32px, 5vw, 72px); align-items: start; }
.toc-layout.toc-empty { grid-template-columns: minmax(0, 760px); }
.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; }
.toc-box summary {
  list-style: none; cursor: default; margin-bottom: 14px;
  color: var(--brand); font-size: .75rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}
.toc-box summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--rule); }
.toc li a {
  display: block; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 2px solid transparent;
  color: var(--ink-2); font-size: .9375rem; line-height: 1.4; text-decoration: none;
  transition: color .15s, border-color .15s;
}
.toc li.toc-l3 a { padding-left: 30px; font-size: .875rem; }
.toc li a:hover { color: var(--brand); border-left-color: var(--brand); }
@media (max-width: 960px) {
  .toc-layout { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; max-height: none; }
  .toc-box { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 14px 18px; }
  .toc-box summary { cursor: pointer; margin: 0; display: flex; justify-content: space-between; align-items: center; }
  .toc-box summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); }
  .toc-box[open] summary { margin-bottom: 12px; }
  .toc-box[open] summary::after { transform: translateY(1px) rotate(-135deg); }
}

.listing-intro { max-width: 760px; margin-bottom: clamp(8px, 2vw, 16px); }
.article-listing .post-list { max-width: 900px; }

.page-landing-notice { padding-top: 24px; }
.page-landing-after { padding-bottom: 48px; }

/* Výpis článků: doporučený článek, štítek, stránkování */
.post-badge {
  display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 4px;
  background: var(--brand-tint); color: #143a66; font-size: .6875rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; vertical-align: .1em;
}
.post-item.is-featured { position: relative; border-color: #c3d1e5; box-shadow: var(--shadow); }
.post-item.is-featured::before {
  content: ""; position: absolute; left: -1px; top: 18px; bottom: 18px; width: 3px; border-radius: 0 2px 2px 0;
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
}
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: clamp(28px, 4vw, 44px); font-variant-numeric: tabular-nums; }
.pager ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.pager a, .pager span[aria-current] {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 12px;
  border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); font-weight: 600; text-decoration: none; transition: border-color .15s, color .15s;
}
.pager a:hover { border-color: var(--brand); color: var(--brand); }
.pager span[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }

/* Sekce stránky – společný základ */
.psec { padding: clamp(56px, 7vw, 104px) 0; border-top: 1px solid var(--rule); }
.page-landing > .psec:first-of-type, .psec-t-divider + .psec, .psec + .psec-t-divider { border-top: 0; }
.psec-bg-mist { background: var(--mist); }
.psec-bg-ink {
  background: radial-gradient(900px 400px at 85% 0%, rgba(111, 151, 213, .22), transparent 70%), linear-gradient(160deg, var(--ink) 0%, var(--navy) 100%);
  color: #e6edf5; border-top: 0;
}
.psec-bg-ink .section-head::before { background: linear-gradient(90deg, var(--accent), rgba(157, 191, 234, .3)); }
.psec-bg-ink .section-head p, .psec-bg-ink .fineprint { color: #b8c6d6; }
.psec-bg-ink :focus-visible { outline-color: var(--accent); }
.psec-narrow { max-width: calc(760px + 2 * var(--gutter)); }
.psec .section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.psec-t-text .section-head { margin-bottom: clamp(20px, 3vw, 32px); }
.psec-intro { border-top: 0; }

/* Obrázek a text */
.psec-split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(32px, 5.5vw, 80px); align-items: center; }
.psec-split.is-reversed .psec-media { order: 2; }
.psec-split.no-media { grid-template-columns: minmax(0, 760px); }
.psec-media {
  position: relative; margin: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow-lg);
}
.psec-media img { width: 100%; }
.psec-copy h2 { margin-bottom: 18px; }
.psec-copy .eyebrow { margin-bottom: 16px; }
.psec-copy .prose { color: var(--ink-2); }
.psec-actions { margin-top: 28px; }
@media (max-width: 880px) {
  .psec-split { grid-template-columns: minmax(0, 1fr); }
  .psec-split.is-reversed .psec-media { order: 0; }
}

/* Galerie */
.psec-gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(14px, 2vw, 22px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.psec-gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.psec-gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.psec-gallery figure { margin: 0; }
.psec-gallery img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius);
  border: 1px solid var(--rule); background: var(--mist);
}
.psec-gallery figcaption { margin-top: 8px; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
@media (max-width: 880px) { .psec-gallery.cols-3, .psec-gallery.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .psec-gallery, .psec-gallery.cols-2, .psec-gallery.cols-3, .psec-gallery.cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* Výzva k akci – tmavý pruh s tečkovým rastrem a kovovou linkou */
.psec-t-cta {
  position: relative; overflow: hidden; border-top: 0; color: #e6edf5;
  background: radial-gradient(800px 360px at 100% 0%, rgba(111, 151, 213, .24), transparent 70%), linear-gradient(160deg, var(--ink) 0%, var(--navy) 100%);
}
.psec-t-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(157, 191, 234, .22) 1px, transparent 1.2px);
  background-size: 18px 18px;
  -webkit-mask-image: radial-gradient(ellipse 50% 90% at 88% 50%, #000 10%, transparent 70%);
          mask-image: radial-gradient(ellipse 50% 90% at 88% 50%, #000 10%, transparent 70%);
}
.psec-t-cta::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(157, 191, 234, .5), transparent);
}
.psec-cta-inner { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.psec-cta-copy { max-width: 640px; }
.psec-t-cta h2 { color: #fff; }
.psec-cta-copy p { color: #b8c6d6; font-size: 1.125rem; margin-top: 16px; }
.psec-t-cta .eyebrow { color: var(--accent); }
.psec-t-cta .eyebrow::before { background: linear-gradient(90deg, var(--accent), rgba(157, 191, 234, .3)); }
.psec-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.psec-btn-ghost { background: transparent; color: #fff; border-color: rgba(157, 191, 234, .45); box-shadow: none; }
.psec-btn-ghost:hover { background: rgba(255, 255, 255, .06); border-color: var(--accent); color: #fff; }
.psec-t-cta :focus-visible { outline-color: var(--accent); }

/* Karty */
.psec-cards { display: grid; gap: clamp(16px, 2vw, 24px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.psec-cards.cards-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.psec-card {
  --pad: clamp(22px, 2.6vw, 30px);
  display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--radius-lg);
  padding: var(--pad); box-shadow: var(--shadow-sm);
  transition: border-color .25s, box-shadow .25s, transform .25s var(--ease);
}
.psec-card:hover { border-color: #c3d1e5; box-shadow: var(--shadow); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) { .psec-card:hover { transform: translateY(-3px); } }
.psec-card-media { margin: calc(-1 * var(--pad)) calc(-1 * var(--pad)) 22px; border-bottom: 1px solid var(--rule); border-radius: var(--radius-lg) var(--radius-lg) 0 0; overflow: hidden; background: var(--mist); }
.psec-card-media img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.psec-card h3 { margin-bottom: 10px; }
.psec-card h2.psec-card-h { margin-bottom: 10px; font-size: 1.1875rem; letter-spacing: -0.015em; }   /* karty bez nadpisu sekce (h2 místo h3, stejný vzhled) */
.psec-card p { color: var(--ink-2); }
.psec-card-link { margin-top: auto; padding-top: 18px; }
.psec-card-link a { font-weight: 600; text-decoration: none; }
.psec-card-link a::after { content: "\00a0\2192"; }
.psec-card-link a:hover { text-decoration: underline; }
.psec-bg-mist .psec-card { box-shadow: none; }

/* Čísla – pruh hodnot jako v účetní knize: tenká linka, tabulková čísla */
.psec-kpis { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px clamp(20px, 3vw, 40px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); }
.psec-kpi { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 4px 0 4px 20px; border-left: 1px solid var(--rule); }
.psec-kpi::before {
  content: ""; position: absolute; left: -1px; top: 4px; width: 2px; height: 28px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--brand-light));
}
.psec-kpi-value { font-size: clamp(2rem, 4vw, 2.875rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; color: var(--ink); font-variant-numeric: tabular-nums lining-nums; }
.psec-kpi-label { font-weight: 600; font-size: 1rem; }
.psec-kpi-detail { color: var(--ink-2); font-size: .875rem; line-height: 1.5; }
.psec-kpi-note { margin-top: 28px; }
.psec-bg-ink .psec-kpi { border-left-color: rgba(157, 191, 234, .25); }
.psec-bg-ink .psec-kpi::before { background: linear-gradient(180deg, var(--accent), rgba(157, 191, 234, .3)); }
.psec-bg-ink .psec-kpi-value { color: #fff; }
.psec-bg-ink .psec-kpi-detail { color: #b8c6d6; }

/* Výpis článků v sekci – karty v mřížce */
.psec-posts { display: grid; gap: clamp(16px, 2vw, 22px); grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.post-item.post-card { grid-template-columns: 1fr; gap: 18px; padding: 20px; align-content: start; }
.post-card h3 { font-size: 1.1875rem; margin-bottom: 8px; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--brand); }
.post-card .post-cover img { aspect-ratio: 16 / 10; }
.psec-more { margin-top: 28px; font-weight: 600; }
.psec-more a { text-decoration: none; }
.psec-more a:hover { text-decoration: underline; }

/* Kontaktní formulář v sekci – stejný vzhled jako na úvodní stránce */
.psec-t-contact { background: radial-gradient(700px 360px at 0% 100%, rgba(111, 151, 213, .14), transparent 70%), var(--mist); }

/* Oddělovač a mezery */
.psec-t-divider { padding: 0; border-top: 0; }
.psec-t-divider hr {
  margin: clamp(24px, 4vw, 48px) 0; border: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--rule) 12%, #b8c6d6 50%, var(--rule) 88%, transparent);
}
.psec-divider-space-s { height: 24px; }
.psec-divider-space-m { height: clamp(40px, 5vw, 64px); }
.psec-divider-space-l { height: clamp(64px, 9vw, 120px); }

@media print {
  .topbar, .nav-extra, .toc, .pager, .psec-cta-actions { display: none !important; }
  .toc-layout, .psec-split { display: block; }
  .psec, .psec-t-cta, .psec-bg-ink, .psec-bg-mist, .psec-t-contact { background: none !important; color: #000 !important; padding: 18pt 0; }
  .psec-t-cta h2, .psec-cta-copy p, .psec-bg-ink .psec-kpi-value { color: #000 !important; }
  .psec-card, .psec-kpi { break-inside: avoid; }
}

/* Formátování z editoru textu ------------------------------------------------
   .prose = text stránek a článků, .rich = krátké formátované texty úvodní stránky (rich_block()).
   Třídy povoluje sanitize_class_whitelist() v app/helpers.php; stejný vzhled zrcadlí .rte-area v admin.css. */

.prose h4, .rich h4 { font-size: 1.0625rem; line-height: 1.3; letter-spacing: 0; margin: 1.6em 0 .45em; }
.rich > :first-child { margin-top: 0; }
.rich > :last-child { margin-bottom: 0; }
.rich p, .rich ul, .rich ol { margin: 0 0 .85em; }
.rich ul, .rich ol { padding-left: 1.25em; }
.rich li { margin-bottom: .3em; }
.rich li::marker { color: var(--brand); }
.rich h2 { font-size: 1.375rem; margin: 1.1em 0 .4em; }
.rich h3 { font-size: 1.125rem; margin: 1em 0 .4em; }
.rich img { border-radius: var(--radius); }
.prose li > ul, .prose li > ol, .rich li > ul, .rich li > ol { margin: .4em 0 0; }
.prose ol > li::marker, .rich ol > li::marker { font-variant-numeric: tabular-nums; font-weight: 600; }
.prose ol.ol-alpha, .rich ol.ol-alpha { list-style-type: lower-alpha; }
.prose ol.ol-roman, .rich ol.ol-roman { list-style-type: upper-roman; }

/* písmo, velikost, barva, zvýraznění */
.prose .ff-serif, .rich .ff-serif { font-family: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif; letter-spacing: 0; }
.prose .ff-mono, .rich .ff-mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace; font-size: .92em; letter-spacing: 0; }
.prose .fs-small, .rich .fs-small { font-size: .875em; }
.prose .fs-large, .rich .fs-large { font-size: 1.2em; line-height: 1.5; }
.prose p.fs-lead, .rich p.fs-lead { font-size: clamp(1.1875rem, 1.6vw, 1.3125rem); line-height: 1.6; letter-spacing: -.005em; color: var(--ink); margin-bottom: 1.25em; }
.prose p.note, .rich p.note { font-size: .875rem; line-height: 1.6; color: var(--ink-2); }
.prose .tc-brand, .rich .tc-brand { color: var(--brand); }
.prose .tc-navy, .rich .tc-navy { color: var(--navy); }
.prose .tc-steel, .rich .tc-steel { color: #5d6e85; }
.prose .tc-signal, .rich .tc-signal { color: #8a5a12; }   /* tmavší odstín signálu: kontrast 4,5 : 1 na bílé (od 1.7.6) */
.section-ink .rich .tc-navy, .plan-featured .rich .tc-navy, .site-footer .rich .tc-navy { color: #fff; }
.section-ink .rich .tc-brand, .plan-featured .rich .tc-brand, .site-footer .rich .tc-brand { color: var(--accent); }
.section-ink .rich .tc-steel, .plan-featured .rich .tc-steel, .site-footer .rich .tc-steel { color: #b8c6d6; }
.section-ink .rich .tc-signal, .plan-featured .rich .tc-signal, .site-footer .rich .tc-signal { color: #e3b46a; }
.prose mark, .rich mark, .lead mark, .plan-for mark {
  color: inherit; padding: 0 .12em; border-radius: 2px;
  background: linear-gradient(transparent 14%, rgba(157, 191, 234, .45) 14%, rgba(157, 191, 234, .45) 88%, transparent 88%);
}
.section-ink mark, .plan-featured mark, .site-footer mark { background: linear-gradient(transparent 14%, rgba(157, 191, 234, .28) 14%, rgba(157, 191, 234, .28) 88%, transparent 88%); }
.prose sub, .prose sup, .rich sub, .rich sup { line-height: 0; font-size: .72em; }
.prose u, .rich u { text-underline-offset: .18em; text-decoration-thickness: 1px; }
.prose s, .rich s { text-decoration-thickness: 1px; }
.section-ink .rich a:not(.btn-link), .plan-featured .rich a:not(.btn-link) { color: var(--accent); }
.section-ink .rich li::marker, .plan-featured .rich li::marker { color: var(--accent); }

/* zarovnání a odsazení */
.prose .ta-left, .rich .ta-left { text-align: left; }
.prose .ta-center, .rich .ta-center { text-align: center; }
.prose .ta-right, .rich .ta-right { text-align: right; }
.prose .ta-justify, .rich .ta-justify { text-align: justify; hyphens: auto; }
.prose .indent-1, .rich .indent-1 { margin-left: 2em; }
.prose .indent-2, .rich .indent-2 { margin-left: 4em; }
.prose .indent-3, .rich .indent-3 { margin-left: 6em; }
@media (max-width: 600px) {
  .prose .indent-1, .rich .indent-1 { margin-left: 1em; }
  .prose .indent-2, .rich .indent-2 { margin-left: 2em; }
  .prose .indent-3, .rich .indent-3 { margin-left: 3em; }
}

/* zvýrazněný rámeček – tenká linka barvy značky vlevo */
.prose .callout, .rich .callout {
  margin: 1.75em 0; padding: 18px 22px 18px 20px;
  background: linear-gradient(90deg, rgba(230, 237, 247, .75), rgba(247, 249, 252, .55));
  border: 1px solid var(--rule); border-left: 2px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0;
}
.prose .callout > :first-child, .rich .callout > :first-child { margin-top: 0; }
.prose .callout > :last-child, .rich .callout > :last-child { margin-bottom: 0; }
.section-ink .rich .callout, .plan-featured .rich .callout { background: rgba(255, 255, 255, .04); border-color: rgba(157, 191, 234, .2); border-left-color: var(--accent); }

/* odkaz jako tlačítko */
.prose a.btn-link, .rich a.btn-link {
  display: inline-flex; align-items: center; gap: .55em; margin: .2em .35em .2em 0; padding: .72em 1.2em;
  background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none;
  box-shadow: var(--shadow-sm), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: background-color .18s, border-color .18s, box-shadow .18s, transform .18s var(--ease);
}
.prose a.btn-link::after, .rich a.btn-link::after {
  content: ""; width: .42em; height: .42em; margin-left: .05em;
  border-top: 1.5px solid currentColor; border-right: 1.5px solid currentColor; transform: rotate(45deg);
}
.prose a.btn-link:hover, .rich a.btn-link:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; box-shadow: 0 8px 20px -10px rgba(20, 40, 70, .55); }
.section-ink .rich a.btn-link, .plan-featured .rich a.btn-link, .site-footer .rich a.btn-link { background: #fff; border-color: #fff; color: var(--ink); }
.section-ink .rich a.btn-link:hover, .plan-featured .rich a.btn-link:hover, .site-footer .rich a.btn-link:hover { background: var(--brand-tint); border-color: var(--brand-tint); color: var(--ink); }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .prose a.btn-link:hover, .rich a.btn-link:hover { transform: translateY(-1px); }
}

/* tabulky jako finanční výkaz: tenké linky, tabulková čísla, tučný součet s dvojitou linkou */
.prose table, .rich table {
  display: table; width: 100%; margin: 1.8em 0; border-collapse: collapse;
  font-size: .9375rem; line-height: 1.5; font-variant-numeric: tabular-nums lining-nums;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
}
.prose caption, .rich caption { caption-side: top; text-align: left; padding: 0 0 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.prose th, .prose td, .rich th, .rich td { padding: 10px 16px 10px 0; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: top; }
.prose tr > :last-child, .rich tr > :last-child { padding-right: 0; }
.prose thead th, .rich thead th {
  padding-top: 12px; vertical-align: bottom; border-bottom: 1px solid var(--ink);
  font-size: .75rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2);
}
.prose tbody th, .rich tbody th { font-weight: 600; }
.prose tbody tr:last-child > *, .rich tbody tr:last-child > * { border-bottom: 0; }
.prose tfoot td, .prose tfoot th, .rich tfoot td, .rich tfoot th { font-weight: 700; border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); }
.prose tbody tr:hover > *, .rich tbody tr:hover > * { background: rgba(230, 237, 247, .45); }
.prose td.ta-right, .prose th.ta-right, .rich td.ta-right, .rich th.ta-right { text-align: right; }
.prose td > :last-child, .rich td > :last-child { margin-bottom: 0; }
@media (max-width: 700px) {
  .prose table, .rich table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* velikost obrázku a galerie */
.prose figure.size-s, .rich figure.size-s { width: min(260px, 100%); }
.prose figure.size-m, .rich figure.size-m { width: min(440px, 100%); }
.prose figure.size-l, .rich figure.size-l { width: min(680px, 100%); }
.prose figure[class*="size-"] img, .rich figure[class*="size-"] img { width: 100%; }
.prose .align-left.size-s, .prose .align-right.size-s { width: min(260px, 46%); }
.prose .align-left.size-m, .prose .align-right.size-m { width: min(440px, 46%); }
.prose figure.size-full, .rich figure.size-full { float: none; display: block; width: 100%; max-width: none; margin-left: 0; margin-right: 0; }
.prose figure.gallery, .rich figure.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 1.9em 0; }
.prose figure.gallery.cols-2, .rich figure.gallery.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.prose figure.gallery.cols-4, .rich figure.gallery.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.prose figure.gallery img, .rich figure.gallery img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin: 0; border-radius: var(--radius); box-shadow: 0 0 0 1px rgba(8, 23, 45, .06); }
.prose figure.gallery figcaption, .rich figure.gallery figcaption { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 560px) {
  .prose figure.gallery.cols-3, .prose figure.gallery.cols-4, .rich figure.gallery.cols-3, .rich figure.gallery.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* obrázky bloků úvodní stránky (pole Obrázek z knihovny) a portrét u reference */
.block-media { margin: 0 0 20px; }
.block-media img { width: 100%; height: auto; border-radius: calc(var(--radius-lg) - 4px); }
.feature-media img { aspect-ratio: 16 / 10; object-fit: cover; box-shadow: 0 0 0 1px var(--rule); }
.step-media { margin: 18px 0 0; }
.step-media img { box-shadow: 0 0 0 1px rgba(157, 191, 234, .2); }
.plan-media img { aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 0 0 1px var(--rule); }
.plan-featured .plan-media img { box-shadow: 0 0 0 1px rgba(157, 191, 234, .25); }
.ref figcaption.has-photo { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 14px; align-items: center; }
.ref figcaption.has-photo > :not(.ref-photo) { grid-column: 2; }
.ref-photo { grid-row: span 2; width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 1px var(--rule), 0 0 0 3px var(--surface), 0 0 0 4px var(--steel); }
.ref blockquote > .rich, .ref blockquote > p { margin: 0; }
.section-head .rich { margin-top: 18px; color: var(--ink-2); font-size: 1.125rem; line-height: 1.6; }
.section-head .rich p { margin-top: 0; }
.section-ink .section-head .rich { color: #b8c6d6; }
.contact-copy .rich { margin-top: 18px; color: var(--ink-2); font-size: 1.125rem; max-width: 40ch; }
.contact-copy .rich p { margin-top: 0; }
.faq-answer .rich { color: var(--ink-2); max-width: 64ch; }

@media print {
  .prose a.btn-link, .rich a.btn-link { display: inline; padding: 0; background: none !important; color: #000 !important; border: 0; box-shadow: none; }
  .prose a.btn-link::after, .rich a.btn-link::after { display: none; }
  .prose .callout { background: none; }
}

/* ==========================================================================
   Hledání na webu a stránka 404 (app/search.php, templates/search.php, templates/404.php,
   hledání v hlavičce templates/partials/search_header.php + assets/js/hledani.js)
   ========================================================================== */

/* Hledání v hlavičce: ikona lupy, po otevření pole pod hlavičkou */
.hs { position: relative; display: flex; align-items: center; }
.main-nav a.hs-toggle {
  display: inline-grid; place-items: center; width: 38px; height: 38px; padding: 0; margin: 0 -8px;
  border-radius: var(--radius); color: var(--ink); transition: color .15s, background-color .15s;
}
.main-nav a.hs-toggle::after { display: none; }
.main-nav a.hs-toggle:hover, .hs.is-open .hs-toggle { color: var(--brand); background: var(--mist); }
.hs-form { display: none; }
.hs.is-open .hs-form {
  display: flex; align-items: center; gap: 4px;
  position: absolute; right: -10px; top: calc(100% + 15px); z-index: 60;
  width: min(380px, calc(100vw - 2 * var(--gutter)));
  padding: 5px; background: var(--surface);
  border: 1px solid var(--rule); border-top: 2px solid var(--brand); border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hs-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .18), var(--shadow-lg); }
.hs-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 0; background: transparent;
  font: inherit; font-size: 1rem; color: var(--ink);
}
.hs-input:focus { outline: none; }
.hs-input::placeholder { color: #5f6e84; }
.hs-submit {
  flex: none; display: inline-grid; place-items: center; width: 42px; height: 42px;
  border: 0; border-radius: calc(var(--radius) - 2px); background: var(--brand); color: #fff; cursor: pointer;
  transition: background-color .15s;
}
.hs-submit:hover { background: var(--brand-dark); }
.hs-submit:focus-visible { outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .hs.is-open .hs-form { animation: hs-in .2s var(--ease); }
}
@keyframes hs-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
/* tmavá hlavička a průhledná hlavička nad tmavým úvodem */
.look-header-tmava .main-nav a.hs-toggle { color: #dbe3eb; }
.look-header-tmava .main-nav a.hs-toggle:hover, .look-header-tmava .hs.is-open .hs-toggle { color: #fff; background: rgba(255, 255, 255, .08); }
@media (min-width: 881px) {
  :where(html:not(.nav-compact)) .look-header-over-dark .site-header:not(.is-scrolled) .main-nav a.hs-toggle { color: #dbe3eb; }
  :where(html:not(.nav-compact)) .look-header-over-dark .site-header:not(.is-scrolled) .main-nav a.hs-toggle:hover { color: #fff; background: rgba(255, 255, 255, .08); }
}
/* mobilní menu: pole nahoře, bez ikony */
@media (max-width: 880px) {
  .main-nav .hs { order: -1; display: block; padding: 10px 0 8px; }
  .main-nav a.hs-toggle { display: none; }
  .hs-form, .hs.is-open .hs-form {
    display: flex; align-items: center; gap: 4px; position: static; width: auto; padding: 4px;
    background: var(--surface); border: 1px solid #c3cfdd; border-radius: var(--radius); box-shadow: none; animation: none;
  }
  .hs-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .18); }
}
:where(html.nav-compact) .main-nav .hs { order: -1; display: block; padding: 10px 0 8px; }
:where(html.nav-compact) .main-nav a.hs-toggle { display: none; }
:where(html.nav-compact) .hs-form, :where(html.nav-compact) .hs.is-open .hs-form {
  display: flex; align-items: center; gap: 4px; position: static; width: auto; padding: 4px;
  background: var(--surface); border: 1px solid #c3cfdd; border-radius: var(--radius); box-shadow: none; animation: none;
}
:where(html.nav-compact) .hs-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .18); }
@media print { .hs { display: none; } }

/* Formulář hledání (stránka hledání, 404) */
.search-form { display: flex; gap: 10px; width: 100%; max-width: 640px; margin-top: 28px; }
.search-field { position: relative; flex: 1; min-width: 0; }
.search-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-2); pointer-events: none; }
.search-field input {
  width: 100%; height: 52px; padding: 0 14px 0 44px;
  border: 1px solid #c3cfdd; border-radius: var(--radius); background: var(--surface);
  font: inherit; font-size: 1.0625rem; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.search-field input::placeholder { color: #5f6e84; }
.search-field input:hover { border-color: #8fa2ba; }
.search-field input:focus { outline: 2px solid transparent; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .2); }
.search-form .btn { height: 52px; padding-left: 1.5em; padding-right: 1.5em; }
@media (max-width: 480px) {
  .search-form { flex-direction: column; }
  .search-form .btn { width: 100%; }
}

/* Stránka výsledků */
.search-head h1 { margin-bottom: 0; }
.search-tip { margin: 12px 0 0; font-size: .875rem; color: var(--ink-2); }
.search-count { margin: 0 0 4px; color: var(--ink-2); font-size: .9375rem; }
.search-count strong { color: var(--ink); }
.search-results { list-style: none; margin: 0; padding: 0; max-width: 860px; border-top: 1px solid var(--rule); }
.search-hit {
  display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 0 12px;
  padding: 22px 0; border-bottom: 1px solid var(--rule);
}
/* pořadové číslo jako řádek účetního deníku */
.search-no { padding-top: 3px; font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--brand-mid); }
.search-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 6px; font-size: .8125rem; color: var(--ink-2); }
.search-type { font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.search-path { color: #5f6e84; overflow-wrap: anywhere; }
.search-hit h2 { margin: 0 0 8px; font-size: clamp(1.1875rem, 2vw, 1.375rem); letter-spacing: -0.01em; }
.search-hit h2 a { color: var(--ink); text-decoration: none; }
.search-hit h2 a:hover { color: var(--brand); text-decoration: underline; text-decoration-thickness: 1px; }
.search-snippet { margin: 0; max-width: 72ch; color: var(--ink-2); }
.search-hit mark, .search-snippet mark {
  color: inherit; padding: 0 .06em; border-radius: 2px;
  background: linear-gradient(transparent 56%, rgba(157, 191, 234, .6) 56%);
}
.search-empty {
  max-width: 680px; padding: clamp(22px, 3vw, 32px);
  border: 1px solid var(--rule); border-radius: var(--radius-lg); background: var(--surface);
}
.search-empty h2 { margin-bottom: 10px; font-size: 1.375rem; }
.search-empty-sub { margin: 18px 0 0; font-weight: 600; }
.search-suggest, .e404-col ul { list-style: none; margin: 12px 0 0; padding: 0; }
.search-suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.search-suggest a {
  display: inline-block; padding: 7px 14px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--paper); color: var(--ink); font-weight: 500; text-decoration: none; transition: border-color .15s, color .15s;
}
.search-suggest a:hover { border-color: var(--brand); color: var(--brand); }
.search-empty-contact { margin: 18px 0 0; color: var(--ink-2); }
@media (max-width: 560px) {
  .search-hit { grid-template-columns: 1fr; }
  .search-no { display: none; }
}

/* Stránka 404 */
.article-404 { justify-content: flex-start; }
.e404-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.e404-copy .lead { max-width: 52ch; }
.e404-ledger {
  position: relative; padding: 22px 24px 18px; border: 1px solid var(--rule); border-radius: var(--radius-lg);
  background: linear-gradient(180deg, #fff, var(--paper)); box-shadow: var(--shadow);
  font-size: .875rem; font-variant-numeric: tabular-nums;
}
.e404-ledger::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(59, 87, 135, .12) 1px, transparent 1px); background-size: 12px 12px;
  -webkit-mask-image: linear-gradient(180deg, transparent 40%, #000); mask-image: linear-gradient(180deg, transparent 40%, #000);
}
.e404-ledger > * { position: relative; }
.e404-ledger-head, .e404-ledger-sum { display: flex; justify-content: space-between; gap: 16px; margin: 0; }
.e404-ledger-head { padding-bottom: 12px; border-bottom: 1px solid var(--steel); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: .75rem; color: var(--brand); }
.e404-ledger-head .num { color: #8a5a12; }
.e404-ledger dl { margin: 0; }
.e404-ledger dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--steel); }
.e404-ledger dt { color: var(--ink-2); }
.e404-ledger dd { margin: 0; font-weight: 600; text-align: right; color: var(--ink); }
.e404-ledger-path { overflow-wrap: anywhere; font-weight: 500; }
.e404-ledger-sum { padding-top: 12px; margin-top: 2px; border-top: 1px solid var(--ink); color: var(--ink-2); }
.e404-ledger-sum span:last-child { color: var(--ink); font-weight: 600; text-align: right; }
.e404-links {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px clamp(24px, 4vw, 56px);
  margin-top: clamp(48px, 6vw, 80px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--rule);
}
.e404-col h2 { font-size: 1.0625rem; letter-spacing: -0.005em; }
.e404-col li { padding: 8px 0; border-bottom: 1px solid var(--mist); }
.e404-col li a { font-weight: 500; text-decoration: none; }
.e404-col li a:hover { text-decoration: underline; }
.e404-posts time { display: block; margin-top: 2px; font-size: .8125rem; color: var(--ink-2); }
.e404-contact p { margin: 12px 0 0; color: var(--ink-2); }
.e404-contact-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.e404-contact-links a:not(.btn) { font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .e404-grid { grid-template-columns: 1fr; }
  .e404-ledger { max-width: 420px; padding: 16px 18px 14px; }
}
@media (max-width: 560px) {
  .e404-ledger { display: none; }
}
   Obsah: interaktivní ukázka v úvodu, kalkulačka úspory, ke stažení za e-mail
   (app/ukazka.php, app/kalkulacka.php, app/leads.php; skripty: konec assets/js/site.js a assets/js/kalkulacka.js)
   ========================================================================== */

/* Interaktivní ukázka – záložky jako navigace aplikace pod lištou okna */
.demo-tabs {
  display: flex; gap: 2px; padding: 0 clamp(10px, 1.6vw, 18px);
  border-bottom: 1px solid var(--rule); background: var(--surface);
  overflow-x: auto; scrollbar-width: none;
}
.demo-tabs::-webkit-scrollbar { display: none; }
.demo-tab {
  position: relative; flex: none; margin: 0; padding: 9px 10px 10px; border: 0; background: none;
  font: inherit; font-size: .8125rem; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap;
  border-radius: 4px 4px 0 0; transition: color .18s;
}
.demo-tab::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px 2px 0 0;
  background: var(--brand); transform: scaleX(0); transition: transform .3s var(--ease);
}
.demo-tab:hover { color: var(--ink); }
.demo-tab[aria-selected="true"] { color: var(--ink); font-weight: 600; }
.demo-tab[aria-selected="true"]::after { transform: scaleX(1); }
.demo-tab:focus-visible { outline-offset: -3px; }
/* tenká linka odpočtu do další záložky (jen při automatickém střídání) */
.demo-timer {
  position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px;
  background: var(--brand-light); transform-origin: left; transform: scaleX(0); opacity: 0;
}
.demo-tab.is-timing .demo-timer { opacity: .6; animation: demo-timer var(--demo-rotate, 8s) linear both; }
@keyframes demo-timer { to { transform: scaleX(1); } }

/* všechny panely v jedné buňce mřížky: výška = nejvyšší panel, přepnutí nic neposune */
.demo-panels { display: grid; }
.demo-panel { grid-area: 1 / 1; min-width: 0; }
.demo-panel:focus-visible { outline-offset: -4px; }
.demo-panel[hidden] { display: block; visibility: hidden; opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: no-preference) {
  .demo-panel { transition: opacity .38s var(--ease), transform .38s var(--ease), visibility 0s; }
  .demo-panel[hidden] { transform: translateY(6px); transition: opacity .22s ease, transform .22s ease, visibility 0s .22s; }
  .demo-panel.is-shown .var-bar, .demo-panel.is-shown .use-bar { animation: demo-grow .8s var(--ease) .08s both; }
  .demo-panel.is-shown .spark-line { stroke-dasharray: 1; animation: demo-draw 1.1s var(--ease) .05s both; }
  .demo-panel.is-shown .demo-col { animation: demo-rise .7s var(--ease) both; }
  .demo-panel.is-shown .close-ring { animation: demo-ring 1s var(--ease) both; }
  .demo-panel.is-shown .demo-check li { animation: demo-fade .5s ease both; }
  .demo-panel.is-shown .demo-check li:nth-child(n+4) { animation-delay: .08s; }
  .demo-panel.is-shown .demo-check li:nth-child(n+7) { animation-delay: .16s; }
  @keyframes demo-grow { from { transform: scaleX(0); } }
  @keyframes demo-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
  @keyframes demo-rise { from { transform: scaleY(0); } }
  @keyframes demo-ring { from { --done: 0; } }
  @keyframes demo-fade { from { opacity: 0; } }
}

/* menší ukazatele pod hlavním číslem */
.demo-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); margin: 0; border-bottom: 1px solid var(--rule); }
.demo-kpis > div { padding: 9px 12px 9px 0; min-width: 0; }
.demo-kpis > div + div { padding-left: 12px; border-left: 1px solid var(--mist); }
.demo-kpis dt { font-size: .71875rem; line-height: 1.4; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-kpis dd { margin: 0; font-weight: 700; font-size: .9375rem; line-height: 1.35; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.demo-kpis .unit { font-size: .75rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.demo-chg { margin-left: 6px; font-size: .71875rem; font-weight: 600; color: var(--brand); letter-spacing: 0; }

/* sloupce rozpočtu a odpočet uzávěrky */
.demo-col { fill: #c9d6e8; transform-box: fill-box; transform-origin: bottom; }
.demo-col.is-last { fill: var(--brand-mid); }
.demo-plan { fill: none; stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 3; opacity: .7; }
.demo-burn .spark-line { stroke-linejoin: miter; }

/* čerpání rozpočtu a podíl na konsolidovaných tržbách */
.use-track { position: relative; flex: 1; height: 8px; background: var(--mist); border-radius: 2px; overflow: hidden; }
.use-bar { position: absolute; top: 0; bottom: 0; left: 0; width: var(--w); background: var(--brand); border-radius: 2px; transform-origin: left; }
.use-bar.over { background: var(--signal); }
.demo-net { width: 5.2em; }

/* checklist uzávěrky */
.demo-check-head { display: flex; justify-content: space-between; padding: 14px 0 6px; font-size: .8125rem; color: var(--ink-2); }
.demo-check { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.demo-check li { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--mist); font-size: .8125rem; line-height: 1.35; }
.demo-check-mark { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid #b8c6d6; }
.demo-check-mark svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.demo-check .is-done .demo-check-mark { background: var(--brand); border-color: var(--brand); }
.demo-check .is-done .demo-check-label { color: var(--ink-2); }
.demo-check .is-open .demo-check-label { font-weight: 600; color: var(--ink); }
.demo-check .is-done + .is-open .demo-check-mark { border-color: var(--signal); box-shadow: inset 0 0 0 3px var(--surface), inset 0 0 0 9px var(--signal-tint); }
.demo-check-day { font-size: .75rem; color: var(--ink-2); }

@media (max-width: 520px) {
  .demo-tabs { padding: 0 6px; gap: 0; }
  .demo-tab { padding: 9px 6px 10px; font-size: .75rem; }
  .demo-tab::after, .demo-timer { left: 6px; right: 6px; }
  .demo-kpis > div:nth-child(n+3) { display: none; }
  .demo-chg { display: block; margin-left: 0; }
}

/* Kalkulačka úspory ------------------------------------------------------- */

.kalk { container-type: inline-size; }
.kalk-fallback { max-width: 640px; padding: 22px 24px; border: 1px solid var(--rule); border-left: 3px solid var(--brand); border-radius: var(--radius); background: var(--surface); }
.kalk-fallback p { color: var(--ink-2); }
.kalk-fallback .btn { margin-top: 6px; }
.kalk-fallback[hidden] { display: none; }
.kalk-app { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.kalk-app[hidden] { display: none; }
@container (max-width: 700px) { .kalk-app { grid-template-columns: minmax(0, 1fr); } }

.kalk-group { margin: 0 0 26px; padding: 0; border: 0; min-width: 0; }
.kalk-group legend { padding: 0 0 10px; font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.kalk-field { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-top: 1px solid var(--rule); }
.kalk-group .kalk-field:last-of-type { border-bottom: 1px solid var(--rule); }
.kalk-field label { font-weight: 600; font-size: .9375rem; line-height: 1.35; }
.kalk-field-hint { display: block; font-weight: 400; font-size: .8125rem; color: var(--ink-2); }
.kalk-input { position: relative; flex: none; display: inline-flex; align-items: center; }
.kalk-input input {
  width: 7.75em; padding: .5em 3.5em .5em .7em; font: inherit; font-size: 1rem; font-weight: 600; text-align: right;
  font-variant-numeric: tabular-nums; color: var(--ink); background: #fff;
  border: 1px solid #b8c6d6; border-radius: var(--radius); transition: border-color .15s, box-shadow .15s;
  -moz-appearance: textfield; appearance: textfield;
}
.kalk-input input::-webkit-outer-spin-button, .kalk-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.kalk-input input:hover { border-color: #8fa2ba; }
.kalk-input input:focus { outline: 2px solid transparent; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .2); }
.kalk-input-unit { position: absolute; right: .7em; font-size: .8125rem; color: var(--ink-2); pointer-events: none; }
.kalk-hint { margin: 10px 0 0; font-size: .8125rem; color: var(--ink-2); }

.kalk-result {
  position: relative; padding: clamp(20px, 3vw, 32px); background: var(--surface);
  border: 1px solid #d3dce8; border-radius: var(--radius-lg); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, var(--shadow-lg);
  overflow: hidden;
}
.kalk-result::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light) 60%, var(--steel));
}
@media (min-width: 961px) { .kalk-result { position: sticky; top: calc(var(--header-h) + 24px); } }
.kalk-result p { margin: 0; }
.kalk-result-label { font-size: .8125rem; color: var(--ink-2); }
.kalk-big { font-size: clamp(2.25rem, 4.4vw, 3.25rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.08; color: var(--ink); white-space: nowrap; }
.kalk-unit { font-size: .42em; font-weight: 500; letter-spacing: 0; color: var(--ink-2); }
.kalk-sub { margin-top: 4px !important; font-size: .9375rem; color: var(--brand); font-weight: 600; }
.kalk-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 20px 0 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.kalk-stats > div { padding: 12px 12px 12px 0; min-width: 0; }
.kalk-stats > div + div { padding-left: 12px; border-left: 1px solid var(--mist); }
.kalk-stats dt { font-size: .75rem; color: var(--ink-2); }
.kalk-stats dd { margin: 2px 0 0; font-weight: 700; font-size: 1rem; color: var(--ink); }
.kalk-muted { display: block; font-weight: 500; font-size: .75rem; color: var(--ink-2); }

.kalk-bars { margin-top: 18px; }
.kalk-bars-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .75rem; color: var(--ink-2); margin-bottom: 8px !important; }
.kalk-key { display: inline-flex; align-items: center; gap: 6px; }
.kalk-key i { display: inline-block; width: 10px; height: 4px; border-radius: 2px; background: var(--steel); }
.kalk-key i.is-after { margin-left: 8px; background: var(--brand); }
.kalk-bar { display: grid; grid-template-columns: minmax(0, 11em) minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 5px 0; font-size: .8125rem; }
.kalk-bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.kalk-bar-track { position: relative; height: 10px; }
.kalk-bar-now, .kalk-bar-after { position: absolute; left: 0; width: var(--w); border-radius: 2px; }
.kalk-bar-now { top: 0; height: 10px; background: var(--steel); }
.kalk-bar-after { top: 3px; height: 4px; background: var(--brand); }
.kalk-bar-val { color: var(--ink-2); white-space: nowrap; min-width: 6.5em; text-align: right; }
@media (prefers-reduced-motion: no-preference) {
  .kalk-bar-now, .kalk-bar-after { transition: width .45s var(--ease); }
}
@container (max-width: 440px) {
  .kalk-stats { grid-template-columns: minmax(0, 1fr); }
  .kalk-stats > div + div { padding-left: 0; border-left: 0; border-top: 1px solid var(--mist); }
  .kalk-bar { grid-template-columns: minmax(0, 1fr) auto; }
  .kalk-bar-track { grid-column: 1 / -1; grid-row: 2; }
  .kalk-field { flex-wrap: wrap; }
}

.kalk-payback { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--rule); }
.kalk-payback label { display: block; font-size: .75rem; color: var(--ink-2); margin-bottom: 6px; }
.kalk-payback select {
  width: 100%; font: inherit; font-size: .9375rem; color: var(--ink); padding: .5em .7em;
  background: #fff; border: 1px solid #b8c6d6; border-radius: var(--radius);
}
.kalk-payback select:focus { outline: 2px solid transparent; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59, 87, 135, .2); }
.kalk-payback-text { margin-top: 10px !important; font-size: .9375rem; line-height: 1.5; }
.kalk-actions { margin-top: 22px !important; }
.kalk-actions .btn { width: 100%; }
.kalk-disclaimer { margin-top: 14px !important; font-size: .8125rem; line-height: 1.5; color: var(--ink-2); }

/* Ke stažení za e-mail ---------------------------------------------------- */

.dl { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
@media (max-width: 880px) { .dl { grid-template-columns: minmax(0, 1fr); } .dl-cover { width: min(100%, 240px); } }
.dl-cover { margin: 0; }
.dl-cover img { width: 100%; border-radius: var(--radius-lg); box-shadow: 0 0 0 1px var(--rule), var(--shadow-lg); }
/* obálka bez obrázku: stránka dokumentu z linek a křivky */
.dl-doc {
  position: relative; display: flex; flex-direction: column; gap: 18px; aspect-ratio: 3 / 4; max-width: 340px; margin-inline: auto;
  padding: 30px 28px; background: var(--surface); border: 1px solid #d3dce8; border-radius: 8px; overflow: hidden;
  box-shadow: 10px 10px 0 -1px var(--paper), 10px 10px 0 0 var(--rule), var(--shadow-lg);
}
.dl-doc::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-light) 60%, var(--steel)); }
.dl-doc-tag { align-self: flex-start; padding: 2px 8px; border: 1px solid var(--brand); border-radius: 3px; font-size: .6875rem; font-weight: 700; letter-spacing: .08em; color: var(--brand); }
.dl-doc-title { font-size: 1.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; color: var(--ink); }
.dl-doc-chart { width: 100%; height: auto; margin-top: auto; }
.dl-doc-chart path { fill: none; stroke: var(--brand-mid); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.dl-doc-lines { display: grid; gap: 8px; }
.dl-doc-lines i { display: block; height: 5px; border-radius: 3px; background: var(--mist); }
.dl-doc-lines i:nth-child(2) { width: 82%; }
.dl-doc-lines i:nth-child(3) { width: 91%; }
.dl-doc-lines i:nth-child(4) { width: 64%; }
.dl-copy h2 { margin-bottom: 16px; }
.dl-copy .eyebrow { margin-bottom: 16px; }
.dl-text { color: var(--ink-2); font-size: 1.0625rem; max-width: 56ch; }
.dl-meta { font-size: .8125rem; font-weight: 600; letter-spacing: .04em; color: var(--ink-2); margin: 0 0 22px; }
.dl-form { max-width: 560px; }
.dl-consent label { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: .875rem; line-height: 1.5; color: var(--ink-2); }
.dl-consent input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 2px 0 0; padding: 0; accent-color: var(--brand); }
.dl-done { max-width: 560px; padding: 22px 24px; border: 1px solid var(--rule); border-left: 3px solid var(--brand); border-radius: var(--radius); background: var(--surface); }
.dl-done:focus { outline: none; }
.dl-done-title { font-weight: 700; margin-bottom: 14px; }
.dl-done .btn { white-space: normal; text-align: left; }
.dl-btn-meta { font-weight: 500; opacity: .8; }
.dl-done .fineprint { margin-top: 14px; }
@media (max-width: 880px) { .dl-doc { padding: 22px 20px; gap: 12px; } .dl-doc-title { font-size: 1.0625rem; } }
.psec-bg-mist .dl-doc { box-shadow: 10px 10px 0 -1px var(--mist), 10px 10px 0 0 var(--rule), var(--shadow-lg); }
@media print { .dl-form, .kalk-app, .demo-tabs { display: none !important; } }

/* ==========================================================================
   Přístupnost (WCAG 2.1 AA) – doplňky po kontrole celého webu, popis v docs/PRISTUPNOST.md
   ========================================================================== */

/* Hranice formulářových polí aspoň 3 : 1 proti bílé (1.4.11 Kontrast netextových prvků);
   dekorativní linky (karty, oddělovače) zůstávají jemné stříbrné */
.field input, .field textarea, .search-field input, .kalk-input input, .kalk-payback select { border-color: #8393a8; }
.field input:hover, .field textarea:hover, .search-field input:hover, .kalk-input input:hover,
.kalk-payback select:hover { border-color: #5f7189; }
.hs.is-open .hs-form { border-color: #8393a8; border-top-color: var(--brand); }
.hs-form:focus-within, .hs.is-open .hs-form:focus-within { border-color: var(--brand); }
.field.is-valid input, .field.is-valid textarea { border-color: #6f86a8; }
.has-error input, .has-error textarea, .field.has-error input:hover, .field.has-error textarea:hover { border-color: var(--signal); }
.field input:focus, .field textarea:focus, .search-field input:focus, .kalk-input input:focus, .kalk-payback select:focus { border-color: var(--brand); }
.has-error input:focus, .has-error textarea:focus { border-color: var(--signal); }
/* pole hledání v mobilním a kompaktním menu */
@media (max-width: 880px) { .main-nav .hs-form { border-color: #8393a8; } .main-nav .hs-form:focus-within { border-color: var(--brand); } }
:where(html.nav-compact) .main-nav .hs-form { border-color: #8393a8; }
:where(html.nav-compact) .main-nav .hs-form:focus-within { border-color: var(--brand); }

/* Souhrn chyb nad kontaktním formulářem (contact_notices() v app/site.php) */
.form-summary p { margin: 0 0 6px; }
.form-summary ul { margin: 0; padding-left: 1.2em; font-weight: 400; }
.form-summary a { color: inherit; text-decoration: underline; text-underline-offset: .18em; }
.form-summary a:hover { text-decoration-thickness: 2px; }
.form-summary:focus { outline: 2px solid var(--signal); outline-offset: 2px; }

/* Velikost cílů pro dotyk aspoň 24 × 24 px (malé odkazy v horní liště a patičce) */
.topbar-nav a, .topbar-info a { display: inline-block; padding: 4px 0; }
.legal-links a { display: inline-block; padding: 3px 0; }

/* Viditelný fokus i na tmavých plochách sekcí stránek a v rozbaleném podmenu */
.psec-bg-ink :focus-visible, .psec-t-cta :focus-visible, .look-mozaika .feature:nth-child(6n+1) :focus-visible { outline-color: var(--accent); }
.demo-panel:focus-visible, .demo-tab:focus-visible { outline-color: var(--brand); }

/* Omezení pohybu: pojistka pro všechny animace a přechody webu (jednotlivé části už pohyb vynechávají samy) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}

/* Vysoký kontrast Windows: hranice tlačítek a polí podle systému */
@media (forced-colors: active) {
  .btn, .nav-toggle, .hs-form, .field input, .field textarea { border: 1px solid ButtonText; }
  .main-nav a:not(.btn)::after { background: Highlight; }
}
/* zvýrazněné slovo ve výsledcích hledání tmavším textem (kontrast i na podbarvení) */
.search-hit mark, .search-snippet mark { color: var(--ink); }

/* Vyhledávače: drobečková navigace, související články, štítek skrytého webu (app/seo.php, app/seo_spusteni.php)
   Drobečky jsou ve stejném řádku a stylu jako dřívější „Blog · kategorie · datum“ (.post-date). */
.post-meta { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 0; row-gap: 2px; }
.crumbs ol { display: inline; list-style: none; margin: 0; padding: 0; }
.crumbs li { display: inline; }
.crumbs li + li::before {
  content: ""; display: inline-block; width: 3px; height: 3px; border-radius: 50%;
  background: currentColor; opacity: .55; margin: 0 .6em; vertical-align: .25em;
}
.crumbs a { font-weight: 600; text-decoration: none; }
.crumbs a:hover, .crumbs a:focus-visible { text-decoration: underline; }
.post-meta-sep { white-space: pre; }
.related-posts { padding-top: 0; padding-bottom: clamp(64px, 8vw, 112px); }
.related-posts > h2 { font-size: 1.375rem; margin-bottom: 18px; padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--rule); }
.article:has(+ .related-posts) { padding-bottom: clamp(32px, 4vw, 56px); }
.adminbar a.adminbar-seo {
  font-weight: 600; font-size: .8125rem; color: #fff; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .35); border-radius: 6px; padding: 3px 9px; white-space: nowrap;
}
.adminbar a.adminbar-seo:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
@media print { .crumbs, .related-posts { display: none; } }

/* Doladění 1.3: opravy z vizuální kontroly (360 / 768 / 1366 px, všech 5 rozložení) ------------------------
   Dlouhé slovo nebo adresa v textu z editoru (https://…/velmi/dlouha/adresa) roztáhla na telefonu celou stránku
   do šířky; ve výsledcích hledání úryvek s takovou adresou ořízl i nadpis výsledku. */
.prose, .rich, .search-snippet, .search-hit h2 { overflow-wrap: break-word; }
.prose :is(td, th), .rich :is(td, th) { overflow-wrap: normal; }   /* tabulky se posouvají vodorovně, čísla se nedělí */
@media (max-width: 560px) {
  .search-hit { grid-template-columns: minmax(0, 1fr); }
  .search-snippet, .search-hit h2 { overflow-wrap: anywhere; }
}

/* Úvodní stránka – vlastní sekce (app/uvod.php, templates/partials/uvod_skupina.php) -----------------------
   Karty, kroky, tarify, citace a otázky používají třídy vestavěných sekcí. Nové vzhledy – čísla, loga, jednoduchý
   text a obrázek s textem – berou barvu textu z okolí (currentColor), takže fungují na bílém, stříbrném i tmavém
   pozadí (tmavé sekce rozložení Skupina a Kokpit). Bez vlastní sekce se nic z toho na webu nepoužije. */
.uv-odkaz { margin-top: auto; padding-top: 14px; }
.uv-odkaz a { font-weight: 600; text-decoration: none; }
.uv-odkaz a::after { content: "\00a0\2192"; }
.uv-odkaz a:hover { text-decoration: underline; }
.feature .uv-odkaz { margin-top: 14px; }

.uv-cisla { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px clamp(20px, 3vw, 44px); grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.uv-cislo { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 4px 0 4px 20px; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
.uv-cislo::before { content: ""; position: absolute; left: -1px; top: 4px; width: 2px; height: 28px; border-radius: 2px; background: linear-gradient(180deg, var(--brand), var(--brand-light)); }
.section-ink .uv-cislo::before { background: linear-gradient(180deg, var(--accent), rgba(157, 191, 234, .3)); }
.uv-cislo-hodnota { font-size: clamp(2rem, 4vw, 2.875rem); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums lining-nums; }
.uv-cislo-popis { font-weight: 600; font-size: 1rem; }
.uv-cislo-detail { font-size: .875rem; line-height: 1.5; opacity: .78; }

.uv-loga { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.uv-logo { display: flex; }
.uv-logo-box { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 92px; padding: 18px 20px;
  background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); }
.uv-logo a.uv-logo-box { text-decoration: none; transition: border-color .2s ease, box-shadow .2s ease; }
.uv-logo a.uv-logo-box:hover { border-color: var(--brand-light); box-shadow: var(--shadow-sm); }
.uv-logo-img { max-width: 100%; max-height: 52px; width: auto; height: auto; object-fit: contain; filter: grayscale(1); opacity: .82; transition: filter .2s ease, opacity .2s ease; }
.uv-logo a:hover .uv-logo-img, .uv-logo a:focus-visible .uv-logo-img { filter: none; opacity: 1; }
.uv-logo-text { font-weight: 600; letter-spacing: .02em; color: var(--ink-2); text-align: center; }

.uv-texty { display: grid; gap: clamp(24px, 3vw, 40px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .uv-texty-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .uv-texty-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.uv-text { padding-top: 18px; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.uv-text h3 { font-size: 1.25rem; margin-bottom: 10px; }
.uv-text p, .uv-text .rich { line-height: 1.65; }
.section:not(.section-ink) .uv-text p { color: var(--ink-2); }

.uv-radky { display: grid; gap: clamp(48px, 7vw, 96px); }
.uv-radek { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.uv-radek.is-reversed .uv-radek-media { order: 2; }
.uv-radek.no-media { grid-template-columns: minmax(0, 760px); }
.uv-radek-media { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius-lg); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-lg); }
.uv-radek-media img { display: block; width: 100%; height: auto; }
.uv-radek-text h3 { font-size: clamp(1.375rem, 2.4vw, 1.75rem); margin-bottom: 12px; }
.section:not(.section-ink) .uv-radek-text p { color: var(--ink-2); }
@media (max-width: 860px) {
  .uv-radek { grid-template-columns: minmax(0, 1fr); }
  .uv-radek.is-reversed .uv-radek-media { order: 0; }
}
/* rozložení Editorial: stejný úzký sloupec jako u vestavěných sekcí (kotva sekce je vlastní) */
.look-editorial :is(.uv-v-karty, .uv-v-kroky, .uv-v-citace, .uv-v-otazky, .uv-v-text) > .wrap { max-width: calc(var(--look-narrow, 840px) + 2 * var(--gutter)); }
.look-editorial .uv-v-otazky .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
/* tmavé oddíly rozložení Skupina a Kokpit: loga zůstávají na světlé dlaždici, text dědí barvu oddílu */
.look-skupina.look-home main > .section:nth-child(odd) :is(.uv-text p, .uv-radek-text p),
.look-kokpit.look-home main > .section :is(.uv-text p, .uv-radek-text p) { color: inherit; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .uv-logo-img, .uv-logo-box { transition: none; } }
@media print { .uv-logo-img { filter: none; opacity: 1; } }
