:root {
  color-scheme: light;
  --page: #f4f7fb;
  --surface: #fff;
  --ink: #14243a;
  --muted: #526176;
  --line: #dae3ed;
  --accent: #096b62;
  --accent-dark: #07574f;
  --accent-soft: #e9f6f2;
  --wrong: #a03b35;
  --wrong-soft: #fff1ef;
  --shadow: 0 12px 38px #15304d0a, 0 2px 5px #15304d05;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; }
h1, h2, h3, p, ol, dl, dd { margin: 0; }
button { font: inherit; }
button:focus-visible, .choice:has(input:focus-visible) { outline: 3px solid #157fb0; outline-offset: 3px; }
h1:focus { outline: none; }

.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.top-bar-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-inline: auto;
  max-width: 1100px;
  min-height: 66px;
  padding: 0 16px;
}

.brand { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 750; white-space: nowrap; }
.brand-icon {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 6px);
  grid-template-rows: repeat(2, 6px);
  place-content: center;
  gap: 3px;
  width: 31px;
  height: 31px;
  border-radius: 9px;
  background: var(--accent);
}
.brand-icon::after { content: ""; position: absolute; inset: 13px; background: #fff; border-radius: 2px; }
.brand-icon i { border: 1px solid #fff; border-radius: 50%; }
.brand-category { color: var(--accent-dark); font-size: 12px; font-weight: 650; }

.page { max-width: 1100px; margin-inline: auto; padding: 21px 16px 24px; }
.quiz-layout { display: grid; gap: 20px; align-items: start; }
.single-layout { max-width: 780px; margin-inline: auto; }
.panel { border: 1px solid var(--line); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow); }
.question-panel { padding: 19px 17px; min-width: 0; }

.progress-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 3px 14px;
  margin-bottom: 10px;
}
.eyebrow { color: var(--accent-dark); font-size: 12px; font-weight: 750; letter-spacing: 0.055em; text-transform: uppercase; }
.topic { color: var(--muted); font-size: 13px; font-weight: 600; }
progress { display: block; width: 100%; height: 5px; border: 0; border-radius: 999px; background: #e4ebef; overflow: hidden; }
progress::-webkit-progress-bar { background: #e4ebef; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
h1 { font-size: clamp(24px, 5.2vw, 34px); font-weight: 760; line-height: 1.22; letter-spacing: -0.035em; overflow-wrap: anywhere; }
.question-panel h1 { margin: 22px 0 21px; }

.choices { border: 0; padding: 0; margin: 0; min-width: 0; display: grid; gap: 9px; }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 57px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcfe;
  font-size: 15px;
  line-height: 1.42;
  cursor: pointer;
}
.choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-letter {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 8px;
  background: #eaf0f6;
  color: #3e5269;
  font-size: 13px;
  font-weight: 760;
}
.choice-text { overflow-wrap: anywhere; }
.choice:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:checked) .choice-letter { background: var(--accent); color: #fff; }

.navigation { display: flex; justify-content: space-between; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 15px; margin-top: 18px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 680;
  text-align: center;
  cursor: pointer;
}
.button:disabled { color: #69798e; background: #f2f5f8; border-color: #e8eef4; cursor: default; }
.primary { background: var(--accent); color: #fff; }
.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.quiet { color: var(--accent-dark); background: var(--accent-soft); }
.button span[aria-hidden] { font-size: 16px; line-height: 1; }

.map-panel { display: none; padding: 21px; }
h2 { font-size: 19px; line-height: 1.3; letter-spacing: -0.022em; }
.muted { color: var(--muted); font-size: 14px; }
.map-panel .muted { margin-top: 3px; }
.question-map { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; margin-top: 17px; }
.map-cell {
  min-height: 43px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.map-cell.answered { background: var(--accent-soft); color: var(--accent-dark); border-color: #b0d8cd; }
.map-cell[aria-current="step"] { border-color: var(--accent); color: var(--accent-dark); box-shadow: inset 0 0 0 1px var(--accent); }
.map-legend { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-top: 16px; color: var(--muted); font-size: 11px; }
.map-legend span { display: inline-flex; align-items: center; gap: 5px; }
.map-legend i { width: 10px; height: 10px; border: 1px solid var(--line); border-radius: 3px; }
.map-legend span:first-child i { background: var(--accent-soft); border-color: #b0d8cd; }

.section-header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; align-items: end; padding: 21px 18px; }
.section-header h1 { margin: 5px 0 6px; }
.section-header .muted + .muted { margin-top: 5px; }
.section-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.item-list { display: grid; gap: 10px; list-style: none; padding: 0; margin-top: 15px; }
.summary-item {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 14px 12px;
  width: 100%;
  text-align: left;
  color: var(--ink);
  border-radius: 12px;
  box-shadow: none;
  cursor: pointer;
}
.item-number { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 7px; color: var(--muted); background: #edf2f7; font-size: 12px; font-weight: 750; }
.item-prompt { display: block; font-size: 15px; font-weight: 670; line-height: 1.4; overflow-wrap: anywhere; }
.summary-answer { display: block; color: var(--muted); font-size: 14px; margin-top: 5px; overflow-wrap: anywhere; }
.summary-answer.answered { color: var(--accent-dark); }
.item-arrow { color: var(--accent-dark); padding: 2px; }

.score { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; }
.score strong { font-size: clamp(40px, 10vw, 62px); font-weight: 780; line-height: 1.12; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.score span { color: var(--accent-dark); font-size: 18px; font-weight: 750; }
.score-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; border-top: 1px solid var(--line); padding-top: 14px; }
.score-details div { padding: 7px 8px; border-radius: 8px; background: #f4f7fb; }
.score-details dt { color: var(--muted); font-size: 12px; line-height: 1.2; }
.score-details dd { font-size: 19px; font-weight: 750; }
.review-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-top: 24px; }
.review-filters { display: flex; gap: 4px; }
.review-filters .button[aria-pressed="false"] { background: transparent; color: var(--muted); }
.review-item { border-radius: 12px; padding: 15px 13px; box-shadow: none; }
.review-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 7px; }
.review-top .muted { font-size: 12px; }
.review-state { padding: 3px 8px; border-radius: 6px; color: var(--muted); background: #edf2f7; font-size: 12px; font-weight: 740; }
.review-state.correct { color: var(--accent-dark); background: var(--accent-soft); }
.review-state.wrong { color: var(--wrong); background: var(--wrong-soft); }
.review-answers { margin-top: 12px; display: grid; gap: 7px; font-size: 14px; overflow-wrap: anywhere; }
.review-answers div { padding: 8px 10px; background: #f4f7fb; border-radius: 8px; }
.review-answers div:last-child { background: var(--accent-soft); }
.review-answers dt { color: var(--muted); font-size: 12px; font-weight: 720; }
.review-answers div:last-child dt { color: var(--accent-dark); }
.message { padding: 18px; margin-top: 15px; }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 18px; padding: 18px 2px 0; color: var(--muted); font-size: 11px; }

@media (hover: hover) {
  .primary:not(:disabled):hover { background: var(--accent-dark); }
  .secondary:not(:disabled):hover, .quiet:hover, .review-filters .button[aria-pressed="false"]:hover { background: #eaf0f6; }
  .choice:not(:has(input:checked)):hover, .map-cell:hover, .summary-item:hover { border-color: #8ba9ac; }
}

@media (min-width: 760px) {
  .top-bar-content { min-height: 74px; padding-inline: 25px; }
  .brand { font-size: 18px; gap: 11px; }
  .brand-icon { width: 35px; height: 35px; }
  .brand-icon::after { inset: 15px; }
  .brand-category { font-size: 13px; }
  .page { padding: 36px 25px 26px; }
  .quiz-layout { grid-template-columns: minmax(0, 1fr) 245px; }
  .question-panel { padding: 25px 27px; }
  .question-panel h1 { margin-top: 24px; }
  .choice { padding: 11px 14px; font-size: 16px; }
  .map-panel { display: block; }
  .button { padding-inline: 16px; }
  .section-header { padding: 24px; }
  .summary-item, .review-item { padding: 16px 19px; }
  .score-details { gap: 10px; }
  .score-details div { padding: 8px 12px; }
  .footer { font-size: 12px; }
}

@media (min-width: 1000px) {
  .quiz-layout { grid-template-columns: minmax(0, 1fr) 268px; gap: 24px; }
  .question-panel { padding: 30px 34px; }
  .map-panel { padding: 24px; }
}

@media (max-width: 360px) {
  .top-bar-content, .page { padding-inline: 11px; }
  .brand { gap: 6px; font-size: 15px; }
  .brand-category { font-size: 11px; }
  .button { padding-inline: 10px; }
  .question-panel { padding-inline: 13px; }
}
