/* Základ dokumentu (dřív ho dodával obal artefaktu). */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; padding: 0; }
img { max-width: 100%; }
[hidden]:not([hidden=until-found i]) { display: none !important; }

/* Rozvržení: rádce = panel s otázkami vlevo (na mobilu nahoře) + mřížka karet modelů; detail modelu = technický list se SPZ plackou,
   cenová křivka po ročnících a bloky spolehlivost / závady / opravy / popularita / recenze (zatím jako připravené sloty s popisem dat).
   Motiv: česká SPZ – bílé pole, černé písmo, modrý pruh EU; stejná identita jako kalkulačka koeficientů. */
:root {
  --bg: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f5f7fa;
  --ink: #0f141b;
  --ink-2: #474f60;
  --muted: #6e7686;
  --line: #dde2e9;
  --line-strong: #c3cad5;
  --accent: #1c46ad;
  --accent-ink: #ffffff;
  --accent-soft: #e5ebf8;
  --series: #2a78d6;
  --band: rgba(42, 120, 214, 0.14);
  --ok: #1d6b3c;
  --ok-soft: #e1f2e7;
  --warn: #8a5100;
  --warn-soft: #fbeedb;
  --todo: #7a4ea8;
  --todo-soft: #efe7f8;
  --photo-bg: #dfe5ee;
  --photo-ink: #8a93a6;
  --plate-bg: #ffffff;
  --plate-ink: #0f141b;
  --plate-blue: #1d3fa6;
  --plate-eu-ink: #ffffff;
  --plate-star: #f5c518;
  --shadow: 0 1px 2px rgba(15, 20, 27, 0.05), 0 10px 30px rgba(15, 20, 27, 0.06);
  --font-display: "Barlow Semi Condensed", "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f13; --surface: #151a21; --surface-2: #1b212a; --ink: #edf0f4; --ink-2: #b6bdca; --muted: #8d95a4;
    --line: #29303a; --line-strong: #3b4453; --accent: #86a8ff; --accent-ink: #0c0f13; --accent-soft: #1a2746;
    --series: #3987e5; --band: rgba(57, 135, 229, 0.22); --ok: #74d29d; --ok-soft: #12301f; --warn: #f2bb62; --warn-soft: #36270f;
    --todo: #c9a8f0; --todo-soft: #2b1f3d; --photo-bg: #1f2631; --photo-ink: #6c7686;
    --plate-bg: #e8ebf0; --plate-ink: #0f141b; --plate-blue: #2a4fc0; --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f13; --surface: #151a21; --surface-2: #1b212a; --ink: #edf0f4; --ink-2: #b6bdca; --muted: #8d95a4;
  --line: #29303a; --line-strong: #3b4453; --accent: #86a8ff; --accent-ink: #0c0f13; --accent-soft: #1a2746;
  --series: #3987e5; --band: rgba(57, 135, 229, 0.22); --ok: #74d29d; --ok-soft: #12301f; --warn: #f2bb62; --warn-soft: #36270f;
  --todo: #c9a8f0; --todo-soft: #2b1f3d; --photo-bg: #1f2631; --photo-ink: #6c7686;
  --plate-bg: #e8ebf0; --plate-ink: #0f141b; --plate-blue: #2a4fc0; --shadow: none; color-scheme: dark;
}

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 16px; line-height: 1.5; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--surface); }
h1, h2, h3, h4 { font-family: var(--font-display); text-wrap: balance; margin: 0; }
h1 { font-size: 40px; line-height: 1.02; font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: 28px; line-height: 1.1; font-weight: 600; }
h3 { font-size: 19px; line-height: 1.2; font-weight: 600; }
h4 { font-size: 15px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
p { margin: 0; }
a { color: var(--accent); text-underline-offset: 2px; }
button { font: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

/* Hlavička */
.top { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 9; background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .plate { height: 32px; }
.brand .plate .cislo { font-size: 17px; padding: 0 9px; letter-spacing: 0.1em; }
.brand .plate .eu { width: 18px; font-size: 8px; padding-bottom: 3px; }
.brand .plate .eu::before { width: 9px; height: 9px; margin-left: -4.5px; top: 4px; border-width: 1px; }
.brand b { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.005em; }
.brand small { display: block; font-size: 12px; color: var(--muted); line-height: 1.1; margin-top: 1px; }
nav { display: flex; gap: 4px; flex-wrap: wrap; }
nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14px; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.proto { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--warn); background: var(--warn-soft); padding: 2px 7px; border-radius: 4px; }

/* SPZ */
.plate { display: inline-flex; align-items: stretch; height: 46px; border: 2px solid var(--plate-ink); border-radius: 6px; background: var(--plate-bg); overflow: hidden; }
.plate .eu { position: relative; background: var(--plate-blue); color: var(--plate-eu-ink); width: 26px; display: grid; align-content: end; justify-items: center; padding-bottom: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; }
.plate .eu::before { content: ""; position: absolute; top: 6px; left: 50%; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; border: 1.5px dotted var(--plate-star); }
.plate .cislo { font-family: var(--font-display); font-weight: 600; font-size: 28px; letter-spacing: 0.08em; color: var(--plate-ink); padding: 0 14px; display: grid; place-items: center; font-variant-numeric: tabular-nums; }

main { padding-block: 28px 64px; }
.view { display: grid; gap: 28px; }

/* Rádce */
.hero { display: grid; gap: 10px; max-width: 70ch; }
.hero .lede { font-size: 18px; color: var(--ink-2); }
.radce { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 18px; position: sticky; top: calc(58px + 16px + env(safe-area-inset-top, 0px)); }
.q { display: grid; gap: 8px; }
.q .label { font-size: 14px; font-weight: 600; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.q .label output { color: var(--ink); font-variant-numeric: tabular-nums; }
.q .help { font-size: 13px; color: var(--muted); line-height: 1.4; }
input[type="number"], select { width: 100%; height: 42px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 16px; padding: 0 10px; font-variant-numeric: tabular-nums; }
input[type="number"]:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 4px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-btn { border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 5px 11px; font-size: 14px; font-weight: 500; cursor: pointer; }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.seg .chip-btn { border-radius: 8px; text-align: left; padding: 8px 10px; line-height: 1.25; }
.seg .chip-btn small { display: block; font-size: 12px; opacity: 0.8; }
.budget-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.budget-in span { font-size: 14px; color: var(--muted); }

.results { display: grid; gap: 14px; min-width: 0; }
.results-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.results-head h2 { font-size: 22px; }
.results-head .count { color: var(--ink-2); }
.sort { display: flex; gap: 8px; align-items: center; font-size: 14px; color: var(--muted); }
.sort select { height: 34px; width: auto; font-size: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: grid; grid-template-rows: auto 1fr; text-decoration: none; color: inherit; min-width: 0; transition: border-color 0.15s ease; }
.card:hover { border-color: var(--accent); }
.card .photo { aspect-ratio: 16 / 9; }
.card-body { padding: 12px 14px 14px; display: grid; gap: 8px; align-content: start; }
.card .brandline { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; gap: 8px; }
.card h3 { font-size: 22px; }
.card .price { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.card .price small { font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted); display: block; margin-top: 2px; }
.card .sub { font-size: 14px; color: var(--ink-2); line-height: 1.4; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.tag.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.tag.todo { background: var(--todo-soft); color: var(--todo); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.empty { background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 12px; padding: 28px; color: var(--ink-2); display: grid; gap: 6px; }
.empty strong { color: var(--ink); font-family: var(--font-display); font-size: 20px; }

/* Fotka a zástupný blok */
.photo { position: relative; background: var(--photo-bg); overflow: hidden; display: grid; place-items: center; max-width: 100%; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; }
.photo img.in { opacity: 1; }
.photo .ph { display: grid; gap: 4px; justify-items: center; color: var(--photo-ink); text-align: center; padding: 10px; }
.photo .ph svg { width: 44%; max-width: 180px; height: auto; }
.photo .ph span { display: none; }
.credit { font-size: 12px; color: var(--muted); line-height: 1.35; }

/* Detail modelu */
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--accent); text-decoration: none; }
.m-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: start; }
.m-head .lede { color: var(--ink-2); font-size: 17px; margin-top: 8px; max-width: 62ch; }
.facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14px; color: var(--ink-2); margin-top: 10px; }
.facts b { color: var(--ink); font-weight: 600; }
.plate-box { display: grid; justify-items: end; gap: 6px; }
.plate-box small { font-size: 13px; color: var(--muted); }
.m-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
.m-photo { display: grid; gap: 8px; }
.m-photo .photo { aspect-ratio: 16 / 10; border-radius: 12px; } /* výchozí; radce.js nastaví poměr fotky */
.box { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; display: grid; gap: 14px; min-width: 0; }
.box h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.est-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.est-form .q { gap: 5px; }
.est-form .q .label { font-size: 13px; }
.hero-num { font-family: var(--font-display); font-size: 42px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.hero-num .approx { font-size: 28px; color: var(--muted); margin-right: 4px; font-weight: 500; }
.range { font-size: 16px; color: var(--ink-2); }
.range strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.note { font-size: 13px; color: var(--muted); }
.inline-btn { justify-self: start; font-size: 13px; font-weight: 600; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

figure.chart { margin: 0; display: grid; gap: 8px; min-width: 0; }
.chart-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); align-items: center; }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key-line { width: 18px; height: 2px; background: var(--series); border-radius: 1px; }
.key-band { width: 18px; height: 10px; background: var(--band); border-radius: 2px; }
.chart-box { min-width: 0; }
.chart-box svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-box text { font-family: var(--font-body); font-size: 12px; fill: var(--muted); }
.chart-box text.lab { fill: var(--ink-2); font-weight: 600; paint-order: stroke; stroke: var(--surface); stroke-width: 3px; stroke-linejoin: round; }
.toggle { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 6px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-2); cursor: pointer; }
.toggle[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); }
.tscroll { overflow-x: auto; min-width: 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 7px 10px 7px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--line-strong); }
td.n, th.n { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.n:last-child, th.n:last-child { padding-right: 0; }

.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.slots > .slot { grid-column: 1 / -1; }
.slots > .slot.half { grid-column: auto; }
.subnav { display: flex; flex-wrap: wrap; gap: 6px; position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding: 8px 0; margin: -8px 0; }
.subnav a { text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 11px; white-space: nowrap; }
.subnav a:hover { border-color: var(--accent); color: var(--accent); }
.slot h4 { margin-top: 6px; }
details.skup { border-top: 1px solid var(--line); padding-top: 10px; }
details.skup summary { cursor: pointer; font-weight: 600; color: var(--accent); }
details.skup .tscroll { margin-top: 10px; }
.slot { scroll-margin-top: calc(58px + 56px + env(safe-area-inset-top, 0px)); }
@media (max-width: 700px) { .slots > .slot.half { grid-column: 1 / -1; } }
.slot { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; display: grid; gap: 10px; align-content: start; min-width: 0; }
.slot.wide { grid-column: 1 / -1; }
.slot p { color: var(--ink-2); font-size: 15px; }
.slot .src { font-size: 13px; color: var(--muted); }
.skel { display: grid; gap: 8px; }
.skel .bar { height: 10px; border-radius: 5px; background: var(--photo-bg); }
.skel-chart { height: 90px; border-radius: 8px; background: repeating-linear-gradient(90deg, var(--photo-bg) 0 22px, transparent 22px 30px); position: relative; overflow: hidden; }
.skel-chart::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, var(--surface) 0%, transparent 70%); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: grid; gap: 2px; }
.stat .v { font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 13px; color: var(--ink-2); }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); border-radius: 8px; padding: 7px 12px; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; justify-self: start; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.toast { font-size: 13px; color: var(--warn); }

/* Pohled znalce */
.znalec { gap: 12px; }
.znalec .tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.znalec .tabs button { font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-2); background: transparent; border: 1px solid transparent; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.znalec .tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); }
.znalec .pane { display: grid; gap: 10px; max-width: 76ch; color: var(--ink-2); font-size: 16px; line-height: 1.55; }
.znalec .pane p { color: var(--ink-2); }
.znalec .pane h4 { color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 16px; }
.znalec .pane ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; }
.znalec .gen { display: grid; gap: 12px; }
.znalec .gen > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; align-items: start; }
.znalec .gen b { font-family: var(--font-display); font-size: 17px; color: var(--ink); }
.znalec .gen b small { display: block; font-family: var(--font-body); font-size: 13px; font-weight: 500; color: var(--muted); }
.znalec .verdikt { background: var(--accent-soft); border-radius: 10px; padding: 12px 14px; color: var(--ink); }
.znalec .zdroje { font-size: 13px; color: var(--muted); }
.znalec .zdroje a { color: var(--muted); }
@media (max-width: 560px) { .znalec .gen > div { grid-template-columns: minmax(0, 1fr); gap: 4px; } }

/* Shrnutí a slovní škála */
.zk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.zk { background: var(--surface-2); border-radius: 12px; padding: 12px 14px; display: grid; gap: 6px; align-content: start; min-width: 0; border-left: 4px solid var(--line-strong); }
.zk.ok { border-left-color: var(--ok); } .zk.warn { border-left-color: var(--warn); } .zk.bad { border-left-color: #c0392b; }
.zk-head { display: flex; align-items: center; gap: 8px; }
.zk-ik { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface); color: var(--ink-2); flex: none; }
.zk-ik svg { width: 16px; height: 16px; }
.zk.ok .zk-ik { color: var(--ok); } .zk.warn .zk-ik { color: var(--warn); } .zk.bad .zk-ik { color: #c0392b; }
.zk-t { font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.zk-v { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1.15; color: var(--ink); text-wrap: balance; }
.zk-d { font-size: 13px; color: var(--ink-2); line-height: 1.35; }
.zk-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.zk .skala { max-width: none; } .zk .skala-pop { max-width: none; }

.shrnuti { gap: 10px; }
.shrnuti h3 { font-size: 22px; }
.shrnuti ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.shrnuti li { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 16px; color: var(--ink-2); line-height: 1.45; }
.shrnuti li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--line-strong); }
.shrnuti li.ok::before { background: var(--ok); }
.shrnuti li.warn::before { background: var(--warn); }
.shrnuti li.bad::before { background: #c0392b; }
.shrnuti li strong { color: var(--ink); }
.shrnuti .small { font-size: 13px; color: var(--muted); }
.skala { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.skala span { height: 8px; border-radius: 3px; background: var(--line); position: relative; }
.skala span.on { background: var(--accent); }
.skala-pop { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); max-width: 420px; }
.bars { display: flex; align-items: flex-end; gap: 2px; height: 70px; }
.bars div { flex: 1 1 0; background: var(--band); border-top: 2px solid var(--series); min-width: 0; }
.bars-pop { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.tag.bad { background: #f7dcd8; color: #8c2318; border-color: transparent; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag.bad { background: #3a1b17; color: #f0a79d; } }
:root[data-theme="dark"] .tag.bad { background: #3a1b17; color: #f0a79d; }

.zeb-ctl { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 700px) { .zeb-ctl { grid-template-columns: minmax(0, 1fr); } }
table a { text-decoration: none; font-weight: 600; }
.rocniky { display: flex; gap: 3px; align-items: flex-end; height: 64px; }
.rocniky div { flex: 1 1 0; min-width: 0; background: var(--line); border-radius: 2px 2px 0 0; position: relative; }
.rocniky div.ok { background: var(--ok); opacity: 0.75; } .rocniky div.warn { background: var(--warn); opacity: 0.8; } .rocniky div.bad { background: #c0392b; opacity: 0.8; }
.rocniky-pop { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.brands .bez { color: var(--muted); font-weight: 400; }
.vin-res { display: grid; gap: 12px; margin-top: 14px; }
.vin-res .big { font-family: var(--font-display); font-size: 28px; font-weight: 600; }

/* Seznam modelů */
.kat-bar { position: sticky; top: calc(58px + env(safe-area-inset-top, 0px)); z-index: 5; background: var(--bg); padding: 10px 0 12px; margin-top: -10px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.kat-bar input[type=search] { flex: 1 1 240px; min-width: 0; font: inherit; font-size: 16px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
.kat-bar select { width: auto; flex: 0 0 auto; font: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); }
.katalog { min-width: 0; }
.naklady { display: grid; gap: 12px; }
.nk-form { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.nk-form input, .nk-form select { width: 100%; }
.nk-celkem .v { font-family: var(--font-display); font-size: 30px; font-weight: 700; }
.nk-celkem .l { font-size: 14px; color: var(--muted); }
.nk-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nk-t { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.nk-t span { font-variant-numeric: tabular-nums; }
.nk-bar { height: 8px; background: var(--surface-2); border-radius: 4px; margin: 4px 0 2px; overflow: hidden; }
.nk-bar i { display: block; height: 100%; background: var(--series); border-radius: 4px; }
.nk-list small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 700px) { .est-form.nk-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .skryt-m { display: none; } }
.kontrola { display: grid; gap: 6px; }
.kontrola h4 { margin: 12px 0 0; }
.k-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.k-pocet { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.k-list { list-style: none; margin: 0; padding: 0; }
.k-list label { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--line); cursor: pointer; font-size: 15px; line-height: 1.45; }
.k-list input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); }
.k-list li.hotovo span { color: var(--muted); }
.k-tisk-titul, #tisk { display: none; }
@media print {
  body.tisk-seznam > *:not(#tisk) { display: none !important; }
  body.tisk-seznam #tisk { display: block; color: #000; font-size: 12pt; }
  #tisk .k-head .btn, #tisk .note { display: none; }
  #tisk .k-tisk-titul { display: block; font-size: 14pt; margin-bottom: 6pt; }
  #tisk .k-list label { border-bottom: 1px solid #ccc; padding: 4pt 0; font-size: 11pt; }
  #tisk h4 { font-size: 12pt; margin: 10pt 0 2pt; }
}
.kat-legend p, .kat-count:empty { display: none; }
.kat-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.kat-znacky { display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0 0 18px; }
@media (max-width: 640px) { .kat-znacky { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; } .kat-znacky button { white-space: nowrap; } }
.kat-pozn { font-size: 13px; color: var(--muted); margin: -4px 0 14px; }
.kat-znacky button { border: 0; background: none; color: var(--accent); font: inherit; font-size: 14px; padding: 2px 4px; cursor: pointer; }
.kat-znacky button:hover { text-decoration: underline; }
.kat-count { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.brands { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 22px 28px; }
.brands h3 { font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--line-strong); display: flex; justify-content: space-between; align-items: baseline; scroll-margin-top: 80px; }
.brands h3 small { font-size: 13px; font-weight: 400; color: var(--muted); }
.brands ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 2px; }
.brands.flat { grid-template-columns: 1fr; }
.brands.flat ul { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); column-gap: 28px; }
.brands li a { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; text-decoration: none; color: var(--ink); padding: 6px 0; font-size: 15px; border-bottom: 1px dashed var(--line); }
.brands li a:hover .km-n { color: var(--accent); }
.brands .km-n { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brands .km-n .por { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; margin-right: 6px; }
.brands .km-m { grid-column: 1; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.brands .km-m b { color: var(--ink-2); font-weight: 600; }
.brands .tag { grid-row: 1 / span 2; grid-column: 2; }
.tag.neutral { background: var(--surface-2); color: var(--ink-2); }

/* Metodika */
.prose { display: grid; gap: 12px; max-width: 72ch; color: var(--ink-2); }
.prose strong { color: var(--ink); }
.prose ul, .prose ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.status td:first-child { font-weight: 600; color: var(--ink); }
.cols2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 40px; align-items: start; }
footer { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; margin-top: 40px; }

@media (max-width: 900px) {
  .radce { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
  .m-grid, .slots, .cols2 { grid-template-columns: minmax(0, 1fr); }
  .m-head { grid-template-columns: minmax(0, 1fr); }
  .plate-box { justify-items: start; }
  h1 { font-size: 34px; }
}
@media (max-width: 560px) {
  .top .wrap { height: auto; padding-block: 8px; flex-wrap: wrap; row-gap: 6px; }
  nav { width: 100%; gap: 2px; }
  nav a { padding: 5px 8px; font-size: 13px; }
  .proto { order: -1; margin-left: auto; }
  .brand small { display: none; }
  .est-form { grid-template-columns: minmax(0, 1fr); }
  .hero-num { font-size: 36px; }
  .grid { grid-template-columns: minmax(0, 1fr); }
  h2 { font-size: 24px; }
}
@media (prefers-reduced-motion: reduce) { .card, .toggle { transition: none; } }

/* Doplněno pro web: patička s provozovatelem, stav načítání, noscript. */
footer#footer { display: grid; gap: 8px; }
footer#footer p { margin: 0; }
footer#footer a { color: var(--muted); }
.kontakt-email { font: inherit; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.nacitani { grid-column: 1 / -1; color: var(--muted); padding: 24px 0; }
.nacitani.chyba { color: var(--warn); }
noscript .empty { margin-top: 16px; }

/* Související modely na statické stránce modelu (vyrábí tools/prerender.mjs) */
.souvisejici { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 28px; }
.souvisejici ul { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.souvisejici li a { text-decoration: none; font-weight: 600; }
.souvisejici li a:hover { text-decoration: underline; }
.souvisejici .note { grid-column: 1 / -1; }
