:root {
  --ui-nav: #142238;
  --ui-nav-active: #243755;
  --ui-bg: #f4f6fa;
  --ui-surface: #fff;
  --ui-text: #17243b;
  --ui-muted: #64748b;
  --ui-border: #e2e8f0;
  --ui-primary: #2563eb;
  --ui-primary-hover: #1d4ed8;
  --ui-primary-tint: #eff6ff;
  --ui-success: #15803d;
  --ui-warning: #92400e;
  --ui-danger: #b91c1c;
  --ui-card-radius: 14px;
  --ui-control-radius: 8px;
  --ui-badge-radius: 6px;
  --ui-sidebar-width: 248px;
  --ui-shadow: 0 2px 8px rgba(20,34,56,.025);
}

html { font-size: 14px; min-height: 100%; }
body { margin: 0; background: var(--ui-bg); color: var(--ui-text); font: 400 14px/1.5 "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: var(--ui-primary); }
a:hover { color: var(--ui-primary-hover); }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.btn:focus-visible, .form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(37,99,235,.16); }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: var(--ui-control-radius); padding: 9px 16px; font-size: 13px; font-weight: 600; }
.btn-sm { min-height: 44px; padding: 7px 12px; }
.btn-primary { background: var(--ui-primary); border-color: var(--ui-primary); }
.btn-primary:hover, .btn-primary:focus { background: var(--ui-primary-hover); border-color: var(--ui-primary-hover); }
.btn-outline-primary { color: var(--ui-primary); border-color: #bfd3fc; }
.btn-outline-primary:hover { background: var(--ui-primary-tint); color: var(--ui-primary-hover); border-color: #a8c4fa; }
.btn-secondary { background: #475569; border-color: #475569; }
.btn-outline-secondary { color: #475569; border-color: #cbd5e1; }
.form-control, .form-select { min-height: 44px; border-color: #d8e0ec; border-radius: var(--ui-control-radius); color: var(--ui-text); font-size: 14px; }
.form-control:focus, .form-select:focus { border-color: #93b4ff; }
.form-label { color: #334155; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.form-text, .text-muted, small { color: var(--ui-muted); }
.alert { border-radius: var(--ui-control-radius); font-size: 13px; }

.app-shell { display: grid; grid-template-columns: var(--ui-sidebar-width) minmax(0,1fr); min-height: 100vh; transition: grid-template-columns .2s ease; }
.app-sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--ui-sidebar-width); display: flex; flex-direction: column; overflow-y: auto; padding: 28px 16px 16px; background: var(--ui-nav); color: #e3eaf5; transition: transform .2s ease, visibility 0s; }
.app-sidebar-header { position: relative; padding: 0 10px; }
.app-brand { display: flex; gap: 12px; align-items: center; text-decoration: none; color: #fff; }
.app-brand:hover { color: #fff; }
.app-brand strong { display: block; font-size: 20px; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.app-brand small { display: block; margin-top: 3px; color: #a9b8ce; font-size: 11px; letter-spacing: .3px; }
.app-brand-mark { width: 36px; height: 36px; flex: none; display: flex; align-items: end; justify-content: center; gap: 3px; padding: 8px 5px; background: #3b6ff5; border-radius: 10px; }
.app-brand-mark i { display: block; width: 6px; border-radius: 2px; background: #fff; }
.app-brand-mark i:nth-child(1) { height: 10px; opacity: .7; }
.app-brand-mark i:nth-child(2) { height: 15px; opacity: .85; }
.app-brand-mark i:nth-child(3) { height: 20px; }
.app-nav { display: flex; flex-direction: column; gap: 6px; margin-top: 34px; }
.app-nav-label { margin: 0 12px 6px; color: #91a3bf; font-size: 11px; font-weight: 600; letter-spacing: 1.3px; }
.app-nav-label-secondary { margin-top: 22px; }
.app-nav-link { position: relative; display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px; color: #c7d2e3; border-radius: 9px; text-decoration: none; font-size: 14px; font-weight: 500; }
.app-nav-link:hover { color: #fff; background: #1c2d47; }
.app-nav-link.active { color: #fff; background: var(--ui-nav-active); }
.app-nav-link.active::before { content: ""; position: absolute; left: -16px; top: 13px; bottom: 13px; width: 3px; border-radius: 0 3px 3px 0; background: #6f9cff; }
.app-nav-link svg, .app-menu-toggle svg { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-nav-link svg { color: #9bacca; }
.app-nav-link.active svg { color: #93b4ff; }
.app-sidebar-footer { margin-top: auto; padding-top: 28px; }
.app-account { display: flex; align-items: center; gap: 10px; padding: 16px 10px 12px; border-top: 1px solid #30405b; min-width: 0; }
.app-avatar { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: #e8eefa; color: #36528c; font-size: 12px; font-weight: 700; }
.app-account .app-avatar { background: #2b405f; color: #d5e2fa; }
.app-account-text { min-width: 0; }
.app-account-text strong { display: block; color: #fff; font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-account-text small { display: block; color: #a8b7cf; font-size: 11px; }
.app-account-action { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: #c7d2e3; text-align: left; font-size: 12px; text-decoration: none; }
.app-account-action:hover { background: #243755; color: #fff; }
.app-sidebar-footer form { margin: 0; }
.app-workspace { grid-column: 2; min-width: 0; }
.app-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; height: 64px; padding: 0 32px; background: var(--ui-surface); border-bottom: 1px solid var(--ui-border); }
.app-topbar-left, .app-topbar-right { display: flex; align-items: center; gap: 14px; min-width: 0; }
.app-topbar-right { color: var(--ui-muted); font-size: 12px; }
.app-topbar-right > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-breadcrumb { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--ui-muted); font-size: 13px; }
.app-breadcrumb strong { color: var(--ui-text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-menu-toggle, .app-sidebar-close { display: none; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border: 1px solid var(--ui-border); border-radius: var(--ui-control-radius); background: #fff; color: var(--ui-text); }
.app-menu-toggle { display:inline-flex; }
.app-menu-toggle:hover { background:var(--ui-primary-tint); border-color:#bfd3fc; color:var(--ui-primary); }
.app-content { width: 100%; max-width: 1440px; min-width: 0; margin: 0 auto; padding: 32px; }
.app-content > h1, .app-content > .d-flex > h1 { margin: 0; font-size: 26px; font-weight: 700; letter-spacing: -.6px; line-height: 1.3; }
.app-content h2 { font-size: 18px; }
.app-content > h1 { margin-bottom: 24px; }
.app-content > .d-flex.justify-content-between { gap: 16px; flex-wrap: wrap; margin-bottom: 24px !important; }
.app-content > p { color: var(--ui-muted); }
.app-content > form.row, .app-content > .table-responsive { max-width: 1100px; padding: 24px; background: var(--ui-surface); border: 1px solid var(--ui-border); border-radius: var(--ui-card-radius); box-shadow: var(--ui-shadow); }
.app-content > .table-responsive { max-width: none; padding: 0; overflow-x: auto; }
.app-content > form.row > .col-12:last-child { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; }
.app-content > .table-responsive .table { margin-bottom: 0; }
.app-content > .table-responsive .table th, .app-content > .table-responsive .table td { padding: 14px 18px; vertical-align: middle; border-color: #edf1f6; }
.app-content > .table-responsive .table th { background: #f8fafc; color: var(--ui-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.app-content > .table-responsive .table-striped > tbody > tr:nth-of-type(odd) > * { background: #fff; }
.app-content > .table-responsive .table tbody tr:hover > * { background: #fbfcfe; }
.app-content > .table-responsive .table td:last-child { white-space: nowrap; }
.app-content > .table-responsive .table a { font-weight: 600; text-decoration: none; }
.app-content > .row.g-2 { padding: 0; border: 0; background: transparent; box-shadow: none; }
.app-content > form.row.g-2 > .col-auto { padding-top: 0; }
.app-content > p:only-of-type { padding: 32px; background: #fff; border: 1px solid var(--ui-border); border-radius: var(--ui-card-radius); }
.home-link-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; max-width: 1000px; }
.home-link-grid a { position: relative; display: flex; flex-direction: column; gap: 8px; min-height: 128px; padding: 24px 54px 24px 24px; border: 1px solid var(--ui-border); border-radius: var(--ui-card-radius); background: #fff; box-shadow: var(--ui-shadow); text-decoration: none; }
.home-link-grid a:hover { border-color: #bfd3fc; box-shadow: 0 8px 24px rgba(20,34,56,.06); }
.home-link-grid strong { color: var(--ui-text); font-size: 18px; font-weight: 600; }
.home-link-grid span { color: var(--ui-muted); font-size: 12px; }
.home-link-grid span:last-child { position: absolute; right: 24px; top: 24px; color: var(--ui-primary); font-size: 20px; line-height: 1; }

.guest-shell { display: grid; grid-template-columns: minmax(320px,44%) minmax(0,1fr); min-height: 100vh; }
.guest-side { display: flex; flex-direction: column; justify-content: space-between; padding: 40px clamp(32px,5vw,80px); background: var(--ui-nav); color: #fff; }
.guest-side-message { max-width: 440px; padding-bottom: 10vh; }
.guest-side-message > span { color: #93b4ff; font-size: 12px; font-weight: 700; letter-spacing: 1.5px; }
.guest-side-message h2 { margin: 18px 0; font-size: clamp(28px,3vw,42px); font-weight: 700; letter-spacing: -.04em; line-height: 1.18; }
.guest-side-message p { margin: 0; color: #b8c6db; font-size: 14px; }
.guest-main { display: flex; align-items: center; justify-content: center; padding: 32px; min-width: 0; }
.guest-main .login-shell { width: 100%; min-height: auto; padding: 0; }
.guest-main .login-panel { width: min(100%,420px); padding: 0; border: 0; box-shadow: none; background: transparent; }
.guest-main .login-panel h1 { font-size: 28px; letter-spacing: -.6px; }
.guest-main .login-panel p { color: var(--ui-muted); }

@media (min-width: 960px) {
  html.sidebar-collapsed .app-shell { grid-template-columns: 0 minmax(0,1fr); }
  html.sidebar-collapsed .app-sidebar { transform: translateX(-100%); visibility: hidden; transition: transform .2s ease, visibility 0s .2s; }
}
@media (max-width: 959px) {
  .app-shell { display: block; }
  .app-sidebar { transform: translateX(-100%); transition: transform .2s ease; }
  body.sidebar-open { overflow: hidden; }
  body.sidebar-open .app-sidebar { transform: translateX(0); }
  .app-sidebar-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 40; display: block; width: 100%; border: 0; background: rgba(15,23,42,.42); }
  .app-sidebar-close, .app-menu-toggle { display: inline-flex; }
  .app-sidebar-close { position: absolute; top: -12px; right: -8px; background: transparent; border-color: #465a78; color: #fff; font-size: 22px; }
  .app-topbar { padding: 0 24px; }
  .app-content { padding: 28px 24px; }
}
@media (max-width: 720px) {
  .app-topbar { padding: 0 16px; }
  .app-content { padding: 24px 16px; }
  .app-topbar-right > span:first-child { display: none; }
  .guest-shell { display: block; }
  .guest-side { display: none; }
  .guest-main { min-height: 100vh; padding: 24px; }
  .home-link-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .app-content > h1, .app-content > .d-flex > h1 { font-size: 22px; }
  .app-content > .d-flex.justify-content-between > .btn, .app-content > .d-flex.justify-content-between > div { width: 100%; }
  .app-content > .d-flex.justify-content-between > div { display: flex; gap: 8px; flex-wrap: wrap; }
  .app-content > form.row { padding: 20px; }
  .app-breadcrumb { gap: 6px; font-size: 12px; }
  .app-breadcrumb > span:first-child, .app-breadcrumb > span:nth-child(2) { display: none; }
  .guest-main .login-panel h1 { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .app-sidebar,.app-shell,html.sidebar-collapsed .app-sidebar { transition: none; } }

.exam-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; flex-wrap:wrap; margin:20px 0 26px; }
.exam-heading h1 { font-size:clamp(1.75rem,3vw,2.25rem); font-weight:650; letter-spacing:-.035em; margin:4px 0 7px; }
.exam-heading h2, .exam-panel h2 { font-size:1.2rem; font-weight:650; margin:0; }
.exam-heading p, .exam-panel-head p, .exam-section-heading p { color:#637188; margin:6px 0 12px; max-width:680px; }
.exam-eyebrow { display:block; color:#4964ad; font-size:.72rem; font-weight:750; letter-spacing:.13em; text-transform:uppercase; }
.exam-code { background:#eef2ff; color:#3458c5; border-radius:6px; padding:4px 9px; font-size:.8rem; font-weight:700; font-family:Consolas,monospace; }
.exam-title-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.exam-title-row h1, .exam-title-row h2 { margin:0; }
.exam-actions, .exam-form-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.exam-download-actions { max-width:100%; }
.exam-panel { background:#fff; border:1px solid #e1e6ee; border-radius:12px; margin-bottom:18px; box-shadow:0 2px 12px rgba(38,55,84,.035); overflow:hidden; }
.exam-panel-head { display:flex; justify-content:space-between; align-items:flex-start; flex-wrap:wrap; gap:20px; padding:22px 24px; }
.exam-panel-head p { margin-bottom:12px; }
.exam-form-panel { padding:24px; margin-left:0; margin-right:0; }
.exam-empty { text-align:center; padding:48px 24px; }
.exam-empty p { color:#637188; }
.exam-muted { color:#637188; }
.exam-pill { display:inline-block; border-radius:999px; padding:4px 10px; font-size:.76rem; font-weight:650; white-space:nowrap; background:#f1f4f9; color:#5d6b7d; }
.exam-pill-good { background:#eaf6ef; color:#237250; }
.exam-pill-warn { background:#fff5df; color:#805515; }
.exam-pill-muted { background:#f1f4f9; color:#5d6b7d; }
.exam-level-table { border-top:1px solid #e1e6ee; }
.exam-level-row { display:grid; grid-template-columns:145px 130px minmax(150px,1fr) minmax(0,max-content); align-items:center; gap:16px; padding:14px 24px; border-top:1px solid #f0f2f6; }
.exam-level-row:first-child { border-top:0; }
.exam-level-row small { display:block; color:#637188; }
.exam-level-actions { justify-content:flex-end; }
.exam-text-link { font-weight:600; text-decoration:none; white-space:nowrap; }
.exam-table { margin-bottom:0; }
.exam-table th { background:#f6f8fb; color:#637188; font-size:.77rem; font-weight:650; white-space:nowrap; }
.exam-table td, .exam-table th { padding:14px 18px; border-color:#eef1f5; }
.exam-overview-table td:first-child { white-space:nowrap; }
.exam-crumb { display:flex; flex-wrap:wrap; align-items:center; gap:8px; color:#6c788b; font-size:.82rem; margin-top:16px; }
.exam-crumb a { text-decoration:none; }
.exam-grade-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:4px; }
.exam-grade-choice { display:flex; align-items:center; gap:8px; border:1px solid #dbe2ee; border-radius:8px; min-height:48px; padding:10px 12px; cursor:pointer; }
.exam-grade-choice:has(input:checked) { border-color:#3458c5; background:#eef2ff; }
.exam-grade-choice.attached { color:#788498; background:#f1f4f9; border-color:#e1e6ee; cursor:default; }
.exam-grade-choice.attached small { margin-left:auto; font-size:.72rem; }
.exam-level-heading { margin-bottom:12px; }
.exam-section-heading { margin-bottom:18px; }
.exam-section-heading h2 { font-size:1.4rem; font-weight:650; margin:0; }
.exam-subheading { border-bottom:1px solid #e1e6ee; padding-bottom:10px; }
.exam-radio-group { display:flex; gap:12px; flex-wrap:wrap; }
.exam-radio-group label { border:1px solid #dce3ed; border-radius:8px; padding:10px 12px; }
.exam-stepper { display:flex; gap:10px; flex-wrap:wrap; margin:0 0 18px; }
.exam-stepper span { border-radius:8px; border:1px solid #dce3ed; padding:8px 12px; color:#637188; background:#fff; font-size:.84rem; }
.exam-stepper span.active { color:#3458c5; background:#eef2ff; border-color:#9baef0; font-weight:650; }
.exam-upload-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:20px; }
.exam-upload-summary>div { background:#f6f8fb; border-radius:8px; padding:12px; }
.exam-upload-summary small { color:#637188; display:block; }
.exam-upload-summary strong { font-size:.95rem; }
.exam-confirm-block { border-top:1px solid #e1e6ee; padding:18px 22px; background:#f9fbff; }
.exam-confirm-block p { font-weight:600; }
.login-shell { min-height:calc(100vh - 120px); display:grid; place-items:center; padding:30px 10px 70px; }
.login-panel { width:min(100%,440px); background:#fff; border:1px solid #e1e6ee; border-radius:14px; box-shadow:0 12px 34px rgba(38,55,84,.08); padding:34px; }
.login-panel h1 { font-size:1.75rem; font-weight:700; margin:7px 0; }
.login-panel p { color:#637188; margin-bottom:22px; }
@media (max-width:1080px) {
  .exam-level-row { grid-template-columns:minmax(150px,1fr) minmax(0,max-content); }
}
@media (max-width:800px) {
  .exam-grade-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .exam-panel-head, .exam-form-panel { padding:18px; }
  .exam-upload-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:480px) { .exam-grade-grid { grid-template-columns:1fr; } }

/* Existing exam flow keeps its structure; only the shared visual tokens change. */
.app-content .exam-heading { margin-top: 0; }
.app-content .exam-heading h1 { font-size: 26px; font-weight: 700; letter-spacing: -.6px; }
.exam-heading h2, .exam-panel h2, .exam-section-heading h2 { font-size: 18px; font-weight: 600; }
.exam-heading p, .exam-panel-head p, .exam-section-heading p, .exam-empty p, .exam-muted, .exam-level-row small { color: var(--ui-muted); }
.exam-eyebrow { color: var(--ui-primary); font-size: 11px; }
.exam-code { color: var(--ui-primary-hover); background: var(--ui-primary-tint); border-radius: var(--ui-badge-radius); }
.exam-panel { border-color: var(--ui-border); border-radius: var(--ui-card-radius); box-shadow: var(--ui-shadow); }
.exam-panel-head, .exam-form-panel { padding: 24px; }
.exam-pill { border-radius: var(--ui-badge-radius); }
.exam-pill-good { color: var(--ui-success); background: #f0fdf4; }
.exam-pill-warn { color: var(--ui-warning); background: #fffbeb; }
.exam-pill-muted { color: #53657b; background: #f1f5f9; }
.exam-level-table, .exam-level-row, .exam-subheading, .exam-confirm-block { border-color: var(--ui-border); }
.exam-table th { background: #f8fafc; color: var(--ui-muted); }
.exam-table td, .exam-table th { border-color: #edf1f6; }
.exam-grade-choice, .exam-radio-group label, .exam-stepper span { border-color: var(--ui-border); border-radius: var(--ui-control-radius); }
.exam-grade-choice:has(input:checked), .exam-stepper span.active { border-color: var(--ui-primary); background: var(--ui-primary-tint); color: var(--ui-primary-hover); }
.exam-confirm-block, .exam-upload-summary > div { background: #f8fafc; }
.login-panel { border-color: var(--ui-border); border-radius: var(--ui-card-radius); }
.login-panel p { color: var(--ui-muted); }
@media (max-width: 800px) { .exam-panel-head, .exam-form-panel { padding: 18px; } }
@media (max-width: 600px) {
  .exam-panel-head > div, .exam-panel-head .exam-actions { width: 100%; min-width: 0; }
  .exam-panel-head .exam-actions > .btn { flex: 1 1 140px; }
  .exam-download-actions { width: 100%; }
  .exam-level-row { grid-template-columns: minmax(0,1fr); gap: 8px; }
  .exam-level-row > * { min-width: 0; }
  .exam-level-actions { justify-content: flex-start; }
  .exam-level-row .exam-text-link { white-space: normal; }
}
@media (max-width: 480px) { .app-content .exam-heading h1 { font-size: 22px; } }

.exam-level-heading { align-items: center; margin-bottom: 20px; }
.exam-setup-heading-content { flex: 1; min-width: 0; }
.exam-level-context { display: flex; align-items: center; gap: 14px; margin: 18px 0 20px; }
.exam-selected-grade { display: inline-flex; align-items: center; justify-content: center; flex: none; min-height: 56px; padding: 10px 16px; background: var(--ui-primary-tint); color: var(--ui-primary-hover); border: 1px solid #bfd3fc; border-radius: var(--ui-control-radius); font-size: 20px; font-weight: 700; white-space: nowrap; }
.exam-level-identity { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.exam-level-name { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.exam-level-name > strong { overflow-wrap: anywhere; font-weight: 600; }
.exam-level-heading h1 { margin-top: 0; }
.exam-level-heading p { margin-bottom: 0; }
.exam-setup-progress { margin-bottom: 24px; }
.exam-setup-progress-label { margin: 0 0 10px; color: var(--ui-muted); font-size: 12px; font-weight: 600; }
.exam-setup-steps { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding: 0; margin: 0; list-style: none; }
.exam-setup-steps li { min-width: 0; }
.exam-setup-steps a, .exam-setup-step-disabled { display: flex; align-items: center; gap: 10px; min-height: 82px; height: 100%; padding: 12px; border: 1px solid var(--ui-border); border-radius: var(--ui-control-radius); background: var(--ui-surface); color: var(--ui-text); text-decoration: none; }
.exam-setup-steps a:hover { border-color: #a8c4fa; background: #f8fbff; color: var(--ui-primary-hover); }
.exam-setup-steps a:focus-visible { outline-color: var(--ui-primary); outline-offset: 3px; }
.exam-setup-step-number { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border: 1px solid #cbd5e1; border-radius: 50%; color: #475569; font-size: 12px; font-weight: 700; }
.exam-setup-step-copy { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.exam-setup-step-copy strong { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.exam-setup-step-copy small { font-size: 11px; line-height: 1.35; }
.exam-setup-steps .is-current a { border-color: var(--ui-primary); background: var(--ui-primary-tint); color: var(--ui-primary-hover); box-shadow: inset 0 0 0 1px var(--ui-primary); }
.exam-setup-steps .is-current .exam-setup-step-number { border-color: var(--ui-primary); background: var(--ui-primary); color: #fff; }
.exam-setup-steps .is-current small { color: var(--ui-primary-hover); }
.exam-setup-steps .is-complete .exam-setup-step-number { border-color: #bbdfc9; background: #f0fdf4; color: var(--ui-success); }
.exam-setup-steps .is-complete small { color: var(--ui-success); }
.exam-setup-steps .is-locked .exam-setup-step-disabled { background: #f1f5f9; border-style: dashed; color: #64748b; }
.exam-setup-steps .is-locked .exam-setup-step-number { background: #e2e8f0; border-color: #cbd5e1; color: #64748b; }
.exam-setup-navigation { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--ui-border); }
.exam-setup-navigation-message { flex: 1 1 300px; min-width: 0; }
.exam-setup-navigation-message p { margin: 0; color: var(--ui-muted); font-size: 13px; }
.exam-setup-navigation-message .exam-setup-success { color: var(--ui-success); }
.exam-setup-navigation-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.exam-setup-navigation-actions .btn:disabled { cursor: not-allowed; opacity: 1; color: #64748b; border-color: #cbd5e1; background: #e2e8f0; }
@media (max-width: 1180px) {
  .exam-setup-steps a, .exam-setup-step-disabled { flex-direction: column; align-items: flex-start; gap: 8px; }
}
@media (max-width: 720px) {
  .exam-setup-steps { grid-template-columns: 1fr; gap: 6px; }
  .exam-setup-steps a, .exam-setup-step-disabled { flex-direction: row; align-items: center; min-height: 60px; padding: 10px 12px; }
  .exam-setup-step-copy { flex: 1; flex-direction: row; align-items: center; justify-content: space-between; gap: 12px; }
  .exam-setup-step-copy small { text-align: right; }
  .exam-setup-navigation { align-items: stretch; gap: 14px; }
  .exam-setup-navigation-actions { width: 100%; }
  .exam-setup-navigation-actions .btn { flex: 1 1 200px; }
}
@media (max-width: 480px) {
  .exam-level-heading { gap: 12px; }
  .exam-level-context { align-items: flex-start; gap: 10px; }
  .exam-selected-grade { min-height: 48px; padding: 8px 12px; font-size: 18px; }
  .exam-level-name { gap: 6px; }
  .exam-setup-step-copy { align-items: flex-start; flex-direction: column; gap: 2px; }
  .exam-setup-step-copy small { text-align: left; }
}

.exam-content-summary { display: flex; flex-wrap: wrap; gap: 12px 24px; margin: 16px 0; color: var(--ui-muted); font-size: 13px; }
.exam-key-details > summary { cursor: pointer; min-height: 44px; padding: 12px 0; color: var(--ui-primary); font-weight: 600; }
.exam-key-scroll { max-height: 480px; overflow: auto; }
.exam-key-scroll thead th { position: sticky; top: 0; z-index: 1; }
.exam-coefficient-input { max-width: 180px; }
.exam-checkbox { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.exam-checkbox input { width: 18px; height: 18px; }
.exam-penalty-setting fieldset { padding: 12px 0 0; }
.exam-penalty-setting fieldset:disabled { opacity: .55; }
