/* страница проверки: отдельная, но в токенах сайта */
html, body { overflow-anchor: none; }

.gate-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.gate-body::before {
  opacity: .7;
}

.gate-body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: .22;
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 20%, transparent) .6px, transparent .6px);
  background-size: 19px 19px;
  mask-image: linear-gradient(180deg, transparent, #000 20%, #000 80%, transparent);
}

.gate-topbar {
  position: relative;
  z-index: 2;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.gate-topbar .brand {
  cursor: default;
}

.gate-topbar .controls {
  margin-left: auto;
}

.gate-main {
  position: relative;
  z-index: 2;
  flex: 1;
  display: grid;
  place-items: center;
  padding: clamp(26px, 5vw, 60px) var(--page-pad);
}

.gate-card {
  position: relative;
  min-height: 540px;
  width: min(650px, 100%);
  padding: clamp(26px, 4.4vw, 46px);
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--accent) 5%, transparent), transparent 42%),
    var(--card);
  box-shadow: 0 34px 90px rgba(0, 0, 0, .34);
  overflow: hidden;
  animation: gateIn .5s var(--ease-out) both;
}

.gate-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.gate-card::after {
  content: '';
  position: absolute;
  width: 240px;
  height: 240px;
  right: -130px;
  top: -150px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  filter: blur(14px);
  pointer-events: none;
}

.gate-card.is-shaking {
  animation: gateShake .42s var(--ease-out);
}

.gate-card__top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-bottom: 4px;
}

.gate-kicker,
.gate-badge {
  font: 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

.gate-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
}

.gate-title {
  margin: 0 0 26px;
  font: 700 clamp(72px, 13vw, 132px)/.78 'Big Shoulders', 'Bricolage Grotesque', sans-serif;
  letter-spacing: -.015em;
  text-transform: lowercase;
  color: var(--ink);
}

.gate-sub {
  margin: 10px 0 clamp(32px, 5vw, 46px);
  padding-top: 12px;
  min-height: 3.5em;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(17px, 1.9vw, 19px);
  line-height: 1.55;
}

.gate-instruction {
  margin: 0 0 18px;
  min-height: 2.9em;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  letter-spacing: -.02em;
}

.gate-target {
  font-weight: 700;
  color: var(--c);
  border-bottom: 2px solid color-mix(in srgb, var(--c) 50%, transparent);
  text-shadow: 0 0 26px color-mix(in srgb, var(--c) 20%, transparent);
}

.gate-sliders {
  display: grid;
  gap: 13px;
  margin: 0 0 18px;
}

/* одна ямочка: акцентная обводка + цветной ползунок внутри */
.gate-slider {
  position: relative;
  height: 52px;
  padding: 0;
  border: 1.5px solid color-mix(in srgb, var(--accent) 58%, var(--line-strong));
  border-radius: 15px;
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  overflow: hidden;
  touch-action: none;
  cursor: grab;
  transition: border-color .22s, background .22s;
}

.gate-slider:hover,
.gate-slider:focus-visible {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
  outline: none;
}

.gate-slider.is-dragging {
  cursor: grabbing;
  border-color: var(--accent);
}

.gate-slider__knob {
  position: absolute;
  top: 0;
  left: 0;
  width: 66px;
  height: 100%;
  border-radius: 11px;
  background: var(--c);
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, .88);
  will-change: transform;
  transition: transform .22s var(--ease-out);
}

.gate-slider.is-dragging .gate-slider__knob {
  transition: none;
}

.gate-slider__knob svg {
  width: 23px;
  height: 23px;
  opacity: .95;
}

.gate-slider.is-wrong {
  animation: gateWrong .38s var(--ease-out);
}

.gate-slider.is-correct {
  border-color: var(--c);
}

.gate-slider.is-correct .gate-slider__knob {
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--c) 17%, transparent);
}

.gate-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.gate-status {
  min-height: 20px;
  margin: 10px 0 0;
  color: #d06a6a;
  font-size: 13px;
}

.gate-done {
  text-align: center;
  padding: 16px 0 8px;
  animation: gateIn .45s var(--ease-out) both;
}

.gate-check {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  animation: gatePop .5s var(--ease-spring) both;
}

.gate-check svg { width: 42px; height: 42px; }

.gate-done h2 {
  margin: 0 0 8px;
  font: 700 clamp(42px, 7vw, 64px)/.9 'Big Shoulders', 'Bricolage Grotesque', sans-serif;
  text-transform: lowercase;
}

.gate-done p {
  margin: 0 auto 20px;
  max-width: 34ch;
  color: var(--muted);
}

.gate-go { display: inline-flex; }

.gate-done--ban .gate-ban-mark {
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 400 50px/1 'Bricolage Grotesque', sans-serif;
  color: #d06a6a;
  background: color-mix(in srgb, #d06a6a 10%, transparent);
  border: 1px solid color-mix(in srgb, #d06a6a 35%, transparent);
}

.gate-footer {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px var(--page-pad) 24px;
  color: var(--muted);
  font: 10px/1.3 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}

#gateSnow {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

@keyframes gateIn {
  from { opacity: 0; transform: translateY(16px) scale(.99); }
  to { opacity: 1; transform: none; }
}

@keyframes gateShake {
  0%, 100% { transform: translateX(0); }
  22% { transform: translateX(-7px) rotate(-.35deg); }
  44% { transform: translateX(6px) rotate(.3deg); }
  66% { transform: translateX(-4px); }
  84% { transform: translateX(3px); }
}

@keyframes gateWrong {
  0%, 100% { transform: translateX(0); }
  30% { transform: translateX(-5px); }
  60% { transform: translateX(4px); }
}

@keyframes gatePop {
  from { opacity: 0; transform: scale(.6); }
  to { opacity: 1; transform: scale(1); }
}

@media (max-width: 720px) {
  .gate-main { padding-top: 24px; padding-bottom: 24px; }
  .gate-card { border-radius: 22px; padding: 20px; }
  .gate-card__top { margin-bottom: 22px; }
  .gate-title { margin-bottom: 14px; }
  .gate-sub { margin-bottom: 28px; }
  .gate-slider { height: 48px; }
  .gate-slider__knob { width: 58px; height: 100%; border-radius: 10px; }
  .gate-slider__knob svg { width: 20px; height: 20px; }
  .gate-footer { font-size: 9px; padding-bottom: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-card, .gate-done, .gate-check, .gate-slider.is-wrong { animation: none !important; }
  .gate-slider, .gate-slider__knob { transition: none; }
}