/* Společný vzhled obou návodů — vychází z barev appky Výdejky */
:root {
  --green: #1a7f5a;
  --green-dark: #14634a;
  --green-soft: #eaf5f0;
  --bg: #f4f6f5;
  --card: #ffffff;
  --text: #1c2320;
  --muted: #6b7770;
  --red: #c0392b;
  --amber: #7a5d00;
  --amber-bg: #fff8e1;
  --amber-border: #f0d68a;
  --border: #e0e5e2;
  --maxw: 860px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 20px; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16.5px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px 90px; }

/* ---------- hlavička ---------- */
header.hero {
  background: linear-gradient(160deg, var(--green) 0%, var(--green-dark) 100%);
  color: #fff;
  padding: 52px 22px 44px;
  margin-bottom: 34px;
}
header.hero .inner { max-width: var(--maxw); margin: 0 auto; }
header.hero .eyebrow {
  text-transform: uppercase; letter-spacing: .13em; font-size: .74rem;
  font-weight: 700; opacity: .82; margin-bottom: 10px;
}
header.hero h1 { font-size: 2.3rem; line-height: 1.2; margin-bottom: 12px; font-weight: 800; }
header.hero p { opacity: .93; max-width: 62ch; }
header.hero .meta { margin-top: 20px; font-size: .85rem; opacity: .8; }
header.hero a { color: #fff; }

/* ---------- obsah ---------- */
nav.toc {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 20px 24px; margin-bottom: 38px;
}
nav.toc h2 { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
nav.toc ol { list-style: none; counter-reset: toc; }
nav.toc li { counter-increment: toc; padding: 5px 0; border-bottom: 1px solid var(--border); }
nav.toc li:last-child { border-bottom: none; }
nav.toc li::before {
  content: counter(toc); display: inline-flex; align-items: center; justify-content: center;
  width: 23px; height: 23px; border-radius: 6px; background: var(--green-soft);
  color: var(--green-dark); font-size: .76rem; font-weight: 700; margin-right: 11px;
}
nav.toc a { color: var(--text); text-decoration: none; font-weight: 500; }
nav.toc a:hover { color: var(--green); text-decoration: underline; }

/* ---------- sekce ---------- */
section { margin-bottom: 52px; scroll-margin-top: 16px; }
section > h2 {
  font-size: 1.55rem; font-weight: 800; margin-bottom: 8px;
  padding-bottom: 10px; border-bottom: 3px solid var(--green);
  display: inline-block;
}
section > .lead { color: var(--muted); margin: 10px 0 22px; max-width: 66ch; }

h3 { font-size: 1.12rem; margin: 30px 0 10px; font-weight: 700; }
h4 { font-size: .98rem; margin: 22px 0 8px; font-weight: 700; color: var(--green-dark); }

p { margin-bottom: 13px; max-width: 68ch; }
ul, ol { margin: 0 0 15px 22px; }
li { margin-bottom: 7px; max-width: 66ch; }

strong { font-weight: 700; }
code {
  background: #eef1f0; border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 6px; font-size: .87em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- kroky ---------- */
ol.steps { list-style: none; margin-left: 0; counter-reset: step; }
ol.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 20px 46px; margin-bottom: 0; max-width: none;
  border-left: 2px solid var(--border); margin-left: 15px;
}
ol.steps > li:last-child { border-left-color: transparent; padding-bottom: 4px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: -16px; top: -2px;
  width: 31px; height: 31px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .88rem;
  box-shadow: 0 0 0 5px var(--bg);
}
ol.steps > li > strong:first-child { display: block; margin-bottom: 3px; font-size: 1.02rem; }

/* ---------- rámečky ---------- */
.note, .warn, .danger, .tip {
  border-radius: 12px; padding: 15px 18px; margin: 18px 0;
  border: 1px solid; font-size: .95rem;
}
.note   { background: #eef4ff; border-color: #c9dcff; color: #1e3a6b; }
.tip    { background: var(--green-soft); border-color: #bfe3d3; color: var(--green-dark); }
.warn   { background: var(--amber-bg); border-color: var(--amber-border); color: var(--amber); }
.danger { background: #fdecea; border-color: #f5c2bc; color: #8a2318; }
.note b, .tip b, .warn b, .danger b { display: block; margin-bottom: 4px; }
.note p:last-child, .tip p:last-child, .warn p:last-child, .danger p:last-child { margin-bottom: 0; }
.note ul, .tip ul, .warn ul, .danger ul { margin-bottom: 0; }

/* ---------- obrázky ---------- */
figure { margin: 24px 0 28px; }
figure img {
  max-width: 100%; height: auto; display: block; border-radius: 10px;
}
figure.phone img { max-width: 340px; margin: 0 auto; }
figure.pair { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
figure.pair img { max-width: 300px; }
figcaption {
  font-size: .85rem; color: var(--muted); margin-top: 9px;
  text-align: center; font-style: italic;
}

/* ---------- tabulky ---------- */
table {
  width: 100%; border-collapse: collapse; margin: 18px 0 22px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; font-size: .93rem;
}
th, td { text-align: left; padding: 10px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: #f0f3f2; font-weight: 700; font-size: .84rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
.table-scroll { overflow-x: auto; }

/* Na úzkých displejích roztlačí trojsloupcová tabulka celou stránku do strany.
   Ať se roluje jen ta tabulka, ne text okolo. */
@media (max-width: 480px) {
  table:not(.xls) {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table:not(.xls) th, table:not(.xls) td { min-width: 7.5em; }
}

/* napodobenina excelového listu */
table.xls { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; }
table.xls th, table.xls td { padding: 6px 9px; border: 1px solid #d4dad7; text-align: center; white-space: nowrap; }
table.xls .rowhead { background: #f0f3f2; font-weight: 700; }
table.xls .cell-invoice { background: #f4b183; font-weight: 700; }
table.xls .cell-dates { background: #a9d08e; font-weight: 700; }
table.xls .label { text-align: left; font-weight: 700; background: #fafbfa; }

/* ---------- ostatní ---------- */
.kbd {
  display: inline-block; background: var(--card); border: 1px solid var(--border);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px;
  font-size: .84em; font-weight: 600;
}
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 700;
}
.pill-warn { background: #fff3cd; color: var(--amber); }
.pill-done { background: #d9f2e6; color: var(--green-dark); }
.pill-red  { background: #fdeceb; color: var(--red); }

.checklist { list-style: none; margin-left: 0; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before {
  content: "☐"; position: absolute; left: 0; top: -2px;
  font-size: 1.25rem; color: var(--green);
}

.faq { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 10px; }
.faq summary {
  padding: 14px 18px; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: center; gap: 10px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "▸"; color: var(--muted); transition: transform .15s; }
.faq[open] summary::before { transform: rotate(90deg); }
.faq .body { padding: 0 18px 16px; }
.faq .body p:last-child, .faq .body ul:last-child { margin-bottom: 0; }

footer.end {
  border-top: 1px solid var(--border); margin-top: 20px; padding-top: 22px;
  color: var(--muted); font-size: .88rem; text-align: center;
}
footer.end a { color: var(--green-dark); }

.backlink {
  display: inline-block; margin-bottom: 22px; color: var(--muted);
  text-decoration: none; font-size: .9rem;
}
.backlink:hover { color: var(--green); }

@media print {
  body { background: #fff; font-size: 11pt; }
  header.hero { background: var(--green-dark) !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  nav.toc, .backlink { display: none; }
  section { page-break-inside: avoid; }
  figure img { max-width: 320px; }
  .note, .tip, .warn, .danger { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 620px) {
  header.hero h1 { font-size: 1.7rem; }
  .wrap { padding: 0 16px 60px; }
  figure.pair img { max-width: 100%; }
}
