
:root {
  color-scheme: light;

  --background: #f7f8f5;
  --surface: #ffffff;

  --text: #141915;
  --muted: #536252;

  --green: #00d348;
  --green-hover: #00ed54;
  --green-dark: #004b23;

  --selected-background: #e8f7eb;
  --selected-border: #007635;

  --border: #cdd5cd;
  --error: #9b2424;

  --font: "Instrument Sans", Inter, Arial, Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

body {
  position: relative;
  isolation: isolate;

  min-width: 320px;
  min-height: 100vh;
  margin: 0;

  color: var(--text);

  background:
    radial-gradient(
      ellipse at 5% 18%,
      rgba(0, 211, 72, 0.10),
      transparent 42%
    ),
    radial-gradient(
      ellipse at 95% 85%,
      rgba(0, 115, 45, 0.06),
      transparent 42%
    ),
    var(--background);

  font: 16px/1.55 var(--font);

  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: "";

  position: fixed;
  z-index: -1;

  inset: 55% -20% -35%;

  background: repeating-linear-gradient(
    0deg,
    transparent 0 31px,
    rgba(35, 93, 43, 0.045) 32px 33px
  );

  transform: rotate(-25deg);
  pointer-events: none;
}

body::after {
  content: "";

  position: fixed;
  z-index: -1;

  top: 83px;
  left: 0;
  right: 0;

  height: 260px;

  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.55),
    transparent
  );

  pointer-events: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
a,
input,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

button {
  appearance: none;
  -webkit-appearance: none;
}

img,
svg {
  vertical-align: middle;
}

[hidden] {
  display: none !important;
}

::selection {
  color: #00230e;
  background: #9cf6bb;
}

/* =====================================================
   HEADER
   ===================================================== */

.header {
  position: relative;

  height: 83px;

  color: #fff;
  background: #000;

  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header::after {
  content: "";

  position: absolute;

  bottom: -1px;
  left: 0;
  right: 0;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent 8%,
    rgba(0, 211, 72, 0.55) 35%,
    rgba(0, 211, 72, 0.15) 65%,
    transparent 92%
  );

  pointer-events: none;
}

.header__inner {
  display: flex;
  align-items: center;
  gap: 25px;

  width: min(1380px, calc(100% - 80px));
  height: 100%;

  margin: auto;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;

  color: #fff;
  text-decoration: none;
}

.brand img {
  display: block;

  width: 150px;
  height: 34px;

  object-fit: contain;
  object-position: left center;
}

.brand__fallback {
  font: 900 30px/1 Arial, sans-serif;
  letter-spacing: -1.7px;
}

.brand__fallback span {
  color: var(--green);
}

.header__divider {
  width: 1px;
  height: 24px;

  background: rgba(255, 255, 255, 0.20);
}

.header__product {
  color: #f0f5ef;

  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.header__about {
  display: inline-flex;
  align-items: center;
  gap: 14px;

  min-height: 44px;

  margin-left: auto;
  padding: 4px 4px 4px 14px;

  border-radius: 12px;

  color: #e7eee7;

  font-size: 13px;
  font-weight: 500;
  text-decoration: none;

  transition:
    color 180ms ease,
    background 180ms ease;
}

.header__icon {
  display: grid;
  place-items: center;

  width: 38px;
  height: 38px;

  border: 1px solid rgba(0, 211, 72, 0.28);
  border-radius: 10px;

  color: var(--green);
  background: rgba(0, 211, 72, 0.07);

  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.header__icon svg {
  display: block;

  width: 24px;
  height: 24px;
}

.header__about:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.035);
}

.header__about:hover .header__icon {
  color: #001d0b;
  background: var(--green);

  border-color: var(--green);

  transform: translateX(2px);
}

/* =====================================================
   PAGE AND MAIN CARD
   ===================================================== */

.page {
  width: min(1380px, calc(100% - 80px));

  margin: 58px auto 0;
}

.quiz-layout {
  position: relative;

  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.9fr);

  min-height: 720px;

  overflow: hidden;

  border: 1px solid rgba(20, 40, 23, 0.075);
  border-radius: 26px;

  background: var(--surface);

  box-shadow:
    0 34px 75px -44px rgba(18, 57, 27, 0.38),
    0 8px 24px -16px rgba(18, 57, 27, 0.12);
}

.quiz {
  position: relative;

  display: flex;
  flex-direction: column;

  min-width: 0;

  padding: 47px 50px 32px;

  background: #fff;
}

.quiz-form {
  display: flex;
  flex: 1;
  flex-direction: column;

  min-width: 0;
}

.screen {
  flex: 1;
  min-width: 0;

  animation: screen-enter 240ms ease-out;
}

.screen h1 {
  max-width: 780px;

  margin: 0 0 24px;

  color: #101811;

  font-size: clamp(32px, 3.45vw, 50px);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: -0.045em;

  overflow-wrap: break-word;

  outline: none;
}

.help {
  max-width: 720px;

  margin: -4px 0 28px;

  color: var(--muted);

  font-size: 14px;
  font-weight: 400;
  line-height: 1.75;
}

/* =====================================================
   PROGRESS
   ===================================================== */

.progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.progress__item {
  color: #626f5f;

  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.progress__item.is-active {
  color: var(--green-dark);
}

.progress__item.is-done {
  color: #356f43;
}

.progress__item.is-skipped {
  color: #788373;
}

.progress__bar {
  height: 4px;

  margin-bottom: 11px;

  overflow: hidden;

  border-radius: 4px;

  background: #e5eae2;
}

.progress__bar span {
  display: block;

  width: 0;
  height: 100%;

  border-radius: inherit;

  background: var(--green);

  transition: width 260ms ease;
}

.progress__item.is-active .progress__bar {
  background: #dcebe0;
}

.progress__item.is-done .progress__bar span {
  background: #00b841;
}

.stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin: 33px 0 24px;

  color: var(--green-dark);

  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.stage > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.stage > span:first-child::before {
  content: "";

  width: 6px;
  height: 6px;

  border-radius: 2px;

  background: var(--green);
}

.stage__count {
  color: #667860;

  font: 11px/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0;
}

.stage__count b {
  color: var(--green-dark);
  font-weight: 600;
}

/* =====================================================
   FIELDS
   ===================================================== */

.field {
  min-width: 0;

  margin: 0 0 25px;
  padding: 0;

  border: 0;
}

.field legend,
.field__label {
  display: block;

  width: 100%;

  margin-bottom: 12px;
  padding: 0;

  color: #243425;

  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.choices {
  display: grid;
  gap: 10px;
}

.choices--compact {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

/* Single border only — no external focus ring on card */

.choice {
  position: relative;

  display: flex;
  align-items: center;
  gap: 13px;

  min-width: 0;
  min-height: 59px;

  padding: 16px 18px;

  border: 1px solid #cbd5c9;
  border-radius: 11px;

  color: #17271a;
  background: #fff;

  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;

  cursor: pointer;

  outline: none;
  box-shadow: none;

  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.choice > span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.choice:hover {
  border-color: #7dac86;
  background: #f4faf3;
}

.choice.is-selected {
  border-color: var(--selected-border);

  color: #003e1b;
  background: var(--selected-background);

  outline: none;
  box-shadow: none;
}

/*
 * Убираем причину двойной обводки.
 * При клике и программном возврате фокуса
 * внешнего контура карточки нет.
 */
.choice:focus,
.choice:focus-within,
.choice.is-selected:focus-within {
  outline: none;
  box-shadow: none;
}

.choice.is-selected:hover {
  border-color: #00682d;
  background: #dff5e5;
}

.choice.is-disabled {
  color: #778472;
  opacity: 0.48;
  cursor: not-allowed;
}

.choice.is-disabled:hover {
  border-color: #cbd5c9;
  background: #fff;
}

.choice__input {
  position: absolute;

  width: 1px;
  height: 1px;

  margin: 0;
  padding: 0;

  opacity: 0;
}

/* Visible keyboard focus inside the card, not around it */

.choice__input:focus-visible + .choice__indicator {
  outline: 2px solid #004b23;
  outline-offset: 4px;
}

.choice__indicator {
  display: grid;
  place-items: center;

  flex: 0 0 20px;

  width: 20px;
  height: 20px;

  border: 1px solid #b9c9b5;
  border-radius: 50%;

  background: #f7faf5;

  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.choice.is-selected .choice__indicator {
  border-color: var(--selected-border);
  background: var(--selected-border);
}

.choice.is-selected .choice__indicator::after {
  content: "";

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: #fff;
}

.choice--checkbox .choice__indicator {
  border-radius: 5px;
}

.choice--checkbox.is-selected .choice__indicator::after {
  width: 9px;
  height: 5px;

  margin-top: -2px;

  border-bottom: 2px solid #fff;
  border-left: 2px solid #fff;
  border-radius: 0;

  background: transparent;

  transform: rotate(-45deg);
}

.choices--compact .choice {
  min-height: 49px;

  padding: 12px 16px;

  font-size: 14px;
}

.choices--compact .choice__indicator {
  flex-basis: 18px;

  width: 18px;
  height: 18px;
}

/* Text inputs */

.text-input {
  display: block;

  width: 100%;
  min-height: 55px;

  padding: 14px 16px;

  border: 1px solid #cbd5c9;
  border-radius: 10px;

  color: var(--text);
  background: #fff;

  font-size: 16px;
  line-height: 1.45;

  outline: none;
  box-shadow: none;

  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.text-input::placeholder {
  color: #6c7b66;
  font-size: 14px;
  opacity: 1;
}

.text-input:hover {
  border-color: #8cae87;
}

.text-input:focus {
  border-color: #007635;

  background: #fcfffb;

  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 118, 53, 0.10);
}

.text-input:disabled {
  cursor: wait;
}

textarea.text-input {
  min-height: 125px;
  resize: vertical;
}

/* Errors */

.field__error {
  margin: 9px 0 0;

  color: var(--error);

  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.field__error:empty,
.global-error:empty {
  display: none;
}

.field.is-invalid .choice,
.field.is-invalid .text-input {
  border-color: var(--error);
}

.field.is-invalid .text-input:focus {
  box-shadow: 0 0 0 3px rgba(155, 36, 36, 0.10);
}

.global-error {
  margin: 16px 0 0;
  padding: 12px 14px;

  border: 1px solid rgba(155, 36, 36, 0.18);
  border-radius: 9px;

  color: var(--error);
  background: #fff5f3;

  font-size: 13px;
  font-weight: 500;
  line-height: 1.55;
}

/* =====================================================
   ACTIONS AND BUTTONS
   ===================================================== */

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-top: 27px;
  padding-top: 24px;

  border-top: 1px solid #e1e8de;
}

.actions--single {
  justify-content: flex-end;
}

.button {
  position: relative;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 25px;

  min-height: 53px;

  padding: 16px 26px;

  border: 0;
  border-radius: 12px;

  font-family: var(--font);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.3;

  text-align: center;
  text-decoration: none;

  cursor: pointer;

  transition:
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease;
}

.button--primary {
  color: #001d0b;

  background: var(--green);

  box-shadow:
    0 8px 18px -10px rgba(0, 128, 44, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.button--primary:hover {
  background: var(--green-hover);

  transform: translateY(-2px);

  box-shadow:
    0 13px 24px -12px rgba(0, 128, 44, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.button--primary:active {
  transform: translateY(0);

  background: #00c644;
}

.button--secondary {
  padding-left: 0;
  padding-right: 12px;

  color: #486043;
  background: transparent;

  box-shadow: none;
}

.button--secondary:hover {
  color: var(--green-dark);

  transform: translateX(-2px);
}

.button__arrow {
  display: inline-block;

  font-size: 23px;
  font-weight: 400;
  line-height: 16px;

  transition: transform 160ms ease;
}

.button--primary:hover .button__arrow {
  transform: translateX(3px);
}

.button:disabled {
  opacity: 0.65;
  cursor: wait;

  transform: none;
}

.button:disabled:hover {
  transform: none;
}

.button:focus-visible {
  outline: 2px solid var(--green-dark);
  outline-offset: 4px;
}

a:focus-visible {
  outline: 2px solid #008e3a;
  outline-offset: 4px;
}

.header a:focus-visible {
  outline-color: var(--green);
}

/* =====================================================
   PREMIUM PROJECT OVERVIEW
   ===================================================== */

.overview {
  position: relative;
  isolation: isolate;

  display: flex;
  flex-direction: column;

  min-width: 0;

  padding: 34px 28px 32px;

  color: #fff;

  border-left: 1px solid #203626;

  background:
    radial-gradient(
      ellipse at 85% 5%,
      rgba(0, 211, 72, 0.18),
      transparent 48%
    ),
    radial-gradient(
      ellipse at 15% 80%,
      rgba(0, 132, 48, 0.11),
      transparent 50%
    ),
    #0d1911;
}

.overview::before {
  content: "";

  position: absolute;
  z-index: -1;

  inset: 0;

  background-image:
    linear-gradient(
      rgba(127, 186, 133, 0.045) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(127, 186, 133, 0.045) 1px,
      transparent 1px
    );

  background-size: 40px 40px;

  pointer-events: none;
}

.overview::after {
  content: "";

  position: absolute;

  top: 0;
  left: 28px;
  right: 28px;

  height: 1px;

  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 211, 72, 0.75),
    transparent
  );

  pointer-events: none;
}

.overview__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;

  margin: 0 2px 24px;

  color: #adc5a9;

  font: 9px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.13em;
}

.overview__top-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.overview__top-label i {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--green);

  box-shadow: 0 0 9px rgba(0, 211, 72, 0.6);
}

.overview__symbol {
  display: grid;
  place-items: center;

  width: 35px;
  height: 35px;

  border: 1px solid rgba(161, 207, 162, 0.18);
  border-radius: 10px;

  color: #9ede9b;
  background: rgba(135, 190, 139, 0.035);
}

.overview__symbol svg {
  display: block;

  width: 22px;
  height: 22px;
}

/* Illustration */

.visual {
  position: relative;

  display: grid;
  align-items: center;

  min-width: 0;
  min-height: 320px;
}

.visual__image {
  display: block;

  width: 100%;
  height: auto;

  aspect-ratio: 1.28;
  object-fit: cover;

  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;

  box-shadow:
    0 22px 35px -24px rgba(0, 0, 0, 0.9),
    0 0 30px -18px rgba(0, 211, 72, 0.4);
}

/* Overview text */

.overview__body {
  display: flex;
  flex: 1;
  flex-direction: column;

  min-width: 0;

  padding: 32px 4px 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;

  margin: 0 0 17px;

  color: #b6cfb0;

  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.15em;
}

.eyebrow i {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: var(--green);
}

.overview h2 {
  margin: 0 0 15px;

  color: #f7fff4;

  font-size: 30px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.035em;

  overflow-wrap: break-word;
}

.overview__description,
.overview__region {
  margin: 0 0 11px;

  color: #b9cdb4;

  font-size: 13px;
  line-height: 1.8;
}

.overview__region {
  color: #d7e7d0;
}

.overview__region:empty {
  display: none;
}

.overview__progress {
  margin-top: 29px;
}

.overview__progress-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;

  color: #c5d7be;

  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}

.overview__progress-labels span:last-child {
  color: #91edaa;
}

.overview__track {
  height: 5px;

  margin-top: 13px;

  overflow: hidden;

  border-radius: 5px;

  background: #2d432f;
}

.overview__track span {
  display: block;

  width: 0;
  height: 100%;

  border-radius: inherit;

  background: var(--green);

  box-shadow: 0 0 12px rgba(0, 211, 72, 0.4);

  transition: width 260ms ease;
}

.overview__signature {
  display: flex;
  align-items: center;
  gap: 11px;

  margin-top: auto;
  padding-top: 32px;

  color: #a4bfa0;

  font: 8px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.12em;
}

.overview__signature-line {
  width: 26px;
  height: 1px;

  background: var(--green);
}

/* =====================================================
   DECORATIVE IMAGE FALLBACK
   ===================================================== */

.architecture {
  min-width: 0;

  padding: 8px 2px 0;
}

.code-card {
  overflow: hidden;

  border: 1px solid rgba(154, 209, 153, 0.23);
  border-radius: 13px;

  color: #d0e3c7;
  background: #142a1b;

  font: 9px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace;

  transform: rotate(-2deg);

  box-shadow:
    0 20px 30px -18px rgba(0, 0, 0, 0.8),
    0 0 26px -20px rgba(0, 211, 72, 0.5);
}

.code-card__header {
  display: flex;
  align-items: center;
  gap: 10px;

  height: 35px;

  padding: 0 13px;

  border-bottom: 1px solid rgba(154, 209, 153, 0.09);

  color: #b1c7a8;

  font-size: 8px;
}

.code-card__dots {
  display: flex;
  gap: 4px;
}

.code-card__dots i {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: #9dbd86;
}

.code-card__dots i:first-child {
  background: var(--green);
}

.code-card__header b {
  margin-left: auto;

  color: #94d886;

  font-size: 8px;
  font-weight: 500;
}

.code-card__body {
  overflow: hidden;

  padding: 18px 13px 21px;
}

.code-card__body p {
  margin: 6px 0;

  white-space: nowrap;
}

.code-card__body em {
  margin-right: 10px;

  color: #93ad88;
  font-style: normal;
}

.code-card__body p > span {
  color: #e2dca8;
}

.code-card__body strong {
  color: #9ff18a;
  font-weight: 500;
}

.code-card__body small {
  display: block;

  margin: 22px 0 0 23px;

  color: #a2bf97;

  font-size: 7px;
  line-height: 1.7;
}

.code-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;

  padding: 9px 12px;

  border-top: 1px solid rgba(154, 209, 153, 0.09);

  color: #a2bf97;

  font-size: 5px;
  letter-spacing: 0.1em;
}

.architecture__nodes {
  position: relative;

  display: flex;
  justify-content: space-between;
  gap: 9px;

  padding-top: 50px;
}

.architecture__nodes::before {
  content: "";

  position: absolute;

  top: 21px;
  right: 16%;
  left: 16%;

  height: 29px;

  border: 1px solid #416746;
  border-bottom: 0;
}

.architecture__nodes::after {
  content: "";

  position: absolute;

  top: 0;
  left: 50%;

  width: 1px;
  height: 50px;

  background: #416746;
}

.architecture__nodes > div {
  position: relative;
  z-index: 1;

  flex: 1;
  min-width: 0;

  padding: 12px 5px;

  border: 1px solid #36583c;
  border-radius: 7px;

  color: #d1e4c6;
  background: #182e1e;

  font-size: 9px;
  text-align: center;
}

.architecture__nodes small {
  margin-right: 4px;

  color: #9ce28c;

  font-size: 6px;
}

.architecture__caption {
  display: flex;
  align-items: center;
  gap: 9px;

  margin: 24px 0 0;

  color: #aac2a1;

  font: 5px/1.5 ui-monospace, monospace;
  letter-spacing: 0.13em;
}

.architecture__caption::before {
  content: "";

  width: 19px;
  height: 1px;

  background: #81c47c;
}

/* =====================================================
   TERMINAL SCREENS
   ===================================================== */

.screen--terminal {
  padding-top: 15px;
}

.terminal-icon {
  display: grid;
  place-items: center;

  width: 62px;
  height: 62px;

  margin: 8px 0 28px;

  border: 1px solid rgba(0, 118, 53, 0.15);
  border-radius: 17px;

  color: #007635;
  background: #e8f7eb;

  font-size: 29px;

  box-shadow: 0 10px 22px -17px rgba(0, 118, 53, 0.4);
}

.terminal-body {
  max-width: 620px;

  color: #50644a;

  font-size: 16px;
  line-height: 1.8;

  overflow-wrap: break-word;
}

.terminal-link {
  margin-top: 20px;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;

  padding: 28px 4px 33px;

  color: #52654b;

  font-size: 11px;
  font-weight: 500;
}

.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.footer__brand i {
  width: 5px;
  height: 5px;

  border-radius: 50%;

  background: #00b841;
}

/* =====================================================
   ACCESSIBILITY AND MOTION
   ===================================================== */

.sr-only {
  position: absolute !important;

  width: 1px !important;
  height: 1px !important;

  margin: -1px !important;
  padding: 0 !important;

  overflow: hidden !important;

  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;

  border: 0 !important;
}

@keyframes screen-enter {
  from {
    opacity: 0;
    transform: translateY(7px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================================
   LARGE SCREENS
   ===================================================== */

@media (min-width: 1450px) {
  .page {
    margin-top: 70px;
  }

  .quiz-layout {
    min-height: 760px;
  }

  .visual {
    min-height: 365px;
  }

  .code-card {
    font-size: 11px;
  }

  .code-card__body {
    padding: 23px 17px;
  }

  .code-card__body small {
    font-size: 8px;
  }
}

/* =====================================================
   TABLET
   ===================================================== */

@media (max-width: 1100px) {
  .header__inner,
  .page {
    width: calc(100% - 48px);
  }

  .page {
    margin-top: 38px;
  }

  .quiz {
    padding: 36px 30px 27px;
  }

  .overview {
    padding: 29px 22px;
  }

  .overview h2 {
    font-size: 27px;
  }

  .visual {
    min-height: 280px;
  }

  .code-card {
    font-size: 8px;
  }

  .code-card__body em {
    margin-right: 5px;
  }

  .progress {
    gap: 7px;
  }

  .progress__item {
    font-size: 10px;
  }

  .button {
    gap: 18px;
    padding: 16px 23px;
  }
}

@media (min-width: 691px) and (max-width: 820px) {
  .header__inner,
  .page {
    width: calc(100% - 40px);
  }

  .quiz {
    padding: 29px 22px 25px;
  }

  .overview {
    padding: 25px 16px;
  }

  .overview__top {
    font-size: 7px;
    letter-spacing: 0.07em;
    gap: 7px;
  }

  .overview__top-label {
    gap: 6px;
  }

  .overview__symbol {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }

  .visual {
    min-height: 230px;
  }

  .code-card__body {
    padding-left: 8px;
    font-size: 6.5px;
  }

  .code-card__body small {
    margin-left: 10px;
    font-size: 5.5px;
  }

  .architecture__nodes {
    gap: 5px;
  }

  .architecture__nodes > div {
    font-size: 7px;
  }

  .overview h2 {
    font-size: 24px;
  }

  .overview__description,
  .overview__region {
    font-size: 12px;
  }

  .overview__progress-labels {
    font-size: 9px;
  }

  .overview__signature {
    font-size: 6px;
    letter-spacing: 0.08em;
  }

  .progress__item {
    font-size: 9px;
  }

  .stage {
    font-size: 10px;
  }

  .screen h1 {
    font-size: 34px;
  }

  .choice {
    gap: 11px;
    padding: 14px;
    font-size: 14px;
  }

  .button {
    gap: 14px;
    padding: 15px 18px;
    font-size: 13px;
  }
}

/* =====================================================
   MOBILE — OVERVIEW HIDDEN AS REQUIRED BY BRIEF
   ===================================================== */

@media (max-width: 690px) {
  body::after {
    top: 65px;
    height: 180px;
  }

  .header {
    height: 65px;
  }

  .header__inner {
    width: calc(100% - 38px);
    gap: 14px;
  }

  .brand img {
    width: 111px;
    height: 27px;
  }

  .brand__fallback {
    font-size: 24px;
  }

  .header__divider {
    height: 20px;
  }

  .header__product {
    font-size: 11px;
  }

  .header__about {
    min-height: 38px;

    gap: 0;
    padding: 0;
  }

  /*
   * Текст остаётся доступен screen reader,
   * но не занимает место в мобильной шапке.
   */
  .header__about-text {
    position: absolute;

    width: 1px;
    height: 1px;

    margin: -1px;
    padding: 0;

    overflow: hidden;

    clip: rect(0, 0, 0, 0);
    white-space: nowrap;

    border: 0;
  }

  .header__icon {
    width: 35px;
    height: 35px;

    border-radius: 9px;
  }

  .header__icon svg {
    width: 23px;
    height: 23px;
  }

  .page {
    width: calc(100% - 38px);

    margin-top: 25px;
  }

  .quiz-layout {
    grid-template-columns: 1fr;

    min-height: calc(100svh - 165px);

    border-radius: 20px;

    box-shadow:
      0 22px 45px -32px rgba(18, 57, 27, 0.3),
      0 5px 15px -11px rgba(18, 57, 27, 0.12);
  }

  .quiz {
    padding: 26px 20px 25px;
  }

  .overview {
    display: none;
  }

  .screen h1 {
    margin-bottom: 23px;

    font-size: 35px;
    line-height: 1.13;
    letter-spacing: -0.045em;
  }

  .help {
    margin-bottom: 24px;

    font-size: 13px;
    line-height: 1.75;
  }

  .progress {
    gap: 7px;
  }

  .progress__item {
    font-size: 9px;
    line-height: 1.4;
  }

  .progress__bar {
    height: 3px;
    margin-bottom: 9px;
  }

  .stage {
    margin: 27px 0 22px;

    font-size: 10px;
    letter-spacing: 0.12em;
  }

  .stage__count {
    font-size: 10px;
  }

  .choice {
    min-height: 59px;

    gap: 11px;
    padding: 15px 13px;

    border-radius: 10px;

    font-size: 15px;
  }

  .choices--compact .choice {
    min-height: 48px;

    gap: 8px;
    padding: 12px;

    font-size: 14px;
  }

  .field {
    margin-bottom: 22px;
  }

  .field legend,
  .field__label {
    font-size: 13px;
  }

  .text-input {
    min-height: 54px;
    padding: 14px;
  }

  .actions {
    gap: 12px;

    margin-top: 25px;
    padding-top: 21px;
  }

  .actions .button--primary {
    flex: 1;
    min-width: 0;
  }

  .actions .button--secondary {
    flex: 0 0 auto;
    padding-right: 8px;
  }

  .button {
    min-height: 52px;

    gap: 16px;
    padding: 15px 17px;

    border-radius: 11px;

    font-size: 13px;
  }

  .button__arrow {
    font-size: 21px;
  }

  .terminal-body {
    font-size: 14px;
    line-height: 1.8;
  }

  .terminal-icon {
    width: 56px;
    height: 56px;

    border-radius: 15px;
  }

  .global-error {
    padding: 11px 12px;
    font-size: 12px;
  }

  .footer {
    align-items: center;

    padding: 22px 3px 26px;

    font-size: 9px;
  }

  .footer > span:last-child {
    max-width: 170px;
    text-align: right;
  }
}

@media (max-width: 360px) {
  .header__inner {
    gap: 10px;
  }

  .brand img {
    width: 101px;
  }

  .header__product {
    font-size: 10px;
  }

  .quiz {
    padding-right: 16px;
    padding-left: 16px;
  }

  .screen h1 {
    font-size: 32px;
  }

  .progress__item {
    font-size: 8px;
  }

  .button {
    gap: 10px;
    padding-right: 13px;
    padding-left: 13px;
  }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}