/* Ohrana Trainer — mobile mnemonic-app reference style (iOS Охрана Тест) */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Backgrounds (reference iOS app) */
  --bg: #0f1012;
  --bg-2: #15171b;
  --bg-card: #1b1d22;
  --bg-card-2: #22252b;
  --bg-chip: #26282e;
  --bg-hint: #14161c;
  --bg-raise: #2a2d34;

  /* Text */
  --text: #E5E7EB;
  --text-bright: #FFFFFF;
  --text-dim: #9ca3af;
  --text-muted: #6b7280;

  /* Accent — yaguard green */
  --primary: #22c55e;
  --primary-dim: #16a34a;
  --primary-light: rgba(34,197,94,0.15);
  --primary-glow: rgba(34,197,94,0.35);
  --accent: #22c55e;
  --cta-from: #22c55e;
  --cta-to: #16a34a;
  --cta-glow: rgba(34,197,94,0.35);
  --green: #22c55e;
  --green-light: rgba(34,197,94,0.15);

  /* Status */
  --danger: #EF4444;
  --danger-light: rgba(239,68,68,0.14);
  --warn: #f59e0b;
  --warn-light: rgba(245,158,11,0.14);

  /* Borders */
  --border: rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.12);
  --border-subtle: rgba(255,255,255,0.04);

  /* Radii — reference app has 12-16 */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 18px;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.2);
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', system-ui, sans-serif;
  --font-heading: var(--font);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  /* Нижний отступ под фиксированные полосы: базово место под sticky CTA, а
     pwa.js ставит в --bottom-bars-h суммарную высоту видимых полос (плашка
     установки и sticky-cta стоят друг над другом), чтобы подвал при
     максимальной прокрутке выходил из-под обеих. На страницах без sticky-cta
     сумма не превышает базу, лишнего хвоста не появляется. */
  padding-bottom: max(calc(88px + env(safe-area-inset-bottom)), var(--bottom-bars-h, 0px));
}

a { color: var(--primary); text-decoration: none; transition: color .15s; }
a:hover { color: var(--accent); }


/* ═══════════ AMBIENT BG (убран — эталон плоский) ═══════════ */
.bg-effects { display: none !important; }


/* ═══════════ LAYOUT ═══════════ */

main, .container { position: relative; z-index: 1; }

.container {
  max-width: 640px;
  margin: 0 auto;
  padding: 16px max(16px, env(safe-area-inset-right)) 24px max(16px, env(safe-area-inset-left));
}


/* ═══════════ HEADER (reference: back + title + settings) ═══════════ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(12px, env(safe-area-inset-left));
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  max-width: 640px;
  margin: 0 auto;
}

.topbar-side {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topbar-icon-btn {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-bright);
  cursor: pointer;
  transition: background .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.topbar-icon-btn:hover { background: var(--bg-card-2); }
.topbar-icon-btn:active { transform: scale(.94); }
.topbar-icon-btn svg { display: block; }

.topbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-bright);
  text-align: center;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* old nav - keep hidden on mobile, show compact on desktop */
.topnav { display: none; }

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-bright);
  font-family: var(--font-heading);
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 30px; height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--cta-from), var(--cta-to));
  border-radius: 9px;
  color: #fff;
}
.brand-mark svg { display: block; }
.brand-text { display: none; }

/* Rank switcher — compact chip set shown under header when present */
.rank-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px auto 0;
  max-width: 640px;
  padding: 0 16px;
  justify-content: center;
}

.rank-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.rank-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  min-width: 44px; min-height: 32px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.rank-btn:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.rank-btn.is-active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.rank-strip-label {
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
  padding: 6px 4px;
}

/* Переключатель аудитории на экране выбора и в шапке */
.audience-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.audience-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  min-height: 36px;
  padding: 8px 18px;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.audience-tab:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.audience-tab.is-active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
}

.user-chip {
  display: none; /* скрываем старую плашку, имя показано в account */
}
.user-name, .rank-badge { display: none; }


/* ═══════════ HERO COMPACT ═══════════ */

.hero, .hero-compact {
  text-align: left;
  padding: 16px 0 12px;
}

.hero-compact { padding: 8px 0 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  background: var(--primary-light);
  color: var(--accent);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid rgba(34,197,94,.2);
}

.hero h1 {
  font-size: clamp(24px, 5vw, 30px);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -.02em;
  color: var(--text-bright);
}

.hero-compact h1 {
  font-size: clamp(22px, 4.5vw, 26px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -.02em;
  margin-bottom: 6px;
  color: var(--text-bright);
}

.lead {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 0 16px;
  line-height: 1.5;
}

.hero-cta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.hero-cta .btn { flex: 1 1 auto; }

.feature-list {
  list-style: none;
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.feature-list li {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-dim);
}

.feature-list li strong { color: var(--text-bright); }


/* ═══════════ BUTTONS ═══════════ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  padding: 12px 20px;
  transition: transform .1s, background .15s, border-color .15s;
  line-height: 1;
  min-height: 48px;
  color: var(--text-bright);
  background: var(--bg-card);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn:active { transform: scale(.97); }

.btn-primary,
.btn-lg {
  background: var(--primary);
  color: #fff;
  border-color: transparent;
}
.btn-primary:hover,
.btn-lg:hover { background: var(--primary-dim); }

.btn-lg {
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 56px;
  border-radius: 14px;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: var(--bg-card); }

.btn-block { width: 100%; }


/* ═══════════ STICKY BOTTOM CTA ═══════════ */

.sticky-cta {
  position: fixed;
  left: 0; right: 0;
  bottom: var(--pwa-bar-h, 0px);
  z-index: 40;
  padding: 10px max(16px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: linear-gradient(180deg, rgba(15,16,18,0) 0%, rgba(15,16,18,0.92) 30%, var(--bg) 100%);
  pointer-events: none;
}
.sticky-cta > * { pointer-events: auto; }
.sticky-cta-inner {
  max-width: 640px;
  margin: 0 auto;
}
.sticky-cta .btn {
  width: 100%;
  height: 56px;
  font-size: 15px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 14px;
}


/* ═══════════ HOME STATS CARD ═══════════ */

.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.home-stats-item { text-align: center; }
.home-stats-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}
.home-stats-num.is-accent { color: var(--primary); }
.home-stats-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}


/* ═══════════ TILE GRID (home: Изучать / Библиотека / Марафон / Экзамен) ═══════════ */

.tile-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0;
}

.tile {
  display: block;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background .15s, transform .1s;
  position: relative;
  overflow: hidden;
}
.tile:hover { background: var(--bg-card-2); }
.tile:active { transform: scale(.98); }

.tile-icon {
  width: 40px; height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  margin-bottom: 12px;
}
.tile-icon svg { display: block; }

.tile-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
}
.tile-subtitle {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.35;
}

.tile-accent { border-color: rgba(34,197,94,0.4); }
.tile-badge {
  position: absolute;
  top: 10px; right: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}


/* ═══════════ MODE GRID (fallback для старого home) ═══════════ */

.mode-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 14px 0 18px;
}

.mode-card {
  display: block;
  position: relative;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: background .15s, transform .1s;
  color: inherit;
}
.mode-card:hover { background: var(--bg-card-2); }
.mode-card:active { transform: scale(.98); }

.mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  font-size: 18px;
  margin-bottom: 10px;
  border: 1px solid rgba(34,197,94,0.18);
}

.mode-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

.mode-card p {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.4;
}

.mode-card-accent { border-color: rgba(34,197,94,0.4); }

.mode-card .badge {
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 10px;
  padding: 3px 8px;
}


/* ═══════════ SECTION HEADING ═══════════ */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 0 10px;
}
.section-head h2,
.category-list h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-bright);
  letter-spacing: -0.01em;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.section-head a { font-size: 13px; color: var(--primary); }


/* ═══════════ CATEGORY CARDS (with progress bar) ═══════════ */

.category-list { margin-top: 8px; }

.category-list h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.category-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background .15s;
  color: var(--text);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.category-card:hover { background: var(--bg-card-2); }

.category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.category-name { font-size: 14px; font-weight: 600; color: var(--text-bright); }
.category-count { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.category-bar {
  height: 3px;
  background: rgba(255,255,255,0.05);
  border-radius: 999px;
  overflow: hidden;
}
.category-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .3s;
}


/* ═══════════ RANK PICKER ═══════════ */

.rank-picker {
  padding: 16px 0;
}

.rank-picker h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 6px;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.rank-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 16px;
}

.rank-card {
  text-align: left;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  position: relative;
  overflow: hidden;
  font-family: inherit;
  color: inherit;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.rank-card:hover { background: var(--bg-card-2); border-color: var(--border-strong); }
.rank-card:active { transform: scale(.99); }

.rank-num {
  flex-shrink: 0;
  font-size: 32px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  width: 56px; height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-light);
  border-radius: 14px;
  border: 1px solid rgba(34,197,94,0.2);
}

.rank-body { flex: 1; min-width: 0; }

.rank-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 4px;
}

.rank-desc {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.4;
}


/* ═══════════ QUIZ ═══════════ */

.practice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.practice-head h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Modal dialog (replaces native confirm) */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  backdrop-filter: blur(4px);
}
.modal-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  max-width: 360px;
  width: 100%;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.modal-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 8px;
}
.modal-message {
  color: var(--text-dim);
  font-size: 15px;
  line-height: 1.5;
  margin-bottom: 16px;
}
.modal-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
}
.modal-actions .btn { width: 100%; min-height: 48px; }
.btn-danger {
  background: var(--danger, #ef4444);
  color: #fff;
  border: none;
}
.btn-danger:hover { opacity: 0.9; }

.quiz-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  animation: quizIn .3s cubic-bezier(.22,.8,.26,1);
}

@keyframes quizIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-progress-bar {
  height: 3px;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 14px;
}

.quiz-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width .3s cubic-bezier(.22,.8,.26,1);
}

.quiz-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quiz-category {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-chip);
  color: var(--text);
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  font-size: 11px;
}

.quiz-question {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.45;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.quiz-options {
  display: grid;
  gap: 8px;
}

.quiz-option {
  display: flex;
  align-items: center;
  min-height: 52px;
  text-align: left;
  padding: 12px 14px 12px 48px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.35;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .1s;
  position: relative;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.quiz-option::before {
  content: '';
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  width: 20px; height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 50%;
  transition: all .15s;
}

.quiz-option:hover:not(:disabled) {
  border-color: var(--border-strong);
  background: var(--bg-raise);
}

.quiz-option:hover:not(:disabled)::before {
  border-color: var(--text-dim);
}

.quiz-option:disabled { cursor: default; }
.quiz-option:disabled:not(.is-selected):not(.is-correct):not(.is-wrong) { opacity: 0.55; }
.quiz-option.is-pending { pointer-events: none; opacity: 0.85; }
.quiz-option.is-pending::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  width: 16px; height: 16px;
  margin-top: -8px;
  border: 2px solid rgba(255,255,255,0.18);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.quiz-option.is-selected {
  border-color: var(--primary);
  background: var(--primary-light);
}

.quiz-option.is-selected::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 3px var(--bg-card-2);
}

.quiz-option.is-correct {
  border-color: var(--primary);
  background: rgba(34, 197, 94, 0.15);
  color: var(--text-bright);
  animation: correctPop .35s cubic-bezier(.22,.8,.26,1);
}

.quiz-option.is-correct::before {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: inset 0 0 0 2px var(--bg-card-2);
}

.quiz-option.is-correct::after {
  content: '';
  position: absolute;
  right: 14px; top: 50%;
  width: 18px; height: 18px;
  margin-top: -9px;
  background: var(--primary);
  border-radius: 50%;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/14px no-repeat;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='white' d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/></svg>") center/14px no-repeat;
}

.quiz-option.is-wrong {
  border-color: var(--danger);
  background: var(--danger-light);
  color: var(--text-bright);
  animation: wrongShake .35s cubic-bezier(.22,.8,.26,1);
}

.quiz-option.is-wrong::before {
  border-color: var(--danger);
  background: var(--danger);
  box-shadow: inset 0 0 0 2px var(--bg-card-2);
}

.quiz-option.is-wrong::after {
  content: '✕';
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--danger);
  font-weight: 800;
  font-size: 16px;
}

@keyframes correctPop {
  0% { transform: scale(1); }
  40% { transform: scale(1.01); }
  100% { transform: scale(1); }
}

@keyframes wrongShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}


/* ═══════════ EXPLANATION / HINTS ═══════════ */

.explanation {
  margin-top: 14px;
  padding: 14px;
  background: var(--bg-hint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  animation: fadeIn .25s ease-out;
}

.explanation h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
}

.explanation h4::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.explanation > div {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
}

.explanation-mnemonic {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: var(--radius-sm);
  display: grid;
  gap: 10px;
}

.explanation-mnemonic > div {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

.mn-row {
  display: grid;
  gap: 2px;
}
.mn-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.mn-body {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
}
.mn-row:has(.mn-label:first-child) .mn-body { padding-left: 0; }

/* Hint-plate (reference: icon + text + close cross) */
.hint-plate {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-hint);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  margin: 10px 0;
  position: relative;
}
.hint-plate-icon {
  flex-shrink: 0;
  width: 20px; height: 20px;
  color: var(--primary);
  margin-top: 1px;
}
.hint-plate-body { flex: 1; line-height: 1.45; }
.hint-plate-close {
  flex-shrink: 0;
  width: 22px; height: 22px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
}
.hint-plate-close:hover { color: var(--text); background: rgba(255,255,255,0.04); }

.premium-hint {
  padding: 10px 14px;
  background: var(--warn-light);
  border: 1px solid rgba(245,158,11,0.2);
  border-radius: var(--radius-sm);
  color: var(--warn);
  font-size: 13px;
  margin-top: 12px;
}
.teaser-note {
  margin-top: 10px;
  padding: 10px 14px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius-sm);
  color: var(--text-bright);
  font-size: 13px;
}
.teaser-note a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.limit-warning {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.25);
  border-radius: var(--radius-sm);
  color: var(--warn);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.home-premium-banner {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  margin: 12px 0 16px;
  background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(34,197,94,0.04));
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: var(--radius-md, 14px);
  color: var(--text-bright);
  text-decoration: none;
}
.home-premium-banner-icon { font-size: 22px; }
.home-premium-banner-body { flex: 1; min-width: 0; }
.home-premium-banner-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-bright);
}
.home-premium-banner-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 2px;
}
.home-premium-banner-cta {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}
.premium-hint-inline { margin: 10px 0 4px; }

.social-proof {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 0;
  padding: 6px 12px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.22);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text-dim, #9ba1ad);
  font-variant-numeric: tabular-nums;
}
.social-proof-compact { margin: 10px 0 0; padding: 5px 10px; font-size: 11.5px; }
.social-proof-pulse { display: inline-flex; gap: 6px; align-items: center; color: var(--text-bright, #e5e7eb); font-weight: 600; }
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulseDot 1.8s ease-out infinite;
}
.social-proof-sep { opacity: 0.4; }
@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70% { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

.billing-welcome {
  margin: 20px 0;
  padding: 28px 24px 26px;
  background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(34,197,94,0.05));
  border: 1px solid rgba(34,197,94,0.4);
  border-radius: var(--radius, 14px);
  text-align: center;
}
.billing-welcome-emoji {
  display: inline-flex; align-items: center; justify-content: center;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(34,197,94,0.18);
  color: #22c55e; font-size: 28px; font-weight: 800;
  margin-bottom: 10px;
}
.billing-welcome-title {
  font-size: 22px; margin: 4px 0 8px;
  color: var(--text-bright);
}
.billing-welcome-sub { color: var(--text-dim); font-size: 14px; line-height: 1.55; }
.billing-welcome-cta { margin-top: 16px; }

.layman-block {
  margin: 10px 0 6px;
  padding: 12px 14px 11px;
  background: rgba(250, 204, 21, 0.07);
  border: 1px solid rgba(250, 204, 21, 0.25);
  border-radius: var(--radius-sm, 10px);
  animation: fadeIn .25s ease-out;
}
.layman-block h4 {
  font-size: 11px;
  font-weight: 700;
  color: #eab308;
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.layman-block p {
  color: var(--text-bright);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}

.mnemonic-preview {
  margin: 10px 0 6px;
  padding: 12px 14px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.2);
  border-radius: var(--radius-sm);
  animation: fadeIn .25s ease-out;
}

.hint-toggle {
  display: block; width: 100%;
  margin: 10px 0 0;
  padding: 10px 14px;
  background: transparent;
  border: 1px dashed rgba(34,197,94,0.35);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 13px; font-weight: 600;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.hint-toggle:hover, .hint-toggle:active {
  background: rgba(34,197,94,0.06);
  border-color: rgba(34,197,94,0.55);
}
.hint-toggle.is-open {
  border-style: solid;
  background: rgba(34,197,94,0.05);
}
.hint-slot { margin-top: 0; }
.hint-slot .mnemonic-preview { margin-top: 6px; }
.mnemonic-preview h4 {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.mnemonic-preview .explanation-mnemonic {
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
}
.mnemonic-law {
  font-size: 12px !important;
  color: var(--text-muted) !important;
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.08);
  margin-top: 4px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ═══════════ QUIZ ACTIONS + CHIP PAGINATION ═══════════ */

.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.quiz-progress-text {
  font-size: 12px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.streak-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--warn-light);
  color: var(--warn);
  border: 1px solid rgba(245,158,11,0.2);
  animation: streakPulse .4s;
}

@keyframes streakPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

/* Chip pagination (reference: squares at bottom with q-numbers) */
.quiz-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 14px;
  padding: 10px 0;
}
.quiz-chip {
  min-width: 44px; height: 44px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.quiz-chip.is-current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.quiz-chip.is-done {
  background: var(--bg-card-2);
  color: var(--primary);
  border-color: rgba(34,197,94,0.3);
}
.quiz-chip.is-wrong {
  background: var(--danger-light);
  color: var(--danger);
  border-color: rgba(239,68,68,0.35);
}

.empty-state {
  padding: 32px 16px;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-dim);
}


/* ═══════════ EXAM ═══════════ */

.exam-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.exam-head-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cancel {
  padding: 8px 12px;
  font-size: 13px;
  min-height: 38px;
  color: var(--text-dim);
  border: 1px solid var(--border);
  background: transparent;
}
.btn-cancel:hover { color: var(--danger); border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.06); }

.exam-head h1 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.timer {
  font-size: 18px;
  font-weight: 800;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
  transition: all .3s;
  min-width: 80px;
  text-align: center;
}

.timer.is-critical {
  background: var(--danger-light);
  border-color: rgba(239,68,68,0.3);
  color: var(--danger);
  animation: timerPulse 1s infinite;
}

@keyframes timerPulse {
  0%, 100% { box-shadow: 0 0 0 rgba(239,68,68,0); }
  50% { box-shadow: 0 0 16px rgba(239,68,68,.35); }
}

.exam-intro {
  padding: 12px 0 8px;
}

.exam-intro h1 {
  font-size: clamp(22px, 4vw, 26px);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.exam-rules {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.exam-rules li {
  padding: 10px 12px 10px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
}

.exam-rules li::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  background: var(--primary-light);
  border: 1.5px solid var(--primary);
  border-radius: 50%;
}

.exam-rules li::after {
  content: '';
  position: absolute;
  left: 17px; top: 50%;
  transform: translateY(-50%);
  width: 6px; height: 6px;
  background: var(--primary);
  border-radius: 50%;
}

.exam-rules li strong { color: var(--text-bright); }

/* Exam modes selector */
.exam-modes {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.exam-mode-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: background .15s, border-color .15s;
}
.exam-mode-card:hover { background: var(--bg-card-2); }
.exam-mode-card-primary { border-color: rgba(34,197,94,0.35); }
.exam-mode-card-primary:hover { border-color: rgba(34,197,94,0.55); }
.exam-mode-card-muted { opacity: 0.9; }
.exam-mode-card h3 { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; margin: 0; color: var(--text-bright); }
.exam-mode-card p { color: var(--text-dim); font-size: 13px; line-height: 1.4; margin: 0; }
.exam-mode-card .btn { margin-top: 4px; align-self: stretch; }
.exam-select-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.exam-select {
  appearance: none;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}
.exam-select:focus { outline: 2px solid var(--primary); outline-offset: 1px; }

/* Exam result */
.result-card {
  margin: 16px 0 0;
  padding: 24px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow-card);
}

.result-card.pass { border-color: rgba(34,197,94,0.4); }
.result-card.fail { border-color: rgba(239,68,68,0.35); }

.result-status {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.result-card.pass .result-status { color: var(--primary); }
.result-card.fail .result-status { color: var(--danger); }

.result-score {
  font-size: 48px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  margin: 10px 0;
}

.result-card.fail .result-score { color: var(--danger); }

.result-hint {
  color: var(--text-dim);
  font-size: 13px;
  margin: 10px 0 16px;
  line-height: 1.4;
}

.result-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ═══════════ PROGRESS ═══════════ */

.progress-head h1 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-bright);
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.stat-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 22px;
}

.stat-card {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}

.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1;
  margin-bottom: 4px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-section { margin-bottom: 18px; }
.progress-section h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.exam-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  font-size: 13px;
}

.exam-table th, .exam-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.exam-table th {
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  background: var(--bg-card-2);
}

.exam-table tbody tr:last-child td { border-bottom: none; }

.badge-pass, .badge-fail {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-pass { background: var(--green-light); color: var(--primary); border: 1px solid rgba(34,197,94,0.2); }
.badge-fail { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,0.2); }

.muted { color: var(--text-muted); font-size: 14px; }


/* ═══════════ ACCOUNT / SETTINGS GROUPS ═══════════ */

.settings-form { margin: 0; }

.settings-group {
  margin-bottom: 16px;
}
.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 14px 8px;
}
.settings-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.settings-list > * + * { border-top: 1px solid var(--border); }

.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  min-height: 52px;
  color: var(--text);
  text-decoration: none;
}
.settings-row:hover { background: var(--bg-card-2); }
.settings-row-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}
.settings-row-body { flex: 1; min-width: 0; }
.settings-row-title { font-size: 14px; font-weight: 600; color: var(--text-bright); }
.settings-row-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.35; }
.settings-row-arrow { color: var(--text-muted); flex-shrink: 0; }

.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: transparent;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background .15s;
  min-height: 52px;
}
.toggle:hover { background: var(--bg-card-2); }
.toggle input[type="checkbox"] { position: absolute; opacity: 0; pointer-events: none; }

.toggle-slider {
  position: relative;
  flex-shrink: 0;
  width: 44px; height: 26px;
  background: var(--bg-raise);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: background .2s, border-color .2s;
  order: 2;
  margin-left: auto;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform .2s;
}
.toggle input:checked + .toggle-slider {
  background: var(--primary);
  border-color: transparent;
}
.toggle input:checked + .toggle-slider::after { transform: translateX(18px); }

.toggle-text { display: grid; gap: 2px; order: 1; flex: 1; min-width: 0; }
.toggle-text strong { color: var(--text-bright); font-size: 14px; font-weight: 600; }
.toggle-text .muted { font-size: 12px; line-height: 1.35; color: var(--text-muted); }


/* ═══════════ FOOTER ═══════════ */

.footer {
  text-align: center;
  padding: 20px 16px 24px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 24px;
}


/* ═══════════ UTILS ═══════════ */

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  font-size: 13px;
}

.trust-row span { color: var(--primary); font-weight: 500; }


/* ═══════════ BILLING ═══════════ */

.billing-hero {
  text-align: center;
  padding: 24px 0 16px;
}

.billing-hero h1 {
  font-size: clamp(22px, 4.5vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-bright);
  margin-bottom: 8px;
}

.badge-premium {
  background: var(--primary);
  color: #fff;
  border: none;
}

.billing-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin: 0 0 24px;
}

.billing-card {
  position: relative;
  padding: 20px 18px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  overflow: hidden;
}

.billing-card-featured {
  border-color: rgba(34,197,94,0.4);
  background: var(--bg-card);
}

.billing-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 10px;
  background: var(--primary);
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.billing-card h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.billing-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-bottom: 2px;
}

.billing-amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
  letter-spacing: -0.02em;
}

.billing-amount-old {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-right: 6px;
  align-self: center;
}
.billing-currency { font-size: 18px; color: var(--text-dim); font-weight: 600; }
.badge-sale {
  background: linear-gradient(90deg, #ef4444 0%, #f97316 100%);
  color: #fff;
  border: none;
}
.lead-sale { color: var(--primary); font-weight: 600; }
.quiz-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 16px;
}
.quiz-summary-actions .btn { width: 100%; }
.billing-period { color: var(--text-dim); font-size: 12px; margin-bottom: 2px; }
.billing-per-month { color: var(--primary); font-size: 11px; margin-bottom: 12px; font-weight: 600; }

.billing-cta { width: 100%; margin-top: 12px; }

/* 3-column grid for pricing cards */
@media (min-width: 560px) {
  .billing-grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Featured badge variant (year plan) */
.billing-badge-featured {
  background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
  font-size: 9px;
}

/* Featured card stronger highlight */
.billing-card-featured {
  border-color: rgba(34,197,94,0.6);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.25);
}

/* Short description line under period */
.billing-desc {
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 4px;
}

/* Secondary button (non-featured plans) */
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.billing-benefits { margin: 0 0 24px; }

.billing-benefits h2,
.billing-payment h2,
.billing-about h2 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.benefit-list {
  list-style: none;
  display: grid;
  gap: 6px;
}

.benefit-list li {
  padding: 10px 14px 10px 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-dim);
  position: relative;
}

.benefit-list li::before {
  content: '✓';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  font-weight: 700;
  font-size: 11px;
  border: 1px solid rgba(34,197,94,0.25);
}

.benefit-list li strong { color: var(--text-bright); }

.billing-payment {
  margin: 0 0 20px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: var(--radius);
  animation: quizIn .3s cubic-bezier(.22,.8,.26,1);
}

.payment-steps {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.payment-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.payment-step-num {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(34,197,94,0.25);
}

.payment-step-text { flex: 1; font-size: 13px; color: var(--text-dim); line-height: 1.45; }
.payment-step-text strong { color: var(--text-bright); display: block; margin-bottom: 3px; }

.payment-value {
  display: inline-block;
  margin: 4px 0 2px;
  padding: 6px 10px;
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  color: var(--text-bright);
  user-select: all;
}

.payment-value a { color: var(--primary); }

.billing-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.billing-about {
  margin: 0 0 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.billing-about p { color: var(--text-dim); font-size: 13px; line-height: 1.5; }


/* ═══════════ PAYWALL ═══════════ */

.paywall-inline {
  margin-top: 14px;
  padding: 18px;
  background: var(--bg-card);
  border: 1px solid rgba(34,197,94,0.35);
  border-radius: var(--radius);
  text-align: center;
  animation: quizIn .3s cubic-bezier(.22,.8,.26,1);
}

.paywall-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}

.paywall-inline h4 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-bright);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.paywall-inline p {
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.paywall-benefits {
  list-style: none;
  display: inline-grid;
  gap: 4px;
  margin: 0 0 14px;
  text-align: left;
}

.paywall-benefits li {
  font-size: 12px;
  color: var(--text);
  padding-left: 18px;
  position: relative;
}

.paywall-benefits li::before {
  content: '✓';
  position: absolute;
  left: 0; top: 0;
  color: var(--primary);
  font-weight: 800;
}

.paywall-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}


/* ═══════════ ADMIN ═══════════ */

.admin-flash { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; }
.admin-flash.is-ok { background: var(--green-light); color: var(--primary); border: 1px solid rgba(34,197,94,0.25); }
.admin-flash.is-err { background: var(--danger-light); color: var(--danger); border: 1px solid rgba(239,68,68,0.25); }

.admin-section { margin-bottom: 24px; }
.admin-section h2 { font-size: 15px; font-weight: 700; color: var(--text-bright); margin-bottom: 10px; }
.admin-table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 12px;
}
.admin-table th, .admin-table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.admin-table th { background: var(--bg-card-2); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 10px; font-weight: 600; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-sm { padding: 6px 10px; font-size: 12px; min-height: 32px; border-radius: 8px; }

.admin-grant {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.admin-grant label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--text-muted); }
.admin-grant input { padding: 8px 10px; background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text-bright); font-family: inherit; font-size: 14px; min-width: 120px; }
.admin-grant input:focus { border-color: var(--primary); outline: none; }

.admin-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 10px 0; padding: 10px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); }
.admin-search input[type="text"] { flex: 1 1 240px; padding: 8px 12px; background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 8px; color: var(--text-bright); font-family: inherit; font-size: 14px; }
.admin-search input[type="text"]:focus { border-color: var(--primary); outline: none; }
.admin-search-sort { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--text-muted); cursor: pointer; }

.intent-status { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.intent-pending { background: var(--warn-light); color: var(--warn); border: 1px solid rgba(245,158,11,0.25); }
.intent-confirmed { background: var(--green-light); color: var(--primary); border: 1px solid rgba(34,197,94,0.25); }
.intent-canceled { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 8px; }


/* ═══════════ ACCOUNT PROFILE ═══════════ */

.account-profile {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 8px 0 18px;
}

.account-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.account-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.account-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}

.account-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.account-links .btn { flex: 1 1 calc(50% - 4px); min-width: 0; }

.account-logout { margin-top: 6px; }


/* Mnemonic variant picker (admin) */
.mnemonic-pick-page { max-width: 1100px; }
.pick-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; margin-bottom: 14px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; position: sticky; top: 8px; z-index: 5; }
.pick-progress { font-size: 14px; color: var(--text-dim); }
.pick-progress strong { color: var(--primary); }
.pick-bar .pick-actions { display: flex; gap: 8px; }
.pick-question { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; }
.pick-qmeta { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--text-dim); margin-bottom: 8px; flex-wrap: wrap; }
.pick-nav-inline { display: flex; gap: 14px; }
.pick-nav-inline a { color: var(--text-dim); text-decoration: none; border-bottom: 1px dashed rgba(255,255,255,0.25); }
.pick-nav-inline a:hover { color: #fff; }
.pick-qtext { font-size: 16px; line-height: 1.5; margin: 4px 0 12px; }
.pick-options { padding-left: 20px; color: var(--text-dim); margin: 0 0 18px; font-size: 14px; }
.pick-options li { margin-bottom: 4px; line-height: 1.4; }
.pick-options li.is-correct { color: var(--primary); font-weight: 600; }
.variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 10px; }
.variant-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: var(--bg-card-2); border: 1px solid var(--border); border-radius: 12px; transition: border-color 0.12s, transform 0.12s; }
.variant-card:hover { border-color: rgba(34,197,94,0.4); }
.variant-card.is-picked { border-color: rgba(34,197,94,0.7); background: rgba(34,197,94,0.08); }
.variant-head { display: flex; align-items: center; gap: 8px; }
.variant-key { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; background: rgba(255,255,255,0.08); border-radius: 6px; font-size: 12px; font-weight: 600; color: var(--text-dim); }
.variant-badge { font-size: 11px; color: var(--primary); }
.variant-badge-warn { color: #eab308; background: rgba(234,179,8,0.14); padding: 2px 6px; border-radius: 4px; font-weight: 600; }
.variant-hint { font-size: 14px; line-height: 1.4; font-weight: 600; }

.home-readiness { display: flex; align-items: center; gap: 14px; margin: 12px 0 8px; padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: inherit; transition: border-color 0.15s, background 0.15s; }
.home-readiness:hover { border-color: var(--primary); }
.home-readiness-cta { background: linear-gradient(135deg, rgba(34,197,94,0.14), rgba(34,197,94,0.04)); border-color: rgba(34,197,94,0.35); }
.home-readiness-cta .home-readiness-title { color: var(--primary); }
.home-readiness-ring { --pct: 0%; position: relative; width: 56px; height: 56px; flex-shrink: 0; border-radius: 50%; background: conic-gradient(var(--primary) var(--pct), rgba(255,255,255,0.08) 0); display: flex; align-items: center; justify-content: center; }
.home-readiness-ring::before { content: ''; position: absolute; inset: 5px; background: var(--bg-card); border-radius: 50%; }
.home-readiness-pct { position: relative; font-weight: 700; font-size: 14px; color: var(--primary); }
.home-readiness-body { flex: 1; min-width: 0; }
.home-readiness-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.home-readiness-sub { font-size: 13px; color: var(--text-dim); }
.home-readiness-arrow { color: var(--text-dim); font-size: 18px; flex-shrink: 0; }
.variant-assoc { font-size: 13px; line-height: 1.5; color: var(--text-dim); }
.variant-plain { font-size: 12px; line-height: 1.5; }
.variant-card .btn { align-self: flex-start; margin-top: auto; }


/* ═══════════ READINESS DASHBOARD ═══════════ */

.readiness-overall {
  display: flex; align-items: center; gap: 20px;
  padding: 16px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; margin-bottom: 16px;
}
.readiness-ring {
  --pct: 0%;
  width: 92px; height: 92px; border-radius: 50%;
  background: conic-gradient(var(--primary) var(--pct), rgba(255,255,255,0.08) 0);
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
.readiness-ring::before {
  content: ''; position: absolute; inset: 8px;
  background: var(--bg-card); border-radius: 50%;
}
.readiness-pct { position: relative; font-size: 20px; font-weight: 700; }
.readiness-verdict { flex: 1; }
.readiness-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.readiness-formula { font-size: 12px; margin-top: 4px; }

.readiness-cats {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.readiness-cat {
  padding: 12px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px;
}
.readiness-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; font-size: 14px;
}
.readiness-cat-head strong.good { color: var(--primary); }
.readiness-cat-head strong.ok { color: #eab308; }
.readiness-cat-head strong.bad { color: var(--danger); }
.readiness-bar {
  height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden;
}
.readiness-bar-fill {
  height: 100%; background: var(--primary); transition: width 0.4s ease;
}
.readiness-cat-sub { margin-top: 6px; font-size: 12px; }
.badge-warn { background: rgba(234,179,8,0.14); color: #eab308; border: 1px solid rgba(234,179,8,0.25); }

/* ═══════════ DESKTOP ═══════════ */

@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .account-profile { grid-template-columns: repeat(4, 1fr); }
  .home-stats { max-width: 640px; }
  .category-grid { grid-template-columns: 1fr 1fr; }
  .readiness-cats { grid-template-columns: 1fr 1fr; }
  .catalog-grid { grid-template-columns: repeat(3, 1fr); }
}

.catalog-back {
  display: inline-flex; align-items: center; gap: 4px;
  margin-bottom: 10px; padding: 6px 10px 6px 6px;
  font-size: 13px; font-weight: 600; color: var(--text-dim);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s;
}
.catalog-back:hover, .catalog-back:active { color: var(--accent); border-color: var(--accent); }

.catalog-list { display: flex; flex-direction: column; gap: 8px; margin: 12px 0 24px; }
.catalog-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.catalog-item:hover { border-color: var(--accent); }
.catalog-item:active { transform: scale(0.99); }
.catalog-item.is-done {
  border-color: rgba(34,197,94,0.45);
  background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(34,197,94,0.02));
}
.catalog-item.is-done .catalog-item-title::after {
  content: '✓'; margin-left: 8px; color: var(--accent); font-weight: 700;
}
.catalog-item-main { flex: 1; min-width: 0; }
.catalog-item-title {
  font-size: 15px; font-weight: 600; color: var(--text-bright, #f3f4f6);
  margin-bottom: 3px; line-height: 1.3;
  overflow-wrap: break-word;
}
.catalog-item-sub { font-size: 12.5px; color: var(--text-dim); line-height: 1.35; }
.catalog-item-ring {
  --pct: 0%;
  position: relative; width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%;
  background: conic-gradient(var(--accent) var(--pct), rgba(255,255,255,0.08) 0);
  display: flex; align-items: center; justify-content: center;
}
.catalog-item-ring::before {
  content: ''; position: absolute; inset: 4px; background: var(--bg-card); border-radius: 50%;
}
.catalog-item.is-done .catalog-item-ring::before { background: rgba(34,197,94,0.14); }
.catalog-item-pct { position: relative; font-size: 11px; font-weight: 700; color: var(--accent); }
.catalog-item-arrow { color: var(--text-dim); font-size: 20px; flex-shrink: 0; opacity: 0.7; }
.catalog-item:hover .catalog-item-arrow { color: var(--accent); opacity: 1; }

.catalog-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin: 12px 0 24px;
}
.catalog-tile {
  display: flex; flex-direction: column; gap: 6px;
  padding: 12px 14px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  text-decoration: none; color: inherit;
  transition: border-color 0.15s, background 0.15s;
}
.catalog-tile:hover { border-color: var(--accent); }
.catalog-tile.is-done { border-color: rgba(34,197,94,0.45); background: rgba(34,197,94,0.06); }
.catalog-tile-head { display: flex; justify-content: space-between; align-items: center; }
.catalog-tile-num { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; }
.catalog-tile-check { color: var(--accent); font-weight: 700; }
.catalog-tile-range { font-size: 12px; color: var(--text-dim); }
.catalog-tile-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-dim); }
.catalog-tile-pct { color: var(--accent); font-weight: 600; }
.catalog-tile-bar { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.catalog-tile-bar-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.25s; }

.catalog-pager {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 10px; margin: 10px 0 16px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
}
.catalog-pager-btn {
  flex-shrink: 0;
  font-size: 13px; font-weight: 600; color: var(--accent); text-decoration: none;
  padding: 8px 12px; border-radius: 8px; white-space: nowrap;
  transition: background 0.15s;
}
.catalog-pager-btn:hover, .catalog-pager-btn:active { background: rgba(34,197,94,0.12); }
.catalog-pager-btn.is-disabled { color: var(--text-dim); opacity: 0.4; pointer-events: none; }
.catalog-pager-pos { font-size: 12px; font-weight: 500; color: var(--text-dim); text-align: center; }
@media (max-width: 380px) {
  .catalog-pager-btn { font-size: 12px; padding: 6px 8px; }
  .catalog-pager-pos { font-size: 11px; }
}

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

/* Data-source badge на home.ejs - актуальность базы Росгвардии 21.09.2023 */
.data-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}
.data-source-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

/* Кнопка "Показать подсказку" в режимах training/mistakes */
.btn-show-hint {
  margin-top: 12px;
  width: 100%;
  font-size: 14px;
  background: rgba(34, 197, 94, 0.06);
  border: 1px dashed rgba(34, 197, 94, 0.35);
  color: var(--text-muted, #94a3b8);
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-show-hint:hover {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.55);
  color: var(--text, #e2e8f0);
}
.mnemonic-slot.is-hidden { display: none; }


/* ═══════════ LEGAL PAGES ═══════════ */

.legal-page {
  padding: 16px 16px 40px;
  max-width: 720px;
  margin: 0 auto;
}

.legal-doc h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: 6px;
  line-height: 1.3;
}

.legal-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.legal-doc section {
  margin-bottom: 28px;
}

.legal-doc h2 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.legal-doc h3 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 14px 0 6px;
}

.legal-doc p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 10px;
}

.legal-doc ul, .legal-doc ol {
  padding-left: 18px;
  margin-bottom: 10px;
}

.legal-doc li {
  font-size: 14px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 6px;
}

.legal-doc code {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 12px;
  background: var(--bg-chip);
  padding: 1px 5px;
  border-radius: 4px;
  color: var(--primary);
}

/* Table for offer tariffs */
.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-size: 14px;
}

.legal-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-card);
  color: var(--text-bright);
  font-weight: 600;
  border-bottom: 1px solid var(--border-strong);
}

.legal-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.legal-table tr:last-child td {
  border-bottom: none;
}

/* Footer legal block */
.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 16px 28px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  align-items: center;
}

.footer-legal a {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.footer-legal a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

.footer-sep {
  font-size: 12px;
  color: var(--border-strong);
}

.footer-company {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.footer-company a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: transparent;
  transition: color 0.15s;
}

.footer-company a:hover {
  color: var(--primary);
  text-decoration-color: var(--primary);
}

/* Legal consent under welcome CTA */
.legal-consent {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

.legal-consent a {
  color: var(--text-dim);
  text-decoration: underline;
}

.legal-consent a:hover {
  color: var(--primary);
}

/* Contacts page */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 28px;
}

@media (min-width: 560px) {
  .contacts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.contacts-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.contacts-card h2 {
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 14px;
}

.contacts-dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  margin: 0;
}

.contacts-dl dt {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  align-self: baseline;
  padding-top: 2px;
}

.contacts-dl dd {
  font-size: 13px;
  color: var(--text);
  margin: 0;
}

.contacts-btn {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: center;
}

.contacts-docs {
  margin-bottom: 28px;
}

.contacts-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 12px;
}

.contacts-doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}

.contacts-doc-link:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--text-bright);
}

.contacts-doc-link svg {
  flex-shrink: 0;
  color: var(--primary);
}

@media (min-width: 560px) {
  .contacts-links {
    flex-direction: row;
  }
  .contacts-doc-link {
    flex: 1;
  }
}


/* Contrast-блок: "Чем правильный отличается от неправильных" - наш USP */
.contrast-block {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(99, 102, 241, 0.06);
  border-left: 3px solid rgba(99, 102, 241, 0.5);
  border-radius: 8px;
}
.contrast-block h4 {
  margin: 0 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text, #e2e8f0);
}
.contrast-key {
  font-size: 14px;
  font-weight: 600;
  color: rgb(165, 180, 252);
  margin-bottom: 10px;
  padding: 6px 10px;
  background: rgba(99, 102, 241, 0.12);
  border-radius: 6px;
}
.contrast-wrong {
  display: flex;
  gap: 8px;
  margin: 6px 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted, #94a3b8);
}
.contrast-wrong-mark {
  flex-shrink: 0;
  color: rgb(248, 113, 113);
  font-weight: 700;
  margin-top: 1px;
}

/* --- PWA (этап 2) --- */
.pwa-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  max-width: min(94vw, 560px);
  padding: 8px 12px;
  border-radius: 14px;
  background: rgba(24, 26, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  font-size: 13px;
}
.pwa-bar[hidden] { display: none; }
.pwa-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.16);
  color: #4ade80;
  white-space: nowrap;
}
.pwa-update { white-space: nowrap; }
.pwa-ios-hint { flex-basis: 100%; font-size: 12px; opacity: 0.85; }
/* Крестик закрытия подсказки установки: зона нажатия 44px по гайдлайнам,
   контент плашки уезжает из-под него правым отступом. Цвет наследуется от
   плашки: светлый на тёмных экранах, тёмный на светлом лендинге. */
.pwa-bar:has(.pwa-bar-close:not([hidden])) { padding-right: 52px; }
.pwa-bar-close {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: inherit;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
}
.pwa-bar-close[hidden] { display: none; }
.pwa-bar-close:active { opacity: 1; }
.btn-sm { padding: 6px 10px; font-size: 13px; }

.offline-panel {
  margin: 20px 0 28px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}
.offline-panel h2 { margin: 0 0 6px; font-size: 18px; }
.offline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.offline-select {
  padding: 9px 10px;
  border-radius: 10px;
  background: #17181c;
  color: inherit;
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.hint-action { margin-top: 10px; }
.hint-left { font-size: 12px; opacity: 0.75; margin: 6px 0; }
.advanced-explanation { margin-bottom: 10px; }
body.is-offline .quiz-card { outline: 1px dashed rgba(255, 255, 255, 0.15); }


/* ═══════════ LANDING (welcome) ═══════════ */

.landing-section { margin-top: 26px; }
.landing-section .section-head { margin-top: 0; }

.aud-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .aud-grid { grid-template-columns: 1fr 1fr; }
}

.aud-card {
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.aud-card-accent { border-color: rgba(34,197,94,.35); background: var(--bg-card-2); }
.aud-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--primary);
  letter-spacing: -.02em;
}
.aud-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 2px 0 6px;
}
.aud-card p { font-size: 14px; line-height: 1.5; color: var(--text-dim); margin: 0; }

.aud-list { list-style: none; display: grid; gap: 6px; margin-top: 4px; }
.aud-list li {
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-dim);
  padding-left: 18px;
  position: relative;
}
.aud-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.landing-note { margin-top: 10px; line-height: 1.5; }
.landing-cta { margin-top: 14px; }

.faq-item {
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.faq-item summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-bright);
}
.faq-item p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 8px 0 2px;
}

.landing-final h2 {
  font-size: clamp(20px, 4.5vw, 26px);
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--text-bright);
  margin-bottom: 8px;
}


/* ═══════════ LANDING V2: светлая фирменная тема Гризли ═══════════
   Образцы: хаб ГризлиОн v7 и лендинг ГризлиCRM.
   Палитра: кремовый фон #FFF9EF, белые карточки, мёд #F5A623 и градиент
   #FFC53D → #F5A623 → #E07F13, чернила #1D1710, радиусы 20/18/14,
   кнопки-пилюли, мягкие тёплые тени. Действует только на гостевой
   странице (main[data-page="welcome"]), внутренние экраны не тронуты. */

html:has(main[data-page="welcome"]) { background: #FFF9EF; }

body:has(main[data-page="welcome"]) {
  --lz-bg: #FFF9EF;
  --lz-card: #FFFFFF;
  --lz-soft: #FFF3DC;
  --lz-ink: #1D1710;
  --lz-mut: #6E6455;
  --lz-faint: #8A7C62;
  --lz-line: rgba(74, 52, 10, 0.12);
  --lz-honey: #F5A623;
  --lz-honey-deep: #E07F13;
  --lz-honey-ink: #8F5E06;
  --lz-grad: linear-gradient(94deg, #FFC53D 0%, #F5A623 48%, #E07F13 100%);
  --lz-sh-card: 0 16px 36px -20px rgba(122, 82, 10, 0.28);
  --lz-sh-btn: 0 14px 30px -12px rgba(245, 166, 35, 0.55);
  background: var(--lz-bg);
  color: var(--lz-ink);
}

/* --- Шапка лендинга --- */
body:has(main[data-page="welcome"]) .topbar {
  max-width: 1080px;
  background: rgba(255, 249, 239, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(74, 52, 10, 0.1);
}
body:has(main[data-page="welcome"]) .topbar-title { color: var(--lz-ink); }
body:has(main[data-page="welcome"]) .topbar-icon-btn {
  background: var(--lz-card);
  border-color: rgba(74, 52, 10, 0.14);
  color: var(--lz-ink);
  border-radius: 14px;
  box-shadow: 0 6px 16px -8px rgba(122, 82, 10, 0.3);
}
body:has(main[data-page="welcome"]) .topbar-icon-btn:hover { background: var(--lz-soft); }

/* --- Каркас --- */
main[data-page="welcome"] {
  max-width: 1080px;
  padding: 28px 24px 48px;
}
main[data-page="welcome"] a { color: var(--lz-honey-ink); }
main[data-page="welcome"] a:hover { color: var(--lz-honey-deep); }
main[data-page="welcome"] .muted { color: var(--lz-mut); }
main[data-page="welcome"] .lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--lz-mut);
}

/* --- Первый экран --- */
main[data-page="welcome"] .hero {
  position: relative;
  text-align: center;
  padding: 44px 12px 10px;
  border-radius: 28px;
  background:
    radial-gradient(620px 300px at 50% -90px, rgba(245, 166, 35, 0.16), rgba(245, 166, 35, 0) 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='150' viewBox='0 0 100 100'%3E%3Cg fill='%23F5A623' fill-opacity='0.07'%3E%3Cellipse cx='50' cy='63' rx='19' ry='14'/%3E%3Ccircle cx='23' cy='40' r='8.5'/%3E%3Ccircle cx='41' cy='29' r='8.5'/%3E%3Ccircle cx='59' cy='29' r='8.5'/%3E%3Ccircle cx='77' cy='40' r='8.5'/%3E%3C/g%3E%3C/svg%3E");
}
main[data-page="welcome"] .badge {
  background: var(--lz-card);
  color: var(--lz-honey-ink);
  border: 1px solid rgba(245, 166, 35, 0.45);
  box-shadow: 0 8px 20px -10px rgba(122, 82, 10, 0.35);
  font-size: 12.5px;
  padding: 6px 14px;
  margin-bottom: 18px;
}
main[data-page="welcome"] .badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lz-grad);
  flex: 0 0 auto;
}
main[data-page="welcome"] .hero h1 {
  font-size: clamp(30px, 4.6vw, 46px);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: var(--lz-ink);
  max-width: 760px;
  margin: 0 auto 14px;
}
main[data-page="welcome"] .hero .lead {
  max-width: 640px;
  margin: 0 auto 22px;
}
main[data-page="welcome"] .hero-cta {
  justify-content: center;
  margin-bottom: 14px;
}
main[data-page="welcome"] .legal-consent { color: var(--lz-faint); }
main[data-page="welcome"] .legal-consent a {
  color: var(--lz-honey-ink);
  text-decoration: underline;
}

/* --- Кнопки лендинга: пилюли, мёд, сочное нажатие --- */
main[data-page="welcome"] .btn {
  border-radius: 999px;
  min-height: 52px;
  padding: 14px 26px;
  font-size: 16px;
  transition: transform 0.18s cubic-bezier(.22,1,.36,1), box-shadow 0.25s, background 0.2s, border-color 0.2s;
}
main[data-page="welcome"] .btn:active { transform: scale(0.97); }
main[data-page="welcome"] .btn:focus-visible {
  outline: 3px solid rgba(245, 166, 35, 0.55);
  outline-offset: 2px;
}
main[data-page="welcome"] .btn-primary {
  background: var(--lz-grad);
  color: var(--lz-ink);
  border-color: transparent;
  box-shadow: var(--lz-sh-btn);
}
main[data-page="welcome"] .btn-ghost,
main[data-page="welcome"] .btn-secondary {
  background: var(--lz-card);
  color: var(--lz-ink);
  border: 1px solid rgba(74, 52, 10, 0.18);
  box-shadow: 0 8px 20px -12px rgba(122, 82, 10, 0.25);
}
@media (hover: hover) {
  main[data-page="welcome"] .btn-primary:hover,
  main[data-page="welcome"] .btn-ghost:hover,
  main[data-page="welcome"] .btn-secondary:hover { transform: translateY(-1px); }
}

/* --- Строка доверия: белые чипсы --- */
main[data-page="welcome"] .trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
}
main[data-page="welcome"] .trust-row span {
  background: var(--lz-card);
  border: 1px solid var(--lz-line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--lz-mut);
  box-shadow: 0 8px 18px -12px rgba(122, 82, 10, 0.3);
}

/* --- Секции --- */
main[data-page="welcome"] .landing-section { margin-top: 46px; }
main[data-page="welcome"] .landing-section .section-head {
  justify-content: flex-start;
  margin: 0 0 16px;
}
main[data-page="welcome"] .landing-section .section-head h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 800;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--lz-ink);
}
main[data-page="welcome"] .landing-section .section-head h2::after {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 2px;
  background: var(--lz-grad);
  margin-top: 8px;
}

/* --- Карточки аудиторий и тарифов --- */
main[data-page="welcome"] .aud-grid { gap: 16px; }
main[data-page="welcome"] .aud-card {
  background: var(--lz-card);
  border: 1px solid var(--lz-line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--lz-sh-card);
}
main[data-page="welcome"] .aud-card-accent {
  background: linear-gradient(180deg, #FFF6E0, #FFF1D2);
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 20px 44px -20px rgba(245, 166, 35, 0.55);
}
main[data-page="welcome"] .aud-num {
  font-size: 44px;
  color: var(--lz-honey-deep);
  letter-spacing: -0.02em;
}
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  main[data-page="welcome"] .aud-num {
    background: var(--lz-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}
main[data-page="welcome"] .aud-title {
  font-size: 18px;
  color: var(--lz-ink);
  margin: 4px 0 8px;
}
main[data-page="welcome"] .aud-card p { font-size: 15px; color: var(--lz-mut); }
main[data-page="welcome"] .aud-list { gap: 8px; }
main[data-page="welcome"] .aud-list li { font-size: 15px; color: var(--lz-mut); }
main[data-page="welcome"] .aud-list li::before { color: var(--lz-honey-deep); }
main[data-page="welcome"] .landing-note { margin-top: 12px; }

/* --- Тарифы Premium на лендинге: данные из PRICING, единый источник --- */
main[data-page="welcome"] .tariff-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
main[data-page="welcome"] .tariff-card {
  background: var(--lz-card);
  border: 1px solid var(--lz-line);
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: var(--lz-sh-card);
}
main[data-page="welcome"] .tariff-card-featured {
  background: linear-gradient(180deg, #FFF6E0, #FFF1D2);
  border-color: rgba(245, 166, 35, 0.5);
  box-shadow: 0 20px 44px -20px rgba(245, 166, 35, 0.55);
}
main[data-page="welcome"] .tariff-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lz-soft);
  color: var(--lz-honey-ink);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
main[data-page="welcome"] .tariff-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--lz-mut);
  margin-bottom: 8px;
}
main[data-page="welcome"] .tariff-price {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
}
main[data-page="welcome"] .tariff-amount {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--lz-honey-deep);
}
main[data-page="welcome"] .tariff-currency { font-size: 18px; font-weight: 600; color: var(--lz-mut); }
main[data-page="welcome"] .tariff-period { font-size: 12.5px; color: var(--lz-mut); margin-top: 4px; }
main[data-page="welcome"] .tariff-per-month { font-size: 11.5px; font-weight: 600; color: var(--lz-honey-ink); margin-top: 2px; }
main[data-page="welcome"] .tariff-desc { font-size: 11.5px; color: var(--lz-faint); margin-top: 8px; }
@media (max-width: 720px) {
  main[data-page="welcome"] .tariff-grid { grid-template-columns: 1fr; }
  main[data-page="welcome"] .tariff-card { padding: 20px; }
}

/* --- Списки возможностей: белые карточки с мёдовой галочкой --- */
main[data-page="welcome"] .feature-list { gap: 12px; margin-top: 0; }
main[data-page="welcome"] .feature-list li {
  position: relative;
  background: var(--lz-card);
  border: 1px solid var(--lz-line);
  border-radius: 18px;
  padding: 16px 18px 16px 54px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--lz-mut);
  box-shadow: var(--lz-sh-card);
}
main[data-page="welcome"] .feature-list li::before {
  content: "✓";
  position: absolute;
  left: 16px;
  top: 15px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--lz-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
main[data-page="welcome"] .feature-list li strong { color: var(--lz-ink); }
@media (min-width: 900px) {
  main[data-page="welcome"] .feature-list { grid-template-columns: 1fr 1fr; }
}

/* --- FAQ --- */
main[data-page="welcome"] .faq-item {
  background: var(--lz-card);
  border: 1px solid var(--lz-line);
  border-radius: 18px;
  padding: 16px 18px;
  margin-bottom: 10px;
  box-shadow: var(--lz-sh-card);
}
main[data-page="welcome"] .faq-item summary {
  font-size: 15px;
  font-weight: 700;
  color: var(--lz-ink);
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
main[data-page="welcome"] .faq-item summary::-webkit-details-marker { display: none; }
main[data-page="welcome"] .faq-item summary::after {
  content: "+";
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--lz-soft);
  color: var(--lz-honey-ink);
  font-size: 17px;
  font-weight: 800;
  display: grid;
  place-items: center;
}
main[data-page="welcome"] .faq-item[open ] summary::after { content: "−"; }
main[data-page="welcome"] .faq-item p { font-size: 15px; color: var(--lz-mut); }

/* --- Финальный CTA: мёдовая плашка --- */
main[data-page="welcome"] .landing-final {
  background: var(--lz-grad);
  border-radius: 24px;
  padding: 38px 28px;
  text-align: center;
  box-shadow: 0 24px 60px -18px rgba(245, 166, 35, 0.45);
}
main[data-page="welcome"] .landing-final h2 {
  font-size: clamp(24px, 3.6vw, 32px);
  color: var(--lz-ink);
  margin-bottom: 10px;
}
main[data-page="welcome"] .landing-final .lead {
  color: rgba(29, 23, 16, 0.78);
  max-width: 560px;
  margin: 0 auto 20px;
}
main[data-page="welcome"] .landing-final .hero-cta { margin-bottom: 0; }
main[data-page="welcome"] .landing-final .btn-primary {
  background: var(--lz-ink);
  color: #FFF6E0;
  box-shadow: 0 16px 34px -14px rgba(29, 23, 16, 0.55);
}

/* --- Подвал лендинга --- */
body:has(main[data-page="welcome"]) .footer {
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
  border-top: 1px solid rgba(74, 52, 10, 0.1);
}
body:has(main[data-page="welcome"]) .footer-tagline,
body:has(main[data-page="welcome"]) .footer-company,
body:has(main[data-page="welcome"]) .footer-company a { color: var(--lz-faint); }
body:has(main[data-page="welcome"]) .footer-legal a { color: var(--lz-mut); }
body:has(main[data-page="welcome"]) .footer-legal a:hover,
body:has(main[data-page="welcome"]) .footer-company a:hover {
  color: var(--lz-honey-ink);
  text-decoration-color: var(--lz-honey-ink);
}
body:has(main[data-page="welcome"]) .footer-sep { color: rgba(74, 52, 10, 0.25); }

/* --- Плавающая PWA-плашка в светлой теме --- */
body:has(main[data-page="welcome"]) .pwa-bar {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(74, 52, 10, 0.14);
  border-radius: 18px;
  box-shadow: 0 18px 40px -12px rgba(122, 82, 10, 0.35);
  color: var(--lz-ink);
}
body:has(main[data-page="welcome"]) .pwa-badge {
  background: rgba(245, 166, 35, 0.18);
  color: var(--lz-honey-ink);
}
body:has(main[data-page="welcome"]) .pwa-bar .btn-primary {
  background: var(--lz-grad);
  color: var(--lz-ink);
  border-color: transparent;
}
body:has(main[data-page="welcome"]) .pwa-bar .btn-secondary {
  background: var(--lz-card);
  color: var(--lz-ink);
  border: 1px solid rgba(74, 52, 10, 0.18);
}

/* --- Адаптив лендинга --- */
@media (max-width: 720px) {
  main[data-page="welcome"] { padding: 18px 16px 40px; }
  main[data-page="welcome"] .hero { padding: 30px 6px 6px; }
  main[data-page="welcome"] .landing-section { margin-top: 38px; }
  main[data-page="welcome"] .aud-card { padding: 20px; }
  main[data-page="welcome"] .landing-final { padding: 30px 20px; }
}
@media (max-width: 560px) {
  main[data-page="welcome"] .hero-cta .btn { flex: 1 1 100%; }
  main[data-page="welcome"] .trust-row span { font-size: 12.5px; padding: 6px 12px; }
  main[data-page="welcome"] .badge { font-size: 11.5px; }
}
@media (max-height: 480px) and (orientation: landscape) {
  /* На коротком экране плавающая плашка ложится на ряд CTA hero:
     прячем её, установка доступна кнопкой в hero и в секции офлайна. */
  body:has(main[data-page="welcome"]) .pwa-bar { display: none; }
  main[data-page="welcome"] .hero { padding: 16px 6px 2px; }
  main[data-page="welcome"] .hero h1 { font-size: 28px; margin-bottom: 8px; }
  main[data-page="welcome"] .hero .lead { margin-bottom: 14px; }
  main[data-page="welcome"] .landing-section { margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  main[data-page="welcome"] .btn { transition: none; }
}
