  :root {
    --bg: linear-gradient(135deg, #f6efe7 0%, #eef6ff 100%);
    --panel: rgba(255, 255, 255, 0.92);
    --panel-border: rgba(32, 68, 108, 0.12);
    --text: #1f2d3d;
    --muted: #6a7b8f;
    --accent: #1d6f42;
    --accent-dark: #14522f;
    --accent-soft: #e8f5ee;
    --danger: #b42318;
    --danger-soft: #fdecec;
    --success: #18794e;
    --success-soft: #eaf7ef;
    --shadow: 0 18px 45px rgba(34, 60, 80, 0.12);
  }

  * {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: var(--bg);
  }

  .top-alert-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 75%;
    min-width: 400px;
    z-index: 2000;
    pointer-events: none;
  }

  .top-alert {
    pointer-events: auto;
    box-shadow: 0 18px 45px rgba(34, 60, 80, 0.18);
    opacity: 0;
    transform: translateY(-24px);
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .top-alert.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .app-shell {
    width: min(1300px, calc(100% - 32px));
    margin: 0 auto;
    padding: 10px;
  }

  .hero,
  .quiz-panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 24px;
    box-shadow: var(--shadow);
  }

  .quiz-panel {
    backdrop-filter: blur(10px);
  }

  .hero {
    position: relative;
    overflow: hidden;
    padding: 22px;
    margin-bottom: 8px;
    background:
      radial-gradient(circle at 92% 8%, rgba(119, 255, 183, 0.14) 0, rgba(119, 255, 183, 0.14) 18%, transparent 18.1%),
      radial-gradient(circle at 4% 92%, rgba(119, 255, 183, 0.12) 0, rgba(119, 255, 183, 0.12) 16%, transparent 16.1%),
      linear-gradient(140deg, #1f7a44 0%, #0f5d30 48%, #0a4f2a 100%);
    border: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .hero-badge {
    width: fit-content;
    border-radius: 999px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
  }

  .hero-head {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

  .hero-media {
    width: 74px;
    min-width: 74px;
    height: 74px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
  }

  .hero-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
  }

  .hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero h1 {
    margin: 0;
    font-size: clamp(1.8rem, 2.8vw, 2.6rem);
    line-height: 1.08;
    font-weight: 800;
  }

  .hero-subtitle {
    margin: 6px 0 0;
    color: #9de7ba;
    font-size: clamp(0.95rem, 1.2vw, 1.3rem);
    font-weight: 600;
  }

  .hero-alert {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 12px 14px;
  }

  .hero-alert-icon {
    width: 36px;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #c8f4d8;
    background: rgba(255, 255, 255, 0.16);
  }

  .hero-text {
    margin: 0;
    color: #e7fff0;
    font-size: 1rem;
    line-height: 1.4;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .hero-stat {
    border-radius: 14px;
    padding: 10px 10px 9px;
    text-align: center;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.13);
  }

  .hero-stat-value {
    display: block;
    font-weight: 800;
    font-size: clamp(1.6rem, 2.3vw, 2.1rem);
    line-height: 1;
    color: #69f0a7;
  }

  .hero-stat-label {
    display: block;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    color: #b4eecb;
    font-weight: 600;
  }

  .identity-form {
    margin: 22px 0;
  }

  .start-quiz-btn {
  margin-top: 12px;
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #86aa79 0%, #176c15 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(32, 68, 108, 0.2);
    width: 220px;
  }

  .custom-label {
    color: var(--text);
    font-weight: 700;
  }

  .custom-input {
    min-height: 50px;
    border-radius: 14px;
    border: 1px solid #d9e5f2;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.95);
  }

  .custom-input:focus {
    border-color: #8eb8e8;
    box-shadow: 0 0 0 0.25rem rgba(58, 120, 186, 0.15);
  }

  .quiz-panel {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 24px;
  }

  .quiz-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    margin-bottom: 18px;
  }

  .quiz-progress-track {
    position: relative;
    padding-bottom: 22px;
  }

  .quiz-meta {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
  }

  .question-timeline {
    width: 100%;
    position: relative;
    height: 10px;
    background: #d6dee8;
    border-radius: 999px;
    overflow: hidden;
    --passed-width: 0%;
    --current-left: 0%;
    --current-width: 0%;
  }

  .quiz-progress-label {
    position: absolute;
    top: 16px;
    left: var(--label-left, 0%);
    transform: translateX(-50%);
    white-space: nowrap;
  }

  .question-timeline-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--passed-width);
    background: #2f8f58;
    transition: width 0.2s ease;
  }

  .question-timeline-current {
    position: absolute;
    left: var(--current-left);
    top: 0;
    bottom: 0;
    width: var(--current-width);
    background: #315f90;
    transition: left 0.2s ease, width 0.2s ease;
  }

  .quiz-timer {
    margin: 0;
    color: var(--danger);
    font-size: 1rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    position: fixed;
    top: 10px;
    right: 16px;
    z-index: 1051;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #d9e5f2;
    border-radius: 10px;
    padding: 6px 10px;
  }

  #btnSubmit {
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--accent) 0%, #2f8f58 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 12px 24px rgba(29, 111, 66, 0.22);
    width: 100%;
    min-width: 0;
    flex-basis: 100%;
    order: 2;
  }

  #btnSubmit:hover {
    transform: translateY(-1px);
  }

  #btnScrollTop {
    position: fixed;
    right: 16px;
    bottom: 16px;
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #20446c 0%, #3b6b99 100%);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 12px 24px rgba(32, 68, 108, 0.22);
    cursor: pointer;
    z-index: 1040;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
  }

  #btnScrollTop:hover {
    transform: translateY(-2px);
  }

  #quiz {
    width: 100%;
  }

  .question {
    background: #fff;
    border: 1px solid #e4ebf3;
    padding: 18px;
    border-radius: 18px;
    width: 100%;
    min-width: 0;
    height: 100%;
  }

  .question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
  }

  .question-number {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 700;
  }

  .question-category {
    display: none;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    background: #f2f7fc;
    color: #32577d;
    font-size: 0.84rem;
    font-weight: 700;
  }

  .q-title {
    margin: 0 0 14px;
    font-weight: 700;
    line-height: 1.5;
    overflow-wrap: break-word;
    font-size: 16px;
    text-align: justify;
    text-indent: 30px;
  }

  .options {
    display: grid;
    gap: 10px;
  }

  .option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d9e5f2;
    padding: 4px 14px;
    border-radius: 14px;
    cursor: pointer;
    background: #fafcff;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    width: 100%;
    min-width: 0;
  }

  .option:hover {
    background: #f1f8ff;
    border-color: #9fc2ec;
    transform: translateY(-1px);
  }

  .option input {
    transform: scale(1.15);
    accent-color: var(--accent);
  }

  .option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    background: #edf3f9;
    color: #35597d;
    flex-shrink: 0;
  }

  .opt-icon {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
  }

  .opt-text {
    font-weight: 600;
    line-height: 1.4;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .option.is-correct {
    background: var(--success-soft);
    border-color: #9cd3b7;
  }

  .option.is-wrong {
    background: var(--danger-soft);
    border-color: #efb0aa;
  }

  .question-status {
    margin-top: 12px;
    font-weight: 700;
  }

  .question-status.success {
    color: var(--success);
  }

  .question-status.error {
    color: var(--danger);
  }

  .result {
    margin-top: 20px;
    padding: 18px;
    border-radius: 18px;
    background: #f6f9fc;
    border: 1px solid #dde7f2;
    display: none;
  }

  .result.is-visible {
    display: block;
  }

  .result h2,
  .result p {
    margin: 0;
  }

  .result p {
    margin-top: 8px;
    color: var(--muted);
    line-height: 1.5;
  }

.result-name {
  margin: 0 0 12px;
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.45rem);
  font-weight: 800;
  color: var(--text);
  font-size: 36px;
  text-align: center;
}

.result-name span {
  display: block;
  color: rebeccapurple;
  text-shadow: 1px 1px 1px #003280;
}

  .result-line {
    margin: 0;
    font-size: clamp(1.25rem, 1rem + 0.8vw, 2rem);
    font-weight: 800;
    color: #0f172a;
  }

  .result-line+.result-line {
    margin-top: 6px;
  }

  .result-categories {
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #d8e3f1;
    background: #f9fcff;
  }

  .result-categories-title {
    margin: 0 0 10px !important;
    font-size: 0.95rem;
    font-weight: 800;
    color: #32577d;
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }

  .result-categories-list {
    display: grid;
    gap: 8px;
  }

  .result-category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dbe6f4;
    background: #ffffff;
    border-radius: 10px;
    padding: 8px 10px;
  }

  .result-category-name {
    font-weight: 700;
    color: #2a4463;
  }

  .result-category-score {
    font-weight: 800;
    color: #0f172a;
    text-align: right;
  }

  .result-meta {
    margin-top: 12px !important;
    font-size: 0.95rem;
  }

  .result-inscription-wrap {
    margin-top: 20px;
    text-align: center;
  }

  .btn-inscription {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    padding: 11px 36px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
  }

  .btn-inscription:hover {
    background: var(--accent-dark);
    color: #fff;
  }

  @media (max-width: 700px) {
    body {
      overflow-x: hidden;
    }

    .top-alert-container {
      top: 12px;
      width: calc(100vw - 24px);
      min-width: 0;
    }

    .app-shell {
      width: min(100% - 20px, 1100px);
    }

    .question-head {
      flex-direction: column;
      align-items: flex-start;
    }

    .quiz-toolbar {
      flex-direction: column;
      align-items: stretch;
      width: 100%;
    }

    .quiz-progress-track {
      width: 100%;
      min-width: 0;
    }

    .quiz-timer {
      position: fixed;
      top: 8px;
      right: 12px;
      width: auto;
      max-width: calc(100vw - 24px);
      text-align: right;
    }

    #btnSubmit {
      width: 100%;
      max-width: 100%;
      min-width: 0;
      padding: 12px 16px;
      font-size: 0.98rem;
    }

    #btnScrollTop {
      right: 12px;
      bottom: 12px;
    }

    .option {
      align-items: flex-start;
    }

    .start-quiz-btn {
      width: 100%;
    }

    .quiz-panel {
      padding: 16px;
    }

    .question {
      padding: 14px;
    }

    .option {
      padding: 8px 10px;
      gap: 10px;
    }

    .opt-text {
      font-size: 0.95rem;
    }

    .q-title {
      text-align: left;
      text-indent: 0;
    }

    .hero {
      padding: 16px 14px;
      gap: 12px;
    }

    .hero-badge {
      font-size: 0.74rem;
      padding: 7px 12px;
    }

    .hero-head {
      gap: 10px;
      padding-bottom: 12px;
    }

    .hero-media {
      width: 60px;
      min-width: 60px;
      height: 60px;
      border-radius: 14px;
    }

    .hero-logo {
      width: 44px;
      height: 44px;
    }

    .hero-subtitle,
    .hero-text {
      font-size: 0.9rem;
    }

    .hero-alert {
      padding: 10px 10px;
      gap: 8px;
    }

    .hero-alert-icon {
      width: 32px;
      min-width: 32px;
      height: 32px;
      border-radius: 10px;
    }

    .hero-stats {
      gap: 9px;
    }

    .hero-stat {
      padding: 8px 6px;
    }

    .hero-stat-value {
      font-size: 1.7rem;
    }

    .hero-stat-label {
      font-size: 0.7rem;
    }

    .result-category-item {
      flex-direction: column;
      align-items: flex-start;
    }

    .result-category-score {
      text-align: left;
    }
  }


  .quiz-steps {
    width: 100%;
  }

  .quiz-category-step[hidden] {
    display: none !important;
  }

  .category-header {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #dde7f2;
    border-radius: 18px;
    background: #f6faff;
    display: flex;
    justify-content: space-between;
  }

  .category-step-text {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }



  .category-count {
    color: var(--muted);
    font-weight: 600;
  }

  .category-navigation {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
  }

  .quiz-category-step.is-active .category-navigation {

    margin: 15px;
  }

  .category-nav-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 20px;
    background: #edf4fb;
    color: #24486f;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(36, 72, 111, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
  }

  .category-nav-btn:hover {
    transform: translateY(-1px);
    background: #e4eef9;
  }

  .category-nav-btn.is-next {
    min-width: 170px;
    padding: 14px 24px;
    background: linear-gradient(135deg, #20446c 0%, #3b6b99 100%);
    color: #fff;
    font-size: 1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 14px 28px rgba(32, 68, 108, 0.24);
  }

  .category-nav-btn.is-next:hover {
    background: linear-gradient(135deg, #1a395b 0%, #315a82 100%);
    box-shadow: 0 16px 30px rgba(32, 68, 108, 0.28);
  }

  @media (max-width: 700px) {
    .category-navigation {
      flex-direction: column;
      align-items: stretch;
      width: 100%;
      margin-top: 16px;
    }

    .quiz-category-step.is-active .category-navigation {
      margin: 12px 0 0;
    }

    .category-nav-btn,
    .category-nav-btn.is-next {
      width: 100%;
      max-width: 100%;
      margin-left: 0;
      min-width: 0;
      padding: 12px 16px;
    }

    .category-nav-btn.is-next {
      font-size: 0.98rem;
    }

  }
