:root {
  --blue: #1746a2;
  --blue-deep: #0f1f3d;
  --blue-soft: #eaf0fb;
  --orange: #f28c28;
  --orange-soft: #fff2e4;
  --ink: #18243b;
  --muted: #61708b;
  --line: #d9e1ef;
  --surface: #ffffff;
  --canvas: #f4f7fc;
  --success: #1e7a5a;
  --success-soft: #e6f5ef;
  --danger: #b84242;
  --danger-soft: #fceceb;
  --shadow: 0 16px 40px rgba(15, 31, 61, 0.08);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.site-shell { min-height: 100vh; }

.site-header {
  min-height: 176px;
  padding: 18px max(24px, calc((100vw - 1180px) / 2));
  background: linear-gradient(115deg, #1356f5 0%, #354af0 55%, #6240df 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -130px;
  top: -220px;
  border: 2px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255, 255, 255, 0.04), 0 0 0 48px rgba(255, 255, 255, 0.035);
}

.site-header-inner {
  width: min(1180px, 100%);
  min-height: 140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.challenge-brand { display: grid; place-items: center; width: min(100%, 180px); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: white;
  text-decoration: none;
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 6px 18px rgba(13, 30, 116, 0.28);
}

.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: 1.1rem; letter-spacing: -0.02em; }
.brand-copy span { color: #e2e7ff; font-size: 0.75rem; letter-spacing: 0.04em; }

.challenge-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 170px;
  object-fit: contain;
  object-position: center;
  flex: 0 1 auto;
  filter: drop-shadow(0 6px 12px rgba(13, 30, 116, 0.2));
}

.header-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd6ec;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(242, 140, 40, 0.18);
}

.page-main {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 48px 0 30px;
}

.registration-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.9fr);
  gap: 42px;
  align-items: center;
  margin: 0 0 54px;
  padding: 34px 36px;
  border: 1px solid #b9cbed;
  border-left: 6px solid var(--blue);
  border-radius: var(--radius-lg);
  background: linear-gradient(120deg, #ffffff 0%, #f0f5ff 100%);
  box-shadow: var(--shadow);
}
.registration-intro h1 {
  max-width: 600px;
  margin: 0 0 14px;
  color: var(--blue-deep);
  font-size: clamp(2.3rem, 4.4vw, 4.2rem);
  line-height: 0.99;
  letter-spacing: -0.06em;
}
.registration-intro h1 span { color: var(--blue); }
.registration-intro > p:last-child { max-width: 510px; margin: 0; color: var(--muted); font-size: 1rem; }
.registration-form { display: grid; gap: 14px; }
.registration-fields { display: grid; gap: 14px; }
.field-label { display: grid; gap: 7px; color: var(--blue-deep); font-size: 0.78rem; font-weight: 800; }
.field-label input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid #b9cbed;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  outline: none;
}
.field-label input::placeholder { color: #94a2bb; }
.field-label input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23, 70, 162, 0.15); }
.registration-button { min-height: 50px; justify-content: center; }
.registration-error { margin: 0; padding: 10px 12px; border: 1px solid #e2a1a1; border-radius: var(--radius-sm); background: var(--danger-soft); color: var(--danger); font-size: 0.82rem; font-weight: 700; }
.registration-privacy { margin: 0; color: var(--muted); font-size: 0.72rem; line-height: 1.35; }
.participant-greeting { margin: 14px 0 0; color: var(--blue); font-size: 0.82rem; font-weight: 700; }
.participant-greeting strong { color: var(--blue-deep); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: end;
  gap: 64px;
  padding: 0 8px 54px;
}

.eyebrow, .section-kicker {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.eyebrow-line { width: 30px; height: 2px; background: var(--orange); }

h1, h2, p { margin-top: 0; }
.hero h1 {
  max-width: 720px;
  margin-bottom: 18px;
  color: var(--blue-deep);
  font-size: clamp(2.45rem, 5vw, 4.85rem);
  line-height: 0.99;
  letter-spacing: -0.065em;
}
.hero h1 span { color: var(--blue); }
.hero-intro { max-width: 650px; margin-bottom: 0; color: var(--muted); font-size: 1.08rem; }

.hero-stats { display: grid; grid-template-columns: 1fr 1fr; border-top: 2px solid var(--blue-deep); border-bottom: 1px solid var(--line); }
.hero-stat { min-height: 116px; padding: 18px 16px; display: flex; flex-direction: column; justify-content: center; border-right: 1px solid var(--line); }
.hero-stat:last-child { border-right: 0; }
.hero-stat strong { color: var(--blue-deep); font-size: 2.3rem; letter-spacing: -0.06em; line-height: 1; }
.hero-stat span { margin-top: 8px; color: var(--muted); font-size: 0.76rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.hero-stat--accent strong { color: var(--orange); }

.classification-strip {
  display: grid;
  grid-template-columns: 1.05fr repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
  margin: 0 0 42px;
}
.classification-strip-heading {
  padding: 8px 12px 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.classification-strip-heading .section-kicker { margin-bottom: 7px; }
.classification-strip-heading h2 { margin: 0; color: var(--blue-deep); font-size: 1.18rem; line-height: 1.08; letter-spacing: -0.03em; }
.classification-card {
  min-height: 128px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 20px rgba(15, 31, 61, 0.05);
}
.classification-label { display: block; margin-bottom: 10px; color: var(--blue); font-size: 0.82rem; font-weight: 900; }
.classification-card p { margin: 0; color: var(--muted); font-size: 0.76rem; line-height: 1.4; }
.classification-card--attenuated { border-top-color: #e3a22c; }
.classification-card--attenuated .classification-label { color: #a96b0b; }
.classification-card--inactivated { border-top-color: #3e88d7; }
.classification-card--inactivated .classification-label { color: #23609d; }
.classification-card--rna { border-top-color: #a16bd0; }
.classification-card--rna .classification-label { color: #75409e; }

.quiz-form { position: relative; }
.quiz-footer-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 8px 0;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.quiz-footer-actions .primary-button { min-width: 280px; justify-content: center; }
.quiz-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
  padding: 0 8px 22px;
  border-bottom: 2px solid var(--blue-deep);
}
.toolbar-copy h2 { margin-bottom: 3px; color: var(--blue-deep); font-size: clamp(1.35rem, 2.5vw, 1.8rem); letter-spacing: -0.03em; }
.progress-text { margin: 0; color: var(--muted); font-size: 0.84rem; }
.toolbar-actions { min-width: min(440px, 100%); display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.progress-track { flex: 1 1 120px; height: 9px; min-width: 100px; overflow: hidden; border-radius: 99px; background: #dde5f3; }
.progress-bar { width: 0%; height: 100%; border-radius: inherit; background: var(--orange); transition: width 220ms ease; }
.timer-display {
  min-height: 42px;
  padding: 7px 12px;
  border: 1px solid #efc58f;
  border-radius: 10px;
  background: var(--orange-soft);
  color: #8b5118;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}
.timer-label { font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.timer-display strong { color: #6f3a0d; font-size: 1.05rem; letter-spacing: 0.04em; }
.timer-display.is-warning { border-color: #e3a22c; background: #fff6dc; color: #8a5c0d; }
.timer-display.is-critical { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); animation: timer-pulse 900ms ease-in-out infinite alternate; }
.timer-display.is-critical strong, .timer-display.is-expired strong { color: var(--danger); }
.timer-display.is-expired { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }

.primary-button, .secondary-button {
  min-height: 46px;
  border-radius: 8px;
  font-weight: 800;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
.primary-button {
  padding: 0 16px 0 18px;
  border: 1px solid #0b9450;
  background: #0b9450;
  color: white;
  display: inline-flex;
  align-items: center;
  gap: 18px;
}
.primary-button:hover { background: #087d43; box-shadow: 0 6px 16px rgba(11, 148, 80, 0.22); transform: translateY(-1px); }
.primary-button:disabled { cursor: default; opacity: 0.62; box-shadow: none; transform: none; }
.button-arrow { color: #ffd5a6; font-size: 1.15rem; }
.secondary-button { padding: 0 16px; border: 1px solid var(--line); background: white; color: var(--blue); }
.secondary-button:hover { border-color: var(--blue); background: var(--blue-soft); }

.validation-message {
  margin: -8px 8px 22px;
  padding: 12px 16px;
  border: 1px solid #e3ae61;
  border-radius: var(--radius-sm);
  background: var(--orange-soft);
  color: #73410e;
  font-size: 0.9rem;
  font-weight: 700;
}

.quiz-table-head {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 2fr);
  gap: 26px;
  padding: 0 22px 8px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.quiz-table-head span:last-child { text-align: center; }
.quiz-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.quiz-card {
  min-width: 0;
  padding: 14px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 4px 0 rgba(15, 31, 61, 0.03);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.quiz-card:hover { border-color: #adc2e4; box-shadow: var(--shadow); transform: translateY(-2px); }
.quiz-card.is-correct { border-color: #79bea2; background: linear-gradient(0deg, rgba(230, 245, 239, 0.52), rgba(230, 245, 239, 0.52)), white; }
.quiz-card.is-incorrect { border-color: #e2a1a1; background: linear-gradient(0deg, rgba(252, 236, 235, 0.5), rgba(252, 236, 235, 0.5)), white; }
.quiz-card.is-timeout { border-color: #cbd4e3; background: #f7f9fc; }

.quiz-card fieldset { min-width: 0; width: 100%; margin: 0; padding: 0; border: 0; display: grid; grid-template-columns: minmax(240px, 1fr) minmax(360px, 2fr); column-gap: 26px; align-items: center; }
.quiz-card legend { width: 100%; padding: 0; display: flex; align-items: center; gap: 10px; color: var(--blue-deep); font-weight: 800; }
.question-number { color: var(--orange); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em; }
.question-name { min-width: 0; overflow-wrap: anywhere; font-size: 1.05rem; letter-spacing: -0.015em; }
.answer-list { grid-column: 2; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.answer-option { position: relative; min-width: 0; }
.answer-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.answer-label {
  min-height: 72px;
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbfcff;
  color: #415474;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.15;
  transition: border-color 150ms ease, color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}
.answer-label:hover { border-color: #8ca9d7; color: var(--blue); }
.answer-option input:focus-visible + .answer-label { outline: 3px solid rgba(242, 140, 40, 0.65); outline-offset: 3px; }
.answer-option input:checked + .answer-label { border: 2px solid var(--blue); background: var(--blue-soft); color: var(--blue); box-shadow: inset 0 0 0 1px white; }
.answer-symbol { color: var(--orange); font-size: 1.1rem; line-height: 1; }
.answer-state { min-height: 14px; color: inherit; font-size: 0.63rem; font-weight: 800; }
.answer-label.answer--correct { border-color: var(--success); background: var(--success-soft); color: var(--success); }
.answer-label.answer--correct .answer-symbol { color: var(--success); }
.answer-label.answer--wrong { border-color: var(--danger); background: var(--danger-soft); color: var(--danger); }
.answer-label.answer--wrong .answer-symbol { color: var(--danger); }
.card-feedback { grid-column: 1 / -1; min-height: 0; margin: 10px 0 0 31px; color: var(--muted); font-size: 0.78rem; font-weight: 700; }
.card-feedback strong { color: var(--blue-deep); }

.result-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, 280px);
  align-items: center;
  gap: 26px;
  margin-top: 34px;
  padding: 26px 28px;
  border: 2px solid var(--blue);
  border-radius: var(--radius-lg);
  background: var(--blue-deep);
  color: white;
  animation: result-in 260ms ease both;
}
.result-orbit { width: 112px; height: 112px; border: 1px solid rgba(255,255,255,0.28); border-radius: 50%; display: grid; place-items: center; position: relative; }
.result-orbit::before { content: ""; position: absolute; inset: 10px; border: 8px solid var(--orange); border-left-color: rgba(255,255,255,0.15); border-radius: 50%; transform: rotate(-28deg); }
.result-orbit span { position: relative; color: white; font-size: 1.15rem; font-weight: 800; }
.result-copy .section-kicker { color: #ffd5a6; }
.result-copy h2 { margin-bottom: 7px; color: white; font-size: clamp(1.35rem, 3vw, 2rem); letter-spacing: -0.04em; }
.result-copy p { margin-bottom: 14px; color: #cbd6ec; }
.result-metrics { display: flex; gap: 22px; }
.result-metrics div { display: grid; gap: 1px; }
.result-metrics strong { color: white; font-size: 1.25rem; }
.result-metrics span { color: #aebbd5; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.result-tip { padding: 16px; border: 1px solid rgba(255,255,255,0.18); border-radius: var(--radius-sm); background: rgba(255,255,255,0.06); }
.tip-label { color: #ffd5a6; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.result-tip p { margin: 6px 0 0; color: #d8e0ef; font-size: 0.82rem; }

[hidden] { display: none !important; }

@keyframes result-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes timer-pulse { from { box-shadow: 0 0 0 0 rgba(184, 66, 66, 0.08); } to { box-shadow: 0 0 0 5px rgba(184, 66, 66, 0.14); } }

@media (max-width: 820px) {
  .page-main { width: min(100% - 32px, 680px); padding-top: 42px; }
  .registration-panel { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-bottom: 38px; }
  .hero-stats { max-width: 360px; }
  .classification-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .classification-strip-heading { grid-column: 1 / -1; padding: 0 8px 4px; }
  .quiz-table-head { grid-template-columns: 1fr; gap: 4px; padding-inline: 14px; }
  .quiz-table-head span:last-child { text-align: left; }
  .quiz-card fieldset { grid-template-columns: 1fr; row-gap: 14px; }
  .answer-list { grid-column: 1; }
  .card-feedback { grid-column: 1; margin-left: 0; }
  .quiz-toolbar { align-items: stretch; flex-direction: column; gap: 20px; }
  .toolbar-actions { min-width: 0; justify-content: stretch; }
  .progress-track { flex-basis: 100%; order: -1; }
  .primary-button { flex: 1; justify-content: center; }
  .quiz-grid { grid-template-columns: 1fr; }
  .result-panel { grid-template-columns: auto minmax(0, 1fr); }
  .result-tip { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .site-header { min-height: 148px; padding: 12px 16px; }
  .site-header-inner { min-height: 120px; }
  .challenge-brand, .challenge-logo { width: min(100%, 140px); }
  .challenge-logo { max-height: 140px; }
  .page-main { width: min(100% - 24px, 680px); padding-top: 34px; }
  .registration-panel { gap: 24px; margin-bottom: 38px; padding: 24px 18px; border-left-width: 4px; }
  .registration-intro h1 { font-size: clamp(2.25rem, 13vw, 3.3rem); }
  .hero h1 { font-size: clamp(2.3rem, 14vw, 3.35rem); }
  .hero-intro { font-size: 0.98rem; }
  .classification-strip { grid-template-columns: 1fr; gap: 10px; margin-bottom: 34px; }
  .classification-strip-heading { grid-column: auto; }
  .classification-card { min-height: auto; }
  .quiz-toolbar { padding-inline: 2px; }
  .timer-display { justify-content: center; }
  .quiz-footer-actions { align-items: stretch; flex-direction: column; margin-inline: 0; }
  .quiz-footer-actions .primary-button, .quiz-footer-actions .secondary-button { width: 100%; }
  .quiz-card { padding: 18px 14px; }
  .card-feedback { margin-left: 0; }
  .answer-list { gap: 6px; }
  .answer-label { min-height: 82px; padding-inline: 4px; font-size: 0.7rem; }
  .result-panel { grid-template-columns: 1fr; padding: 22px; }
  .result-orbit { width: 92px; height: 92px; }
  .result-tip { grid-column: auto; }
}

@media (max-width: 420px) {
  .site-header { min-height: 136px; padding: 10px 12px; }
  .site-header-inner { min-height: 112px; }
  .challenge-brand, .challenge-logo { width: min(100%, 128px); }
  .challenge-logo { max-height: 128px; }
  .page-main { width: calc(100% - 20px); padding-top: 24px; }
  .registration-panel { padding: 20px 14px; border-radius: 18px; }
  .registration-intro h1 { font-size: clamp(2rem, 12vw, 2.8rem); }
  .registration-intro > p:last-child { font-size: 0.9rem; }
  .hero { gap: 20px; padding-inline: 2px; padding-bottom: 30px; }
  .hero h1 { font-size: clamp(2rem, 13vw, 3rem); }
  .hero-intro { font-size: 0.92rem; }
  .classification-strip { gap: 8px; }
  .classification-card { padding: 14px; }
  .quiz-table-head { padding-inline: 8px; font-size: 0.63rem; }
  .quiz-card { padding: 12px 10px; }
  .question-name { font-size: 0.95rem; }
  .answer-label { min-height: 72px; font-size: 0.64rem; }
  .quiz-footer-actions { margin-top: 18px; padding-top: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
