:root {
  /* dark theme (default) */
  --bg: #0d0f1a;
  --bg-panel: #161927;
  --bg-panel-2: #1e2235;
  --border: #2b2f45;
  --text: #edeef5;
  --text-dim: #9b9fb8;
  --accent: #8b7cf6;
  --accent-rgb: 139, 124, 246;
  --accent-dark: #6f5eeb;
  --accent-contrast: #ffffff;
  --good: #34d399;
  --good-rgb: 52, 211, 153;
  --bad: #fb7185;
  --bad-rgb: 251, 113, 133;
  --warn: #fbbf24;
  --warn-rgb: 251, 191, 36;
  --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f7f7fb;
  --bg-panel: #ffffff;
  --bg-panel-2: #f0eff8;
  --border: #e2e0ef;
  --text: #1c1b29;
  --text-dim: #64607e;
  --accent: #6d5bd0;
  --accent-rgb: 109, 91, 208;
  --accent-dark: #5847b8;
  --accent-contrast: #ffffff;
  --good: #059669;
  --good-rgb: 5, 150, 105;
  --bad: #e11d48;
  --bad-rgb: 225, 29, 72;
  --warn: #b45309;
  --warn-rgb: 180, 83, 9;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f7fb;
    --bg-panel: #ffffff;
    --bg-panel-2: #f0eff8;
    --border: #e2e0ef;
    --text: #1c1b29;
    --text-dim: #64607e;
    --accent: #6d5bd0;
    --accent-rgb: 109, 91, 208;
    --accent-dark: #5847b8;
    --accent-contrast: #ffffff;
    --good: #059669;
    --good-rgb: 5, 150, 105;
    --bad: #e11d48;
    --bad-rgb: 225, 29, 72;
    --warn: #b45309;
    --warn-rgb: 180, 83, 9;
    color-scheme: light;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background 0.15s, color 0.15s;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

header.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  column-gap: 28px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-panel);
  position: sticky;
  top: 0;
  z-index: 10;
}

header.topbar .brand {
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
header.topbar .brand:hover { text-decoration: none; opacity: 0.85; }

header.topbar .site-nav {
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  flex: 1 1 auto;
}

header.topbar .site-nav a {
  color: var(--text-dim);
  font-weight: 500;
  padding: 6px 4px;
}

header.topbar .site-nav a.active,
header.topbar .site-nav a:hover {
  color: var(--text);
}

/* User box sits at the far right of the nav on desktop. */
.nav-user { margin-left: auto; }

/* Hamburger — hidden on desktop, shown on narrow screens. */
.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  padding: 6px 10px;
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 720px) {
  header.topbar { flex-wrap: wrap; row-gap: 0; }
  .brand { margin-right: auto; }
  .nav-toggle { display: inline-flex; order: 3; }
  #theme-toggle-btn { order: 2; }
  header.topbar .brand { order: 1; }
  header.topbar .site-nav {
    order: 4;
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin-top: 10px;
  }
  header.topbar.nav-open .site-nav { display: flex; }
  header.topbar .site-nav a {
    padding: 11px 8px;
    border-radius: 8px;
  }
  header.topbar .site-nav a.active,
  header.topbar .site-nav a:hover { background: var(--bg-panel-2); }
  .nav-user {
    margin-left: 0;
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 480px) {
  .container { padding: 18px 14px 64px; }
  .hero { padding: 24px 0 12px; }
  .hero h1 { font-size: 26px; }
  header.topbar { padding: 12px 14px; }
}

.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-dim);
}

.theme-toggle {
  padding: 7px 10px;
  font-size: 16px;
  line-height: 1;
}

button, .btn {
  font: inherit;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
  padding: 9px 16px;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s;
}

button:hover, .btn:hover { border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }

.card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

/* clickable card-as-link (e.g. the full-test CTA): only the title
   should underline on hover, not the whole block of text inside it */
a.card { text-decoration: none; }
a.card:hover { text-decoration: none; border-color: var(--accent); }
a.card:hover h2, a.card:hover h3 { text-decoration: underline; }
a.set-card { text-decoration: none; }
a.set-card:hover { text-decoration: none; border-color: var(--accent); }
a.set-card:hover h3 { text-decoration: underline; }

.card h2 { margin-top: 0; }

.grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.set-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.set-card .tag {
  display: inline-block;
  font-size: 12px;
  color: var(--accent);
  background: rgba(var(--accent-rgb), 0.12);
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}

.set-card h3 { margin: 0; font-size: 16px; }

/* Premium-locked practice items: a gold "Premium" accent that invites an
   upgrade rather than looking broken/disabled. */
.set-card.locked { border-color: rgba(var(--warn-rgb), 0.4); }
.set-card .premium-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--warn);
  background: rgba(var(--warn-rgb), 0.14);
  padding: 2px 8px;
  border-radius: 999px;
  width: fit-content;
}
.set-card .lock-btn {
  background: rgba(var(--warn-rgb), 0.14);
  color: var(--warn);
  border: 1px solid rgba(var(--warn-rgb), 0.45);
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
  transition: background 0.15s;
}
.set-card .lock-btn:hover { background: rgba(var(--warn-rgb), 0.24); }

input, textarea, select {
  font: inherit;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  width: 100%;
}

/* radio/checkbox must NOT inherit width:100% from the rule above,
   otherwise their layout box swallows the row and pushes label text away */
input[type="radio"], input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
  margin: 3px 0 0;
}

textarea { resize: vertical; min-height: 220px; line-height: 1.5; }

label { font-size: 13px; color: var(--text-dim); display: block; margin-bottom: 6px; }

.form-row { margin-bottom: 14px; }

.hero {
  text-align: center;
  padding: 40px 0 20px;
}
.hero h1 { font-size: 32px; margin-bottom: 8px; }
.hero p { color: var(--text-dim); max-width: 560px; margin: 0 auto; }

.stat-row { display: flex; gap: 14px; flex-wrap: wrap; }
.stat-tile {
  flex: 1;
  min-width: 140px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}
.stat-tile .num { font-size: 26px; font-weight: 700; }
.stat-tile .label { color: var(--text-dim); font-size: 13px; }

/* ---- Landing page (index) ---- */
.landing-hero { padding: 36px 0 22px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 20px; }
.hero-cta a { min-width: 160px; }
.btn-outline {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font-weight: 600;
  text-align: center;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.section-h { font-size: 20px; margin: 30px 0 14px; }

.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-panel);
}
.feature-ic { font-size: 26px; line-height: 1.1; flex: 0 0 auto; }
.feature strong { display: block; margin-bottom: 4px; }
.feature p { margin: 0; color: var(--text-dim); font-size: 14px; line-height: 1.45; }

.premium-hl {
  border: 1px solid rgba(var(--warn-rgb), 0.5);
  background: rgba(var(--warn-rgb), 0.06);
  border-radius: var(--radius);
  padding: 22px;
  margin-top: 30px;
}
.premium-hl h2 { font-size: 20px; }

.full-test-card {
  display: block;
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.06);
}
.full-test-card:hover { border-color: var(--accent-dark); }

.passage {
  white-space: pre-line;
  line-height: 1.7;
  font-size: 15.5px;
  max-height: 65vh;
  overflow-y: auto;
  padding-right: 8px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
@media (max-width: 800px) {
  .split { grid-template-columns: 1fr; }
}

.question-block {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.question-block:first-child { border-top: none; padding-top: 0; }

.question-text { margin-bottom: 10px; white-space: pre-line; }

.option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  margin-bottom: 4px;
  text-align: left;
}
.option span { flex: 1 1 auto; }
.option:hover { background: var(--bg-panel-2); }
.option.selected { border-color: var(--accent); background: rgba(var(--accent-rgb), 0.1); }
.option.correct { border-color: var(--good); background: rgba(var(--good-rgb), 0.12); }
.option.incorrect { border-color: var(--bad); background: rgba(var(--bad-rgb), 0.12); }

.badge {
  display: inline-block;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
}
.badge.correct { background: rgba(var(--good-rgb), 0.18); color: var(--good); }
.badge.incorrect { background: rgba(var(--bad-rgb), 0.18); color: var(--bad); }

.timer {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 8px;
  background: var(--bg-panel-2);
  border: 1px solid var(--border);
}
.timer.warn { color: var(--warn); border-color: var(--warn); }
.timer.danger { color: var(--bad); border-color: var(--bad); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.pill-row { display: flex; gap: 8px; flex-wrap: wrap; }

.msg { padding: 10px 14px; border-radius: 8px; font-size: 14px; margin-bottom: 12px; }
.msg.error { background: rgba(var(--bad-rgb), 0.14); color: var(--bad); border: 1px solid rgba(var(--bad-rgb), 0.3); }
.msg.success { background: rgba(var(--good-rgb), 0.14); color: var(--good); border: 1px solid rgba(var(--good-rgb), 0.3); }

.word-count { font-size: 13px; color: var(--text-dim); margin-top: 6px; }
.word-count.ok { color: var(--good); }

.mic-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--bad);
  font-weight: 600;
}
.mic-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--bad);
  animation: pulse 1s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 13px;
  margin: 16px 0;
}
.divider-row::before, .divider-row::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

#google-signin-btn { display: flex; justify-content: center; min-height: 40px; }

footer.site-footer {
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
  padding: 30px 20px;
}

.subtle { color: var(--text-dim); font-size: 13px; }

/* ---- Section directions (real exam wording + Russian note) ---- */
.directions h3 { margin-top: 0; }
.directions-en {
  font-size: 15px;
  line-height: 1.6;
}
.directions-ru {
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ---- Estimated scaled score ---- */
.scaled-box {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
}
.scaled-num { font-size: 26px; font-weight: 700; color: var(--accent); }
.scaled-max { font-size: 16px; color: var(--text-dim); font-weight: 600; }
.scaled-band { font-weight: 600; margin-top: 2px; }
.scaled-note { font-size: 12px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }

/* ---- Materials / premium ---- */
.material-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.premium-badge { background: rgba(var(--warn-rgb), 0.18); color: var(--warn); font-size: 13px; padding: 4px 10px; }
.promo-row { display: flex; gap: 8px; margin-top: 10px; }
.promo-row input { flex: 1; }
.promo-row button { flex: 0 0 auto; }
@media (max-width: 480px) {
  .material-row { flex-direction: column; align-items: flex-start; }
  .material-row > div:last-child { margin-left: 0 !important; }
}

/* ---- Profile / личный кабинет ---- */
.profile-link { color: var(--text-dim); font-weight: 500; }
.profile-link:hover { color: var(--text); text-decoration: none; }
.premium-dot { color: var(--warn); }
.profile-head { display: flex; align-items: center; gap: 18px; }
.avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--accent); color: var(--accent-contrast);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700; flex: 0 0 auto;
}
.section-title { margin: 24px 0 12px; font-size: 20px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ach {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 12px 14px; background: var(--bg-panel);
}
.ach.locked { opacity: 0.45; filter: grayscale(0.6); }
.ach.earned { border-color: var(--accent); }
.ach-icon { font-size: 26px; }
.ach-title { font-weight: 600; }
.activity-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-top: 1px solid var(--border);
}
.activity-row:first-child { border-top: none; }
@media (max-width: 480px) {
  .profile-head { flex-direction: column; text-align: center; }
}

/* ---- Theory section ---- */
.theory-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0;
}
.theory-tab {
  padding: 8px 14px;
  font-weight: 500;
}
.theory-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.theory-tab-vocab {
  text-decoration: none;
  border-style: dashed;
  border-color: var(--accent);
  color: var(--accent);
  margin-left: 6px;
}
.theory-tab-vocab:hover {
  background: rgba(var(--accent-rgb), 0.12);
}
#theory-content { line-height: 1.65; }
#theory-content h2 { margin-top: 0; }
#theory-content h3 { margin-top: 26px; color: var(--accent); }
#theory-content h4 {
  margin: 18px 0 4px;
  font-size: 15px;
}
#theory-content ul { padding-left: 20px; }
#theory-content li { margin-bottom: 6px; }
#theory-content p { margin: 8px 0; }
.theory-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}
.theory-table th, .theory-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.theory-table th { background: var(--bg-panel-2); }
.theory-tip {
  margin: 18px 0 4px;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  font-size: 14px;
}
/* wide tables scroll rather than break the page layout on small screens */
@media (max-width: 640px) {
  #theory-content { overflow-x: auto; }
}

/* ---- Vocabulary trainer ---- */
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: var(--bg-panel-2);
  overflow: hidden;
  border: 1px solid var(--border);
}
.progress-fill {
  height: 100%;
  background: var(--good);
  transition: width 0.3s;
}
.flashcard {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel-2);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
  user-select: none;
}
.flash-word { font-size: 34px; font-weight: 700; }
.flash-ru { font-size: 22px; font-weight: 600; margin-bottom: 6px; }
.flash-en { font-size: 15px; margin-bottom: 12px; }
.flash-ex { font-style: italic; color: var(--text); }
.flash-hint { margin-top: 6px; }
#word-list .theory-table td:nth-child(3) { max-width: 320px; }

/* ---- 2026 format: Complete the Words ---- */
.cw-paragraph { font-size: 18px; line-height: 2.1; }
.cw-gap { display: inline-flex; align-items: baseline; white-space: nowrap; }
.cw-shown { color: var(--text); }
.cw-input {
  border: none;
  border-bottom: 2px solid var(--accent);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  font: inherit;
  padding: 0 2px;
  min-width: 2ch;
  border-radius: 3px 3px 0 0;
  outline: none;
}
.cw-input:focus { background: rgba(var(--accent-rgb), 0.16); }
.cw-input.correct { border-bottom-color: var(--good); background: rgba(var(--good-rgb), 0.14); color: var(--good); }
.cw-input.incorrect { border-bottom-color: var(--bad); background: rgba(var(--bad-rgb), 0.14); color: var(--bad); }
/* underscores hint how many letters are missing while the field is empty */
.cw-input::placeholder { color: var(--text-dim); letter-spacing: 1px; opacity: 0.65; }

/* ---- Premium plan cards (materials) ---- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-top: 8px; }
.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  background: var(--bg-panel-2);
}
.plan-label { font-size: 14px; color: var(--text-dim); }
.plan-price { font-size: 24px; font-weight: 700; margin: 6px 0 10px; }
.plan-price .plan-cur { font-size: 15px; font-weight: 500; color: var(--text-dim); }
.plan-card .buy-btn { width: 100%; }

/* ---- Premium benefits list (payment card) ---- */
.premium-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px 18px;
  margin: 0 0 18px;
}
.benefit { display: flex; gap: 10px; align-items: flex-start; }
.benefit-ic {
  flex: 0 0 auto;
  font-size: 20px;
  line-height: 1.3;
}
.benefit-txt { display: flex; flex-direction: column; gap: 2px; }
.benefit-txt strong { font-size: 14.5px; }
.benefit-txt .subtle { font-size: 13px; line-height: 1.4; }

/* ---- Email verification banner (renderHeader) ---- */
.verify-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: rgba(var(--accent-rgb), 0.12);
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.verify-banner span { flex: 1 1 auto; }
.verify-banner .btn { padding: 5px 12px; }
.verify-close { background: transparent; border: none; padding: 4px 8px; color: var(--text-dim); }

/* ---- 2026 format: in-task navigation (back to list / skip to next task) ---- */
.practice-nav { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 2px; }
#next-link { color: var(--accent); text-decoration: none; font-weight: 600; white-space: nowrap; }
#next-link:hover { text-decoration: underline; }

/* ---- 2026 format: Read in Daily Life notice ---- */
.notice-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
  padding: 20px 22px;
}
.notice-title { font-weight: 700; text-align: center; margin-bottom: 10px; font-size: 15px; }
.notice-body { line-height: 1.6; color: var(--text); white-space: pre-line; }

/* ---- 2026 format: Build a Sentence ---- */
.bs-sentence {
  font-size: 19px;
  line-height: 2.2;
  margin: 10px 0 18px;
  padding: 14px 16px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-panel);
}
.bs-fixed { font-weight: 600; }
.bs-slots { display: inline; }
.bs-placeholder { color: var(--text-dim); font-size: 15px; }
.bs-bank { display: flex; flex-wrap: wrap; gap: 8px; }
.bs-tile {
  font: inherit;
  padding: 6px 12px;
  margin: 0 3px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(var(--accent-rgb), 0.10);
  color: var(--text);
  cursor: pointer;
}
.bs-tile:hover { background: rgba(var(--accent-rgb), 0.22); }
.bs-tile.placed { border-style: solid; background: rgba(var(--accent-rgb), 0.18); }

/* ---- 2026 format: Academic Discussion replies ---- */
.reply {
  border-left: 3px solid var(--accent);
  padding: 8px 12px;
  margin-top: 10px;
  background: var(--bg-panel);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}

/* ---------- Legal pages (oferta, privacy) ---------- */
.legal { max-width: 820px; }
.legal h1 { margin-bottom: 6px; }
.legal h2 { font-size: 1.15rem; margin: 26px 0 8px; color: var(--accent); }
.legal p, .legal li { color: var(--text); line-height: 1.6; }
.legal ul { margin: 8px 0 8px 22px; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--accent); }
.legal .legal-note {
  background: var(--bg-panel-2);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  padding: 10px 14px;
  margin: 12px 0;
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* ---------- Site footer ---------- */
.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--bg-panel);
  padding: 22px 20px 30px;
}
.site-footer .footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-footer .footer-brand { font-weight: 700; color: var(--text); }
.site-footer .footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.site-footer .footer-links a { color: var(--text-dim); text-decoration: none; font-size: 0.92rem; }
.site-footer .footer-links a:hover { color: var(--accent); }
.site-footer .footer-note {
  max-width: 1000px;
  margin: 14px auto 0;
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ---------- Full-test variant picker ---------- */
.variant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.variant-btn {
  padding: 16px 14px;
  border: 1px solid var(--border);
  background: var(--bg-panel-2);
  color: var(--text);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s, transform .05s;
}
.variant-btn:hover { border-color: var(--accent); }
.variant-btn:active { transform: translateY(1px); }
