/* Web dokumentace Nessesity (dokumentace.healthyness.cz); sestavuje nastroje/sestav_web.py */
:root { --brand: #354E91; --brand-soft: #E8ECF6; --ink: #1d2230; --muted: #5d6475; --line: #d9dde6;
  --warn-bg: #FFF6E0; --bg: #f6f6f4; --lista: 60px; color-scheme: light; }
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--lista) + 16px); }
body { margin: 0; background: #fff; color: var(--ink); font: 16px/1.65 "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
a { color: var(--brand); }
img { max-width: 100%; height: auto; }

/* horní lišta */
.lista { position: sticky; top: 0; z-index: 30; height: var(--lista); display: flex; align-items: center;
  justify-content: space-between; gap: 16px; padding: 0 24px; background: #fff; border-bottom: 1px solid var(--line); }
.znacka { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-size: 17px; white-space: nowrap; }
.znacka img { border-radius: 6px; }
.znacka b { color: var(--brand); font-weight: 600; }
.lista nav { display: flex; gap: 4px; align-items: center; overflow-x: auto; }
.lista nav a { padding: 6px 12px; border-radius: 6px; text-decoration: none; color: var(--ink); font-size: 15px; white-space: nowrap; }
.lista nav a:hover { background: var(--brand-soft); }
.lista nav a[aria-current] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.lista nav a.app { color: var(--brand); }

/* rozložení wiki: panel s osnovou + obsah */
/* osnova přilepená k levému okraji, text uprostřed zbylé plochy */
.rozlozeni { display: grid; grid-template-columns: 310px minmax(0, 1fr); }
.panel { position: sticky; top: var(--lista); height: calc(100vh - var(--lista)); overflow-y: auto; padding: 18px 14px 24px 20px;
  border-right: 1px solid var(--line); background: var(--bg); font-size: 14.5px; line-height: 1.4; }
.hledat { width: 100%; padding: 8px 10px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; background: #fff; }
.hledat:focus { outline: 2px solid var(--brand); outline-offset: -1px; }
.osnova, .osnova ul { list-style: none; margin: 0; padding: 0; }
.osnova ul { padding: 2px 0 6px 12px; }
.osnova a { display: block; padding: 4px 8px; border-radius: 5px; color: var(--ink); text-decoration: none; }
.osnova a:hover { background: #e4e7ee; }
.osnova li.kap { position: relative; }
.osnova .kap > a { font-weight: 600; margin-top: 2px; padding-left: 24px; }
.osnova ul { padding-left: 24px; }
.osnova ul a { color: var(--muted); font-size: 14px; }
.osnova .kap.ctena > a { color: var(--brand); }
.osnova a.aktivni, .osnova .kap.ctena > a.aktivni { background: var(--brand); color: #fff; }
.rozbal { position: absolute; left: 0; top: 3px; width: 24px; height: 24px; padding: 0; border: 0; border-radius: 4px;
  background: none; color: var(--muted); cursor: pointer; font-size: 12px; line-height: 24px; }
.rozbal::before { content: "▶"; display: inline-block; transition: transform .15s; }
.rozbal:hover { background: #e4e7ee; color: var(--brand); }
.js .osnova li.kap > ul { display: none; }
.js .osnova li.kap.otevrena > ul, .js .osnova li.kap.ctena:not(.zavrena) > ul, .js .osnova.hleda li.kap > ul { display: block; }
.osnova li.kap.otevrena > .rozbal::before, .osnova li.kap.ctena:not(.zavrena) > .rozbal::before { transform: rotate(90deg); }
.prubeh { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: left; }
.osnova .skryto { display: none !important; }
.nic { color: var(--muted); padding: 4px 8px; }
.pdf.mini { display: block; margin-top: 18px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; text-decoration: none; font-size: 14px; }
.obsah-tlacitko { display: none; }

/* obsah */
.obsah { padding: 36px 48px 80px; max-width: 920px; width: 100%; min-width: 0; margin: 0 auto; }
.titul h1 { font-size: 34px; line-height: 1.2; margin: 0 0 6px; color: var(--brand); }
.verze { color: var(--muted); margin: 0 0 18px; font-size: 15px; }
.lead { font-size: 18px; }
h1, h2, h3, h4 { color: var(--brand); line-height: 1.25; }
h2 { font-size: 27px; margin: 64px 0 16px; padding-bottom: 8px; border-bottom: 2px solid var(--brand); }
h3 { font-size: 20px; margin: 36px 0 10px; }
h4 { font-size: 17px; margin: 24px 0 8px; }
.kotva { margin-left: 8px; color: var(--line); text-decoration: none; font-weight: 400; opacity: 0; }
h2:hover .kotva, h3:hover .kotva, h4:hover .kotva, .kotva:focus { opacity: 1; }
p { margin: 0 0 12px; }
ul, ol { margin: 0 0 14px; padding-left: 26px; }
li { margin-bottom: 5px; }
.muted { color: var(--muted); }

figure { margin: 16px 0 26px; text-align: center; }
/* velikost rámečku je známá před načtením snímku (--w, --r ze sestav_web.py), stránka se pak neposouvá */
figure img { --maxh: 560px; --maxw: 100%; width: min(var(--maxw), var(--w), calc(var(--maxh) * var(--r))); height: auto;
  aspect-ratio: var(--r); max-width: none; border: 1px solid var(--line); border-radius: 8px; cursor: zoom-in; }
figure.dlg img { --maxw: 62%; }
figure.narrow img { --maxw: 52%; }
figure.mail img { --maxw: 82%; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 6px; }
.row, .shots { display: flex; gap: 16px; align-items: flex-start; justify-content: center; margin: 16px 0 24px; }
.row figure, .shots figure { flex: 1; margin: 0; min-width: 0; }
.row figure img, .shots img { --maxh: 420px; }
.cols { display: flex; gap: 24px; }
.cols > div { flex: 1; min-width: 0; }

.steps { counter-reset: s; list-style: none; padding-left: 0; }
.steps > li { counter-increment: s; position: relative; padding-left: 36px; margin-bottom: 8px; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600; text-align: center; line-height: 24px; }
.box { border-radius: 8px; padding: 12px 16px; margin: 14px 0 18px; }
.tip { background: var(--brand-soft); border-left: 5px solid var(--brand); }
.warn { background: var(--warn-bg); border-left: 5px solid #d9a300; }
.box > b:first-child { display: block; margin-bottom: 4px; }
.tw { overflow-x: auto; margin: 10px 0 18px; }
table.t { width: 100%; border-collapse: collapse; font-size: 15px; }
table.t th { background: var(--brand); color: #fff; text-align: left; padding: 8px 10px; font-weight: 600; }
table.t td { border-bottom: 1px solid var(--line); padding: 8px 10px; vertical-align: top; }
.ui { font-weight: 600; color: var(--brand); }
.kbd { font-family: Consolas, monospace; background: #f1f2f5; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 14px; }
.flow { display: flex; align-items: stretch; gap: 8px; margin: 14px 0 10px; }
.flow .st { flex: 1; border: 1px solid var(--brand); border-radius: 8px; padding: 8px 10px; font-size: 14px; }
.flow .st b { display: block; color: var(--brand); margin-bottom: 3px; }
.flow .ar { align-self: center; color: var(--brand); font-weight: 700; }
.lbl { display: inline-block; font-size: 13px; font-weight: 600; color: #fff; background: var(--brand); border-radius: 4px;
  padding: 0 7px; margin-right: 6px; vertical-align: 2px; }
.osnova .lbl { font-size: 11px; padding: 0 5px; vertical-align: 1px; }

.pata { margin-top: 72px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; }
.nahoru { position: fixed; right: 20px; bottom: 20px; width: 44px; height: 44px; border-radius: 50%; background: var(--brand);
  color: #fff; text-decoration: none; font-size: 22px; line-height: 44px; text-align: center; opacity: 0; pointer-events: none;
  transition: opacity .2s; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.nahoru.viditelne { opacity: 1; pointer-events: auto; }
.lupa { position: fixed; inset: 0; z-index: 50; background: rgba(20, 24, 34, .86); display: flex; align-items: center;
  justify-content: center; padding: 16px; cursor: zoom-out; }
.lupa[hidden] { display: none; }
.lupa img { max-width: 100%; max-height: 100%; border-radius: 6px; background: #fff; }

/* úvodní stránka */
.uvodni { background: var(--bg); }
.uvod-obsah { max-width: 980px; margin: 0 auto; padding: 48px 24px 72px; }
.uvod-obsah h1 { font-size: 36px; margin: 0 0 12px; }
.karty { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; margin: 28px 0 32px; }
.karta { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px 24px; display: flex; flex-direction: column; }
.karta h2 { margin: 0 0 10px; padding: 0; border: 0; font-size: 22px; }
.karta h2 a { text-decoration: none; }
.karta .akce { margin: auto 0 0; display: flex; flex-wrap: wrap; gap: 10px; padding-top: 8px; }
.tlacitko { display: inline-block; padding: 9px 16px; border-radius: 8px; background: var(--brand); color: #fff; text-decoration: none; font-weight: 600; }
.tlacitko.druhe { background: #fff; color: var(--brand); border: 1px solid var(--brand); font-weight: 500; }

/* mobil: osnova jako vysouvací panel */
@media (max-width: 900px) {
  .lista { padding: 0 16px; }
  .znacka span, .lista nav a.app { display: none; }
  .rozlozeni { display: block; }
  .obsah { padding: 16px 16px 72px; }
  .obsah-tlacitko { display: block; position: sticky; top: var(--lista); z-index: 20; width: 100%; padding: 10px 16px; text-align: left;
    border: 0; border-bottom: 1px solid var(--line); background: var(--bg); font: inherit; font-weight: 600; color: var(--brand); cursor: pointer; }
  html { scroll-padding-top: calc(var(--lista) + 60px); }
  .panel { position: fixed; z-index: 40; top: calc(var(--lista) + 45px); left: 0; width: min(86vw, 340px); height: calc(100vh - var(--lista) - 45px);
    transform: translateX(-100%); transition: transform .2s; box-shadow: 2px 0 12px rgba(0, 0, 0, .15); }
  .panel.otevreny { transform: none; }
  .titul h1 { font-size: 27px; }
  h2 { font-size: 23px; margin-top: 48px; }
  .row, .shots, .cols, .flow { flex-direction: column; align-items: stretch; }
  .flow .ar { transform: rotate(90deg); }
  figure.dlg img, figure.narrow img, figure.mail img { --maxw: 100%; }
}
@media print {
  .lista, .panel, .obsah-tlacitko, .nahoru, .kotva { display: none !important; }
  .rozlozeni { display: block; }
}
