/* Layout: „stavební deník“ – události po datech v levém sloupci, údaje o stavbě v rohovém razítku jako na výkresu. */
:root {
  --paper: #f5f6f3;        /* podklad stránky – pauzovací papír */
  --sheet: #ffffff;        /* listy, karty */
  --ink: #18212c;          /* text */
  --ink-2: #4b5664;        /* vedlejší text */
  --ink-3: #6d7784;        /* popisky */
  --rule: #d3d9df;         /* linky */
  --rule-strong: #18212c;  /* rámeček razítka */
  --blue: #1f4f8f;         /* stavební modrá – odkazy, ovládání */
  --blue-weak: #e2eaf5;
  --amber: #9a5b00;        /* probíhá stavba – text */
  --amber-fill: #e9a21d;   /* probíhá stavba – plochy */
  --amber-weak: #fbefd6;
  --green: #22693d;
  --green-fill: #3d9a5f;
  --green-weak: #e0f0e5;
  --violet: #5d3f8f;
  --violet-fill: #8a6cc0;
  --violet-weak: #ece6f6;
  --slate-fill: #7d8b9c;
  --slate-weak: #e7ebef;
  --red: #a32a20;
  --red-weak: #f7e2df;
  --focus: #1f4f8f;
  --shadow: 0 1px 2px rgb(24 33 44 / 6%), 0 2px 8px rgb(24 33 44 / 5%);

  --f-display: "Archivo", "Arial Narrow", Arial, system-ui, sans-serif;
  --f-body: "Source Sans 3", "Source Sans Pro", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5rem;
  --step-3: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  --step-4: clamp(2rem, 1.5rem + 2.4vw, 3.1rem);
  --radius: 6px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #12171d; --sheet: #1a2129; --ink: #e8ecf0; --ink-2: #b3bdc8; --ink-3: #8f9aa6;
    --rule: #2f3944; --rule-strong: #c9d2db; --blue: #8fb6ec; --blue-weak: #1f2f45;
    --amber: #f2bd5a; --amber-fill: #d99421; --amber-weak: #3a2c12;
    --green: #8fd3a5; --green-fill: #3f9a61; --green-weak: #18301f;
    --violet: #c6b2ec; --violet-fill: #8f72c7; --violet-weak: #2a2140;
    --slate-fill: #6f7d8d; --slate-weak: #26303a; --red: #f0a79f; --red-weak: #3b1f1c;
    --focus: #8fb6ec; --shadow: 0 1px 2px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #12171d; --sheet: #1a2129; --ink: #e8ecf0; --ink-2: #b3bdc8; --ink-3: #8f9aa6;
  --rule: #2f3944; --rule-strong: #c9d2db; --blue: #8fb6ec; --blue-weak: #1f2f45;
  --amber: #f2bd5a; --amber-fill: #d99421; --amber-weak: #3a2c12;
  --green: #8fd3a5; --green-fill: #3f9a61; --green-weak: #18301f;
  --violet: #c6b2ec; --violet-fill: #8f72c7; --violet-weak: #2a2140;
  --slate-fill: #6f7d8d; --slate-weak: #26303a; --red: #f0a79f; --red-weak: #3b1f1c;
  --focus: #8fb6ec; --shadow: 0 1px 2px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

/* ---------- základ ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.55;
  font-feature-settings: "kern";
}
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  background: var(--paper);
  z-index: 30;
}
[hidden] { display: none !important; }
img, svg { max-width: 100%; }
a { color: var(--blue); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { font-family: var(--f-display); font-stretch: 112%; line-height: 1.15; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); font-weight: 760; letter-spacing: -0.01em; }
h2 { font-size: var(--step-2); font-weight: 720; }
h3 { font-size: var(--step-1); font-weight: 680; }
p { margin: 0; }
.num, time, .tab { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--f-mono); font-size: 0.86em; }
.muted { color: var(--ink-2); }
.small { font-size: var(--step--1); }
.label {
  font-family: var(--f-display);
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.wrap {
  max-width: 74rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- horní lišta ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 34px; height: 34px; color: var(--blue); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-top { font-size: 0.78rem; color: var(--ink-3); letter-spacing: 0.04em; }
.brand-name { font-family: var(--f-display); font-stretch: 115%; font-weight: 750; font-size: 1.12rem; }
.topnav { display: flex; gap: 4px; flex-wrap: wrap; }
.topnav a {
  color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: var(--radius); font-weight: 600;
}
.topnav a:hover { color: var(--ink); background: var(--slate-weak); }
.topnav a[aria-current="page"] { color: var(--ink); background: var(--sheet); box-shadow: inset 0 -2px 0 var(--blue); }

main { display: block; padding-block: 28px 56px; }
main:focus, [tabindex="-1"]:focus { outline: none; }

/* ---------- úvod ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px 40px; align-items: end; margin-bottom: 28px; }
.intro .lead { font-size: var(--step-1); color: var(--ink-2); max-width: 40rem; margin-top: 12px; line-height: 1.45; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--rule-strong); background: var(--sheet); }
.stat { padding: 12px 14px; border-left: 1px solid var(--rule); min-width: 0; }
.stat:first-child { border-left: 0; }
.stat .v { font-family: var(--f-display); font-stretch: 105%; font-weight: 760; font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .k { font-size: var(--step--1); color: var(--ink-2); line-height: 1.3; margin-top: 4px; }

/* ---------- filtry ---------- */
.controls { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); margin-bottom: 22px; }
.search { position: relative; flex: 1 1 16rem; min-width: 0; max-width: 24rem; }
.search input {
  width: 100%; font: inherit; padding: 9px 12px 9px 36px; border: 1px solid var(--rule); border-radius: var(--radius);
  background: var(--sheet); color: var(--ink);
}
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font: inherit; font-size: 0.95rem; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule);
  background: var(--sheet); color: var(--ink-2); cursor: pointer; line-height: 1.2;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.select { font: inherit; padding: 7px 10px; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--sheet); color: var(--ink); }
.sort { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.result-count { color: var(--ink-2); font-size: var(--step--1); margin: -8px 0 14px; }

/* ---------- karty projektů ---------- */
.group-title { display: flex; align-items: baseline; gap: 12px; margin: 30px 0 12px; }
.group-title h2 { font-size: var(--step-1); }
.group-title .count { color: var(--ink-3); font-size: var(--step--1); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 16px 14px;
  box-shadow: var(--shadow);
}
.card:hover { border-color: var(--ink-3); }
.card h3 { font-size: 1.16rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.card h3 a:focus-visible { outline: none; }
.card:has(h3 a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.card .sub { color: var(--ink-2); font-size: 0.97rem; line-height: 1.4; }
.card-top { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card-foot { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--rule); }
.card-foot .price { font-family: var(--f-display); font-weight: 720; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.card-foot .price small { font-family: var(--f-body); font-weight: 400; color: var(--ink-3); font-size: 0.8rem; margin-left: 4px; }
.card-foot .when { color: var(--ink-2); font-size: var(--step--1); }
.card-foot .gaps { color: var(--red); font-size: var(--step--1); margin-left: auto; }

/* stav */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px;
  font-size: 0.82rem; font-weight: 650; line-height: 1.3; white-space: nowrap;
}
.pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.pill.s-zamer, .pill.s-projekt { background: var(--blue-weak); color: var(--blue); }
.pill.s-vyber { background: var(--violet-weak); color: var(--violet); }
.pill.s-stavba { background: var(--amber-weak); color: var(--amber); }
.pill.s-hotovo { background: var(--green-weak); color: var(--green); }
.pill.s-zruseno, .pill.s-nejasne { background: var(--slate-weak); color: var(--ink-2); }

/* průběh: Záměr → Projekt → Výběr → Stavba → Hotovo */
.steps { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding-top: 10px; font-size: 0.78rem; color: var(--ink-3); line-height: 1.2; min-width: 0; }
.steps li::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 3px; background: var(--rule); }
.steps li.done::before { background: var(--ink-3); }
.steps li.now { color: var(--ink); font-weight: 650; }
.steps li.now::before { background: var(--now, var(--blue)); }
.steps.compact li { font-size: 0; padding-top: 6px; }
.steps.compact li::before { height: 4px; }
.steps .now-s-vyber { --now: var(--violet-fill); }
.steps .now-s-stavba { --now: var(--amber-fill); }
.steps .now-s-hotovo { --now: var(--green-fill); }
.steps .now-s-projekt, .steps .now-s-zamer { --now: var(--blue); }

/* ---------- detail projektu ---------- */
.crumbs { font-size: var(--step--1); color: var(--ink-3); margin-bottom: 14px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-2); }
.p-head { display: grid; gap: 12px; margin-bottom: 22px; }
.p-head .sub { font-size: var(--step-1); color: var(--ink-2); max-width: 46rem; line-height: 1.4; }
.p-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; color: var(--ink-2); }
.p-steps { max-width: 44rem; margin: 6px 0 4px; }

.p-grid { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 32px; align-items: start; }
.p-main { min-width: 0; display: grid; gap: 40px; }
.p-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 76px); display: grid; gap: 14px; }
.toc { display: grid; gap: 2px; border-left: 2px solid var(--rule); padding-left: 12px; }
.toc button { all: unset; cursor: pointer; padding: 4px 0; color: var(--ink-2); font-weight: 600; }
.toc button:hover { color: var(--ink); }
.toc button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* rohové razítko */
.razitko { border: 2px solid var(--rule-strong); background: var(--sheet); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.razitko > div { padding: 9px 12px 10px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.razitko .wide { grid-column: span 2; }
.razitko .full { grid-column: 1 / -1; }
.razitko .v { margin-top: 2px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.razitko .full .v { font-weight: 400; }
.razitko .v.big { font-family: var(--f-display); font-size: 1.45rem; font-weight: 760; font-variant-numeric: tabular-nums; line-height: 1.15; }
.razitko .v .note { display: block; font-family: var(--f-body); font-weight: 400; font-size: 0.82rem; color: var(--ink-3); margin-top: 2px; }
.razitko .up { color: var(--red); }
.razitko .down { color: var(--green); }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 10px 20px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); }
.section-head p { color: var(--ink-2); font-size: var(--step--1); }
.prose { display: grid; gap: 12px; max-width: 44rem; }
.prose p { line-height: 1.6; }

/* časová osa */
.seg { display: inline-flex; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; background: var(--sheet); }
.seg button { font: inherit; font-size: 0.92rem; padding: 6px 12px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--rule); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-year {
  font-family: var(--f-display); font-stretch: 115%; font-weight: 780; font-size: 1.35rem; color: var(--ink-3);
  padding: 18px 0 6px; display: grid; grid-template-columns: 7.2rem minmax(0, 1fr); gap: 0 18px;
}
.tl-year:first-child { padding-top: 0; }
.tl-item { display: grid; grid-template-columns: 7.2rem 18px minmax(0, 1fr); gap: 0 12px; position: relative; }
.tl-date { padding: 12px 0; text-align: right; color: var(--ink-2); font-size: 0.92rem; line-height: 1.3; font-variant-numeric: tabular-nums; }
.tl-axis { position: relative; }
.tl-axis::before { content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 2px; background: var(--rule); }
.tl-dot { position: absolute; left: 3px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--ink-3); }
.tl-item.key .tl-dot { background: var(--ink); border-color: var(--ink); }
.tl-item.plan .tl-dot { border-style: dashed; background: var(--sheet); border-color: var(--blue); }
.tl-body { padding: 10px 0 14px; min-width: 0; border-bottom: 1px solid var(--rule); }
.tl-item:last-child .tl-body { border-bottom: 0; }
.tl-body h3 { font-family: var(--f-body); font-stretch: 100%; font-size: 1.06rem; font-weight: 700; line-height: 1.35; }
.tl-body .desc { margin-top: 4px; color: var(--ink-2); max-width: 44rem; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; align-items: center; }
.tag { font-size: 0.74rem; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-3); }
.tag.plan { color: var(--blue); }
.tag.derived { color: var(--violet); }
.src { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 0.86rem; }
.src a { color: var(--ink-2); }
.src a:hover { color: var(--blue); }
.tl-today { display: grid; grid-template-columns: 7.2rem 18px minmax(0, 1fr); gap: 0 12px; align-items: center; }
.tl-today .tl-date { color: var(--blue); font-weight: 700; padding: 6px 0; }
.tl-today .line { height: 2px; background: repeating-linear-gradient(90deg, var(--blue) 0 6px, transparent 6px 10px); }
.tl-more { margin-top: 12px; }
.btn {
  font: inherit; font-weight: 650; padding: 8px 14px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--ink); background: var(--sheet); color: var(--ink); text-decoration: none; display: inline-flex; gap: 8px; align-items: center;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.quiet { border-color: var(--rule); color: var(--ink-2); }
.btn.quiet:hover { background: var(--slate-weak); color: var(--ink); }

/* peníze */
.bars { display: grid; gap: 2px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 4px 16px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.bar-row:last-child { border-bottom: 0; }
.bar-label .what { font-weight: 650; line-height: 1.3; }
.bar-label .when { color: var(--ink-3); font-size: 0.85rem; }
.bar-track { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bar { height: 22px; border-radius: 3px; background: var(--slate-fill); flex: 0 1 auto; min-width: 3px; }
.bar-val { flex: none; }
.bar.k-limit, .bar.k-odhad, .bar.k-rozpocet { background: repeating-linear-gradient(135deg, var(--slate-fill) 0 6px, transparent 6px 9px); border: 1px solid var(--slate-fill); }
.bar.k-predpokladana { background: var(--slate-fill); }
.bar.k-nabidka { background: var(--violet-fill); }
.bar.k-smlouva { background: var(--blue); }
.bar.k-dodatek { background: var(--amber-fill); }
.bar.k-zaplaceno { background: var(--green-fill); }
.bar.k-celkem { background: repeating-linear-gradient(135deg, var(--green-fill) 0 6px, transparent 6px 9px); border: 1px solid var(--green-fill); }
.bar-val { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 650; }
.bar-val small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.bar-desc { grid-column: 2; color: var(--ink-2); font-size: 0.9rem; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.85rem; color: var(--ink-2); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 10px; border-radius: 2px; display: inline-block; }
.callout { background: var(--sheet); border: 1px solid var(--rule); border-left: 4px solid var(--blue); padding: 12px 14px; border-radius: 0 var(--radius) var(--radius) 0; }
.callout.warn { border-left-color: var(--amber-fill); }
.money-extra { display: grid; gap: 12px; margin-top: 18px; }
.funding { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.funding li { display: flex; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 8px 12px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }

/* co nevíme */
.gaps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.gaps-list li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); }
.gaps-list .q { width: 30px; height: 30px; border-radius: 50%; background: var(--red-weak); color: var(--red); display: grid; place-items: center; font-family: var(--f-display); font-weight: 800; }
.gaps-list h3 { font-family: var(--f-body); font-stretch: 100%; font-size: 1.04rem; font-weight: 700; }
.gaps-list p { color: var(--ink-2); margin-top: 3px; }
.gaps-list .how { font-size: 0.9rem; margin-top: 6px; color: var(--ink-2); }
.gaps-list .how strong { color: var(--ink); }

/* podklady */
.doc-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.doc-list li { display: grid; grid-template-columns: 6.8rem minmax(0, 1fr) auto; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.doc-list .d { color: var(--ink-2); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.doc-list .t a { font-weight: 600; }
.doc-list .who { color: var(--ink-3); font-size: 0.85rem; display: block; }
.doc-list .kb { color: var(--ink-3); font-size: 0.78rem; white-space: nowrap; }
.doc-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ext::after { content: " ↗"; font-size: 0.85em; }

.related { display: flex; flex-wrap: wrap; gap: 8px; }
.related a { padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; text-decoration: none; background: var(--sheet); color: var(--ink); }
.related a:hover { border-color: var(--ink-3); }

/* ---------- přehled na časové ose (gantt) ---------- */
.gantt-wrap { overflow-x: auto; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.gantt { position: relative; min-width: 56rem; }
.g-head, .g-row { display: grid; grid-template-columns: 17rem minmax(0, 1fr); }
.g-head { position: sticky; top: 0; background: var(--sheet); border-bottom: 1px solid var(--rule); z-index: 2; }
.g-years { position: relative; height: 30px; }
.g-years span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 0.8rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.g-row { border-bottom: 1px solid var(--rule); }
.g-row:last-child { border-bottom: 0; }
.g-name { padding: 6px 12px; font-size: 0.92rem; line-height: 1.25; border-right: 1px solid var(--rule); min-width: 0; }
.g-name a { color: var(--ink); text-decoration: none; }
.g-name a:hover { text-decoration: underline; }
.g-name small { display: block; color: var(--ink-3); font-size: 0.78rem; }
.g-lane { position: relative; min-height: 38px; }
.g-grid { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--rule); opacity: 0.6; }
.g-bar { position: absolute; top: 11px; height: 16px; border-radius: 3px; background: var(--slate-fill); min-width: 6px; }
.g-bar.s-stavba { background: var(--amber-fill); }
.g-bar.s-hotovo { background: var(--green-fill); }
.g-bar.s-vyber { background: var(--violet-fill); }
.g-bar.s-projekt, .g-bar.s-zamer { background: var(--blue); }
.g-bar .planned { position: absolute; top: 0; bottom: 0; right: 0; background: repeating-linear-gradient(135deg, rgb(255 255 255 / 55%) 0 4px, transparent 4px 8px); border-radius: 0 3px 3px 0; }
.g-today { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--red); z-index: 1; }
.g-tick { position: absolute; top: 15px; width: 4px; height: 8px; margin-left: -2px; background: var(--sheet); opacity: 0.9; border-radius: 1px; }

/* ---------- o webu ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1fr) 16rem; gap: 40px; }
.about .prose { max-width: 44rem; }
.about h2 { margin-top: 18px; }
.gloss { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: 0; border-top: 1px solid var(--rule); max-width: 50rem; }
.gloss dt, .gloss dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.gloss dt { font-weight: 700; padding-right: 16px; }
.gloss dd { color: var(--ink-2); }

/* ---------- patička ---------- */
.foot { border-top: 1px solid var(--rule); background: var(--sheet); }
.foot-in { padding-block: 22px 28px; display: grid; gap: 8px; color: var(--ink-2); font-size: var(--step--1); max-width: 74rem; }
.empty { padding: 28px; text-align: center; color: var(--ink-2); border: 1px dashed var(--rule); border-radius: var(--radius); }
.noscript { padding-block: 20px; }

/* ---------- úzké obrazovky ---------- */
@media (max-width: 62rem) {
  .p-grid, .about { grid-template-columns: minmax(0, 1fr); }
  .p-side { position: static; order: -1; }
  .toc { display: flex; flex-wrap: wrap; gap: 4px 14px; border-left: 0; padding-left: 0; }
  .intro { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .razitko { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .razitko .wide { grid-column: 1 / -1; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat { border-left: 0; border-top: 1px solid var(--rule); }
  .stat:first-child { border-top: 0; }
  .tl-year { grid-template-columns: minmax(0, 1fr); padding-left: 0; }
  .tl-item, .tl-today { grid-template-columns: 14px minmax(0, 1fr); gap: 0 10px; }
  .tl-item .tl-date { display: none; }
  .tl-today .tl-date { display: none; }
  .tl-axis::before { left: 5px; }
  .tl-dot { left: 0; }
  .tl-mdate { display: block !important; color: var(--ink-2); font-size: 0.88rem; margin-bottom: 2px; font-variant-numeric: tabular-nums; }
  .bar-row { grid-template-columns: minmax(0, 1fr); }
  .bar-desc { grid-column: 1; }
  .doc-list li { grid-template-columns: minmax(0, 1fr); }
  .doc-list .kb { white-space: normal; }
  .gloss { grid-template-columns: minmax(0, 1fr); }
  .gloss dt { border-bottom: 0; padding-bottom: 0; }
  .card-foot .gaps { margin-left: 0; }
}
.tl-mdate { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .card, .chip, .btn, .topnav a { transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease; }
}

@media print {
  .topbar, .controls, .p-side, .seg, .tl-more, .foot { display: none !important; }
  body { background: #fff; color: #000; }
  .p-grid { grid-template-columns: 1fr; }
  a { color: #000; }
}
