/* Veřejné stránky hubu (/ a /cenik) — jeden soubor stylů pro obě.
   Barvy jsou tmavé tokeny z frontend-upravpdf/src/styles/main.css
   (html[data-theme='dark']): tmavé plátno, korálový akcent, jak chce rámec
   rodiny §2.6. Písmo je systémové jako v aplikacích — CSP posílá
   `font-src 'self'`, cizí webfont by se stejně nenačetl.
   Odkazuje se s `?v=` v URL: nginx dává .css expiraci 30 dní a název souboru
   nemá hash, takže změna stylů potřebuje novou hodnotu `v` v obou HTML. */

:root {
  --bg: #0f1115;
  --bg-deep: #0b0d10;
  --surface: #151924;
  --surface-2: #1c2433;
  --border: #2a3242;
  --border-soft: #222a38;
  --text: #e7e7e7;
  --text-muted: #b6b6b6;
  --text-soft: #8d939d;
  --accent: #f2606b;
  --accent-hover: #ff7b85;
  --accent-bg: rgba(242, 96, 107, .14);
  /* Tmavý text na korálové: bílý by měl kontrast pod 3:1. */
  --on-accent: #1a0b0d;
  --success: #4ade80;
  --radius: 14px;
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
  --page: 1120px;
  --gutter: 24px;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  font-family: var(--font-sans); color: var(--text); background: var(--bg);
  line-height: 1.55; font-size: 16px; min-height: 100vh;
  display: flex; flex-direction: column; isolation: isolate;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }
.hl { color: var(--accent); }
.wrap { width: 100%; max-width: var(--page); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 10; background: var(--accent);
  color: var(--on-accent); font-weight: 700; padding: 8px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 12px; }

/* Textová tapeta — podkres jako v aplikacích (tapeta.js). vmin = nezávislé na zoomu. */
.text-wallpaper { position: fixed; inset: 0; overflow: hidden; pointer-events: none;
  user-select: none; z-index: -1; }
.text-wallpaper-inner { position: absolute; left: 50%; top: 50%; width: 140%; height: 190%;
  transform: translate(-50%, -50%) rotate(-18deg);
  display: flex; flex-wrap: wrap; align-content: space-between; justify-content: center;
  gap: 1.1vmin 2.6vmin; }
.tw-item { font-size: 1.6vmin; font-weight: 600; line-height: 1; white-space: nowrap;
  color: var(--text); opacity: .06; }
.tw-logo { opacity: .11; }
.tw-word { color: var(--accent); }

/* ── Hlavička ─────────────────────────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--border-soft); background: rgba(15, 17, 21, .86);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 5; }
.topbar .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.logo { font-size: 20px; font-weight: 800; letter-spacing: -.015em; text-decoration: none;
  white-space: nowrap; }
.nav { display: flex; gap: 22px; margin-left: 8px; }
.nav a { font-size: 14.5px; color: var(--text-muted); text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.top-actions .login { font-size: 14.5px; font-weight: 600; color: var(--text-muted); text-decoration: none; }
.top-actions .login:hover { color: var(--text); }
@media (max-width: 900px) { .nav { display: none; } }
@media (max-width: 560px) {
  .topbar .btn { display: none; }
  .logo { font-size: 18px; }
}

/* ── Tlačítka ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: 999px; font-weight: 750;
  font-size: 15px; text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border: 1px solid var(--border); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-soft); }
.btn-sm { min-height: 38px; padding: 7px 16px; font-size: 14px; }

/* ── Společné sekce ───────────────────────────────────────────────────── */
main { flex: 1; }
/* Kotvy z navigace nesmí skončit pod lepivou hlavičkou. */
[id] { scroll-margin-top: 80px; }
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--border-soft); }
.eyebrow { font-size: 12.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--accent); }
h1, h2, h3 { letter-spacing: -.02em; line-height: 1.12; }
h2 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 800; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--text-muted); font-size: 17px; margin-top: 12px; }
.lead { color: var(--text-muted); font-size: clamp(17px, 1.6vw, 19px); max-width: 58ch; }
.note { font-size: 14px; color: var(--text-soft); }
.note a, .prose a { color: var(--accent); }

/* ── Úvod ─────────────────────────────────────────────────────────────── */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 5.4vw, 60px); font-weight: 850; letter-spacing: -.035em;
  line-height: 1.03; margin: 14px 0 20px; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero .trust { margin-top: 18px; font-size: 14px; color: var(--text-soft); }
@media (max-width: 900px) {
  .hero { padding: 44px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
}
.hero-plain { padding-bottom: 40px; }
.hero-plain .wrap { display: block; }
.section.flush { padding-top: 0; border-top: 0; }

/* Ukázka exportu — skutečné pořadí sloupců IC Office (icofficeSloupce.ts). */
.export { background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45); overflow: hidden; }
.export-sources { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft); }
.chip { font-size: 12.5px; font-weight: 600; color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 999px; padding: 4px 11px; font-family: var(--font-mono); }
.export-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding: 14px 18px 10px; }
.export-title b { font-size: 14px; }
.export-title span { font-size: 12px; color: var(--text-soft); text-transform: uppercase; letter-spacing: .08em; }
.export table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.export th { text-align: left; font-weight: 700; color: var(--text-soft); font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; padding: 8px 12px; background: var(--surface-2);
  white-space: nowrap; }
.export th:first-child, .export td:first-child { padding-left: 18px; }
.export th:last-child, .export td:last-child { padding-right: 18px; }
.export td { padding: 11px 12px; border-top: 1px solid var(--border-soft); color: var(--text); }
.export td.mono { font-family: var(--font-mono); font-size: 12.5px; color: var(--text-muted); white-space: nowrap; }
.export .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.export-foot { padding: 12px 18px 16px; font-size: 13px; color: var(--text-soft);
  border-top: 1px solid var(--border-soft); }
.export-foot b { color: var(--success); font-weight: 700; }
@media (max-width: 1080px) and (min-width: 901px), (max-width: 480px) {
  .export .opt { display: none; }
}
@media (max-width: 480px) {
  .export th:first-child, .export td:first-child { padding-left: 12px; }
  .export th:last-child, .export td:last-child { padding-right: 12px; }
  .export th, .export td { padding-left: 8px; padding-right: 8px; }
}

/* ── Důkazy pro autoservisy ───────────────────────────────────────────── */
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.proof div { border-top: 2px solid var(--accent); padding-top: 18px; }
.proof h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.proof p { color: var(--text-muted); font-size: 15.5px; }
@media (max-width: 820px) { .proof { grid-template-columns: 1fr; gap: 26px; } }

/* ── Nástroje ─────────────────────────────────────────────────────────── */
.tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1080px) { .tools { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .tools { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 440px) { .tools { grid-template-columns: 1fr; } }
.tool { display: flex; flex-direction: column; gap: 8px; padding: 20px 18px 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  text-decoration: none; transition: border-color .15s ease, transform .15s ease; }
.tool:hover { border-color: var(--accent); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .tool:hover { transform: none; } }
.tool .fmt { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-soft); }
.tool .name { font-size: 18px; font-weight: 800; letter-spacing: -.015em; }
.tool .sub { font-size: 14px; color: var(--text-muted); flex: 1; }
.tool .go { font-size: 13.5px; font-weight: 700; color: var(--accent); margin-top: 6px; }
.tools-note { margin-top: 22px; color: var(--text-muted); font-size: 15px; }
.tools-note a { color: var(--accent); font-weight: 600; }

/* ── Postup ───────────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; counter-reset: krok; list-style: none; }
.steps li { counter-increment: krok; position: relative; padding-top: 52px; }
.steps li::before { content: counter(krok); position: absolute; top: 0; left: 0; width: 36px; height: 36px;
  border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px;
  color: var(--accent); background: var(--accent-bg); }
.steps h3 { font-size: 19px; font-weight: 800; margin-bottom: 8px; }
.steps p { color: var(--text-muted); font-size: 15.5px; }
@media (max-width: 820px) { .steps { grid-template-columns: 1fr; gap: 26px; } }

/* ── Co umí ───────────────────────────────────────────────────────────── */
.features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 40px; list-style: none; }
.features li { display: grid; grid-template-columns: 20px 1fr; gap: 12px; color: var(--text-muted); font-size: 15.5px; }
.features li svg { width: 20px; height: 20px; color: var(--accent); margin-top: 2px; }
.features b { color: var(--text); font-weight: 700; }
@media (max-width: 720px) { .features { grid-template-columns: 1fr; } }
.ai-note { margin-top: 36px; padding: 18px 20px; border: 1px solid var(--border); border-left: 3px solid var(--accent);
  border-radius: 10px; background: rgba(21, 25, 36, .7); color: var(--text-muted); font-size: 14.5px; max-width: 820px; }
.ai-note b { color: var(--text); }

/* ── Tarify ───────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
@media (max-width: 1000px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plans { grid-template-columns: 1fr; } }
.plan { display: flex; flex-direction: column; padding: 22px 20px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); position: relative; }
.plan.recommended { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan .badge { position: absolute; top: -11px; left: 18px; font-size: 11px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); }
.plan h3 { font-size: 18px; font-weight: 800; }
.plan .price { margin-top: 14px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan .price b { font-size: 34px; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan .price span { color: var(--text-soft); font-size: 14px; }
.plan .price-note { min-height: 20px; font-size: 13px; color: var(--text-soft); margin-top: 2px; }
.plan .quota { margin-top: 14px; font-weight: 700; font-size: 15px; }
.plan ul { list-style: none; margin: 12px 0 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plan li { font-size: 14.5px; color: var(--text-muted); padding-left: 18px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); }
.plan .btn { width: 100%; }
.plans-foot { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px 28px; align-items: baseline; }

/* Přepínač období — vykreslí ho cenik.js, jen když API vrátí víc období. */
.periods { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--border);
  border-radius: 999px; margin-bottom: 26px; background: var(--surface); }
.periods button { font: inherit; font-size: 14px; font-weight: 700; color: var(--text-muted);
  background: transparent; border: 0; border-radius: 999px; padding: 8px 16px; cursor: pointer; min-height: 38px; }
.periods button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
@media (max-width: 560px) {
  .periods { display: flex; flex-wrap: nowrap; }
  .periods button { flex: 1 1 0; padding: 8px 6px; font-size: 13.5px; }
}

/* Tabulka limitů — na úzkém displeji se posouvá jen tabulka, ne stránka. */
.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); -webkit-overflow-scrolling: touch; }
.limits { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 14.5px; }
.limits th, .limits td { padding: 13px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--border-soft); }
.limits thead th { border-top: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-soft); background: var(--surface-2); }
.limits tbody th { font-weight: 600; color: var(--text); width: 30%; }
.limits td { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.limits td.no { color: var(--text-soft); }
.limits .group th { background: rgba(28, 36, 51, .5); color: var(--accent); font-size: 12.5px;
  text-transform: uppercase; letter-spacing: .07em; }
.limits tbody th, .limits thead th:first-child { position: sticky; left: 0; background: var(--surface); }
.limits thead th:first-child { background: var(--surface-2); }
@media (max-width: 560px) {
  .limits { min-width: 560px; font-size: 13.5px; }
  .limits th, .limits td { padding: 11px 12px; }
  .limits tbody th { width: 128px; }
}

.prose { max-width: 720px; color: var(--text-muted); font-size: 16px; }
.prose h2 { color: var(--text); margin-bottom: 14px; }
.prose h3 { color: var(--text); font-size: 18px; font-weight: 800; margin: 26px 0 8px; }
.prose p + p { margin-top: 10px; }
.prose ul { margin: 10px 0 0 20px; display: flex; flex-direction: column; gap: 6px; }
.cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px; }
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; gap: 0; } }

/* ── Otázky ───────────────────────────────────────────────────────────── */
.faq { max-width: 820px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; font-weight: 700;
  font-size: 17px; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 24px;
  font-weight: 400; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 18px; color: var(--text-muted); max-width: 68ch; }

/* ── Výzva na konci ───────────────────────────────────────────────────── */
.final { text-align: center; }
.final h2 { max-width: 20ch; margin: 0 auto; }
.final p { color: var(--text-muted); margin: 14px auto 0; max-width: 52ch; }
.final .cta { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ── Patička ──────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-deep); padding: 48px 0 28px;
  font-size: 14px; color: var(--text-muted); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-soft); margin-bottom: 12px; }
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }
.site-footer address { font-style: normal; margin-top: 12px; line-height: 1.6; }
.footer-bottom { margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--border-soft);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; color: var(--text-soft); font-size: 13px; }
