/* Rookeho škála – styly. Čisté CSS, mobile first, světlý i tmavý režim. */

:root {
  --bg: #f6f3ec;
  --surface: #ffffff;
  --text: #1f1e1b;
  --muted: #6d6a63;
  --accent: #b3532b;
  --accent-text: #ffffff;
  --accent-soft: #f6e4da;
  --border: #e1dcd1;
  --bar: #cfc8ba;
  --radius: 12px;
  --max-width: 42rem;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --surface: #1e2025;
    --text: #ebeae6;
    --muted: #a3a29c;
    --accent: #e08457;
    --accent-text: #1a120d;
    --accent-soft: #3a2a21;
    --border: #31343c;
    --bar: #3d4049;
  }
}

* { box-sizing: border-box; }

html { font-size: 106.25%; }

body {
  margin: 0;
  font-family: var(--font-body);
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Hlavička a patička */
.site-header { padding: 1rem 0; }
.site-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.site-footer {
  margin-top: 4rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

/* Typografie */
h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 400;
  line-height: 1.2;
  margin: 0 0 0.75rem;
}
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: 1.15rem; margin-top: 2rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.1rem; }
.muted { color: var(--muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.motto {
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--muted);
}

.screen { padding: 1.5rem 0 2rem; }
.signature {
  font-family: var(--font-heading);
  font-style: italic;
  color: var(--muted);
  margin-top: -0.25rem;
}
.actions-top { margin: 0.25rem 0 1.75rem; }
.signature a { color: inherit; }

.facts {
  list-style: none;
  padding: 0;
  margin: 0 0 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.facts li::before { content: "•"; margin-right: 0.5rem; color: var(--accent); }

/* Tlačítka */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}
.btn {
  font: inherit;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover:not(:disabled) { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Průběh */
.progress { margin-bottom: 1.5rem; }
.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.85rem;
  margin-bottom: 0.4rem;
}
.progress-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 0.3s ease;
}

/* Otázka a možnosti */
.question { margin-bottom: 1.25rem; }
.question:focus { outline: none; }

.options { display: grid; gap: 0.6rem; }
.option {
  font: inherit;
  text-align: left;
  display: grid;
  grid-template-columns: 1.75rem 1fr;
  gap: 0.75rem;
  align-items: start;
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.option:hover { border-color: var(--accent); }
.option:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.option[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.option-key {
  display: inline-grid;
  place-items: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  font-size: 0.8rem;
  background: var(--bg);
  color: var(--muted);
  border: 1px solid var(--border);
}
.option[aria-pressed="true"] .option-key {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.nav { justify-content: space-between; }
.hint { font-size: 0.8rem; margin-top: 1rem; }

/* Výsledek */
.chart { display: grid; gap: 0.45rem; margin-bottom: 1.5rem; }
.chart-row {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8rem) 1fr 3.25rem;
  gap: 0.75rem;
  align-items: center;
  font-size: 0.92rem;
}
.chart-row.is-primary { font-weight: 600; }
.chart-label { display: flex; flex-direction: column; line-height: 1.2; }
.chart-tag { font-size: 0.7rem; color: var(--accent); font-weight: 400; }
.chart-track {
  height: 1.05rem;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.chart-fill {
  height: 100%;
  width: 0;
  background: var(--bar);
  transition: width 0.5s ease;
}
.is-primary .chart-fill { background: var(--accent); }
.chart-value { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-note { font-size: 0.85rem; margin: -0.75rem 0 1.5rem; }

.keyfacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 0 0 1rem;
}
.keyfacts div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
}
.keyfacts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.keyfacts dd { margin: 0.2rem 0 0; font-family: var(--font-heading); font-size: 1.15rem; }

#result-strengths, #result-risks { padding-left: 1.2rem; }
#result-strengths li, #result-risks li { margin-bottom: 0.5rem; }

.honest, .notice, .teaser {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 2rem 0 0;
  font-size: 0.95rem;
}
.honest { background: var(--surface); border: 1px solid var(--border); }
.notice { background: var(--accent-soft); border: 1px solid var(--accent); margin: 1rem 0; }
.teaser { background: var(--accent-soft); margin-top: 2.5rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1rem; }
.contact-actions:empty { display: none; }
.contact-actions .btn { text-decoration: none; display: inline-block; }

/* Tisk: jen výsledek, bez tlačítek */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .actions, .hint, .teaser, #copy-status { display: none !important; }
  .screen { padding: 0; }
  .chart-fill { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

@media (prefers-reduced-motion: reduce) {
  .progress-fill, .chart-fill, .btn, .option { transition: none; }
}

/* Stránka O modelu */
a { color: var(--accent); }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: 0.9rem; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.prose { padding: 1.5rem 0 2rem; }
.prose h2 { font-size: 1.45rem; margin-top: 2.5rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.6rem; }
.prose .btn { text-decoration: none; display: inline-block; }
.small { font-size: 0.85rem; }

.table-wrap { overflow-x: auto; margin-bottom: 0.75rem; }
.levels { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.levels th, .levels td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.levels th {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 500;
}
.levels th:last-child, .levels td:last-child { text-align: right; white-space: nowrap; }
.level-en { color: var(--muted); font-size: 0.85rem; }

/* Tabulka logik na úzkém displeji: heslo pod názvem místo úzkého sloupce */
@media (max-width: 30rem) {
  .levels thead { display: none; }
  .levels tr {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0 1rem;
    padding: 0.7rem 0;
    border-bottom: 1px solid var(--border);
  }
  .levels td { display: block; border: 0; padding: 0; }
  .levels td:nth-child(1) { grid-row: 1; grid-column: 1; }
  .levels td:nth-child(3) { grid-row: 1; grid-column: 2; align-self: start; }
  .levels td:nth-child(2) { grid-row: 2; grid-column: 1 / -1; color: var(--muted); font-style: italic; margin-top: 0.2rem; }
}
