/* ==========================================================================
   TrailSafe – vzhled. Barvy jako tokeny, tmavý režim podle systému.
   ========================================================================== */
:root {
  --forest-950: #07130d;
  --forest-900: #0d1f17;
  --forest-800: #143024;
  --forest-700: #1d4433;
  --lime: #c6f432;
  --lime-600: #a3d117;
  --lime-soft: #f1fccf;

  --bg: #f4f6f1;
  --surface: #ffffff;
  --surface-2: #f8faf6;
  --ink: #0e1a14;
  --ink-2: #2b3a32;
  --muted: #64746b;
  --line: #e2e8e0;
  --line-strong: #cfd8cc;

  --ok: #16a34a;     --ok-bg: #e8f7ee;
  --warn: #b45309;   --warn-bg: #fdf3e2;
  --bad: #dc2626;    --bad-bg: #fdecec;
  --info: #0e7490;   --info-bg: #e5f5f8;

  --primary: var(--forest-900);
  --primary-ink: #ffffff;

  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(14, 26, 20, .04), 0 8px 24px -12px rgba(14, 26, 20, .12);
  --shadow-lg: 0 2px 4px rgba(14, 26, 20, .04), 0 24px 48px -20px rgba(14, 26, 20, .25);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08110c;
    --surface: #0f1c15;
    --surface-2: #13231a;
    --ink: #e7efe9;
    --ink-2: #c5d2c9;
    --muted: #8a9a90;
    --line: #1f3228;
    --line-strong: #2a4235;
    --ok: #4ade80;     --ok-bg: rgba(74, 222, 128, .12);
    --warn: #fbbf24;   --warn-bg: rgba(251, 191, 36, .12);
    --bad: #f87171;    --bad-bg: rgba(248, 113, 113, .12);
    --info: #67e8f9;   --info-bg: rgba(103, 232, 249, .1);
    --primary: var(--lime);
    --primary-ink: var(--forest-950);
    --lime-soft: rgba(198, 244, 50, .1);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 48px -20px rgba(0, 0, 0, .7);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.75rem, 4vw + .5rem, 2.6rem); font-weight: 800; }
h2 { font-size: 1.45rem; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 700; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none;
        stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 16px; }
main { padding-bottom: 64px; }

/* ---------- Horní lišta ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--forest-900) 92%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.topbar .container { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: -.02em; font-size: 1.1rem; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--lime);
  display: grid; place-items: center; color: var(--forest-950);
}
.brand-mark .icon { width: 20px; height: 20px; stroke-width: 2.4; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a, .nav button {
  color: rgba(255, 255, 255, .75); text-decoration: none; font-weight: 600; font-size: .92rem;
  padding: 8px 12px; border-radius: 10px; background: none; border: 0; cursor: pointer;
  font-family: inherit; display: flex; align-items: center; gap: 8px;
}
.nav a:hover, .nav button:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav a.active { color: var(--lime); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--forest-700); color: var(--lime);
  display: grid; place-items: center; font-weight: 800; font-size: .8rem; letter-spacing: .02em;
}
@media (max-width: 640px) {
  .nav .label { display: none; }
  .nav a, .nav button { padding: 8px; }
}

/* ---------- Hero s vrstevnicemi ---------- */
.hero {
  position: relative; overflow: hidden;
  background: var(--forest-900);
  color: #fff;
  padding: 40px 0 88px;
}
.hero::before {
  content: ''; position: absolute; inset: 0; opacity: .5; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='300' viewBox='0 0 600 300'%3E%3Cg fill='none' stroke='%23c6f432' stroke-opacity='.13' stroke-width='1.2'%3E%3Cpath d='M-20 240c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 210c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 180c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 150c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 120c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 90c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 60c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 270c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3Cpath d='M-20 300c80-40 120-110 210-100s110 80 200 60 140-110 230-90'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 600px 300px;
}
.hero::after {
  content: ''; position: absolute; width: 520px; height: 520px; right: -140px; top: -220px;
  background: radial-gradient(circle, rgba(198, 244, 50, .22), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero .eyebrow { color: var(--lime); }
.hero p { color: rgba(255, 255, 255, .72); }
.hero-grid { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
@media (max-width: 720px) {
  .hero-grid { grid-template-columns: 1fr auto; gap: 16px; align-items: start; }
  .hero-grid .ring { --size: 96px; }
  .hero-grid .actions { flex-direction: column; align-items: stretch; margin-right: -112px; }
  .hero-grid .ring::before { inset: 9px; }
  .hero-grid .ring-label strong { font-size: 1.5rem; }
  .hero { padding-top: 24px; }
}
.pull-up { margin-top: -56px; position: relative; z-index: 2; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

/* ---------- Kruhový postup ---------- */
.ring {
  --p: 0; --size: 148px;
  width: var(--size); height: var(--size); border-radius: 50%;
  background: conic-gradient(var(--lime) calc(var(--p) * 1%), rgba(255, 255, 255, .1) 0);
  display: grid; place-items: center; position: relative;
  animation: ring-in 1s cubic-bezier(.2, .8, .2, 1);
}
.ring::before { content: ''; position: absolute; inset: 12px; border-radius: 50%; background: var(--forest-900); }
.ring-label { position: relative; text-align: center; line-height: 1.1; }
.ring-label strong { display: block; font-size: 2.2rem; font-weight: 800; letter-spacing: -.04em; }
.ring-label span { font-size: .75rem; color: rgba(255, 255, 255, .6); font-weight: 600; }
@property --p { syntax: '<number>'; inherits: false; initial-value: 0; }
@keyframes ring-in { from { --p: 0; } }

/* ---------- Karty ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 24px;
}
.card + .card { margin-top: 16px; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-title h2, .card-title h3 { margin: 0; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stack > * + * { margin-top: 16px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }

/* Akční karta – další krok */
.next-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 20px 24px;
}
.next-card h3 { margin: 0 0 2px; font-size: 1.2rem; }
.next-card p { margin: 0; }
@media (max-width: 640px) {
  .next-card { grid-template-columns: auto 1fr; }
  .next-card > .btn, .next-card > .actions, .next-card > .chip { grid-column: 1 / -1; justify-content: center; }
  .next-card > .actions > * { flex: 1; }
  .next-card > .actions .btn { width: 100%; }
}

/* Dlaždice ikon */
.tile {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--lime-soft); color: var(--forest-800); flex: none;
}
.tile .icon { width: 26px; height: 26px; }
.tile-dark { background: var(--forest-900); color: var(--lime); }
@media (prefers-color-scheme: dark) { .tile { color: var(--lime); } .tile-dark { background: var(--lime); color: var(--forest-950); } }

/* ---------- Seznam modulů ---------- */
.modules { display: grid; gap: 12px; }
.module-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
a.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.module-card .num { font-size: .75rem; font-weight: 800; color: var(--muted); letter-spacing: .08em; }
.module-card h3 { margin: 0; font-size: 1.02rem; }
.module-card p { margin: 0; font-size: .875rem; color: var(--muted); }
.module-card.locked { opacity: .55; }
.module-card.locked .tile { background: var(--surface-2); color: var(--muted); }
.module-card.done .tile { background: var(--ok-bg); color: var(--ok); }
.module-card.current { border-color: var(--lime-600); box-shadow: 0 0 0 3px var(--lime-soft), var(--shadow); }
.module-meta { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); font-weight: 600; white-space: nowrap; }

/* ---------- Čipy stavu ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--surface-2); color: var(--muted);
}
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-ok { background: var(--ok-bg); color: var(--ok); }
.chip-warn { background: var(--warn-bg); color: var(--warn); }
.chip-bad { background: var(--bad-bg); color: var(--bad); }
.chip-info { background: var(--info-bg); color: var(--info); }
.chip-lime { background: var(--lime); color: var(--forest-950); }
.chip-plain::before { display: none; }

/* ---------- Tlačítka ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  padding: 12px 20px; border-radius: 14px; border: 1px solid transparent;
  font-family: inherit; font-weight: 700; font-size: .95rem; line-height: 1.2;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .1s ease, background .15s ease, box-shadow .15s ease;
  background: var(--surface-2); color: var(--ink); border-color: var(--line);
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.btn-primary:hover { box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--primary) 70%, transparent); }
.btn-lime { background: var(--lime); color: var(--forest-950); border-color: transparent; }
.btn-lime:hover { background: #d4ff4a; box-shadow: 0 10px 24px -10px rgba(198, 244, 50, .7); }
.btn-ghost { background: transparent; border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-ghost-dark { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .14); }
.btn-ghost-dark:hover { background: rgba(255, 255, 255, .14); }
.btn-danger { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.btn-lg { padding: 16px 26px; font-size: 1.05rem; border-radius: 16px; }
.btn-sm { padding: 8px 12px; font-size: .85rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Formuláře ---------- */
label { font-weight: 700; font-size: .9rem; display: block; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: .82rem; color: var(--muted); margin-top: 6px; }
input[type=text], input[type=email], input[type=number], input[type=search], select, textarea {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--ink);
  padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lime-600); box-shadow: 0 0 0 4px var(--lime-soft); }
textarea { min-height: 140px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--forest-700); flex: none; }

/* ---------- Hlášky ---------- */
.flashes { position: fixed; top: 76px; right: 16px; left: 16px; z-index: 50; display: grid; gap: 8px; justify-items: end; pointer-events: none; }
.flash {
  pointer-events: auto; max-width: 440px; width: 100%;
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  font-weight: 600; font-size: .92rem; animation: slide-in .35s cubic-bezier(.2, .8, .2, 1);
}
.flash .icon { margin-top: 2px; }
.flash-success .icon { color: var(--ok); }
.flash-error .icon { color: var(--bad); }
.flash-info .icon { color: var(--info); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } }

/* ---------- Přihlášení ---------- */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-visual {
  position: relative; overflow: hidden; background: var(--forest-900); color: #fff;
  padding: 48px; display: flex; flex-direction: column; gap: 12vh;
}
.auth-visual .hero-art { position: absolute; inset: auto 0 0 0; width: 100%; height: 55%; z-index: 0; }
.auth-visual > :not(.hero-art) { position: relative; z-index: 1; }
.auth-visual .eyebrow { color: var(--lime); }
.auth-visual h1 { font-size: clamp(2rem, 3vw + 1rem, 3.2rem); max-width: 12ch; }
.auth-visual h1 em { font-style: normal; color: var(--lime); }
.auth-feats { display: grid; gap: 12px; margin-top: 24px; max-width: 380px; }
.auth-feats div { display: flex; gap: 12px; align-items: center; color: rgba(255, 255, 255, .85); font-weight: 600; }
.auth-feats .icon { color: var(--lime); }
.auth-form { display: grid; place-items: center; padding: 32px 16px; }
.auth-form .box { width: 100%; max-width: 400px; }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-form { align-items: start; }
  .auth-visual { padding: 28px 20px 150px; min-height: 0; gap: 28px; }
  .auth-visual .auth-feats { display: none; }
  .auth-visual .hero-art { height: 150px; }
  .auth-form { padding-top: 0; margin-top: -40px; position: relative; z-index: 2; }
  .auth-form .box { background: var(--surface); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
}
.big-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--lime-soft); color: var(--forest-800); margin-bottom: 20px; }
.big-icon .icon { width: 36px; height: 36px; }
@media (prefers-color-scheme: dark) { .big-icon { color: var(--lime); } }

/* ---------- Modul: kroky ---------- */
.module-head { padding: 28px 0 80px; }
.module-head .crumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; font-weight: 600; margin-bottom: 18px; }
.module-head .crumbs a { color: rgba(255, 255, 255, .7); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.module-head .crumbs a:hover { color: #fff; }
.stepper { display: flex; gap: 6px; margin-top: 24px; }
.stepper span { flex: 1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .14); transition: background .3s; }
.stepper span.on { background: var(--lime); }

.step { display: none; animation: fade-up .35s cubic-bezier(.2, .8, .2, 1); }
.step.active { display: block; }
.no-js .step { display: block; margin-bottom: 16px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }
.step-card { padding: 32px; }
@media (max-width: 640px) { .step-card { padding: 22px 18px; } }
.step-count { font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }

.prose { font-size: 1.04rem; color: var(--ink-2); }
.prose h2 { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--lime-600); font-weight: 800; }
.prose strong { color: var(--ink); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .98rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.prose td:first-child strong { font-size: 1.2rem; color: var(--bad); }

.admonition {
  --c: var(--info); --b: var(--info-bg);
  background: var(--b); border-radius: 16px; padding: 16px 18px 16px 52px; margin: 20px 0;
  position: relative; color: var(--ink);
}
.admonition::before {
  content: ''; position: absolute; left: 16px; top: 17px; width: 22px; height: 22px; background: var(--c);
  -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat;
}
.admonition p:last-child, .admonition ul:last-child { margin-bottom: 0; }
.admonition-title { font-weight: 800; color: var(--c); margin-bottom: 4px !important; }
.admonition.tip { --c: var(--ok); --b: var(--ok-bg);
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.admonition.warning { --c: var(--warn); --b: var(--warn-bg);
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.9 1.8 18a2 2 0 0 0 1.7 3h17a2 2 0 0 0 1.7-3L13.7 3.9a2 2 0 0 0-3.4 0zM12 9v4M12 17h.01'/%3E%3C/svg%3E"); }
.admonition.danger { --c: var(--bad); --b: var(--bad-bg);
  --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m4.9 4.9 14.2 14.2'/%3E%3C/svg%3E"); }

.step-nav {
  position: sticky; bottom: 0; z-index: 10; margin-top: 16px;
  display: flex; justify-content: space-between; gap: 10px; padding: 12px 0 16px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}

/* ---------- Kvíz ---------- */
.question { padding: 24px; }
.question + .question { margin-top: 12px; }
.q-num { font-size: .78rem; font-weight: 800; color: var(--muted); letter-spacing: .08em; }
.q-text { font-size: 1.08rem; font-weight: 700; margin: 4px 0 16px; }
.options { display: grid; gap: 10px; }
.option { position: relative; display: block; margin: 0; font-weight: 600; cursor: pointer; }
.option input { position: absolute; opacity: 0; }
.option span {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line-strong); background: var(--surface); transition: all .15s ease; font-size: .98rem;
}
.option span::before {
  content: attr(data-letter); flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); font-weight: 800; font-size: .85rem; color: var(--muted);
}
.option:hover span { border-color: var(--forest-700); }
.option input:checked + span { border-color: var(--forest-800); background: var(--lime-soft); box-shadow: 0 0 0 3px var(--lime-soft); }
.option input:checked + span::before { background: var(--forest-900); color: var(--lime); border-color: transparent; }
.option input:focus-visible + span { outline: 3px solid var(--lime-600); outline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  .option input:checked + span { border-color: var(--lime); }
  .option input:checked + span::before { background: var(--lime); color: var(--forest-950); }
}
.answer { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; margin-top: 8px; font-weight: 600; font-size: .95rem; align-items: flex-start; }
.answer .icon { margin-top: 2px; }
.answer-ok { background: var(--ok-bg); color: var(--ok); }
.answer-bad { background: var(--bad-bg); color: var(--bad); }
.answer small { display: block; color: var(--ink-2); font-weight: 500; }
.why { margin-top: 10px; font-size: .92rem; color: var(--muted); }

.test-bar {
  position: sticky; top: 64px; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.test-bar .container-narrow { display: flex; align-items: center; gap: 16px; }
.progress { flex: 1; height: 8px; background: var(--surface-2); border-radius: 99px; overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--lime-600), var(--lime)); border-radius: 99px; transition: width .3s ease; }

/* ---------- Výsledek ---------- */
.result-hero { text-align: center; padding: 48px 0 96px; }
.result-hero .ring { margin: 0 auto 20px; --size: 170px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 14px; border-radius: 2px; opacity: .9; animation: fall linear forwards; }
@keyframes fall { to { transform: translateY(460px) rotate(540deg); opacity: 0; } }

/* ---------- Checklist ---------- */
.checklist-group h3 { display: flex; align-items: center; gap: 10px; }
.check-item {
  display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px;
  border: 1.5px solid var(--line); margin-top: 8px; cursor: pointer; font-weight: 600; transition: all .15s;
  user-select: none; -webkit-user-select: none;
}
.check-item input { display: none; }
.check-item .box { width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--line-strong); display: grid; place-items: center; flex: none; transition: all .15s; }
.check-item .box .icon { width: 16px; height: 16px; stroke-width: 3; opacity: 0; color: var(--forest-950); }
.check-item.on { background: var(--ok-bg); border-color: transparent; }
.check-item.on .box { background: var(--lime); border-color: var(--lime); }
.check-item.on .box .icon { opacity: 1; }
.check-item small { display: block; color: var(--muted); font-weight: 500; font-size: .85rem; }

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 16px 18px;
  text-decoration: none; color: inherit; display: block; transition: border-color .15s, transform .15s;
}
a.stat:hover { border-color: var(--line-strong); transform: translateY(-1px); }
a.stat.selected { border-color: var(--forest-700); box-shadow: 0 0 0 3px var(--lime-soft); }
.stat .v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.stat .l { font-size: .82rem; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot-ok { background: var(--ok) !important; } .dot-warn { background: var(--warn) !important; }
.dot-bad { background: var(--bad) !important; } .dot-info { background: var(--info) !important; }
.stat-hero { background: var(--forest-900); color: #fff; border-color: transparent; }
.stat-hero .l { color: rgba(255, 255, 255, .65); }
.stat-hero .v { color: var(--lime); }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 20px 0 12px; }
.toolbar form { flex: 1; min-width: 220px; position: relative; }
.toolbar form .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.toolbar input[type=search] { padding-left: 42px; }

.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.data { width: 100%; border-collapse: collapse; }
table.data th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 12px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
table.data td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { cursor: pointer; transition: background .1s; }
table.data tbody tr:hover { background: var(--surface-2); }
.person { display: flex; gap: 12px; align-items: center; }
.person .avatar { background: var(--lime-soft); color: var(--forest-800); }
@media (prefers-color-scheme: dark) { .person .avatar { color: var(--lime); } }
.person b { display: block; font-weight: 700; }
.person small { color: var(--muted); }
.mini-progress { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--muted); font-weight: 600; }
.mini-progress .progress { width: 80px; flex: none; height: 6px; }
@media (max-width: 720px) {
  table.data thead { display: none; }
  table.data tr { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; border-bottom: 1px solid var(--line); gap: 8px; }
  table.data td { padding: 0; border: 0; }
  table.data td.hide-sm { display: none; }
}
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .big-icon { margin: 0 auto 16px; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.timeline li::before { content: ''; position: absolute; left: 15px; top: 38px; bottom: -10px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dotc { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.timeline .dotc .icon { width: 16px; height: 16px; }
.timeline .done .dotc { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.timeline b { display: block; font-weight: 700; }
.timeline small { color: var(--muted); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; font-size: .95rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }

hr.sep { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 32px 16px; }
.center { text-align: center; }
.ring-label .icon { width: 44px; height: 44px; margin: 0 auto 4px; color: var(--lime); }

/* Provozovatel a garant */
.footer strong { color: var(--ink-2); }
.footer-brand { margin-bottom: 2px; }
.guarantor {
  display: flex; gap: 14px; align-items: center; max-width: 420px;
  padding: 14px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.guarantor .avatar { width: 44px; height: 44px; background: var(--lime); color: var(--forest-950); flex: none; }
.guarantor small { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--lime); }
.guarantor b { display: block; font-size: 1rem; }
.guarantor span:not(.avatar) { display: block; font-size: .85rem; color: rgba(255, 255, 255, .7); line-height: 1.35; }
.auth-credit { display: none; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); text-align: center; line-height: 1.5; }
.auth-credit strong { color: var(--ink-2); }
@media (max-width: 860px) { .guarantor { display: none; } .auth-credit { display: block; } }
