:root {
      --blue-dark: #0d2365;
      --blue-mid: #3158b4;
      --blue-light: #648fe9;
      --cream: #fefcf5;
      --black: #090a0f;
      --white: #ffffff;
      --muted: #e9edf7;
      --red: #e74753;
      --green: #27ae60;
      --gold: #f2c14e;
      --shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
      --radius: 20px;
    }

    * {
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      margin: 0;
      font-family: "Montserrat", Arial, sans-serif;
      background:
        radial-gradient(circle at 12% 10%, rgba(100,143,233,0.18), transparent 28%),
        linear-gradient(180deg, #f7f9ff 0%, #eef2fb 100%);
      color: var(--black);
      min-height: 100vh;
    }

    .topbar {
      background: var(--black);
      color: var(--white);
      padding: 12px 18px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: .2px;
    }

    .topbar-inner {
      width: min(980px, calc(100% - 24px));
      margin: 0 auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      flex-wrap: wrap;
    }

    .brand-dot {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: linear-gradient(145deg, var(--blue-light), var(--blue-dark));
      border: 2px solid var(--white);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: 11px;
      margin-left: 8px;
      vertical-align: middle;
    }

    main {
      width: min(980px, calc(100% - 24px));
      margin: 28px auto 60px;
    }

    .hero {
      background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 58%, var(--blue-light) 100%);
      color: var(--white);
      border-radius: var(--radius);
      padding: clamp(28px, 5vw, 58px);
      box-shadow: var(--shadow);
      overflow: hidden;
      position: relative;
    }

    .hero::after {
      content: "";
      position: absolute;
      width: 320px;
      height: 320px;
      border-radius: 50%;
      right: -110px;
      bottom: -170px;
      background: rgba(255,255,255,.08);
    }

    h1 {
      margin: 0 0 10px;
      font-size: clamp(32px, 6vw, 62px);
      line-height: 1;
      letter-spacing: -1.5px;
      text-transform: uppercase;
    }

    .hero p {
      max-width: 760px;
      margin: 12px 0 0;
      font-size: clamp(16px, 2.4vw, 21px);
      line-height: 1.55;
    }

    .quiz-shell {
      margin-top: 24px;
      background: var(--cream);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .quiz-head {
      background: var(--black);
      color: var(--white);
      padding: 18px 24px;
    }

    .quiz-head-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 16px;
    }

    .quiz-head strong {
      font-size: 14px;
    }

    .progress-wrap {
      height: 10px;
      background: rgba(255,255,255,.18);
      border-radius: 999px;
      margin-top: 12px;
      overflow: hidden;
    }

    .progress-bar {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, var(--blue-light), var(--white));
      transition: width .25s ease;
    }

    .panel {
      padding: clamp(22px, 5vw, 44px);
    }

    .intro-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 18px;
      margin-top: 24px;
    }

    .field label {
      display: block;
      font-weight: 700;
      margin-bottom: 8px;
    }

    .field input {
      width: 100%;
      border: 2px solid #d9deeb;
      border-radius: 12px;
      padding: 14px 15px;
      font: inherit;
      background: var(--white);
      outline: none;
    }

    .field input:focus {
      border-color: var(--blue-mid);
      box-shadow: 0 0 0 4px rgba(49,88,180,.12);
    }

    .notice {
      margin-top: 20px;
      padding: 16px 18px;
      border-left: 5px solid var(--blue-mid);
      background: #eef3ff;
      border-radius: 10px;
      line-height: 1.55;
    }

    .question-number {
      color: var(--blue-mid);
      font-size: 14px;
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: .8px;
    }

    .question-title {
      margin: 8px 0 22px;
      font-size: clamp(22px, 3vw, 30px);
      line-height: 1.3;
    }

    .answers {
      display: grid;
      gap: 12px;
    }

    .answer {
      display: grid;
      grid-template-columns: 34px 1fr;
      align-items: center;
      gap: 12px;
      width: 100%;
      padding: 15px 16px;
      border: 2px solid #dfe4ef;
      border-radius: 14px;
      background: var(--white);
      cursor: pointer;
      text-align: left;
      font: inherit;
      transition: transform .12s ease, border-color .12s ease, background .12s ease;
    }

    .answer:hover {
      transform: translateY(-1px);
      border-color: var(--blue-light);
    }

    .answer.selected {
      border-color: var(--blue-mid);
      background: #edf3ff;
    }

    .letter {
      width: 32px;
      height: 32px;
      border-radius: 50%;
      background: var(--black);
      color: var(--white);
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-weight: 800;
      flex: 0 0 auto;
    }

    .answer.selected .letter {
      background: var(--blue-mid);
    }

    .nav {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      margin-top: 28px;
    }

    button {
      font-family: inherit;
    }

    .btn {
      border: 0;
      border-radius: 999px;
      padding: 13px 22px;
      font-weight: 800;
      cursor: pointer;
      transition: transform .12s ease, opacity .12s ease;
    }

    .btn:hover {
      transform: translateY(-1px);
    }

    .btn:disabled {
      opacity: .42;
      cursor: not-allowed;
      transform: none;
    }

    .btn-prev {
      background: linear-gradient(180deg, #7ca2ff, #3158b4);
      color: var(--white);
    }

    .btn-next {
      background: linear-gradient(180deg, #ff6f78, #d92f3c);
      color: var(--white);
    }

    .btn-start, .btn-restart {
      background: var(--black);
      color: var(--white);
    }

    .hidden {
      display: none !important;
    }

    .result-hero {
      background: linear-gradient(135deg, var(--blue-dark), var(--blue-light));
      color: var(--white);
      border-radius: 18px;
      padding: 30px;
      text-align: center;
    }

    .score {
      font-size: clamp(56px, 10vw, 104px);
      line-height: 1;
      font-weight: 800;
      margin: 12px 0 6px;
    }

    .result-label {
      font-size: clamp(20px, 3vw, 28px);
      font-weight: 800;
    }

    .result-note {
      max-width: 700px;
      margin: 14px auto 0;
      line-height: 1.55;
    }

    .review {
      margin-top: 24px;
      display: grid;
      gap: 14px;
    }

    .review-card {
      background: var(--white);
      border-radius: 14px;
      padding: 18px;
      border-left: 6px solid var(--green);
    }

    .review-card.wrong {
      border-left-color: var(--red);
    }

    .review-card h3 {
      margin: 0 0 10px;
      font-size: 17px;
    }

    .review-card p {
      margin: 6px 0;
      line-height: 1.5;
    }

    .correct-text {
      color: #16703a;
      font-weight: 700;
    }

    .wrong-text {
      color: #b2202c;
      font-weight: 700;
    }

    .footer {
      margin-top: 28px;
      background: var(--black);
      color: var(--white);
      border-radius: 18px;
      padding: 22px;
      text-align: center;
      font-size: 13px;
    }

    .error {
      margin-top: 14px;
      color: #b2202c;
      font-weight: 700;
    }

    @media (max-width: 720px) {
      .intro-grid {
        grid-template-columns: 1fr;
      }

      .topbar-inner {
        justify-content: center;
        text-align: center;
      }

      .panel {
        padding: 22px 16px;
      }

      .answer {
        grid-template-columns: 32px 1fr;
      }
    }
  .language-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:18px 0}.lang-btn{border:2px solid #d9deeb;border-radius:14px;padding:16px;background:#fff;font:inherit;font-weight:800;cursor:pointer}.lang-btn.selected{border-color:var(--blue-mid);background:#edf3ff}@media(max-width:720px){.language-grid{grid-template-columns:1fr}}

/* Integrated quiz navigation */
.topbar-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
}

.topbar-inner > :last-child {
  justify-self: end;
}

.topbar-link {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
}

.topbar-link:hover,
.topbar-link:focus-visible {
  text-decoration: underline;
}

.privacy-note {
  margin: 10px 0 0;
  font-size: 13px;
}

.privacy-note a {
  color: var(--blue-mid);
  font-weight: 700;
}

@media (max-width: 720px) {
  .topbar-inner {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .topbar-inner > :last-child {
    justify-self: center;
  }
}
