/* ==========================================================================
   Česky site design system — shared by /, /test, /learn.
   Tokens mirror the app palette (privacy.html uses the same family).
   Light is the base theme; dark via data-theme="dark" or auto + OS setting.
   ========================================================================== */

:root {
  --blue: #2f6bff;
  --blue-deep: #1853e8;
  --blue-soft: #eaf0ff;
  --ink: #12203a;
  --muted: #5a6982;
  --bg: #f4f7ff;
  --card: #fff;
  --soft: #eaf0ff;
  --line: #dfe7f6;
  --line-2: #eef2fb;
  --green: #0f9d6e;
  --amber: #c8871a;
  --red: #e9485b;
  --shadow-s: 0 6px 18px rgba(25, 61, 140, 0.06);
  --shadow-m: 0 14px 40px rgba(25, 61, 140, 0.09);
  --shadow-l: 0 28px 70px rgba(25, 61, 140, 0.13);
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 32px;
  --head-h: 64px;
  color-scheme: light dark;
}
html[data-theme="dark"] {
  --ink: #eaf1ff;
  --muted: #a3b1c8;
  --bg: #0a1120;
  --card: #111c2e;
  --soft: #18263f;
  --line: #26364f;
  --line-2: #1d2c44;
  --blue-deep: #89a9ff;
  --green: #3ecf9a;
  --amber: #e8b45a;
  --shadow-s: 0 6px 18px rgba(0, 0, 0, 0.22);
  --shadow-m: 0 16px 42px rgba(0, 0, 0, 0.3);
  --shadow-l: 0 28px 70px rgba(0, 0, 0, 0.4);
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    --ink: #eaf1ff;
    --muted: #a3b1c8;
    --bg: #0a1120;
    --card: #111c2e;
    --soft: #18263f;
    --line: #26364f;
    --line-2: #1d2c44;
    --blue-deep: #89a9ff;
    --green: #3ecf9a;
    --amber: #e8b45a;
    --shadow-s: 0 6px 18px rgba(0, 0, 0, 0.22);
    --shadow-m: 0 16px 42px rgba(0, 0, 0, 0.3);
    --shadow-l: 0 28px 70px rgba(0, 0, 0, 0.4);
  }
}

/* ------------------------------------------------------------------ базис */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a {
  color: var(--blue-deep);
  text-underline-offset: 3px;
}
button,
a {
  touch-action: manipulation;
}
:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 60%, #fff);
  outline-offset: 3px;
  border-radius: 6px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip {
  position: fixed;
  left: 14px;
  top: -100px;
  z-index: 90;
  padding: 11px 16px;
  border-radius: var(--r-s);
  background: var(--ink);
  color: var(--bg);
  font-weight: 700;
  text-decoration: none;
  transition: top 0.18s;
}
.skip:focus {
  top: 12px;
}
.shell {
  width: min(1180px, 100%);
  margin: auto;
  padding-inline: clamp(16px, 4vw, 40px);
}
.ic {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.topbar.stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 24px rgba(18, 32, 58, 0.06);
}
.topbar-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: min(1180px, 100%);
  margin: auto;
  min-height: var(--head-h);
  padding: 10px clamp(16px, 4vw, 40px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 1.15rem;
  font-weight: 850;
  letter-spacing: -0.035em;
  text-decoration: none;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 12px;
  background: linear-gradient(140deg, var(--blue), #5b8bff);
  color: #fff;
  box-shadow: 0 8px 20px rgba(47, 107, 255, 0.3);
}
.brand-mark svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.6;
  stroke-linecap: round;
}
.nav {
  display: flex;
  gap: 4px;
}
.nav a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: color 0.16s, background 0.16s;
}
.nav a:hover {
  color: var(--blue-deep);
  background: var(--soft);
}
.nav a[aria-current="page"] {
  color: var(--blue-deep);
  background: var(--soft);
}
.tools {
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(140deg, var(--blue), #4f80ff);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(47, 107, 255, 0.28);
  transition: transform 0.16s, box-shadow 0.16s;
}
.app-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(47, 107, 255, 0.34);
}
.iconbtn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  box-shadow: var(--shadow-s);
  transition: transform 0.16s, color 0.16s;
}
.iconbtn:hover {
  color: var(--blue-deep);
  transform: translateY(-1px);
}
.iconbtn .ic {
  width: 18px;
  height: 18px;
}
.iconbtn .ic.moon {
  display: none;
}
html[data-theme="dark"] .iconbtn .ic.moon {
  display: block;
}
html[data-theme="dark"] .iconbtn .ic.sun {
  display: none;
}
.lang {
  display: flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-s);
}
.lang button {
  min-width: 40px;
  padding: 7px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.16s;
}
.lang button:hover {
  color: var(--blue-deep);
}
.lang button[aria-pressed="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
}
.burger {
  display: none;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-s);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-s);
}
.burger .ic {
  width: 20px;
  height: 20px;
}
.burger .ic.close {
  display: none;
}
.burger[aria-expanded="true"] .ic.close {
  display: block;
}
.burger[aria-expanded="true"] .ic.open {
  display: none;
}

/* mobile menu */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow-m);
}
.mobile-menu.show {
  display: block;
}
.mobile-menu nav {
  display: grid;
  gap: 2px;
  padding: 12px clamp(16px, 4vw, 40px) 16px;
}
.mobile-menu nav a {
  padding: 13px 14px;
  border-radius: var(--r-s);
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}
.mobile-menu nav a:hover {
  background: var(--soft);
  color: var(--blue-deep);
}
.mobile-menu nav a[aria-current="page"] {
  background: var(--soft);
  color: var(--blue-deep);
}
.mobile-menu .menu-cta {
  margin: 6px 14px 14px;
}

@media (max-width: 860px) {
  .nav,
  .topbar .app-pill {
    display: none;
  }
  .burger {
    display: grid;
  }
}
@media (max-width: 420px) {
  .lang button {
    min-width: 34px;
    padding-inline: 6px;
  }
  .brand span.txt {
    font-size: 1.02rem;
  }
}

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-m);
  background: linear-gradient(140deg, var(--blue), #4f80ff);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(47, 107, 255, 0.25);
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 17px 30px rgba(47, 107, 255, 0.32);
}
.btn:active {
  transform: translateY(0);
}
.btn.secondary {
  border-color: var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-s);
}
.btn.secondary:hover {
  box-shadow: var(--shadow-m);
}
.btn.ghost {
  background: transparent;
  border-color: transparent;
  color: var(--blue-deep);
  box-shadow: none;
}
.btn.sm {
  min-height: 42px;
  padding: 9px 16px;
  font-size: 0.88rem;
  border-radius: 13px;
}
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn .ic {
  width: 19px;
  height: 19px;
}

/* ---------------------------------------------------------- store badges */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 56px;
  padding: 10px 18px 10px 14px;
  border-radius: 14px;
  background: #12203a;
  color: #fff;
  text-decoration: none;
  border: 1px solid #2a3a58;
  transition: transform 0.18s, box-shadow 0.18s;
}
html[data-theme="dark"] .store-badge {
  background: #1a2740;
  border-color: #34486b;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] .store-badge {
    background: #1a2740;
    border-color: #34486b;
  }
}
a.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
}
.store-badge .ic {
  width: 26px;
  height: 26px;
}
.store-badge small {
  display: block;
  font-size: 0.64rem;
  font-weight: 600;
  opacity: 0.75;
  letter-spacing: 0.02em;
  line-height: 1.2;
}
.store-badge strong {
  display: block;
  font-size: 1.02rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.store-badge.disabled {
  cursor: default;
  opacity: 0.82;
}
.store-badge .soon-tag {
  position: absolute;
  top: -9px;
  right: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--amber);
  color: #fff;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* ----------------------------------------------------------------- cards */
.card {
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--shadow-s);
}
.card.pad {
  padding: clamp(20px, 3.5vw, 30px);
}

/* -------------------------------------------------------------- sections */
.section {
  padding: clamp(40px, 7vw, 76px) 0;
}
.section-head {
  max-width: 640px;
  margin: 0 0 clamp(22px, 4vw, 36px);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 7px 13px;
  border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--card) 75%, transparent);
  color: var(--blue-deep);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 4.4vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.045em;
  font-weight: 850;
}
.section-head p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.02rem;
}
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------- feature */
.feature {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--card);
  box-shadow: var(--shadow-s);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
}
.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--blue);
}
.feature-icon .ic {
  width: 22px;
  height: 22px;
}
.feature h3 {
  margin: 15px 0 6px;
  font-size: 1.04rem;
  letter-spacing: -0.02em;
}
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ------------------------------------------------------------- quiz bits */
.quiz-progress {
  height: 8px;
  border-radius: 99px;
  background: var(--line-2);
  overflow: hidden;
}
.quiz-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), #7aa2ff);
  transition: width 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 15px 17px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-m);
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 0.99rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.quiz-option:hover:not([disabled]) {
  border-color: color-mix(in srgb, var(--blue) 55%, var(--line));
  background: color-mix(in srgb, var(--soft) 50%, var(--card));
  transform: translateY(-1px);
}
.quiz-option[disabled] {
  cursor: default;
}
.quiz-option .opt-key {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--soft);
  color: var(--blue-deep);
  font-size: 0.78rem;
  font-weight: 850;
}
.quiz-option.correct {
  border-color: var(--green);
  background: color-mix(in srgb, var(--green) 10%, var(--card));
  animation: pop 0.35s ease;
}
.quiz-option.correct .opt-key {
  background: var(--green);
  color: #fff;
}
.quiz-option.wrong {
  border-color: var(--red);
  background: color-mix(in srgb, var(--red) 9%, var(--card));
  animation: shake 0.4s ease;
}
.quiz-option.wrong .opt-key {
  background: var(--red);
  color: #fff;
}
.quiz-option.dim {
  opacity: 0.55;
}
.quiz-explain {
  display: flex;
  gap: 11px;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 6px 14px 14px 6px;
  border-left: 4px solid var(--blue);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.92rem;
  animation: rise 0.3s ease both;
}
.quiz-explain.good {
  border-left-color: var(--green);
  background: color-mix(in srgb, var(--green) 9%, var(--card));
}
.quiz-explain.bad {
  border-left-color: var(--red);
  background: color-mix(in srgb, var(--red) 8%, var(--card));
}
.quiz-explain .ic {
  width: 20px;
  height: 20px;
  margin-top: 2px;
}
.quiz-explain.good .ic {
  color: var(--green);
}
.quiz-explain.bad .ic {
  color: var(--red);
}

/* speak button */
.speak-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  min-width: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--blue-deep);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  box-shadow: var(--shadow-s);
  transition: transform 0.16s, box-shadow 0.16s;
}
.speak-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-m);
}
.speak-btn .ic {
  width: 19px;
  height: 19px;
}
.speak-btn.speaking {
  border-color: color-mix(in srgb, var(--blue) 50%, var(--line));
  background: var(--soft);
}
.speak-btn.speaking .ic {
  animation: pulse 1s ease infinite;
}
html.no-tts .speak-btn {
  display: none;
}

/* ------------------------------------------------------------------ tabs */
.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  box-shadow: var(--shadow-s);
  overflow-x: auto;
  scrollbar-width: none;
  max-width: 100%;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs [role="tab"] {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 17px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s, background 0.16s;
}
.tabs [role="tab"]:hover {
  color: var(--blue-deep);
}
.tabs [role="tab"][aria-selected="true"] {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 6px 14px rgba(47, 107, 255, 0.3);
}
.tabs .ic {
  width: 17px;
  height: 17px;
}

/* ------------------------------------------------------------- footer */
.footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(30px, 6vw, 60px);
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: min(1180px, 100%);
  margin: auto;
  padding: 26px clamp(16px, 4vw, 40px) 40px;
  color: var(--muted);
  font-size: 0.82rem;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
}
.footer a {
  font-weight: 700;
  text-decoration: none;
  color: var(--muted);
}
.footer a:hover {
  color: var(--blue-deep);
}

/* ------------------------------------------------------------ animations */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes pop {
  0% {
    transform: scale(1);
  }
  45% {
    transform: scale(1.025);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  55% {
    transform: translateX(4px);
  }
  80% {
    transform: translateX(-2px);
  }
}
@keyframes pulse {
  50% {
    opacity: 0.45;
  }
}
.anim-rise {
  animation: rise 0.35s ease both;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
