/* Test AI úrovně ve stylu C (23. 10. 2026, brand manuál §13): papír, Familjen Grotesk, amber jen na akce a ukazatele.
   Bez terminálu, mono písma, // popisků, gradientů a záře. */
:root {
  --bg: #F6F5F1;
  --bg-soft: #FFFFFF;
  --line: rgba(18,20,26,0.12);
  --track: rgba(18,20,26,0.08);
  --amber: #FFB300;
  --amber-soft: #FFF6DD;
  --txt: #12141A;
  --muted: #5A5F6A;
  --hand: #A87B12;
  --num: #8F6200;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Familjen Grotesk', system-ui, sans-serif;
  background-color: var(--bg);
  color: var(--txt);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--amber); color: var(--txt); }
a { color: var(--txt); font-weight: 700; text-decoration: underline; text-decoration-color: var(--amber); text-decoration-thickness: 2px; text-underline-offset: 3px; }
button { font-family: inherit; }

.kicker { font-size: 15px; font-weight: 600; color: var(--muted); }
.muted { color: var(--muted); }
.hide { display: none !important; }

/* Horní lišta */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; max-width: 1040px; margin: 0 auto;
}
.topbar a { text-decoration: none; }
.topbar .brand { display: inline-flex; align-items: center; }
.topbar .brand img { height: 22px; width: auto; display: block; }
.topbar .back { font-size: 15px; font-weight: 600; color: var(--muted); }
.topbar .back:hover { color: var(--txt); }

main { max-width: 760px; margin: 0 auto; padding: 16px 20px 80px; }

/* Karta testu */
.card {
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: 0 1px 2px rgba(18,20,26,0.05), 0 12px 32px rgba(18,20,26,0.06);
  padding: 32px 32px 36px;
}
@media (max-width: 560px) { .card { padding: 24px 18px 28px; } }

h1 { font-size: clamp(2rem, 5.8vw, 3rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 10px 0 16px; }
h2 { font-size: clamp(1.4rem, 4vw, 1.8rem); font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
p.lead { color: var(--muted); font-size: 1.12rem; margin-bottom: 18px; }
p.lead strong { color: var(--txt); }

/* ručně tažené podtržení (stejné jako na hlavním webu) */
.ul { position: relative; white-space: nowrap; isolation: isolate; }
.ul svg { position: absolute; left: -2%; bottom: -0.06em; width: 104%; height: 0.32em; z-index: -1; overflow: visible;
  fill: none; stroke: var(--amber); stroke-width: 7; stroke-linecap: round; }

/* Úrovně na úvodu jako schody: linka nahoře sílí od úrovně 1 ke 4 (brand manuál §10.2), bez rámečků */
.ladder { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 26px 0 28px; }
@media (max-width: 560px) { .ladder { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.ladder > div { position: relative; padding-top: 16px; display: flex; flex-direction: column; }
.ladder > div::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 99px; background: var(--amber); opacity: var(--o, 1); }
.ladder .n { font-size: 13px; font-weight: 600; color: var(--muted); }
.ladder .name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; margin-top: 2px; line-height: 1.2; }
.ladder .sub { color: var(--muted); font-size: 0.88rem; line-height: 1.4; margin-top: 4px; }

.note { font-size: 0.96rem; color: var(--muted); border-left: 3px solid var(--amber); padding-left: 12px; margin-bottom: 22px; }
.saved { font-size: 0.96rem; color: var(--muted); margin-bottom: 14px; }

/* Tlačítka: stejná žlutá jako podtržení, jediná žlutá na webu; bez stínu a gradientu (brand manuál §13) */
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 26px; border-radius: 12px;
  border: 0; cursor: pointer; font-weight: 700; font-size: 1rem; text-decoration: none; color: var(--txt);
  transition: transform .18s, filter .18s, border-color .18s;
}
.btn-primary { background: var(--amber); color: var(--txt); }
.btn-primary:hover { transform: translateY(-2px); filter: brightness(1.05); }
.btn-ghost { background: var(--bg-soft); color: var(--txt); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--txt); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* Tlačítko testu + ruční poznámka; šipka vždy míří do tlačítka (vedle vodorovně, pod ním nahoru) */
.cta-note { container-type: inline-size; }
.cta-note-row { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hand-note { display: flex; align-items: flex-end; gap: 4px; padding-left: 20px; color: var(--hand); }
.hand-note .pismo { height: 28px; width: auto; display: block; margin-bottom: -4px; }
.arrow-side { display: none; }
@container (min-width: 560px) {
  .cta-note-row { flex-direction: row; align-items: center; gap: 16px; }
  .hand-note { align-items: center; gap: 8px; padding-left: 0; }
  .hand-note .pismo { margin-bottom: 0; }
  .arrow-side { display: block; }
  .arrow-up { display: none; }
}

/* Průběh */
.progress { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.progress .bar { flex: 1; height: 6px; border-radius: 99px; background: var(--track); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--amber); transition: width .35s ease; }
.progress .count { font-size: 14px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }

.q-dim { margin-bottom: 10px; }
.q-text { margin-bottom: 20px; }

.opts { display: grid; gap: 10px; }
.opt {
  display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 12px; text-align: left;
  width: 100%; padding: 14px 16px; border-radius: 14px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); color: var(--txt);
  font-size: 1.05rem; line-height: 1.45; transition: border-color .15s, background .15s;
}
.opt:hover, .opt:focus-visible { border-color: var(--txt); outline: none; }
.opt.selected { border-color: var(--amber); background: var(--amber-soft); }
.opt .k {
  font-size: 13px; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums;
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 0; text-align: center; margin-top: 2px; background: var(--bg-soft);
}
.q-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; gap: 12px; }
.q-nav .hint { font-size: 14px; color: var(--muted); }
@media (max-width: 560px) { .q-nav .hint { display: none; } }

/* Výsledek */
.res-head { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: center; margin: 14px 0 22px; }
@media (max-width: 560px) { .res-head { grid-template-columns: 1fr; gap: 10px; } }
.res-score { font-size: clamp(3.6rem, 12vw, 5.4rem); font-weight: 700; line-height: 1; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.res-score small { font-size: 0.42em; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.res-name { font-size: clamp(1.7rem, 5vw, 2.4rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.res-tag { color: var(--muted); margin-top: 4px; }
.tag-amber { color: var(--num); font-weight: 700; }
.segs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 16px 0 22px; }
.segs i { height: 8px; border-radius: 99px; background: var(--track); display: block; }
.segs i.on { background: var(--amber); }
.res-desc { font-size: 1.1rem; color: var(--txt); margin-bottom: 26px; }

.dims { display: grid; gap: 12px; margin-bottom: 28px; }
.dim { display: grid; grid-template-columns: 190px 1fr 52px; gap: 12px; align-items: center; }
@media (max-width: 560px) { .dim { grid-template-columns: 1fr 52px; row-gap: 6px; } .dim .lbl { grid-row: 1; grid-column: 1; } .dim .val { grid-row: 1; grid-column: 2; } .dim .bar { grid-row: 2; grid-column: 1 / -1; } }
.dim .lbl { font-size: 15px; font-weight: 600; color: var(--muted); }
.dim .bar { height: 8px; border-radius: 99px; background: var(--track); overflow: hidden; }
.dim .bar i { display: block; height: 100%; width: 0; background: var(--amber); border-radius: 99px; transition: width .7s ease; }
.dim .val { font-size: 15px; font-weight: 700; color: var(--txt); text-align: right; font-variant-numeric: tabular-nums; }

.next, .ai-take { border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; margin-bottom: 26px; background: var(--bg); }
.next h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 10px; }
.next ol { padding-left: 20px; color: var(--txt); }
.next li { margin-bottom: 8px; }
.next li::marker { color: var(--num); font-weight: 700; }
.ai-take .kicker { margin-bottom: 4px; }
.ai-take h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.ai-take p { color: var(--muted); font-size: 1rem; margin-bottom: 14px; }
.share { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 6px; }
.share h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.share p { color: var(--muted); font-size: 1rem; margin-bottom: 14px; }
.share .btn { padding: 11px 18px; font-size: 0.98rem; }

.formats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
@media (max-width: 560px) { .formats { grid-template-columns: 1fr; } }
.fmt {
  display: grid; grid-template-columns: 34px 1fr 20px; gap: 12px; align-items: center; text-align: left;
  padding: 10px 12px; border-radius: 12px; cursor: pointer; color: var(--txt);
  background: var(--bg); border: 1px solid var(--line); transition: border-color .15s, background .15s;
}
.fmt:hover, .fmt:focus-visible { border-color: var(--txt); outline: none; }
.fmt.active { border-color: var(--amber); background: var(--amber-soft); }
.fmt b { display: block; font-size: 0.96rem; font-weight: 700; }
.fmt small { display: block; color: var(--muted); font-size: 0.8rem; line-height: 1.3; }
.fmt-ico { display: block; border: 2px solid var(--muted); border-radius: 3px; margin: 0 auto; }
.fmt-og { width: 30px; height: 16px; }
.fmt-square { width: 22px; height: 22px; }
.fmt-feed { width: 20px; height: 25px; }
.fmt-story { width: 16px; height: 28px; }
.fmt.active .fmt-ico { border-color: var(--txt); }
.fmt-dl { color: var(--num); font-weight: 700; text-align: center; }
.preview { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #ECE9E2; max-height: 520px; display: flex; justify-content: center; }
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.actions .btn { justify-content: center; padding: 14px 12px; white-space: nowrap; }
@media (max-width: 560px) { .actions { grid-template-columns: 1fr; } }
.actions.actions-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 420px) { .actions.actions-2 { grid-template-columns: 1fr; } }
.btn-again { width: 100%; justify-content: center; margin-top: 12px; }
.preview canvas { max-width: 100%; max-height: 520px; height: auto; width: auto; display: block; }

.cta {
  margin-top: 30px; border: 1px solid var(--line); border-radius: 20px; padding: 26px 28px;
  background: var(--bg-soft);
}
.cta h2 { margin-bottom: 8px; }
.cta p { color: var(--muted); margin-bottom: 16px; }
.cta .dot-cz { color: var(--num); }

footer { max-width: 760px; margin: 0 auto; padding: 0 20px 40px; color: var(--muted); font-size: 0.9rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
footer a { color: var(--muted); font-weight: 400; text-decoration: none; }
footer a:hover { color: var(--txt); text-decoration: underline; }

/* statický text pro roboty bez JavaScriptu (generuje scripts/ai-uroven-gen.mjs); s JS ho test nahradí */
.js .staticky { display: none; }
.staticky h2 { font-size: 1.15rem; margin: 22px 0 10px; }
.staticky ol { padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.staticky ol b { color: var(--txt); }
.staticky p { color: var(--muted); margin-top: 12px; }
.fade { animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade { animation: none; } .dim .bar i, .progress .bar i { transition: none; } }
