/* WeTest — Studio design system. Light theme, single trusted-blue accent.
   Adapted from the politik.bio "Charcoal Studio" structure: chunky cards,
   pill buttons, generous type, 4-pt grid. Re-themed white + blue. */

/* ───────────────────────────────────────────────────────────────────────────
   1. Tokens
   ─────────────────────────────────────────────────────────────────────────── */
:root {
  /* Cool neutral ramp — professional, scientific. */
  --paper-50:  #ffffff;
  --paper-75:  #f8fafc;
  --paper-100: #f1f5f9;
  --paper-150: #eef2f7;
  --paper-200: #e3e8ef;
  --paper-300: #cdd5e0;
  --paper-400: #94a3b8;
  --paper-500: #64748b;
  --paper-600: #475569;
  --paper-700: #334155;
  --paper-800: #1e293b;
  --paper-900: #0f172a;

  /* Trusted blue — the single action accent. */
  --blue-50:  #eff5ff;
  --blue-100: #dbe7fe;
  --blue-300: #93b4f9;
  --blue-400: #5b8def;
  --blue-500: #2563eb;
  --blue-600: #1d4ed8;
  --blue-700: #1e40af;

  --green-500: #16a34a;
  --red-500:   #dc2626;
  --amber-500: #d97706;

  /* Semantic */
  --bg:            var(--paper-75);
  --bg-card:       var(--paper-50);
  --bg-card-2:     var(--paper-100);
  --bg-subtle:     var(--paper-100);
  --bg-input:      var(--paper-50);
  --bg-header:     rgba(255, 255, 255, .85);

  --text:          var(--paper-900);
  --text-soft:     var(--paper-600);
  --text-mute:     var(--paper-500);
  --text-on-accent:#ffffff;

  --line:          var(--paper-200);
  --line-strong:   var(--paper-300);

  --accent:        var(--blue-500);
  --accent-hover:  var(--blue-400);
  --accent-press:  var(--blue-600);
  --accent-soft:   rgba(37, 99, 235, .12);
  --accent-glow:   rgba(37, 99, 235, .30);
  --ring:          var(--blue-500);
  --danger:        var(--red-500);
  --success:       var(--green-500);

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 1px rgba(15, 23, 42, .03);
  --shadow-md: 0 4px 14px -3px rgba(15, 23, 42, .08), 0 2px 5px rgba(15, 23, 42, .05);
  --shadow-lg: 0 20px 48px -16px rgba(15, 23, 42, .18), 0 6px 14px rgba(15, 23, 42, .07);
  --shadow-cta: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 10px 28px -8px rgba(37, 99, 235, .55), 0 2px 5px rgba(30, 64, 175, .18);

  --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-7: 32px; --s-8: 40px;
  --s-9: 56px; --s-10: 80px;

  --r-pill: 999px;
  --r-lg: 22px;
  --r-md: 14px;
  --r-sm: 10px;

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.42, 0.64, 1);
  --d-quick: 120ms;
  --d-base: 220ms;
  --d-slow: 460ms;

  --w-narrow: 600px;
  --w-base: 760px;
  --w-wide: 1120px;

  --z-sticky: 50;
  --z-modal-bg: 100;
  --z-modal: 101;
}

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

/* ───────────────────────────────────────────────────────────────────────────
   2. Reset
   ─────────────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); color-scheme: light; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700; color: var(--text);
  letter-spacing: -.02em; line-height: 1.15; margin: 0;
}
a { color: inherit; }
button { font-family: inherit; }
img { max-width: 100%; display: block; }
input, textarea { font-family: inherit; background: var(--bg-input); color: var(--text); }
::selection { background: var(--accent); color: #fff; }
.hidden { display: none !important; }
.text-center { text-align: center; }

main { max-width: var(--w-wide); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

/* ───────────────────────────────────────────────────────────────────────────
   3. Header
   ─────────────────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--bg-header);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--w-wide); margin: 0 auto;
  padding: 12px clamp(16px, 4vw, 32px);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-3);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
}
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(150deg, var(--blue-400), var(--blue-600));
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}
.brand__name {
  font-family: var(--font-display); font-weight: 800;
  font-size: 21px; letter-spacing: -.025em;
}
.brand__dot { color: var(--accent); }
.site-header__right { display: flex; align-items: center; gap: var(--s-2); }
.nav-link {
  text-decoration: none; color: var(--text); font-weight: 600; font-size: 14px;
  padding: 9px 15px; border-radius: var(--r-pill);
  background: var(--bg-card); border: 1px solid var(--line);
  transition: background-color var(--d-quick) var(--ease), border-color var(--d-quick) var(--ease);
}
.nav-link:hover { background: var(--bg-card-2); border-color: var(--line-strong); }
.nav-link--btn { cursor: pointer; }

/* ── Language switcher ────────────────────────────────────────────────────── */
.lang-switcher { position: relative; }
.lang-switcher > summary { list-style: none; cursor: pointer; }
.lang-switcher > summary::-webkit-details-marker { display: none; }
.lang-switcher__btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 14px; border-radius: var(--r-pill);
  background: var(--bg-card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text);
  transition: background-color var(--d-quick) var(--ease), border-color var(--d-quick) var(--ease);
}
.lang-switcher__btn:hover { background: var(--bg-card-2); border-color: var(--line-strong); }
.lang-switcher[open] > summary > .lang-switcher__btn { background: var(--bg-card-2); border-color: var(--line-strong); }
.lang-switcher__caret { font-size: 9px; color: var(--text-mute); transition: transform var(--d-quick); }
.lang-switcher[open] .lang-switcher__caret { transform: rotate(180deg); }
.lang-switcher__panel {
  position: absolute; top: calc(100% + 8px); inset-inline-end: 0;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-lg);
  padding: var(--s-2); min-width: 200px; z-index: var(--z-modal);
  display: flex; flex-direction: column; gap: 2px;
  animation: rise var(--d-base) var(--ease);
}
.lang-switcher__option {
  display: flex; flex-direction: column; gap: 1px;
  padding: 9px 12px; border-radius: var(--r-sm);
  text-decoration: none; color: var(--text);
  transition: background-color var(--d-quick);
}
.lang-switcher__option:hover { background: var(--bg-card-2); }
.lang-switcher__option.is-current { background: var(--accent-soft); }
.lang-switcher__native { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.lang-switcher__english { font-size: 11px; color: var(--text-mute); }

/* ───────────────────────────────────────────────────────────────────────────
   4. Buttons
   ─────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 13px 24px; border-radius: var(--r-pill);
  font-family: var(--font-body); font-weight: 600; font-size: 16px; color: var(--text);
  text-decoration: none; cursor: pointer; line-height: 1; min-height: 48px;
  background: var(--bg-card); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  transition: transform 90ms var(--ease-back), background-color var(--d-quick) var(--ease),
              border-color var(--d-quick) var(--ease), box-shadow var(--d-quick) var(--ease),
              filter var(--d-quick) var(--ease);
  user-select: none;
}
.btn:hover { background: var(--bg-card-2); border-color: var(--line-strong); }
.btn:active { transform: scale(.97); filter: brightness(.97); }
.btn:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] {
  color: var(--text-mute); cursor: not-allowed; transform: none; filter: none; box-shadow: none;
}
.btn-primary {
  background: linear-gradient(180deg, var(--blue-400), var(--blue-500));
  color: var(--text-on-accent); border-color: rgba(255, 255, 255, .14);
  font-weight: 700; box-shadow: var(--shadow-cta);
  position: relative; overflow: hidden;
}
.btn-primary::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .25), transparent 42%);
  pointer-events: none;
}
.btn-primary:hover {
  background: linear-gradient(180deg, var(--blue-300), var(--blue-400));
  border-color: rgba(255, 255, 255, .2);
}
.btn-primary:active { background: var(--accent-press); filter: brightness(.97); }
.btn-danger { background: var(--bg-card); color: var(--danger); border-color: var(--line-strong); font-weight: 600; }
.btn-danger:hover { background: #fef2f2; border-color: #fca5a5; }
.btn-block { width: 100%; }
.btn-lg { padding: 17px 30px; font-size: 18px; min-height: 58px; }
.btn-sm { padding: 9px 16px; font-size: 14px; min-height: 38px; }
.btn__arrow { transition: transform var(--d-quick) var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
[dir="rtl"] .btn__arrow { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .btn__arrow { transform: scaleX(-1) translateX(3px); }

/* ───────────────────────────────────────────────────────────────────────────
   5. Footer
   ─────────────────────────────────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--line); background: var(--bg-card);
  margin-top: var(--s-10);
}
.site-footer__inner {
  max-width: var(--w-base); margin: 0 auto;
  padding: var(--s-8) clamp(16px, 4vw, 32px) var(--s-9);
  text-align: center;
}
.site-footer__brand { display: inline-flex; align-items: center; gap: 8px; margin-bottom: var(--s-2); }
.site-footer__tag { color: var(--text-mute); font-size: 13px; font-weight: 600; margin: 0 0 var(--s-4); }
.site-footer__disclaimer {
  color: var(--text-mute); font-size: 12px; line-height: 1.65;
  max-width: 560px; margin: 0 auto var(--s-4);
}
.site-footer__legal { color: var(--text-mute); font-size: 12px; margin: 0; }

/* ───────────────────────────────────────────────────────────────────────────
   6. Test page — lander + quiz
   ─────────────────────────────────────────────────────────────────────────── */
.test-shell {
  max-width: var(--w-base); margin: 0 auto; width: 100%;
  padding: clamp(16px, 4vw, 36px);
  min-height: calc(100dvh - 60px);
  display: flex; flex-direction: column;
}

/* ── Lander ───────────────────────────────────────────────────────────────── */
.lander {
  flex: 1 1 auto;
  display: flex; flex-direction: column; justify-content: center;
  width: 100%; max-width: 500px; margin: 0 auto;
  padding: var(--s-8) 0; gap: var(--s-6);
}
.lander__icon { align-self: center; color: var(--accent); }
.lander__title {
  font-family: var(--font-display);
  font-size: clamp(29px, 5.2vw, 43px); line-height: 1.18; letter-spacing: -.03em;
  font-weight: 800; margin: 0;
}
.lander__title-accent { color: var(--accent); }
.lander__checks {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: var(--s-5);
}
.lander__check {
  display: flex; align-items: flex-start; gap: var(--s-3);
  font-size: 16px; font-weight: 500; color: var(--text-soft);
}
.lander__check-mark { flex-shrink: 0; color: var(--text-mute); margin-top: 1px; }
.lander .btn-primary { width: 100%; border-radius: var(--r-md); }
.lander__avg {
  text-align: center; color: var(--text-mute);
  font-size: 13px; font-weight: 600; margin: 0;
}

/* ── Quiz ─────────────────────────────────────────────────────────────────── */
.quiz {
  flex: 1 1 auto; display: flex; flex-direction: column;
  max-width: 560px; margin: 0 auto; width: 100%; gap: var(--s-5);
}
.quiz__head { display: flex; align-items: center; gap: var(--s-3); }
.quiz__bar { flex: 1; min-width: 0; }
.quiz__bar-label {
  display: flex; justify-content: space-between; font-size: 13px;
  color: var(--text-mute); font-weight: 600; margin-bottom: 6px;
}
.quiz__bar-percent { font-variant-numeric: tabular-nums; }
.quiz__track {
  background: var(--bg-subtle); height: 14px; border-radius: var(--r-pill);
  overflow: hidden; border: 1px solid var(--line);
}
.quiz__fill {
  height: 100%; border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--blue-400), var(--blue-500));
  box-shadow: 0 0 10px -2px var(--accent-glow);
  transition: width var(--d-slow) var(--ease);
}
.quiz__timer {
  flex-shrink: 0; width: 50px; height: 50px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  font-variant-numeric: tabular-nums;
  background: var(--bg-card); border: 1px solid var(--line); color: var(--text);
  box-shadow: var(--shadow-sm); transition: color var(--d-base), border-color var(--d-base);
}
.quiz__timer.is-warning { color: var(--amber-500); border-color: #fcd34d; }
.quiz__timer.is-danger { color: var(--danger); border-color: #fca5a5; }

.question { flex: 1 1 auto; display: flex; flex-direction: column; gap: var(--s-4); min-height: 0; }
.question__text {
  font-family: var(--font-display);
  font-size: clamp(21px, 3.6vw, 30px); line-height: 1.3; font-weight: 700;
  letter-spacing: -.015em; text-align: center;
  display: flex; align-items: center; justify-content: center;
  flex: 1 1 auto; min-height: clamp(110px, 24vh, 220px);
  padding: var(--s-4) var(--s-2);
}
.question__options { display: flex; flex-direction: column; gap: var(--s-2); flex-shrink: 0; }
.question__option {
  text-align: center; padding: 15px 18px;
  border-radius: var(--r-md); border: 1px solid var(--line);
  background: var(--bg-card); box-shadow: var(--shadow-sm);
  font-family: var(--font-body); font-size: 16px; font-weight: 600; color: var(--text);
  cursor: pointer; min-height: 54px;
  transition: transform 90ms var(--ease-back), background-color var(--d-quick) var(--ease),
              border-color var(--d-quick) var(--ease), box-shadow var(--d-quick) var(--ease);
}
.question__option:hover { background: var(--bg-card-2); border-color: var(--line-strong); box-shadow: var(--shadow-md); }
.question__option:active { transform: scale(.98); }
.question__option.is-selected {
  background: var(--accent-soft); border-color: var(--accent); color: var(--accent-press);
  animation: tap 240ms var(--ease-back);
}
@keyframes tap { 0% { transform: scale(1); } 35% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* ── Finish / loading ─────────────────────────────────────────────────────── */
.finish {
  flex: 1 1 auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  gap: var(--s-2); padding: var(--s-8);
}
.spinner {
  width: 46px; height: 46px; border-radius: var(--r-pill);
  border: 4px solid var(--line); border-top-color: var(--accent);
  animation: spin .85s linear infinite; margin-bottom: var(--s-4);
}
@keyframes spin { to { transform: rotate(360deg); } }
.finish__title { font-size: 22px; }
.finish__body { color: var(--text-soft); margin: 0; }

/* ───────────────────────────────────────────────────────────────────────────
   7. Cards & generic page
   ─────────────────────────────────────────────────────────────────────────── */
.narrow-page { max-width: var(--w-narrow); margin: var(--s-8) auto; padding: 0 clamp(16px, 4vw, 24px); }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(20px, 4vw, 32px);
  box-shadow: var(--shadow-md);
}
.card + .card { margin-top: var(--s-5); }
.panel-title {
  font-family: var(--font-display); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; color: var(--text-mute);
  margin: 0 0 var(--s-4);
}
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent);
}

.field { display: flex; flex-direction: column; gap: var(--s-1); margin-bottom: var(--s-4); }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-soft); }
.field input {
  font-size: 16px; padding: 14px 16px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--bg-input); color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--d-quick) var(--ease), box-shadow var(--d-quick) var(--ease);
}
.field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder { color: var(--text-mute); }
.code-input {
  text-align: center; font-size: 28px !important; font-weight: 700;
  letter-spacing: .4em; font-family: var(--font-display);
}

.alert {
  border-radius: var(--r-md); padding: 12px 16px; font-size: 14px; font-weight: 500;
  margin-bottom: var(--s-4);
}
.alert--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* ───────────────────────────────────────────────────────────────────────────
   8. Result page
   ─────────────────────────────────────────────────────────────────────────── */
.result { max-width: var(--w-narrow); margin: var(--s-7) auto; padding: 0 clamp(16px, 4vw, 24px); }
.result__head {
  display: flex; align-items: center; gap: var(--s-2);
  color: var(--text-mute); font-size: 13px; font-weight: 600; margin-bottom: var(--s-4);
}
.result__head .eyebrow { color: var(--text-mute); }
.iq-block { text-align: center; padding: var(--s-5) 0 var(--s-4); }
.iq-value {
  font-family: var(--font-display); font-size: 76px; font-weight: 800;
  letter-spacing: -.03em; line-height: 1; color: var(--accent);
}
.iq-value.is-blurred { filter: blur(14px); user-select: none; }
.iq-label {
  font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-mute); margin-top: var(--s-3);
}
.result-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2);
  margin-top: var(--s-5);
}
.result-meta__item {
  background: var(--bg-subtle); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 12px 8px; text-align: center;
}
.result-meta__label {
  display: block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-mute); margin-bottom: 3px;
}
.result-meta__value { font-family: var(--font-display); font-size: 19px; font-weight: 700; }

.unlock { background: linear-gradient(170deg, var(--blue-50), var(--bg-card) 60%); }
.unlock__title { font-size: 22px; margin: 0 0 var(--s-2); }
.unlock__body { color: var(--text-soft); margin: 0 0 var(--s-4); font-size: 15px; }
.unlock__price {
  display: flex; align-items: baseline; gap: var(--s-2); flex-wrap: wrap;
  margin-bottom: var(--s-4);
}
.unlock__trial {
  font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--accent);
}
.unlock__then { color: var(--text-mute); font-size: 14px; font-weight: 600; }
.unlock__form { display: flex; flex-direction: column; gap: var(--s-3); }
.unlock__form input {
  font-size: 16px; padding: 14px 16px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--bg-input); color: var(--text);
}
.unlock__form input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.unlock__note { color: var(--text-mute); font-size: 12px; text-align: center; margin: var(--s-2) 0 0; }

.bars { display: flex; flex-direction: column; gap: var(--s-4); }
.bar__head { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.bar__value { color: var(--accent); font-variant-numeric: tabular-nums; }
.bar__track { background: var(--bg-subtle); height: 10px; border-radius: var(--r-pill); overflow: hidden; border: 1px solid var(--line); }
.bar__fill { height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--blue-400), var(--blue-500)); }

.testimonials { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.testimonial {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: var(--s-5); box-shadow: var(--shadow-sm);
}
.testimonial__stars { color: var(--amber-500); font-size: 14px; letter-spacing: 2px; margin-bottom: var(--s-2); }
.testimonial p { margin: 0 0 var(--s-3); font-size: 14px; color: var(--text-soft); line-height: 1.6; }
.testimonial__author { font-size: 13px; font-weight: 700; color: var(--text); }

/* ── Subscription (account) ───────────────────────────────────────────────── */
.sub-info { margin-top: var(--s-5); }
.sub-status {
  display: inline-flex; padding: 6px 14px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 700;
}
.sub-active { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sub-inactive { background: var(--bg-subtle); color: var(--text-mute); border: 1px solid var(--line); }
.sub-details { margin-top: var(--s-4); display: flex; flex-direction: column; gap: 2px; }
.sub-row {
  display: flex; justify-content: space-between; gap: var(--s-3);
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px;
}
.sub-row:last-child { border-bottom: 0; }
.sub-label { color: var(--text-mute); font-weight: 600; }

/* ───────────────────────────────────────────────────────────────────────────
   9. Certificate
   ─────────────────────────────────────────────────────────────────────────── */
.cert-page {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px); background: var(--bg);
}
.certificate {
  background: var(--bg-card); width: 100%; max-width: 720px;
  border-radius: var(--r-lg); padding: clamp(28px, 6vw, 64px);
  box-shadow: var(--shadow-lg); position: relative;
  border: 1px solid var(--line);
}
.cert__rule { height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--blue-400), var(--blue-600)); margin-bottom: var(--s-7); }
.cert__header { text-align: center; margin-bottom: var(--s-7); }
.cert__org {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: -.02em;
}
.cert__title {
  font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .16em;
  color: var(--text-mute); margin-top: var(--s-2);
}
.cert__body { text-align: center; }
.cert__certifies { color: var(--text-mute); font-size: 14px; margin: 0 0 var(--s-3); }
.cert__name {
  font-family: var(--font-display); font-size: clamp(28px, 5vw, 40px); font-weight: 800;
  letter-spacing: -.02em; margin: 0 0 var(--s-6);
}
.cert__iq {
  font-family: var(--font-display); font-size: clamp(56px, 11vw, 88px); font-weight: 800;
  color: var(--accent); line-height: 1; letter-spacing: -.03em;
}
.cert__iq-label {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em;
  color: var(--text-mute); margin-top: var(--s-2);
}
.cert__text {
  color: var(--text-soft); font-size: 15px; line-height: 1.65;
  max-width: 420px; margin: var(--s-5) auto 0;
}
.cert__footer {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--s-4); margin-top: var(--s-8); padding-top: var(--s-6);
  border-top: 1px solid var(--line); text-align: start;
}
.cert__meta-label { font-size: 11px; color: var(--text-mute); margin-bottom: 3px; }
.cert__meta-value { font-size: 14px; font-weight: 600; }
.cert__ref { font-size: 11px; color: var(--text-mute); margin-top: 3px; }
.cert__qr canvas { border-radius: 6px; }
.cert__sig { text-align: center; }
.cert__sig-line { width: 150px; height: 1px; background: var(--line-strong); margin: 0 auto var(--s-2); }
.cert__sig-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.cert__sig-sub { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* ───────────────────────────────────────────────────────────────────────────
   10. Auth / success pages
   ─────────────────────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 5vw, 48px);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: clamp(24px, 5vw, 40px);
  box-shadow: var(--shadow-lg);
}
.auth-card__brand { display: flex; justify-content: center; margin-bottom: var(--s-6); }
.auth-card__title { font-size: 24px; text-align: center; margin: 0 0 var(--s-1); }
.auth-card__sub { color: var(--text-soft); text-align: center; font-size: 14px; margin: 0 0 var(--s-6); }
.auth-card__alt { text-align: center; font-size: 13px; margin-top: var(--s-4); }
.auth-card__alt a { color: var(--accent); font-weight: 600; }

.success-page {
  min-height: calc(100dvh - 60px); display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: var(--s-8); gap: var(--s-3);
}
.success-icon {
  width: 72px; height: 72px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; margin-bottom: var(--s-3);
}
.success-page h1 { font-size: 30px; }
.success-page p { color: var(--text-soft); max-width: 420px; margin: 0 0 var(--s-3); }

/* ───────────────────────────────────────────────────────────────────────────
   11. Animations & responsive
   ─────────────────────────────────────────────────────────────────────────── */
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@keyframes fade-in { from { opacity: 0; transform: translateY(10px); } }
.animate-fade { animation: fade-in var(--d-base) var(--ease) both; }
.animate-fade-1 { animation: fade-in var(--d-base) var(--ease) both; animation-delay: 80ms; }
.animate-fade-2 { animation: fade-in var(--d-base) var(--ease) both; animation-delay: 160ms; }

#stripe-element { margin: var(--s-2) 0; }

@media (max-width: 540px) {
  body { font-size: 16px; }
  .testimonials { grid-template-columns: 1fr; }
  .iq-value { font-size: 60px; }
  .question__text { min-height: clamp(90px, 18vh, 150px); }
  .site-header__inner { padding: 10px 14px; }
  .nav-link { display: none; }
}
@media (max-height: 660px) {
  .test-shell { padding: var(--s-3) var(--s-4); }
  .question__text { min-height: clamp(70px, 14vh, 120px); }
}

/* ───────────────────────────────────────────────────────────────────────────
   12. Home landing
   ─────────────────────────────────────────────────────────────────────────── */
.home { padding-bottom: var(--s-9); }
.home-hero {
  text-align: center; max-width: 680px; margin: 0 auto;
  padding: clamp(40px, 8vw, 88px) 0 var(--s-9);
  display: flex; flex-direction: column; align-items: center; gap: var(--s-5);
}
.home-hero__title {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 68px); line-height: 1.05; letter-spacing: -.03em;
  font-weight: 800; margin: 0;
}
.home-hero__sub {
  color: var(--text-soft); font-size: clamp(16px, 2vw, 19px);
  max-width: 540px; margin: 0;
}
.home-hero__note { color: var(--text-mute); font-size: 13px; font-weight: 600; margin: 0; }
.home-points {
  display: grid; gap: var(--s-4);
  grid-template-columns: repeat(auto-fit, minmax(236px, 1fr));
  max-width: var(--w-base); margin: 0 auto;
}
.home-point {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: var(--s-6); box-shadow: var(--shadow-sm);
}
.home-point__num {
  width: 36px; height: 36px; border-radius: var(--r-pill);
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 16px;
  margin-bottom: var(--s-3);
}
.home-point__title { font-size: 18px; margin: 0 0 var(--s-2); }
.home-point__body { color: var(--text-soft); font-size: 14px; margin: 0; line-height: 1.6; }
.home-signin { max-width: 460px; margin: var(--s-9) auto 0; }
.signin-card { text-align: center; }
.signin-card__title { font-size: 22px; margin: 0 0 var(--s-2); }
.signin-card__sub { color: var(--text-soft); font-size: 14px; margin: 0 0 var(--s-5); }
.signin-card__form { display: flex; flex-direction: column; gap: var(--s-3); }
.signin-card__input {
  font-size: 16px; padding: 14px 16px; border-radius: var(--r-md);
  border: 1.5px solid var(--line); background: var(--bg-input); color: var(--text);
}
.signin-card__input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.signin-card__hint { color: var(--text-mute); font-size: 12px; margin: var(--s-3) 0 0; }

/* RTL fine-tuning */
[dir="rtl"] .lang-switcher__panel { inset-inline-end: 0; }
