/* Exam workspace: fixed identity/timer header, fixed skill dock and reading rail. */
:root {
  --v24-header-height: 76px;
  --v24-dock-height: 88px;
  --v24-exam-width: 1360px;
}

.student-shell.v24-exam-active {
  min-height: 100dvh;
  background: #f3f6fb;
}
.v24-exam-active .student-main {
  width: 100%;
  max-width: var(--v24-exam-width);
  margin: 0 auto;
  padding: calc(var(--v24-header-height) + 16px) 22px calc(var(--v24-dock-height) + 28px);
  overflow: visible;
}
.v24-exam-active .student-page-title,
.v24-exam-active .goal-in-exam { display: none; }
.v24-exam-active #view,
.v24-exam-active #examcontent { min-width: 0; overflow: visible; }
.v24-exam-active #examcontent,
.v24-exam-active #v13ReadingPassage,
.v24-exam-active #v13ReadingQuestions,
.v24-exam-active .listening-part,
.v24-exam-active .writing-task,
.v24-exam-active .speaking-part {
  scroll-margin-top: calc(var(--v24-header-height) + 16px);
}
.v24-exam-active .v15-exam-toolbar { display: none; }
.v24-exam-active .v12-skill-save { display: none; }

.v24-exam-header {
  position: fixed !important;
  inset: 0 0 auto;
  z-index: 1200;
  min-height: 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 20px;
  padding: 12px max(22px, calc((100vw - var(--v24-exam-width)) / 2 + 22px));
  background: #173450;
  color: white;
  box-shadow: 0 3px 16px #102a4520;
}
.v24-exam-header .student-identity,
.v24-exam-header .v24-candidate { min-width: 0; }
.v24-candidate { display: flex; flex-direction: column; gap: 3px; }
.v24-candidate strong { font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.v24-candidate small { color: #c4d3e6; font-size: 12px; }
.v24-exam-header .v15-exam-clock {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1px;
  background: #ffffff10;
  color: #fff;
  border: 1px solid #ffffff35;
  border-radius: 10px;
  min-width: 116px;
  padding: 5px 17px;
}
.v24-exam-header .v15-clock-caption { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #dbe8f9; }
.v24-exam-header .v15-exam-clock strong { font-size: 26px; line-height: 1.15; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 1.5px; }
.v24-exam-header .v15-exam-clock.is-urgent { background: #ac2941; border-color: #f9a7b3; color: #fff; }
.v24-exam-header .v24-submit-exam { justify-self: end; background: #c33c43; color: #fff; border: 1px solid #ffffff30; min-height: 42px; padding: 10px 18px; border-radius: 7px; white-space: nowrap; }

.v24-exam-dock {
  position: fixed;
  inset: auto 0 0;
  z-index: 1190;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 16px;
  padding: 12px max(22px, calc((100vw - var(--v24-exam-width)) / 2 + 22px)) max(12px, env(safe-area-inset-bottom));
  background: #e1e6ed;
  border-top: 1px solid #c5cfdc;
  box-shadow: 0 -4px 22px #14315217;
}
.v24-skill-groups { display: flex; flex: 1 1 auto; align-items: stretch; gap: 8px; min-width: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.v24-skill-group { flex: 1 0 auto; display: flex; flex-direction: column; min-width: 125px; overflow: hidden; background: #f7f9fc; border: 1px solid #bdcbdc; border-radius: 5px; }
.v24-part-buttons { display: flex; flex: 1; align-items: stretch; gap: 0; }
.v24-part-button { flex: 1 0 auto; min-height: 32px; min-width: 51px; padding: 6px 10px; border-radius: 0; border-right: 1px solid #d8e0ec; background: #f7f9fc; color: #304965; font-size: 12px; font-weight: 700; white-space: nowrap; }
.v24-part-button:last-child { border-right: 0; }
.v24-part-button.selected,
.v24-part-button.active,
.v24-part-button[aria-current="step"] { background: #245caa; color: #fff; opacity: 1; }
.v24-part-button.is-complete { background: #e1eee8; color: #1a6a49; }
.v24-part-button.selected.is-complete,
.v24-part-button.active.is-complete { background: #245caa; color: #fff; }
.v24-part-button:disabled { opacity: .55; cursor: not-allowed; }
.v24-part-button.selected:disabled,
.v24-part-button.active:disabled { opacity: 1; }
.v24-skill-label { padding: 4px 8px; text-align: center; font-size: 11px; font-weight: 600; color: #50647d; background: #eaf0f6; white-space: nowrap; line-height: 1.3; }
.v24-skill-group.is-active { border-color: #628ec4; }
.v24-skill-group.is-active .v24-skill-label { background: #214c7b; color: #fff; }
.v24-exam-actions { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }
.v24-exam-actions button { white-space: nowrap; min-height: 43px; border-radius: 6px; padding: 10px 16px; font-size: 13px; }
.v24-exam-actions .v24-next { background: #246599; color: #fff; }
.v24-exam-actions .v24-save { background: #fff; color: #24547d; border: 1px solid #99b3cc; }
.v24-exam-active button:focus-visible,
.v24-exam-active a:focus-visible { outline: 3px solid #7baaf0; outline-offset: 3px; }

.v24-exam-active .examgrid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 20px; overflow: visible; }
.v24-exam-active .examgrid .card { margin-bottom: 0; border-radius: 12px; padding: 24px; }
.v24-exam-active .examgrid .passage { position: static !important; max-height: none !important; height: auto !important; overflow: visible !important; white-space: normal !important; }
.v24-exam-active .examgrid .passage h3 { font-size: 18px; line-height: 1.5; margin: 0 0 23px; }
.v24-exam-active .reading-paragraphs p { font-size: 16px; line-height: 1.9; margin: 0 0 20px; }
.v24-exam-active .examgrid .questions {
  position: sticky !important;
  top: calc(var(--v24-header-height) + 16px) !important;
  height: calc(100vh - var(--v24-header-height) - var(--v24-dock-height) - 32px);
  height: calc(100dvh - var(--v24-header-height) - var(--v24-dock-height) - 32px);
  max-height: calc(100dvh - var(--v24-header-height) - var(--v24-dock-height) - 32px) !important;
  overflow-y: auto !important;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #9aafc8 #f3f6fa;
  -webkit-overflow-scrolling: touch;
}
.v24-exam-active .questions .question { padding: 18px 4px; }
.v24-exam-active .questions .question:first-of-type { padding-top: 0; }
.v24-exam-active .questions .option { padding: 9px 5px; }
.v24-exam-active .section-heading h2 { font-size: 20px; }
.v24-exam-active .v22-proctor { bottom: calc(var(--v24-dock-height) + 12px); z-index: 1180; }
body:has(.v24-exam-active) #vstep-toasts { top: calc(var(--v24-header-height) + 12px); }

@media (max-width: 1100px) {
  .v24-exam-header { padding-right: 16px; padding-left: 16px; }
  .v24-exam-dock { gap: 10px; padding-right: 16px; padding-left: 16px; }
  .v24-skill-groups { gap: 5px; }
  .v24-skill-group { min-width: 112px; }
  .v24-part-button { min-width: 48px; padding: 6px 8px; font-size: 11px; }
  .v24-exam-actions { gap: 6px; }
  .v24-exam-actions button { padding: 10px 12px; }
  .v24-exam-active .student-main { padding-right: 16px; padding-left: 16px; }
  .v24-exam-active .examgrid { gap: 14px; }
  .v24-exam-active .examgrid .card { padding: 18px; }
  .v24-exam-active .v13-jump-link { display: none; }
}

@media (max-width: 760px) {
  .v24-exam-header { min-height: 70px; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; padding: 9px 12px; }
  .v24-candidate strong { font-size: 13px; }
  .v24-candidate small { font-size: 10px; }
  .v24-exam-header .v15-exam-clock { min-width: 86px; padding: 5px 8px; }
  .v24-exam-header .v15-exam-clock strong { font-size: 21px; letter-spacing: .5px; }
  .v24-exam-header .v15-clock-caption { font-size: 9px; }
  .v24-exam-header .v24-submit-exam { font-size: 11px; padding: 9px 10px; min-height: 40px; }
  .v24-exam-active .student-main { padding-right: 12px; padding-left: 12px; }
  .v24-exam-active .examgrid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .v24-exam-active .examgrid .questions { position: static !important; top: auto !important; height: auto !important; max-height: none !important; overflow: visible !important; }
  .v24-exam-active .reading-paragraphs p { font-size: 15px; line-height: 1.85; }
  .v24-exam-active .v13-jump-link { display: inline-flex; }
  .v24-exam-dock { display: grid; grid-template-columns: minmax(0, 1fr); gap: 7px; padding: 8px 10px max(8px, env(safe-area-inset-bottom)); }
  .v24-skill-groups { width: 100%; gap: 5px; padding-bottom: 2px; }
  .v24-skill-group { min-width: 120px; }
  .v24-part-button { min-height: 38px; font-size: 11px; min-width: 50px; padding: 6px 8px; }
  .v24-skill-label { font-size: 10px; padding: 3px 5px; }
  .v24-exam-actions { width: 100%; justify-content: flex-end; }
  .v24-exam-actions button { flex: 1; min-height: 40px; padding: 8px 15px; }
  .v24-exam-active .v22-proctor { bottom: calc(var(--v24-dock-height) + 8px); }
  body:has(.v24-exam-active) #vstep-toasts { top: calc(var(--v24-header-height) + 8px); }
}

@media (max-width: 380px) {
  .v24-exam-header { gap: 7px; padding-right: 9px; padding-left: 9px; }
  .v24-candidate strong { font-size: 12px; }
  .v24-exam-header .v15-exam-clock { min-width: 74px; padding: 5px 6px; }
  .v24-exam-header .v15-exam-clock strong { font-size: 19px; }
  .v24-exam-header .v24-submit-exam { font-size: 10px; padding: 8px; }
}

@media print {
  .v24-exam-header, .v24-exam-dock { display: none; }
  .v24-exam-active .student-main { padding: 0; }
  .v24-exam-active .examgrid .questions { position: static !important; height: auto !important; max-height: none !important; overflow: visible !important; }
}
