@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap");

:root {
  color-scheme: light;
  --ink: #030213;
  --muted: #717182;
  --line: #dfe5f2;
  --surface: #ffffff;
  --soft: #f3f3f5;
  --navy: #030213;
  --primary: #506ef5;
  --primary-dark: #3552d2;
  --primary-soft: #eef1ff;
  --blue: #506ef5;
  --teal: #506ef5;
  --green: #7ac143;
  --danger: #b42318;
  --shadow: 0 24px 70px rgba(3, 2, 19, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 0%, rgba(80, 110, 245, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(80, 110, 245, 0.08) 0%, rgba(238, 241, 255, 0.58) 44%, #ffffff 100%);
  color: var(--ink);
  font-family: Poppins, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  padding: 28px;
}

.app-shell::before,
.app-shell::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.app-shell::before {
  right: -16vw;
  bottom: -22vw;
  z-index: 0;
  width: min(78vw, 1100px);
  aspect-ratio: 1;
  border: 2px solid rgba(255, 255, 255, 0.64);
  border-radius: 50%;
}

.app-shell::after {
  right: -8vw;
  bottom: -130px;
  left: -8vw;
  z-index: 0;
  height: 310px;
  background:
    radial-gradient(ellipse at 18% 62%, rgba(255, 255, 255, 0.9) 0 16%, rgba(255, 255, 255, 0.58) 30%, transparent 52%),
    radial-gradient(ellipse at 52% 70%, rgba(255, 255, 255, 0.86) 0 20%, rgba(255, 255, 255, 0.56) 35%, transparent 58%),
    radial-gradient(ellipse at 84% 60%, rgba(255, 255, 255, 0.84) 0 17%, rgba(255, 255, 255, 0.52) 32%, transparent 54%);
  filter: blur(10px);
}

.app-shell > * {
  position: relative;
  z-index: 1;
}

.exam-layout {
  display: grid;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  position: relative;
}

.exam-body {
  display: block;
}

.main-panel,
.question-panel,
.result-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(223, 229, 242, 0.95);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.result-panel .brand {
  justify-content: center;
  margin-bottom: 26px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.brand-logo {
  width: min(174px, 52vw);
  height: auto;
  display: block;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 14px;
  max-width: 780px;
  font-size: 3rem;
  line-height: 1.02;
  font-weight: 760;
}

.intro-copy .brand-logo {
  width: min(250px, 70vw);
}

h2 {
  font-size: 1.5rem;
  line-height: 1.2;
}

h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.lead {
  max-width: 680px;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.65;
}

.main-panel {
  overflow: hidden;
}

.intro {
  min-height: calc(100vh - 56px);
  display: grid;
  align-content: center;
  padding: 48px;
  position: relative;
}

.language-switcher {
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 10;
  width: 176px;
  color: var(--ink);
}

.language-switcher summary {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid rgba(80, 110, 245, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 34px rgba(3, 2, 19, 0.08);
  cursor: pointer;
  list-style: none;
  outline: none;
  backdrop-filter: blur(12px);
}

.language-switcher summary::-webkit-details-marker {
  display: none;
}

.language-switcher summary strong,
.language-menu strong {
  overflow: hidden;
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.language-switcher summary svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.language-switcher[open] summary svg {
  transform: rotate(180deg);
}

.language-switcher summary:focus-visible {
  box-shadow:
    0 0 0 4px rgba(80, 110, 245, 0.2),
    0 14px 34px rgba(3, 2, 19, 0.08);
}

.language-menu {
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 44px rgba(3, 2, 19, 0.11);
  backdrop-filter: blur(12px);
}

.language-menu a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 13px;
  color: var(--muted);
  text-decoration: none;
}

.language-menu a:hover {
  background: var(--primary-soft);
  color: var(--ink);
}

.language-menu a.active {
  background: rgba(80, 110, 245, 0.1);
  color: var(--ink);
  box-shadow: inset 3px 0 0 var(--primary);
}

.language-menu em {
  display: grid;
  place-items: center;
  color: var(--primary);
  font-style: normal;
}

.language-menu em svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.intro-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 460px);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
}

.intro-copy {
  max-width: 680px;
}

.intro-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.intro-actions .btn {
  width: 100%;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
}

.stat strong {
  display: block;
  font-size: 1.55rem;
}

.stat span {
  color: var(--muted);
  font-size: 0.84rem;
}

.candidate-form {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

.country-field {
  position: relative;
}

.field label {
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #c9d4e5;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}

.field select {
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--muted) 50%, transparent 50%) calc(100% - 13px) 50% / 6px 6px no-repeat,
    #fff;
}

.field input:focus,
.field select:focus {
  border-color: var(--primary);
  outline: 4px solid rgba(80, 110, 245, 0.16);
}

.country-combobox {
  position: relative;
}

.country-combobox input {
  padding-right: 44px;
}

.country-toggle {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  place-items: center;
  width: 42px;
  height: calc(100% - 2px);
  border-radius: 0 9px 9px 0;
  background: transparent;
  color: var(--ink);
  box-shadow: none;
}

.country-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 160ms ease;
}

.country-combobox.open .country-toggle svg {
  transform: rotate(180deg);
}

.country-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  max-height: 250px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 46px rgba(3, 2, 19, 0.14);
}

.country-combobox.open .country-list {
  display: grid;
  gap: 2px;
}

.country-option {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.country-option:hover {
  background: var(--primary-soft);
}

.country-option strong {
  overflow: hidden;
  font-size: 0.88rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.country-empty {
  padding: 11px 10px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  background: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  box-shadow: 0 12px 26px rgba(80, 110, 245, 0.24);
}

.btn:hover {
  background: var(--primary-dark);
}

.btn.secondary {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  box-shadow: none;
}

.btn.secondary:hover {
  background: var(--soft);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.exam-topbar {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 8px 4px 10px;
}

.topbar-main {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.topbar-main .brand-logo {
  width: 190px;
}

.exam-title {
  margin: 0;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.progress-card {
  width: 100%;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 10px 36px rgba(3, 2, 19, 0.06);
}

.topbar-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.48fr);
  gap: 16px;
  width: 100%;
  align-items: stretch;
}

.progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.topic-rail {
  position: absolute;
  top: 236px;
  left: calc(100% + 16px);
  width: 230px;
}

.timer-card {
  --timer-progress: 360deg;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 100%;
  padding: 13px;
  border: 1px solid rgba(80, 110, 245, 0.2);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(3, 2, 19, 0.08);
}

.timer-ring {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) var(--timer-progress), #e5e8f2 0deg);
}

.timer-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #fff;
}

.timer-value {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.timer-copy {
  display: grid;
  gap: 2px;
}

.timer-copy strong {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.15;
}

.timer-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.timer-card.warning .timer-ring {
  background: conic-gradient(var(--danger) var(--timer-progress), #f2d8d6 0deg);
}

.timer-card.warning .timer-value {
  color: var(--danger);
}

.topic-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

.topic-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 16px 42px rgba(3, 2, 19, 0.07);
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.topic-item.active {
  border-color: rgba(80, 110, 245, 0.48);
  background: linear-gradient(180deg, rgba(80, 110, 245, 0.13), rgba(255, 255, 255, 0.94));
  box-shadow: 0 18px 46px rgba(80, 110, 245, 0.16);
  transform: translateX(-4px);
}

.topic-item.active .topic-ring {
  background: conic-gradient(var(--primary) var(--topic-progress), rgba(80, 110, 245, 0.2) 0deg);
}

.topic-item.active .topic-copy strong,
.topic-item.active .topic-copy small {
  color: var(--primary);
}

.topic-ring {
  --topic-progress: 0deg;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: conic-gradient(var(--green) var(--topic-progress), #e5e8f2 0deg);
}

.topic-ring::before {
  content: "";
  grid-area: 1 / 1;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: #fff;
}

.topic-icon {
  position: relative;
  z-index: 1;
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--primary);
  font-size: 0.94rem;
  font-weight: 900;
}

.topic-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topic-item.done .topic-icon {
  color: #287014;
}

.topic-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.topic-copy strong {
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
}

.topic-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.progress-track {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e3e7f2;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), #7a90ff);
  transition: width 180ms ease;
}

.question-panel {
  margin: 0;
  padding: clamp(22px, 3vw, 30px);
  box-shadow: none;
  border-radius: 18px 18px 0 0;
  border-width: 0 0 1px;
}

.question-meta {
  display: flex;
  justify-content: flex-start;
  gap: 16px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.section-pill {
  color: var(--primary);
}

.question-text {
  margin-bottom: 26px;
  font-size: clamp(1.14rem, 1.6vw, 1.42rem);
  line-height: 1.28;
}

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

.option {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.option:hover {
  border-color: rgba(80, 110, 245, 0.45);
  background: var(--primary-soft);
}

.option.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(80, 110, 245, 0.14);
}

.option-key {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--primary);
  font-weight: 800;
}

.option.selected .option-key {
  background: var(--primary);
  color: #fff;
}

.exam-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px clamp(20px, 3vw, 30px) 24px;
  background: #fff;
  border-radius: 0 0 18px 18px;
}

.keyboard-hint {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
}

.keyboard-hint span {
  white-space: nowrap;
}

kbd {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin: 0 2px;
  padding: 0 5px;
  border: 1px solid #d8deed;
  border-bottom-width: 2px;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
}

.section-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.section-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(80, 110, 245, 0.18);
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 700;
}

.result-screen {
  min-height: calc(100vh - 56px);
  display: grid;
  place-items: center;
  padding: 28px;
}

.result-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(32px, 6vw, 60px);
  text-align: center;
}

.result-panel h1 {
  margin-left: auto;
  margin-right: auto;
}

.result-panel.failed h1 {
  max-width: 760px;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.18;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(122, 193, 67, 0.18);
  color: #315f10;
  font-weight: 800;
}

.result-badge.failed {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.result-score {
  margin: 18px 0 8px;
  font-size: clamp(3.8rem, 14vw, 8rem);
  line-height: 0.92;
  font-weight: 800;
}

.result-panel.failed .result-score {
  margin: 0;
  padding: 20px 0;
  color: var(--danger);
  font-size: 6rem;
  font-weight: 700;
}

.result-panel.failed .result-number {
  color: var(--danger);
  font-weight: 700;
}

.result-copy {
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.6;
}

.result-panel.failed .result-copy strong,
.result-panel.failed .result-copy {
  color: var(--muted);
}

.result-actions {
  justify-content: center;
}

.incorrect-summary {
  margin-top: 30px;
  text-align: left;
}

.incorrect-summary[hidden] {
  display: none;
}

.incorrect-summary h2 {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 600;
}

.incorrect-list {
  display: grid;
  gap: 12px;
}

.incorrect-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(248, 250, 255, 0.78);
}

.incorrect-item > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
  font-weight: 600;
}

.incorrect-item p {
  margin: 0 0 6px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
}

.incorrect-item h3 {
  margin: 0 0 12px;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.35;
}

.incorrect-item dl {
  display: grid;
  gap: 10px;
  margin: 0;
}

.incorrect-item dt {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
}

.incorrect-item dd {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.45;
}

.loading {
  display: grid;
  justify-items: center;
  gap: 18px;
  max-width: 420px;
  margin: 18vh auto 0;
  padding: 34px 38px;
  border: 1px solid rgba(223, 229, 242, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.loading img {
  width: min(220px, 72vw);
  height: auto;
}

.loading span {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(80, 110, 245, 0.16);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 850ms linear infinite;
}

.loading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.error {
  max-width: 640px;
  margin: 80px auto;
  padding: 24px;
  border-radius: 18px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 14px;
  }

  .intro-grid {
    grid-template-columns: 1fr;
  }

  .exam-body {
    display: grid;
    gap: 18px;
  }

  .exam-body,
  .exam-topbar {
    grid-template-columns: 1fr;
    padding-top: 8px;
  }

  .topbar-status {
    grid-template-columns: 1fr;
  }

  .topbar-main {
    align-items: center;
    flex-direction: column;
    gap: 14px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topic-rail {
    position: static;
    width: auto;
    order: -1;
  }

  .topic-copy strong {
    white-space: normal;
  }

  .intro {
    min-height: auto;
    padding: 74px 4px 22px;
  }

  .language-switcher {
    top: 12px;
    right: 12px;
    width: 168px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .exam-actions,
  .progress-top,
  .question-meta {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 1370px) {
  .exam-layout {
    max-width: 760px;
  }

  .topic-rail {
    width: 220px;
    left: calc(100% + 12px);
  }
}

@media (max-width: 1010px) {
  .exam-layout {
    max-width: 820px;
  }

  .topbar-status {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.48fr);
  }

  .exam-body {
    display: grid;
    gap: 18px;
  }

  .topic-rail {
    position: static;
    width: auto;
    order: -1;
  }

  .topic-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .topbar-status {
    grid-template-columns: 1fr;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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