/* Умножайка — таблица умножения онлайн */
:root {
  --bg-a: #dff3f6;
  --bg-b: #eef8e8;
  --bg-c: #fff6e8;
  --ink: #14353a;
  --ink-soft: #3d5f66;
  --muted: #6a8a90;
  --primary: #0b8a8f;
  --primary-deep: #06666b;
  --primary-soft: #d4f1f2;
  --accent: #ff8a3d;
  --accent-deep: #e56f1f;
  --accent-soft: #ffe8d6;
  --success: #1f9d6a;
  --success-soft: #d8f5e8;
  --danger: #e25555;
  --danger-soft: #ffe0e0;
  --card: rgba(255, 255, 255, 0.78);
  --stroke: rgba(20, 53, 58, 0.1);
  --shadow: 0 18px 50px rgba(10, 70, 80, 0.12);
  --radius: 22px;
  --radius-sm: 14px;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, sans-serif;
  --max: 1120px;
  --nav-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, #b8ebea 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #ffe0b8 0%, transparent 50%),
    radial-gradient(800px 500px at 50% 100%, #d5f0c8 0%, transparent 55%),
    linear-gradient(165deg, var(--bg-a), var(--bg-b) 45%, var(--bg-c));
  background-attachment: fixed;
  line-height: 1.55;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(11, 138, 143, 0.08) 0 2px, transparent 3px),
    radial-gradient(circle at 80% 70%, rgba(255, 138, 61, 0.1) 0 2px, transparent 3px);
  background-size: 48px 48px, 64px 64px;
  z-index: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--primary-deep);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-deep);
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid var(--stroke);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--nav-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.logo-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--primary), #14b8a6);
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 8px 20px rgba(11, 138, 143, 0.35);
  animation: bob 3.2s ease-in-out infinite;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-soft);
  color: var(--primary-deep);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), #ff6b2c) !important;
  color: #fff !important;
  box-shadow: 0 8px 18px rgba(255, 107, 44, 0.28);
}

.nav-cta:hover {
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 3.5rem 0 2.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 2.5rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--primary-deep);
  background: var(--primary-soft);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.hero h1,
.page-hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 1.5rem;
}

.hero-actions,
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  appearance: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 1rem;
  padding: 0.9rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #12a8ae);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 138, 143, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  color: #fff;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ff6b2c);
  color: #fff;
  box-shadow: 0 12px 28px rgba(255, 107, 44, 0.28);
}

.btn-accent:hover {
  transform: translateY(-2px);
  color: #fff;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border: 1px solid var(--stroke);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}

.btn-sm {
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
}

.hero-visual {
  position: relative;
  min-height: 340px;
}

.float-card {
  position: absolute;
  background: var(--card);
  backdrop-filter: blur(10px);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.2rem;
  animation: floatY 4.5s ease-in-out infinite;
}

.float-card.main {
  inset: 12% 8% auto auto;
  width: min(280px, 80%);
  padding: 1.4rem;
  animation-delay: 0s;
}

.float-card.score {
  left: 0;
  bottom: 18%;
  animation-delay: 0.6s;
}

.float-card.timer {
  right: 0;
  bottom: 8%;
  animation-delay: 1.1s;
}

.float-equation {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin: 0.2rem 0 0.6rem;
}

.pill {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.pill.ok {
  background: var(--success-soft);
  color: var(--success);
}

/* Sections */
.section {
  padding: 2.75rem 0;
  position: relative;
  z-index: 1;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.section-head h2,
.page-hero h2,
.content-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
  margin: 0;
}

.section-head p,
.muted {
  color: var(--muted);
  margin: 0.35rem 0 0;
}

.page-hero {
  padding: 2.5rem 0 1rem;
}

.page-hero .lead {
  margin-bottom: 1rem;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.card {
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: 0 10px 30px rgba(10, 70, 80, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  text-decoration: none;
  color: inherit;
  display: block;
  animation: riseIn 0.6s ease both;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  color: inherit;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
  background: var(--primary-soft);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 0 0 0.45rem;
}

.card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.card:nth-child(2) .card-icon { background: var(--accent-soft); }
.card:nth-child(3) .card-icon { background: #e8e4ff; }
.card:nth-child(4) .card-icon { background: #ffe8ef; }
.card:nth-child(5) .card-icon { background: #e4f5ff; }
.card:nth-child(6) .card-icon { background: #eaf8df; }

/* Multiplication table */
.table-wrap {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1rem;
  overflow: auto;
  box-shadow: var(--shadow);
}

.mult-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 4px;
  min-width: 520px;
}

.mult-table th,
.mult-table td {
  text-align: center;
  font-weight: 800;
  border-radius: 10px;
  padding: 0.55rem 0.35rem;
  min-width: 42px;
}

.mult-table th {
  background: var(--primary);
  color: #fff;
}

.mult-table td {
  background: #f4fbfb;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}

.mult-table td:hover {
  background: var(--accent-soft);
  transform: scale(1.06);
}

.mult-table td.highlight {
  background: var(--accent);
  color: #fff;
  animation: pulsePop 0.45s ease;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.chip {
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink-soft);
  font-weight: 800;
  font-family: var(--font-body);
  border-radius: 999px;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  transition: 0.18s;
}

.chip:hover,
.chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Trainer panel */
.trainer {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.25rem;
}

.panel {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat {
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  text-align: center;
}

.stat:nth-child(2) { background: var(--accent-soft); }
.stat:nth-child(3) { background: var(--success-soft); }

.stat-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
}

.question {
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.question-eq {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0.4rem 0 1.2rem;
  animation: riseIn 0.35s ease;
}

.answer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  align-items: center;
}

.answer-input {
  width: min(160px, 40vw);
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  padding: 0.55rem 0.7rem;
  border-radius: 16px;
  border: 2px solid var(--stroke);
  outline: none;
  background: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.answer-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(11, 138, 143, 0.15);
}

.feedback {
  min-height: 1.6rem;
  margin-top: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.feedback.ok { color: var(--success); }
.feedback.bad { color: var(--danger); }

.settings {
  display: grid;
  gap: 0.9rem;
}

.settings label {
  display: grid;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.settings select,
.settings input[type="number"] {
  font: inherit;
  font-weight: 700;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: #fff;
  color: var(--ink);
}

.progress-bar {
  height: 10px;
  background: #e7f2f3;
  border-radius: 999px;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar > span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--primary), #2dd4bf);
  border-radius: inherit;
  transition: width 0.35s ease;
}

.result-box {
  text-align: center;
  padding: 1rem 0;
}

.result-grade {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulsePop 0.6s ease;
}

.choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  margin-top: 0.5rem;
}

.choice-btn {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  padding: 1rem;
  border-radius: 16px;
  border: 2px solid var(--stroke);
  background: #fff;
  cursor: pointer;
  transition: 0.18s;
}

.choice-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.choice-btn.correct {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.choice-btn.wrong {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

/* Game */
.game-arena {
  position: relative;
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(11, 138, 143, 0.12), rgba(255, 138, 61, 0.1)),
    #fff;
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
}

.balloon {
  position: absolute;
  width: 92px;
  height: 92px;
  border-radius: 50% 50% 48% 48%;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 -10px 20px rgba(0, 0, 0, 0.12), 0 10px 20px rgba(0, 0, 0, 0.12);
  animation: riseBalloon linear forwards;
  transition: transform 0.15s;
}

.balloon::after {
  content: "";
  position: absolute;
  bottom: -14px;
  width: 2px;
  height: 16px;
  background: rgba(255, 255, 255, 0.7);
}

.balloon:hover {
  transform: scale(1.06);
}

.balloon.pop {
  animation: popOut 0.35s ease forwards;
}

/* Listen / learn */
.learn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.learn-item {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 0.9rem;
  text-align: center;
  cursor: pointer;
  font-weight: 800;
  transition: 0.18s;
}

.learn-item:hover,
.learn-item.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.audio-player {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 1rem;
}

/* Content SEO blocks */
.content-block {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  margin-top: 1.5rem;
}

.content-block p {
  color: var(--ink-soft);
}

.content-block ul {
  color: var(--ink-soft);
  padding-left: 1.2rem;
}

.faq details {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
}

.faq summary {
  font-weight: 800;
  cursor: pointer;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--primary);
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2rem;
  border-top: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.55);
  position: relative;
  z-index: 1;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.5rem;
}

.site-footer h3 {
  font-family: var(--font-display);
  margin: 0 0 0.7rem;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer li {
  margin-bottom: 0.4rem;
}

.site-footer a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 700;
}

.site-footer a:hover {
  color: var(--primary);
}

.copy {
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Animations */
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulsePop {
  0% { transform: scale(0.85); }
  60% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

@keyframes riseBalloon {
  from { transform: translateY(20px); opacity: 0; }
  10% { opacity: 1; }
  to { transform: translateY(-480px); opacity: 1; }
}

@keyframes popOut {
  to { transform: scale(1.4); opacity: 0; }
}

.confetti-piece {
  position: fixed;
  width: 8px;
  height: 12px;
  top: -20px;
  z-index: 200;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  pointer-events: none;
}

@keyframes confettiFall {
  to { transform: translateY(110vh) rotate(720deg); opacity: 0.2; }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Responsive */
@media (max-width: 960px) {
  .hero,
  .trainer {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 260px;
    order: -1;
  }

  .cards {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(var(--nav-h) + 1px);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.75rem;
    border-bottom: 1px solid var(--stroke);
    gap: 0.25rem;
  }

  .nav-links.open {
    display: flex;
  }

  .cards,
  .stats,
  .footer-grid,
  .choices {
    grid-template-columns: 1fr;
  }

  .float-card.timer {
    display: none;
  }

  .mode-tabs {
    grid-template-columns: 1fr 1fr;
  }

  .truth-row {
    flex-direction: column;
  }
}

/* ===== 5 modes + stats ===== */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.mode-tab {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.75rem 0.5rem;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-soft);
  cursor: pointer;
  transition: 0.18s;
}

.mode-tab:hover {
  border-color: var(--primary);
  color: var(--primary-deep);
}

.mode-tab.active {
  background: linear-gradient(135deg, var(--primary), #12a8ae);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 10px 22px rgba(11, 138, 143, 0.25);
}

.factor-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.5rem 0 1rem;
}

.factor-grid label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  font-size: 0.92rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--stroke);
  cursor: pointer;
  user-select: none;
}

.factor-grid input {
  accent-color: var(--primary);
}

.modes-hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.flash-card {
  position: relative;
  width: min(100%, 360px);
  margin: 0 auto;
  min-height: 160px;
  border: none;
  border-radius: 22px;
  background: linear-gradient(145deg, #0b8a8f, #14b8a6);
  color: #fff;
  box-shadow: var(--shadow);
  cursor: pointer;
  perspective: 800px;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  font-weight: 700;
  transition: transform 0.25s ease;
}

.flash-card:hover {
  transform: translateY(-3px);
}

.flash-card .flash-back {
  display: none;
}

.flash-card.flipped {
  background: linear-gradient(145deg, #ff8a3d, #ff6b2c);
}

.flash-card.flipped .flash-front {
  display: none;
}

.flash-card.flipped .flash-back {
  display: block;
}

.truth-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.truth-btn {
  min-width: 140px;
}

.heat-table td.heat-empty {
  background: #f3f7f8;
  color: #9aafb4;
}

.heat-table td.heat-good {
  background: #b8f0d4;
  color: #0f6b45;
}

.heat-table td.heat-mid {
  background: #ffe3b5;
  color: #8a5a10;
}

.heat-table td.heat-bad {
  background: #ffc9c9;
  color: #9b1c1c;
}

.factor-stat {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 0.75rem 0.9rem;
  display: grid;
  gap: 0.35rem;
}

.factor-stat strong {
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.mini-bar {
  height: 8px;
  background: #e7f2f3;
  border-radius: 999px;
  overflow: hidden;
}

.mini-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #2dd4bf);
}

#st-factors {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.65rem;
}

#st-history {
  list-style: none;
  margin: 0;
  padding: 0;
}

#st-history li {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  margin-bottom: 0.35rem;
  background: #fff;
  border: 1px solid var(--stroke);
  font-weight: 700;
}

#st-history li.ok {
  border-color: rgba(31, 157, 106, 0.35);
}

#st-history li.bad {
  border-color: rgba(226, 85, 85, 0.35);
}

@media (max-width: 960px) {
  .modes-hud {
    grid-template-columns: 1fr 1fr;
  }

  .mode-tabs {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Print sheet */
.print-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.print-blanks {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.print-col {
  background: #fff;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 0.85rem 1rem;
}

.print-col h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}

.print-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-weight: 700;
  line-height: 1.7;
}

.print-table td.print-head {
  background: var(--primary) !important;
  color: #fff !important;
}

@media (max-width: 900px) {
  .print-blanks {
    grid-template-columns: 1fr 1fr;
  }
}

/* Author info block */
.author-info-block {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 0.85rem 0;
  background: linear-gradient(105deg, rgba(11, 138, 143, 0.12), rgba(255, 138, 61, 0.14));
  border-bottom: 1px solid var(--stroke);
}

.author-info-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}

.author-info-mark {
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--primary), #14b8a6);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(11, 138, 143, 0.28);
}

.author-info-text {
  min-width: 0;
}

.author-info-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.15rem;
}

.author-info-text p {
  margin: 0;
  color: var(--ink-soft);
  font-weight: 700;
  font-size: 0.98rem;
}

.author-info-by {
  margin-top: 0.25rem !important;
  color: var(--primary-deep) !important;
  font-size: 0.92rem !important;
}

/* Footer legal */
.footer-legal {
  margin-top: 1.25rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--stroke);
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-weight: 800;
  font-size: 0.92rem;
}

.footer-legal-links a,
.footer-cookie-settings {
  color: var(--primary-deep);
  text-decoration: none;
}

.footer-legal-links a:hover,
.footer-cookie-settings:hover {
  color: var(--accent-deep);
  text-decoration: underline;
}

.footer-cookie-settings {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.footer-legal-note {
  margin: 0;
  max-width: 72rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  font-weight: 600;
}

.footer-legal-note a {
  color: var(--primary-deep);
  font-weight: 800;
}

/* Cookie consent */
.cookie-consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  padding: 0.85rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px));
  background: rgba(20, 53, 58, 0.94);
  color: #fff;
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.cookie-consent-inner {
  width: min(100%, var(--max));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cookie-consent-copy {
  min-width: 0;
  flex: 1;
}

.cookie-consent-copy strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.cookie-consent-copy p {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
}

.cookie-consent-copy a {
  color: #9fe7e4;
  font-weight: 800;
  text-underline-offset: 2px;
}

.cookie-consent-copy a:hover {
  color: #fff;
}

.cookie-decline-link {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  color: #ffd0b0;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-decline-link:hover,
.cookie-decline-link:focus-visible {
  color: #fff;
}

.cookie-accept-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.cookie-accept-btn:focus-visible,
.cookie-decline-link:focus-visible,
.footer-cookie-settings:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@media (max-width: 720px) {
  .cookie-consent-inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-accept-btn {
    width: 100%;
  }

  .author-info-inner {
    gap: 0.65rem;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  body::before,
  .site-header,
  .site-footer,
  .no-print,
  .nav-toggle,
  .hero-actions,
  .cta-row,
  .cookie-consent-banner,
  .author-info-block {
    display: none !important;
  }

  .container {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .print-sheet {
    padding: 0;
  }

  .table-wrap,
  .print-col,
  .panel,
  .content-block {
    box-shadow: none !important;
    border-color: #ccc !important;
  }

  .print-blanks {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
  }

  .print-col {
    break-inside: avoid;
    border-radius: 0;
    padding: 0.4rem;
  }

  .mult-table th,
  .mult-table td {
    padding: 0.35rem !important;
    font-size: 12px;
  }
}
