@font-face {
  font-family: "Mona Sans";
  src: url("/fonts/mona-sans-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: hsl(210 20% 98%);
  --foreground: hsl(222 47% 11%);
  --card: hsl(0 0% 100%);
  --card-foreground: hsl(222 47% 11%);
  --secondary: hsl(210 20% 96%);
  --secondary-foreground: hsl(222 47% 11%);
  --border: hsl(214 32% 91%);
  --input: hsl(214 32% 91%);
  --muted: hsl(210 20% 94%);
  --muted-foreground: hsl(215 16% 47%);
  --primary: hsl(217 91% 25%);
  --primary-foreground: hsl(210 40% 98%);
  --accent: hsl(173 58% 39%);
  --accent-foreground: hsl(0 0% 100%);
  --destructive: hsl(0 84% 60%);
  --destructive-foreground: hsl(0 0% 100%);
  --warning: hsl(38 92% 50%);
  --warning-foreground: hsl(0 0% 100%);
  --sidebar: #3a3f6b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  border-color: var(--border);
  border-style: solid;
  border-width: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  color: var(--foreground);
  background: var(--background);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input {
  font-family: "Mona Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exam-app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #e1eeef;
}

.exam-header {
  z-index: 30;
  flex: 0 0 auto;
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.exam-header-inner {
  width: 100%;
  max-width: 1030px;
  min-height: 60px;
  margin: 0 auto;
  padding: 12px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.exam-identity,
.exam-status,
.desktop-progress {
  display: flex;
  align-items: center;
}

.exam-identity {
  min-width: 0;
  gap: 12px;
}

.paper-name {
  color: var(--foreground);
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.identity-rule {
  margin: 0 4px;
  color: var(--muted-foreground);
  font-weight: 400;
}

.identity-divider,
.status-divider {
  width: 1px;
  height: 16px;
  flex: 0 0 auto;
  background: var(--border);
}

.trainee-email {
  min-width: 0;
  overflow: hidden;
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-status {
  flex: 0 0 auto;
  gap: 12px;
}

.desktop-progress {
  width: 144px;
  gap: 8px;
}

.progress-track {
  height: 6px;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 999px;
  background: var(--secondary);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 160ms ease;
}

.progress-value {
  color: var(--muted-foreground);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
}

.mobile-progress {
  display: none;
}

.mobile-questions-button {
  display: none;
}

.icon-button {
  width: 40px;
  height: 40px;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 6px;
  color: var(--foreground);
  background: transparent;
  cursor: pointer;
}

.icon-button:hover {
  background: var(--muted);
}

.icon-button svg {
  width: 16px;
  height: 16px;
}

.exam-workspace {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
}

.exam-frame {
  width: 100%;
  max-width: 1030px;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #f5f7f8;
}

.frame-cap {
  height: 32px;
  flex: 0 0 auto;
  border-bottom: 2px solid #e1e7ef;
  background: #f5f7f8;
}

.exam-middle {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

.question-sidebar {
  width: 224px;
  min-width: 224px;
  min-height: 0;
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 0;
}

.question-navigator {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 12px;
  background: var(--sidebar);
}

.question-list-spacer {
  height: 12px;
  flex: 0 0 auto;
}

.question-list-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 2px 0 24px;
  scrollbar-width: none;
}

.question-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.question-list-scroll::-webkit-scrollbar,
.results-question-list::-webkit-scrollbar {
  display: none;
}

.question-tile {
  position: relative;
  width: 100%;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: rgba(255, 255, 255, 0.2);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 150ms ease, background 150ms ease;
}

.question-tile:hover {
  background: rgba(255, 255, 255, 0.3);
}

.question-tile.current {
  z-index: 1;
  background: rgba(255, 255, 255, 0.4);
  box-shadow: inset 0 0 0 2px #fff;
  font-weight: 700;
}

.question-tile.attempted {
  color: var(--sidebar);
  background: #fff;
  font-weight: 700;
}

.question-tile.attempted.current {
  box-shadow: inset 0 0 0 2px #1a1f3e;
}

.question-tile.filter-unattempted {
  color: #fff;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 0 0 1px #fff;
  font-weight: 700;
}

.question-tile.filter-flagged {
  color: var(--warning-foreground);
  background: var(--warning);
  font-weight: 700;
}

.question-tile.filter-unattempted.current {
  box-shadow: inset 0 0 0 2px #fff;
}

.question-tile.filter-flagged.current {
  box-shadow: inset 0 0 0 2px #1a1f3e;
}

.question-tile .tile-flag {
  position: absolute;
  right: 8px;
  width: 12px;
  height: 12px;
  fill: currentColor;
  opacity: 0.8;
}

.question-tile.filtered:not(.current) {
  opacity: 0.3;
}

.question-tile:disabled {
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.1);
  cursor: default;
  opacity: 0.4;
}

.question-area {
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.question-scroll {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.question-padding {
  padding: 32px 40px;
}

.question-card {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto 32px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: rgba(237, 240, 243, 0.3);
  user-select: text;
}

.question-scenario,
.question-prompt {
  color: rgba(15, 23, 41, 0.8);
  font-size: 15px;
  line-height: 1.625;
  overflow-wrap: anywhere;
}

.question-scenario {
  margin-bottom: 20px;
}

.question-scenario p,
.question-prompt p {
  margin: 0 0 16px;
}

.question-scenario p:last-child,
.question-prompt p:last-child {
  margin-bottom: 0;
}

.question-prompt {
  color: var(--foreground);
  font-weight: 600;
}

.question-scenario .exam-bullet-list,
.question-prompt .exam-bullet-list {
  margin: 16px 0 16px 24px;
  padding: 0;
  list-style: disc;
}

.question-scenario .exam-bullet-list li,
.question-prompt .exam-bullet-list li {
  margin-top: 6px;
  padding-left: 4px;
  line-height: 1.625;
}

.question-scenario .exam-formula-lead,
.question-prompt .exam-formula-lead {
  margin-bottom: 10px;
}

.question-scenario .exam-table-scroll,
.question-prompt .exam-table-scroll {
  max-width: 100%;
  margin: 20px 0;
  overflow-x: auto;
}

.question-scenario table.exam-table,
.question-prompt table.exam-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  color: #000;
  background: #fff;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
}

.question-scenario table.exam-table th,
.question-scenario table.exam-table td,
.question-prompt table.exam-table th,
.question-prompt table.exam-table td {
  padding: 8px 9.6px;
  border: 1px solid #111;
  text-align: left;
  vertical-align: top;
  white-space: normal;
  overflow-wrap: anywhere;
}

.question-resources {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.question-resource-button {
  min-height: 38px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(4, 45, 172, 0.25);
  color: #042dac;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-decoration: none;
  transition: background-color 150ms ease;
}

.question-resource-button:hover {
  background: rgba(4, 45, 172, 0.05);
}

.question-resource-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #042dac;
}

.question-resource-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.question-resource-button .resource-type {
  padding-left: 8px;
  border-left: 1px solid rgba(4, 45, 172, 0.2);
  color: rgba(4, 45, 172, 0.7);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.answer-row {
  width: 100%;
  max-width: 860px;
  margin: 48px auto 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.answer-input {
  width: 200px;
  height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--input);
  border-radius: 6px;
  outline: 0;
  color: var(--foreground);
  background: var(--background);
  font-size: 14px;
  line-height: 20px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.answer-input:focus {
  border-color: var(--input);
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary);
}

.answer-unit {
  color: #111827;
  font-size: 16px;
  font-weight: 500;
}

/* Inline mark: correct / incorrect + the right answer. The worked method is
   withheld — it lives in the members space. */
.answer-feedback {
  width: 100%;
  max-width: 860px;
  margin: 20px auto 0;
  padding: 18px 20px;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #9ca3af;
  border-radius: 8px;
  background: #f9fafb;
}

.answer-feedback.correct {
  border-color: #a7f3d0;
  border-left-color: #10b981;
  background: #ecfdf5;
}

.answer-feedback.incorrect {
  border-color: #fecaca;
  border-left-color: #ef4444;
  background: #fef2f2;
}

.feedback-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feedback-badge {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: #9ca3af;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.answer-feedback.correct .feedback-badge {
  background: #10b981;
}

.answer-feedback.incorrect .feedback-badge {
  background: #ef4444;
}

.feedback-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

.answer-feedback.correct .feedback-title {
  color: #047857;
}

.answer-feedback.incorrect .feedback-title {
  color: #b91c1c;
}

.feedback-answer {
  margin-top: 12px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.feedback-answer-label {
  color: #6b7280;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.feedback-answer strong {
  color: #0f172a;
  font-size: 17px;
  font-weight: 700;
}

.feedback-locked {
  margin: 14px 0 0;
  padding-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: #475069;
  font-size: 13px;
  font-weight: 600;
}

.feedback-locked svg {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  stroke-width: 1.8;
  color: #042dac;
}

/* Final question: Next becomes Finish (no chevron — nothing to page to). */
.exam-button.finish-next {
  border-color: #042dac;
  color: #fff;
  background: #042dac;
}

.exam-button.finish-next svg {
  display: none;
}

.exam-button.finish-next:hover:not(:disabled) {
  color: #fff;
  background: #03248c;
}

/* Review screen: replaces the dead Next button on the last question. */
.member-cta {
  height: 36px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #fff;
  background: #042dac;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  transition: background 150ms ease;
}

.member-cta:hover {
  background: #03248c;
}

.member-cta:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #042dac;
}

.exam-footer {
  min-height: 70px;
  flex: 0 0 auto;
  display: flex;
  border-top: 2px solid #e1e7ef;
  background: #f5f7f8;
}

.footer-sidebar-spacer {
  width: 224px;
  flex: 0 0 auto;
}

.exam-actions {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 40px;
}

.tool-actions,
.navigation-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.exam-button {
  height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--input);
  border-radius: 6px;
  color: var(--foreground);
  background: var(--background);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}

.exam-button:hover:not(:disabled) {
  color: var(--accent-foreground);
  background: var(--accent);
}

.exam-button:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary);
}

.exam-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.exam-button svg {
  width: 16px;
  height: 16px;
}

.review-button {
  width: 176px;
  gap: 8px;
}

.flag-button {
  padding: 0 12px;
}

.flag-button.active {
  border: 0 solid var(--warning);
  color: #fff;
  background: var(--warning);
}

.flag-button.active svg {
  fill: currentColor;
}

.flag-button.active:hover:not(:disabled) {
  color: var(--warning-foreground);
  background: hsl(38 92% 50% / 0.9);
}

.review-control {
  position: relative;
}

.review-popover {
  position: absolute;
  z-index: 40;
  bottom: calc(100% + 12px);
  left: 0;
  width: 176px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transform-origin: bottom center;
  animation: popover-in 150ms ease-out both;
}

.review-popover label {
  height: 32px;
  padding: 6px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  cursor: pointer;
}

.review-popover label:hover {
  background: rgba(237, 240, 243, 0.5);
}

.review-popover input {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  margin: 0;
  appearance: none;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: var(--background);
  cursor: pointer;
}

.review-popover input:checked {
  color: var(--primary-foreground);
  background-color: var(--primary);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23f8fafc' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 16px 16px;
}

.review-popover span {
  flex: 1 1 auto;
}

.review-popover strong {
  color: var(--muted-foreground);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  margin-left: 8px;
}

@keyframes popover-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.mobile-drawer {
  position: fixed;
  z-index: 80;
  inset: 0;
}

.drawer-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.8);
  animation: drawer-backdrop-in 150ms ease-out both;
}

.drawer-panel {
  position: absolute;
  inset: 0 auto 0 0;
  width: 288px;
  max-width: 86vw;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-right: 1px solid var(--border);
  color: #fff;
  background: var(--sidebar);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  animation: drawer-in 500ms cubic-bezier(0.25, 0.25, 0.25, 1) both;
}

.drawer-header {
  position: relative;
  height: 32px;
  flex: 0 0 auto;
  padding: 16px;
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  color: #fff;
  opacity: 0.7;
}

.drawer-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.drawer-close svg {
  width: 16px;
  height: 16px;
}

.drawer-question-sidebar {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  border: 0;
}

.drawer-question-navigator {
  padding: 0 12px;
}

@keyframes drawer-in {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

.mobile-drawer.closing .drawer-backdrop {
  animation: drawer-backdrop-out 300ms ease-in both;
}

.mobile-drawer.closing .drawer-panel {
  animation: drawer-out 300ms ease-in both;
}

@keyframes drawer-out {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@keyframes drawer-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes drawer-backdrop-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.calculator {
  position: fixed;
  z-index: 90;
  top: 140px;
  left: max(12px, calc(50% - 192px));
  width: 384px;
  max-width: calc(100vw - 24px);
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.calculator-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  color: #fff;
  background: #334155;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: move;
  user-select: none;
}

.calculator-close {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 solid var(--border);
  border-radius: 6px;
  color: #fff;
  background: transparent;
  cursor: pointer;
}

.calculator-close:hover {
  background: rgba(255, 255, 255, 0.18);
}

.calculator-close svg {
  width: 16px;
  height: 16px;
}

.calculator-screen {
  padding: 16px;
  background: #fff;
}

.calculator-display {
  width: 100%;
  height: 56px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--foreground);
  background: #fff;
}

.calculator-display-value {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 30px;
  font-weight: 300;
  line-height: 36px;
  white-space: nowrap;
}

.calculator-copy {
  width: 100%;
  height: 40px;
  margin-top: 12px;
  border: 1px solid #e6d07d;
  border-radius: 4px;
  color: #1e293b;
  background: #fce595;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.calculator-copy:hover {
  background: #fbdc70;
}

.calculator-keys {
  padding: 0 16px 16px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
}

.calculator-keys button {
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: var(--muted-foreground);
  background: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.calculator-keys button:hover {
  background: hsl(210 20% 94% / 0.8);
}

.calculator-keys .number {
  color: var(--secondary-foreground);
  background: var(--secondary);
}

.calculator-keys .number:hover {
  background: hsl(210 20% 96% / 0.8);
}

.calculator-keys .danger {
  color: var(--destructive-foreground);
  background: var(--destructive);
}

.calculator-keys .danger:hover {
  background: hsl(0 84% 54%);
}

.calculator-keys .accent {
  color: var(--accent-foreground);
  background: var(--accent);
}

.calculator-keys .accent:hover {
  background: hsl(173 58% 35%);
}

.calculator-keys .primary {
  color: var(--primary-foreground);
  background: var(--primary);
}

.calculator-keys .primary:hover {
  background: hsl(217 91% 23%);
}

.calculator-keys .col-2 {
  grid-column: span 2;
}

.dialog-overlay {
  position: fixed;
  z-index: 110;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
  animation: dialog-backdrop-in 200ms ease-out both;
}

.submit-dialog {
  width: 100%;
  max-width: 384px;
  padding: 20px;
  display: grid;
  gap: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  text-align: center;
  animation: dialog-in 200ms ease-out both;
}

@keyframes dialog-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.submit-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.submit-dialog h2 {
  margin: 0;
  color: var(--foreground);
  font-size: 18px;
  font-weight: 600;
  line-height: 28px;
}

.submit-description {
  color: var(--muted-foreground);
  font-size: 14px;
  line-height: 20px;
}

.submit-description p {
  margin: 0;
}

.submit-description strong {
  color: var(--foreground);
}

.submit-actions {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dialog-button {
  width: 100%;
  height: 40px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
}

.dialog-button.secondary {
  border: 1px solid var(--input);
  color: var(--foreground);
  background: var(--background);
}

.dialog-button.secondary:hover {
  color: var(--accent-foreground);
  background: var(--accent);
}

.dialog-button.primary {
  border: 0 solid var(--border);
  color: var(--primary-foreground);
  background: var(--primary);
}

.dialog-button.primary:hover {
  background: hsl(217 91% 23%);
}

.results-app {
  width: 100%;
  height: 100dvh;
  display: flex;
  overflow: hidden;
  color: var(--foreground);
  background: #fff;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.results-sidebar {
  width: 224px;
  min-width: 224px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid #e5e7eb;
  background: #f3f4f6;
  padding: 0 12px;
}

.results-sidebar-summary {
  padding: 12px 4px 6px;
}

.results-sidebar-summary > span {
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.results-sidebar-summary > div {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: #9ca3af;
  font-size: 10px;
}

.results-sidebar-summary i {
  width: 8px;
  height: 8px;
  margin-left: 7px;
  border-radius: 50%;
}

.results-sidebar-summary i:first-child {
  margin-left: 0;
}

.results-sidebar-summary i.correct {
  background: #10b981;
}

.results-sidebar-summary i.incorrect {
  background: #f87171;
}

.results-sidebar-summary i.skipped {
  background: #d1d5db;
}

.results-question-list {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 0 0 24px;
  scrollbar-width: none;
}

.results-tile {
  width: 100%;
  height: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.results-tile.correct {
  background: #10b981;
}

.results-tile.incorrect {
  background: #f87171;
}

.results-tile.skipped {
  color: #6b7280;
  background: #e5e7eb;
}

.results-tile.current {
  box-shadow: inset 0 0 0 2px #000;
  font-weight: 800;
}

.results-tile:disabled {
  color: #d1d5db;
  background: rgba(229, 231, 235, 0.6);
  cursor: default;
}

.results-main {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  background: #fff;
}

.results-header {
  min-height: 53px;
  flex: 0 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.results-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.results-heading strong {
  font-size: 14px;
}

.results-heading span {
  color: #e5e7eb;
  font-size: 18px;
  font-weight: 300;
}

.results-heading small {
  color: #9ca3af;
  font-size: 12px;
  font-weight: 500;
}

.results-content {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
}

.results-question {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  padding: 32px 40px;
}

.results-question-number {
  margin-bottom: 10px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.results-question-number span {
  color: #d1d5db;
}

.result-status {
  width: fit-content;
  margin-bottom: 20px;
  padding: 4px 10px;
  color: #9ca3af;
  background: #f3f4f6;
  font-size: 12px;
  font-weight: 600;
}

.result-status.correct {
  color: #059669;
  background: #ecfdf5;
}

.result-status.incorrect {
  color: #ef4444;
  background: #fef2f2;
}

.result-scenario,
.result-prompt {
  color: #4b5563;
  font-size: 15px;
  line-height: 1.625;
}

.result-prompt {
  margin: 20px 0 24px;
  color: #111827;
  font-weight: 600;
}

.result-scenario p,
.result-prompt p {
  margin: 0 0 16px;
}

.result-answer-label {
  margin-bottom: 8px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.result-answer,
.correct-answer {
  min-height: 54px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  color: #9ca3af;
  background: #f9fafb;
  font-size: 16px;
  font-weight: 600;
}

.result-answer.correct,
.correct-answer {
  border-color: #6ee7b7;
  color: #059669;
  background: #ecfdf5;
}

.result-answer.incorrect {
  border-color: #fca5a5;
  color: #ef4444;
  background: #fef2f2;
}

.correct-answer {
  margin-top: 12px;
}

.correct-answer::before {
  content: "Correct";
  margin-right: 8px;
  color: #059669;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Members-space lock-out — replaces the full worked rationale in the taster. */
.locked-card {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: 10px;
  background: #f6f8fe;
}

.locked-copy {
  min-width: 0;
}

.locked-copy strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.locked-copy span {
  display: block;
  margin-top: 4px;
  color: #5b6478;
  font-size: 13px;
  line-height: 1.5;
}


.results-footer {
  min-height: 62px;
  flex: 0 0 auto;
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 2px solid #e5e7eb;
  background: #f9fafb;
  color: #9ca3af;
  font-size: 12px;
}

.results-footer > div {
  display: flex;
  gap: 8px;
}

.results-brand {
  position: relative;
  width: 40%;
  flex: 0 0 40%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #042dac;
}

.results-brand .stars {
  position: absolute;
  inset: 0;
  opacity: 0.45;
  background-image:
    radial-gradient(circle at 16% 22%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 72% 18%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 44% 74%, #fff 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 62%, #fff 0 1px, transparent 1.5px);
  background-size: 110px 100px, 160px 130px, 130px 150px, 190px 120px;
}

.results-brand img {
  position: relative;
  z-index: 1;
  width: 180px;
  max-width: 48%;
  height: auto;
  filter: brightness(0) invert(1);
}

@media (max-width: 1279px) {
  .results-brand {
    display: none;
  }
}

@media (max-width: 1023px) {
  .mobile-questions-button {
    display: inline-flex;
  }

  .question-sidebar:not(.drawer-question-sidebar),
  .footer-sidebar-spacer {
    display: none;
  }

  .results-sidebar {
    display: none;
  }
}

@media (max-width: 767px) {
  .identity-divider,
  .trainee-email,
  .status-divider,
  .desktop-progress {
    display: none;
  }

  .mobile-progress {
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border);
    background: hsl(210 20% 94% / 0.4);
  }

  .mobile-progress .progress-track {
    height: 4px;
  }

  .mobile-progress .progress-value {
    font-size: 10px;
    line-height: 15px;
  }

  .answer-input {
    font-size: 16px;
    line-height: 24px;
  }

  .results-header {
    padding: 12px 16px;
  }

  .results-heading span:nth-of-type(n+3),
  .results-heading small:nth-of-type(n+2) {
    display: none;
  }

  .results-question {
    padding: 28px 24px;
  }

  .results-footer {
    padding: 12px 24px;
  }
}

@media (max-width: 639px) {
  .question-padding {
    padding: 32px 24px;
  }

  .question-card {
    padding: 24px;
  }

  .answer-input {
    font-size: 16px;
    line-height: 24px;
  }

  .exam-actions {
    padding: 16px 24px;
  }

  .tool-actions,
  .navigation-actions {
    gap: 6px;
  }

  .exam-button {
    padding-right: 8px;
    padding-left: 8px;
    gap: 4px;
  }

  .exam-button .button-label {
    display: none;
  }

  .review-button {
    width: 144px;
    gap: 8px;
  }

  .review-popover {
    width: 144px;
  }

  .calculator {
    width: 320px;
  }

  .calculator-header {
    padding: 8px 12px;
    font-size: 12px;
    line-height: 16px;
    cursor: default;
  }

  .calculator-close {
    width: 28px;
    height: 28px;
  }

  .calculator-screen {
    padding: 12px;
  }

  .calculator-display {
    height: 48px;
  }

  .calculator-display-value {
    font-size: 24px;
    line-height: 32px;
  }

  .calculator-copy {
    height: 36px;
    margin-top: 8px;
    font-size: 12px;
    line-height: 16px;
  }

  .calculator-keys {
    padding: 0 12px 12px;
  }

  .calculator-keys button {
    height: 36px;
    font-size: 12px;
    line-height: 16px;
  }

  .results-heading span:nth-of-type(n+2),
  .results-heading small {
    display: none;
  }

  .results-question {
    padding: 24px 18px;
  }

  .locked-card {
    padding: 20px;
  }

  .results-footer {
    padding: 10px 18px;
  }
}

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