/* Dotazník „Jak to šlo s vahou dál“ – neutrální vzhled podle nutriadapt.cz (Montserrat, starorůžová, korálová) */

@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/montserrat-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/montserrat-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --text: #2d2d2d;
  --text-tichy: #5f5f5f;
  --ruzova: #8e6268;          /* nadpisy, vybraná možnost (kontrast 5,1 : 1) */
  --ruzova-svetla: #b88b90;   /* dekorace jako na nutriadapt.cz */
  --modroseda: #9cb0b7;
  --koral: #cc3f47;           /* hlavní tlačítko (bílý text 4,8 : 1) */
  --koral-hover: #b8363e;
  --okraj: #c9c9c9;
  --okraj-ovladac: #8a8a8a;
  --pozadi: #f6f6f6;
  --karta: #ffffff;
  --chyba: #c62f3e;
  --fokus: #2d4156;
  --vybrano: rgba(184, 139, 144, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: linear-gradient(180deg, var(--pozadi) 0%, #ffffff 520px);
}

/* ----- Hlavička ----- */
.hlavicka { padding: 28px 16px 8px; text-align: center; }
.znacka { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
.znacka-nazev { font-size: 24px; font-weight: 500; letter-spacing: 0.18em; padding-left: 0.18em; }
.znacka-podtitul { margin-top: 4px; font-size: 10px; font-weight: 500; letter-spacing: 0.32em; padding-left: 0.32em; text-transform: uppercase; color: var(--text-tichy); }

/* ----- Karta ----- */
.obsah { padding: 16px 16px 56px; }
.karta {
  max-width: 680px;
  margin: 0 auto;
  background: var(--karta);
  border: 1px solid #ececec;
  border-radius: 20px;
  padding: 28px 20px 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03), 0 8px 28px rgba(0, 0, 0, 0.04);
}
@media (min-width: 640px) {
  .karta { padding: 40px 48px 44px; }
}

/* ----- Postup ----- */
.postup { margin-bottom: 24px; }
.postup-text { margin: 0 0 8px; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; color: var(--text-tichy); }
.postup-lista { height: 4px; background: #eeeeee; border-radius: 4px; overflow: hidden; }
.postup-vypln { height: 100%; width: 0; background: linear-gradient(90deg, var(--ruzova-svetla), var(--modroseda)); border-radius: 4px; transition: width 0.3s ease; }

/* ----- Typografie ----- */
h2 {
  margin: 0 0 4px;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 300;
  color: var(--ruzova);
  text-wrap: balance;
}
@media (min-width: 640px) { h2 { font-size: 30px; } }
h2:focus { outline: none; }

.linka {
  width: 120px; height: 2px; margin: 14px 0 22px;
  background: linear-gradient(90deg, var(--ruzova-svetla) 50%, var(--modroseda) 50%);
  opacity: 0.8;
}

p { margin: 0 0 16px; }
.uvod-text { font-size: 18px; }
.pozn { font-size: 15px; color: var(--text-tichy); }
.nacitani { color: var(--text-tichy); }

/* ----- Otázky ----- */
.otazka { margin: 0 0 30px; padding: 0; border: 0; min-width: 0; }
.otazka[hidden] { display: none; }
.otazka legend, .otazka .otazka-text {
  display: block;
  padding: 0;
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
}
.napoveda { margin: 0 0 12px; font-size: 15px; color: var(--text-tichy); }
.otazka legend + .moznosti, .otazka legend + .vaha-pole { margin-top: 12px; }

.moznosti { display: grid; gap: 10px; }

.moznost {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 13px 16px;
  min-height: 50px;
  border: 1px solid var(--okraj);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 16px;
  line-height: 1.45;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.moznost:hover { border-color: var(--ruzova-svetla); }
.moznost input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
}
.znak {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 1px;
  border: 2px solid var(--okraj-ovladac);
  background: #fff;
  display: grid;
  place-items: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.znak-kolecko { border-radius: 50%; }
.znak-ctverec { border-radius: 6px; }
.moznost input:checked ~ .znak { border-color: var(--ruzova); background: var(--ruzova); }
.znak-kolecko::after {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform 0.15s ease;
}
.znak-ctverec::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); transition: transform 0.15s ease;
}
.moznost input:checked ~ .znak-kolecko::after { transform: scale(1); }
.moznost input:checked ~ .znak-ctverec::after { transform: rotate(45deg) scale(1); }
.moznost:has(input:checked) { border-color: var(--ruzova); background: var(--vybrano); }
.moznost:has(input:focus-visible) { outline: 3px solid var(--fokus); outline-offset: 2px; }

/* ----- Známkování 1–5 (otázka 3): kompaktní tabulka ----- */
.hodnoceni { display: block; }
.hodnoceni-hlavicka,
.hodnoceni-radek { display: grid; grid-template-columns: 1fr; gap: 6px; }
.hodnoceni-hlavicka-misto { display: none; }
.hodnoceni-hlavicka-popisky {
  display: flex; justify-content: space-between; width: 232px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-tichy);
}
.hodnoceni-radek {
  padding: 10px 0;
  border-bottom: 1px solid #ececec;
}
.hodnoceni-radek:last-child { border-bottom: 0; }
.hodnoceni-nazev { margin: 0; font-size: 16px; line-height: 1.4; }
.hodnoceni-stupnice { display: grid; grid-template-columns: repeat(5, 40px); gap: 8px; }
.znamka { position: relative; display: block; cursor: pointer; }
.znamka input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.znamka-cislo {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border: 1.5px solid var(--okraj-ovladac);
  border-radius: 50%;
  font-size: 15px; font-weight: 600;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}
.znamka:hover .znamka-cislo { border-color: var(--ruzova); }
.znamka input:checked + .znamka-cislo { background: var(--ruzova); border-color: var(--ruzova); color: #fff; }
.znamka input:focus-visible + .znamka-cislo { outline: 3px solid var(--fokus); outline-offset: 2px; }
.hodnoceni-radek.chybi .hodnoceni-nazev { color: var(--chyba); font-weight: 600; }
.hodnoceni-radek.chybi .znamka-cislo { border-color: var(--chyba); }

/* Na širší obrazovce název vlevo a kolečka vpravo na jednom řádku */
@media (min-width: 560px) {
  .hodnoceni-hlavicka,
  .hodnoceni-radek { grid-template-columns: 1fr auto; align-items: center; column-gap: 20px; }
  .hodnoceni-hlavicka-misto { display: block; }
  .hodnoceni-hlavicka { padding-bottom: 2px; }
}

.doplnit { margin: 2px 0 0 0; }
.doplnit[hidden] { display: none; }

/* ----- Pole ----- */
.pole {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  padding: 12px 18px;
  border: 1px solid var(--okraj-ovladac);
  border-radius: 14px;
  background: #fff;
}
.pole:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
textarea.pole { min-height: 130px; resize: vertical; line-height: 1.5; }
.vaha-radek { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.vaha-radek .pole { width: 140px; border-radius: 50px; text-align: center; font-size: 18px; }
.vaha-jednotka { font-weight: 600; }
.pole:disabled { background: #f3f3f3; color: #8a8a8a; border-color: var(--okraj); }

.souhlas-text { font-size: 15px; color: var(--text-tichy); margin-bottom: 12px; }
.souhlas-text a { color: var(--ruzova); text-underline-offset: 3px; }
.souhlas-text a:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }

/* ----- Chyby ----- */
.chyba { margin: 10px 0 0; font-size: 15px; font-weight: 500; color: var(--chyba); }
.chyba[hidden] { display: none; }
.otazka.ma-chybu .moznost, .otazka.ma-chybu .pole { border-color: var(--chyba); }
.chyba-obecna {
  margin: 0 0 20px; padding: 12px 16px; border-radius: 12px;
  background: #fbeef0; color: var(--chyba); font-weight: 500;
}
.chyba-obecna[hidden] { display: none; }

/* ----- Tlačítka ----- */
.navigace { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.tlacitko {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px;
  padding: 12px 34px;
  border: 1px solid var(--koral);
  border-radius: 50px;
  background: var(--koral);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.tlacitko:hover { background: var(--koral-hover); border-color: var(--koral-hover); }
.tlacitko:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }
.tlacitko:disabled { opacity: 0.6; cursor: progress; }
.tlacitko[hidden] { display: none; }
.navigace .tlacitko { margin-left: auto; }
.zpet {
  min-height: 48px;
  padding: 10px 6px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-tichy);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.zpet:hover { color: var(--text); }
.zpet:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 420px) {
  .navigace .tlacitko { width: 100%; }
  .navigace { flex-direction: column-reverse; align-items: stretch; }
  .zpet { align-self: center; }
}

/* ----- Děkovací stránka ----- */
.dekujeme { text-align: left; }
.na-stred { text-align: center; }
p.na-stred:has(.tlacitko) { margin-top: 24px; margin-bottom: 12px; }
.dekujeme:focus { outline: none; }

/* ----- Lišta ukázky pro kolegy ----- */
.ukazka-lista {
  max-width: 680px; margin: 0 auto 16px; padding: 10px 16px;
  border-radius: 12px; background: #fff7e6; border: 1px solid #f0d9a8; font-size: 14px;
}
.ukazka-lista p { margin: 0; }
.ukazka-titul { font-weight: 600; margin-bottom: 2px !important; }
.ukazka-lista a { color: var(--text); text-underline-offset: 3px; }

/* ----- Náhled všech textů (?nahled=1) ----- */
.nahled-lista {
  margin: 0 0 28px; padding: 14px 16px; border-radius: 12px;
  background: #f0f4f7; border-left: 3px solid var(--modroseda); font-size: 15px;
}
.nahled-lista p { margin: 0; }
.nahled-titul { font-weight: 600; margin-bottom: 4px !important; }
.nahled-rod a { color: var(--text); }
.nahled-rod a.aktivni { font-weight: 700; text-decoration: none; }
.nahled-krok { padding-bottom: 12px; margin-bottom: 36px; border-bottom: 1px dashed var(--okraj); }
.nahled-cislo {
  margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--ruzova);
}
.nahled-pozn {
  margin: 0 0 12px; padding: 8px 12px; border-radius: 8px;
  background: #f0f4f7; color: #3c4a52; font-size: 14px;
}
.nahled-hlasky { margin: 0; display: grid; gap: 4px 20px; }
.nahled-hlasky dt { font-size: 13px; font-weight: 600; color: var(--text-tichy); margin-top: 10px; }
.nahled-hlasky dd { margin: 0; }
@media (min-width: 640px) {
  .nahled-hlasky { grid-template-columns: 220px 1fr; }
  .nahled-hlasky dt { margin-top: 0; }
}

/* ----- Pomocné ----- */
.krok[hidden], [hidden] { display: none !important; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
