.page-exam {
  --exam-yellow: #f7c617;
  --exam-yellow-soft: rgba(247, 198, 23, .14);
  --exam-line: rgba(255, 255, 255, .1);
  --exam-panel: #121418;
  --exam-panel-2: #181b20;
  background: #090a0c;
}

.page-exam [hidden] { display: none !important; }
.page-exam main { overflow: clip; background: #090a0c; }

.exam-hero {
  position: relative;
  min-height: 590px;
  overflow: hidden;
  padding-top: 92px;
  border-bottom: 1px solid var(--exam-line);
  background:
    linear-gradient(90deg, rgba(247,198,23,.035) 1px, transparent 1px),
    linear-gradient(rgba(247,198,23,.035) 1px, transparent 1px),
    radial-gradient(circle at 78% 36%, rgba(247,198,23,.1), transparent 28%),
    #0b0d10;
  background-size: 72px 72px, 72px 72px, auto, auto;
}

.exam-hero::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--exam-yellow), transparent);
  opacity: .45;
  content: "";
}

.exam-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: center;
  min-height: 498px;
  gap: clamp(55px, 8vw, 130px);
  padding-block: 58px 70px;
}

.exam-hero-copy h1 {
  max-width: 850px;
  margin: 19px 0 24px;
  color: #f3f4f1;
  font-size: clamp(48px, 6vw, 84px);
  line-height: .92;
  letter-spacing: -.065em;
  text-transform: uppercase;
}

.exam-hero-copy h1 em { color: var(--exam-yellow); font-style: normal; }
.exam-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 30px;
  border-top: 1px solid var(--exam-line);
}

.exam-metrics span {
  min-width: 145px;
  padding: 19px 28px 0 0;
  color: #7c8087;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.exam-metrics b { margin-right: 6px; color: #f1f2ef; font: 800 20px/1 ui-monospace, monospace; }

.exam-console {
  position: relative;
  width: 100%;
  min-height: 310px;
  padding: 26px;
  border: 1px solid rgba(247,198,23,.35);
  background: rgba(13,15,18,.84);
  box-shadow: 0 32px 80px rgba(0,0,0,.42), inset 0 0 60px rgba(247,198,23,.025);
}

.exam-console::before,
.exam-console::after { position: absolute; width: 24px; height: 24px; border-color: var(--exam-yellow); content: ""; }
.exam-console::before { top: -1px; left: -1px; border-top: 2px solid; border-left: 2px solid; }
.exam-console::after { right: -1px; bottom: -1px; border-right: 2px solid; border-bottom: 2px solid; }
.console-head { display: flex; align-items: center; gap: 14px; color: var(--exam-yellow); font: 800 9px/1 ui-monospace, monospace; letter-spacing: .16em; }
.console-head i { flex: 1; height: 1px; background: linear-gradient(90deg, var(--exam-yellow), transparent); }
.quiz-stage { position: relative; min-height: 214px; margin-top: 17px; overflow: hidden; border-block: 1px solid rgba(255,255,255,.06); background: radial-gradient(circle at 50% 52%, rgba(247,198,23,.075), transparent 48%); }
.quiz-stage::before { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(247,198,23,.028) 1px, transparent 1px), linear-gradient(rgba(247,198,23,.028) 1px, transparent 1px); background-size: 21px 21px; content: ""; }
.trade-corridor { position: absolute; z-index: 1; top: 10px; right: 5px; left: 5px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: #6e7279; font: 800 7px/1 ui-monospace, monospace; letter-spacing: .13em; }
.trade-corridor i { position: relative; display: block; height: 1px; background: repeating-linear-gradient(90deg, rgba(247,198,23,.48) 0 5px, transparent 5px 10px); }
.trade-corridor i::before, .trade-corridor i::after { position: absolute; top: -3px; width: 7px; height: 7px; border: 1px solid var(--exam-yellow); border-radius: 50%; background: #111318; content: ""; }
.trade-corridor i::before { left: 0; }
.trade-corridor i::after { right: 0; }
.trade-corridor b { position: absolute; top: -3px; left: 54px; width: 17px; height: 6px; border-radius: 80% 10% 10% 80%; background: var(--exam-yellow); clip-path: polygon(0 38%, 54% 38%, 72% 0, 84% 0, 78% 38%, 100% 38%, 100% 62%, 78% 62%, 84% 100%, 72% 100%, 54% 62%, 0 62%); animation: corridor-flight 4.6s ease-in-out infinite; }
.exam-paper { position: absolute; z-index: 3; top: 28px; left: 50%; width: 158px; height: 172px; padding: 18px 14px 12px; border: 1px solid #f4f1dd; background: #deded5; box-shadow: 14px 18px 0 rgba(0,0,0,.22), 0 25px 42px rgba(0,0,0,.34); color: #121417; transform: translateX(-50%) rotate(-1.8deg); animation: exam-paper-float 4s ease-in-out infinite; }
.exam-paper::before { position: absolute; top: 7px; right: 7px; bottom: 7px; left: 7px; border: 1px solid rgba(18,20,23,.1); pointer-events: none; content: ""; }
.paper-clip { position: absolute; z-index: 2; top: -8px; left: 50%; width: 42px; height: 15px; border: 1px solid #a78300; border-radius: 4px 4px 1px 1px; background: var(--exam-yellow); box-shadow: 0 3px 0 rgba(0,0,0,.25); transform: translateX(-50%); }
.paper-heading { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 6px; padding-bottom: 7px; border-bottom: 1px solid rgba(18,20,23,.25); font: 900 6px/1 ui-monospace, monospace; letter-spacing: .1em; }
.paper-heading b { font-size: 8px; }
.paper-heading i { height: 1px; background: var(--exam-yellow); }
.paper-heading span { color: #62645f; }
.paper-question { display: grid; grid-template-columns: 8px 1fr; gap: 6px; margin-top: 13px; }
.paper-question b { grid-row: span 2; width: 7px; height: 7px; border: 1px solid #202226; border-radius: 50%; }
.paper-question span { height: 3px; background: rgba(18,20,23,.57); }
.paper-question span:last-child { width: 72%; opacity: .5; }
.paper-question.short { margin-top: 12px; }
.paper-question.short span:last-child { width: 55%; }
.paper-options { display: flex; justify-content: space-between; margin: 8px 0 0 13px; }
.paper-options i { position: relative; display: grid; width: 16px; height: 16px; place-items: center; border: 1px solid rgba(18,20,23,.48); border-radius: 50%; color: #24262a; font: 900 6px/1 ui-monospace, monospace; }
.paper-options i.is-marked::after { position: absolute; inset: 2px; border-radius: 50%; background: var(--exam-yellow); box-shadow: 0 0 0 1px rgba(18,20,23,.58); content: ""; animation: answer-mark 3.2s ease-in-out infinite; }
.option-set-two i.is-marked::after { animation-delay: -1.55s; }
.paper-scan { position: absolute; z-index: 3; right: 8px; left: 8px; top: 25px; height: 1px; background: var(--exam-yellow); box-shadow: 0 0 12px rgba(247,198,23,.85); opacity: .7; animation: quiz-scan 3.8s ease-in-out infinite; }
.customs-stamp { position: absolute; right: 12px; bottom: 10px; display: grid; width: 40px; height: 40px; place-items: center; border: 2px solid rgba(129,93,0,.65); border-radius: 50%; color: rgba(129,93,0,.78); font: 900 6px/1.15 ui-monospace, monospace; letter-spacing: .08em; text-align: center; transform: rotate(-13deg); animation: stamp-check 3.8s ease-in-out infinite; }
.exam-pencil { position: absolute; z-index: 4; right: 38px; bottom: 134px; width: 75px; height: 8px; border: 1px solid #b89000; border-radius: 4px 1px 1px 4px; background: linear-gradient(#ffd83d 0 33%, #d39f00 33% 66%, #ffd83d 66%); box-shadow: 0 7px 14px rgba(0,0,0,.35); transform: rotate(-51deg); transform-origin: right center; animation: pencil-write 3.2s ease-in-out infinite; }
.exam-pencil::before { position: absolute; top: -1px; left: -12px; border-top: 4px solid transparent; border-right: 12px solid #c9b58f; border-bottom: 4px solid transparent; content: ""; }
.exam-pencil::after { position: absolute; top: 1px; left: -14px; border-top: 3px solid transparent; border-right: 6px solid #22252a; border-bottom: 3px solid transparent; content: ""; }
.manifest-tag { position: absolute; z-index: 2; bottom: 18px; left: 2px; display: flex; align-items: center; gap: 7px; color: #696d74; font: 800 6px/1.35 ui-monospace, monospace; letter-spacing: .11em; }
.manifest-tag i { position: relative; width: 32px; height: 20px; border: 1px solid rgba(247,198,23,.62); background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(247,198,23,.2) 7px 8px); }
.manifest-tag i::after { position: absolute; right: -5px; bottom: 2px; width: 3px; height: 3px; border: 1px solid var(--exam-yellow); border-radius: 50%; box-shadow: -29px 0 0 -1px #111318, -29px 0 0 0 var(--exam-yellow); content: ""; }
.console-status { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 16px; color: #656970; font: 800 7px/1 ui-monospace, monospace; letter-spacing: .12em; }
.console-status span { display: flex; align-items: center; gap: 6px; }
.console-status i { width: 4px; height: 4px; border-radius: 50%; background: var(--exam-yellow); box-shadow: 0 0 7px rgba(247,198,23,.8); animation: exam-pulse 2s ease-in-out infinite; }
.console-status span:nth-child(2) i { animation-delay: -.65s; }
.console-status span:nth-child(3) i { animation-delay: -1.3s; }

.exam-orbit { position: absolute; right: -290px; top: -270px; width: 760px; aspect-ratio: 1; border: 1px solid rgba(247,198,23,.09); border-radius: 50%; }
.exam-orbit::before, .exam-orbit::after { position: absolute; inset: 17%; border: 1px dashed rgba(255,255,255,.06); border-radius: 50%; content: ""; animation: exam-orbit 34s linear infinite; }
.exam-orbit::after { inset: 34%; animation-direction: reverse; animation-duration: 24s; }
.exam-orbit i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--exam-yellow); box-shadow: 0 0 16px rgba(247,198,23,.8); }
.exam-orbit i:nth-child(1) { top: 15%; left: 25%; }
.exam-orbit i:nth-child(2) { right: 17%; bottom: 31%; }
.exam-orbit i:nth-child(3) { bottom: 7%; left: 39%; }

.exam-workspace { padding-block: 82px 120px; background: #0d0f12; }
.exam-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 40px; margin-bottom: 42px; }
.toolbar-index { display: block; margin-bottom: 12px; color: var(--exam-yellow); font: 850 10px/1 ui-monospace, monospace; letter-spacing: .18em; }
.exam-toolbar h2 { margin: 0; color: #eef0ed; font-size: clamp(34px, 4.5vw, 58px); line-height: .98; letter-spacing: -.045em; text-transform: uppercase; }
.exam-progress { width: min(330px, 38vw); }
.exam-progress > span { display: block; margin-bottom: 11px; color: #8e9299; font: 800 10px/1 ui-monospace, monospace; letter-spacing: .12em; text-align: right; text-transform: uppercase; }
.exam-progress > div { height: 3px; overflow: hidden; background: rgba(255,255,255,.1); }
.exam-progress i { display: block; width: 0; height: 100%; background: var(--exam-yellow); box-shadow: 0 0 12px rgba(247,198,23,.5); transition: width .35s ease; }

.exam-loading { display: flex; min-height: 240px; align-items: center; justify-content: center; gap: 15px; border: 1px solid var(--exam-line); color: #8b8f96; font: 800 11px/1 ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.exam-loading i { width: 18px; height: 18px; border: 2px solid rgba(247,198,23,.2); border-top-color: var(--exam-yellow); border-radius: 50%; animation: exam-spin .8s linear infinite; }
.exam-error { padding: 55px; border: 1px solid rgba(247,198,23,.45); background: var(--exam-panel); text-align: center; }
.exam-error > span { color: var(--exam-yellow); font: 900 10px/1 ui-monospace, monospace; letter-spacing: .16em; }
.exam-error h2 { margin: 18px 0 12px; color: #f1f2ef; font-size: 32px; text-transform: uppercase; }
.exam-error p { color: #969aa1; }
.exam-error button { min-height: 44px; margin-top: 22px; padding-inline: 20px; border: 1px solid var(--exam-yellow); background: transparent; color: var(--exam-yellow); font-weight: 850; text-transform: uppercase; cursor: pointer; }

.question-list { display: grid; gap: 24px; }
.question-card { display: grid; min-width: 0; margin: 0; padding: 0 0 28px; border: 1px solid var(--exam-line); background: var(--exam-panel); transition: border-color .25s, transform .25s, box-shadow .25s; }
.question-card:focus-within { border-color: rgba(247,198,23,.48); box-shadow: 0 18px 60px rgba(0,0,0,.22); }
.question-card.is-answered { border-left-color: var(--exam-yellow); }
.question-meta { display: flex; grid-row: 1; justify-content: space-between; gap: 20px; padding: 17px 24px; border-bottom: 1px solid var(--exam-line); color: var(--exam-yellow); font: 850 9px/1 ui-monospace, monospace; letter-spacing: .16em; }
.question-meta small { color: #666a72; font: inherit; }
.question-card legend { display: block; grid-row: 2; width: 100%; padding: 29px 28px 23px; color: #f0f1ee; font-size: clamp(18px, 2vw, 23px); font-weight: 720; line-height: 1.48; }
.answer-options { display: grid; grid-row: 3; gap: 9px; padding-inline: 28px; }
.answer-option { position: relative; display: grid; grid-template-columns: 44px 1fr; align-items: center; min-height: 62px; border: 1px solid rgba(255,255,255,.075); background: #0e1013; color: #b9bcc2; cursor: pointer; transition: border-color .2s, background .2s, color .2s, transform .2s; }
.answer-option:hover { border-color: rgba(247,198,23,.36); color: #e7e8e5; transform: translateX(3px); }
.answer-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.answer-marker { display: grid; width: 32px; height: 32px; place-items: center; justify-self: center; border: 1px solid rgba(247,198,23,.35); color: var(--exam-yellow); font: 900 11px/1 ui-monospace, monospace; transition: background .2s, color .2s, box-shadow .2s; }
.answer-copy { padding: 15px 18px 15px 7px; font-size: 14px; line-height: 1.55; }
.answer-option:has(input:focus-visible) { outline: 2px solid #fff; outline-offset: 2px; }
.answer-option:has(input:checked) { border-color: var(--exam-yellow); background: rgba(247,198,23,.065); color: #f2f3f0; }
.answer-option:has(input:checked) .answer-marker { background: var(--exam-yellow); color: #08090a; box-shadow: 0 0 18px rgba(247,198,23,.24); }

.exam-submit-panel { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 32px; padding: 26px 28px; border: 1px solid rgba(247,198,23,.27); background: #111318; }
.exam-submit-panel small { display: block; margin-bottom: 8px; color: var(--exam-yellow); font: 850 9px/1 ui-monospace, monospace; letter-spacing: .16em; }
.exam-submit-panel strong { color: #9da1a8; font-size: 13px; }
.exam-submit, .restart-exam { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; gap: 28px; padding: 0 22px; border: 1px solid var(--exam-yellow); background: var(--exam-yellow); color: #090a0c; font-size: 11px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; cursor: pointer; transition: filter .2s, transform .2s, opacity .2s; }
.exam-submit:not(:disabled):hover, .restart-exam:hover { filter: brightness(1.08); transform: translateY(-2px); }
.exam-submit:disabled { border-color: #35383e; background: #24272c; color: #686c73; cursor: not-allowed; opacity: .75; }

.exam-results { scroll-margin-top: 115px; outline: none; }
.result-summary { display: grid; grid-template-columns: 150px 1fr auto; align-items: center; gap: 36px; padding: 34px; border: 1px solid rgba(247,198,23,.34); background: var(--exam-panel); }
.score-display { --score: 0%; display: grid; width: 132px; aspect-ratio: 1; place-items: center; border-radius: 50%; background: conic-gradient(var(--exam-yellow) var(--score), rgba(255,255,255,.08) 0); }
.score-display::before { position: absolute; content: ""; }
.score-display > span { display: flex; width: 108px; aspect-ratio: 1; align-items: baseline; justify-content: center; place-content: center; border-radius: 50%; background: #0d0f12; }
.score-display b { color: #f4f5f2; font: 900 50px/1 ui-monospace, monospace; }
.score-display small { color: var(--exam-yellow); font: 800 13px/1 ui-monospace, monospace; }
.result-summary h2 { margin: 13px 0 10px; color: #f1f2ef; font-size: clamp(31px, 4vw, 50px); line-height: 1; letter-spacing: -.045em; text-transform: uppercase; }
.result-summary > div:nth-child(2) > p:last-child { margin: 0; color: #9da1a8; line-height: 1.65; }
.restart-exam { background: transparent; color: var(--exam-yellow); }
.result-legend { display: flex; justify-content: flex-end; gap: 22px; padding: 23px 3px; color: #777b82; font: 800 9px/1 ui-monospace, monospace; letter-spacing: .14em; text-transform: uppercase; }
.result-legend span { display: flex; align-items: center; gap: 8px; }
.result-legend i { width: 8px; height: 8px; border-radius: 50%; }
.legend-correct { background: #63d39a; box-shadow: 0 0 10px rgba(99,211,154,.4); }
.legend-wrong { background: #ef6b64; box-shadow: 0 0 10px rgba(239,107,100,.35); }
.result-list { display: grid; gap: 16px; }
.result-card { padding: 26px 28px; border: 1px solid var(--exam-line); border-left: 3px solid; background: var(--exam-panel); }
.result-card.is-correct { border-left-color: #63d39a; }
.result-card.is-wrong { border-left-color: #ef6b64; }
.result-card-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #6f737a; font: 800 9px/1 ui-monospace, monospace; letter-spacing: .13em; }
.result-card-head strong { font: inherit; }
.is-correct .result-card-head strong { color: #63d39a; }
.is-wrong .result-card-head strong { color: #ef6b64; }
.result-card h3 { margin: 18px 0 21px; color: #eceeeb; font-size: 17px; line-height: 1.5; }
.result-answers { display: grid; gap: 8px; }
.result-answers p { display: grid; grid-template-columns: 150px 1fr; gap: 18px; margin: 0; padding: 13px 15px; border: 1px solid rgba(255,255,255,.07); background: #0e1013; }
.result-answers small { color: #6f737a; font: 800 9px/1.5 ui-monospace, monospace; letter-spacing: .12em; }
.result-answers span { color: #b8bbc1; font-size: 13px; line-height: 1.55; }
.correct-answer { border-color: rgba(99,211,154,.3) !important; background: rgba(99,211,154,.045) !important; }
.correct-answer small, .correct-answer span { color: #a9e8c9; }

@keyframes exam-orbit { to { transform: rotate(360deg); } }
@keyframes exam-pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes exam-spin { to { transform: rotate(360deg); } }
@keyframes corridor-flight { 0%,100% { left: 54px; opacity: .4; } 50% { left: calc(100% - 75px); opacity: 1; } }
@keyframes exam-paper-float { 0%,100% { transform: translateX(-50%) rotate(-1.8deg) translateY(2px); } 50% { transform: translateX(-50%) rotate(.6deg) translateY(-3px); } }
@keyframes answer-mark { 0%,22%,100% { opacity: 0; transform: scale(.35); } 38%,78% { opacity: 1; transform: scale(1); } }
@keyframes quiz-scan { 0%,100% { top: 27px; opacity: 0; } 15%,85% { opacity: .7; } 50% { top: 145px; opacity: 1; } }
@keyframes stamp-check { 0%,58% { opacity: 0; transform: rotate(-13deg) scale(1.45); } 68%,92% { opacity: 1; transform: rotate(-13deg) scale(1); } 100% { opacity: 0; } }
@keyframes pencil-write { 0%,100% { transform: rotate(-51deg) translate(0, 0); } 35% { transform: rotate(-48deg) translate(-11px, -3px); } 68% { transform: rotate(-54deg) translate(7px, 4px); } }

@media (max-width: 900px) {
  .exam-hero-grid { grid-template-columns: 1fr; gap: 45px; padding-block: 70px; }
  .exam-console { width: min(100%, 480px); }
  .exam-toolbar { align-items: start; flex-direction: column; }
  .exam-progress { width: 100%; }
  .exam-progress > span { text-align: left; }
  .result-summary { grid-template-columns: 130px 1fr; }
  .restart-exam { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 620px) {
  .exam-hero { min-height: auto; padding-top: 72px; }
  .exam-hero-grid { min-height: auto; padding-block: 65px 58px; }
  .exam-hero-copy h1 { font-size: clamp(42px, 13vw, 60px); }
  .exam-metrics { display: grid; grid-template-columns: repeat(3, 1fr); }
  .exam-metrics span { min-width: 0; padding-right: 10px; font-size: 8px; }
  .exam-metrics b { display: block; margin: 0 0 5px; }
  .exam-console { min-height: 270px; padding: 22px; }
  .exam-workspace { padding-block: 58px 80px; }
  .exam-toolbar { margin-bottom: 30px; }
  .question-card { padding-bottom: 20px; }
  .question-meta { padding: 15px 17px; }
  .question-card legend { padding: 23px 18px 19px; font-size: 17px; }
  .answer-options { padding-inline: 14px; }
  .answer-option { grid-template-columns: 42px 1fr; }
  .answer-copy { padding-right: 12px; font-size: 13px; }
  .exam-submit-panel { align-items: stretch; flex-direction: column; padding: 22px; }
  .exam-submit { width: 100%; }
  .result-summary { grid-template-columns: 1fr; padding: 25px 21px; }
  .score-display { width: 116px; }
  .score-display > span { width: 94px; }
  .result-card { padding: 22px 18px; }
  .result-card-head { align-items: start; flex-direction: column; gap: 8px; }
  .result-answers p { grid-template-columns: 1fr; gap: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .exam-orbit::before, .exam-orbit::after, .exam-loading i, .trade-corridor b, .exam-paper, .paper-options i.is-marked::after, .paper-scan, .customs-stamp, .exam-pencil, .console-status i { animation: none; }
  .exam-progress i, .answer-option, .exam-submit, .restart-exam { transition: none; }
}
