/* Exam UI shares the website's semantic tokens; the runner keeps its own layout. */
.exam-page, .exam-shell, .exam-dialog-layer, .exam-admin-page {
    --exam-navy: var(--ui-text-primary, #111827);
    --exam-slate: #475569;
    --exam-muted: var(--ui-text-muted, #6b7280);
    --exam-accent: var(--ui-color-primary, #2563eb);
    --exam-border: var(--ui-stroke, #e5e7eb);
    --exam-bg: var(--ui-app-bg, #f8fafc);
    --exam-white: var(--ui-app-surface-elevated, #fff);
    color: var(--exam-navy);
    font-family: var(--font-family, IRANSansX, Tahoma, sans-serif);
    line-height: 1.9;
}
.exam-icon { display: block; width: 20px; height: 20px; flex: 0 0 auto; }
.exam-icon--back { transform: rotate(180deg); }
.exam-page { background: transparent; padding-block: 8px 24px; min-height: 60vh; }
.exam-container { width: min(100% - 2rem, var(--ui-container-width, 1180px)); margin-inline: auto; }
.exam-breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; font-size: .78rem; color: var(--exam-muted); }
.exam-breadcrumb a { color: var(--exam-muted); transition: color 150ms ease; }
.exam-breadcrumb a:hover { color: var(--exam-accent); }
.exam-breadcrumb [aria-current] { color: var(--exam-navy); font-weight: 700; }
.exam-breadcrumb > span[aria-hidden] { color: #cbd5e1; }
.exam-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; min-width: 0; }
.exam-heading > div { min-width: 0; }
.exam-heading h1 { font-size: clamp(1.65rem, 3vw, 2.4rem); font-weight: 900; line-height: 1.65; margin: 0 0 10px; }
.exam-page h1:focus { outline: none; }
.exam-heading p { margin: 0; max-width: 650px; color: var(--exam-muted); font-size: .92rem; line-height: 2; }
.exam-eyebrow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--exam-accent); font-size: .76rem; font-weight: 850; }
.exam-eyebrow::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.exam-hero, .exam-heading--hero {
    position: relative; isolation: isolate; overflow: hidden;
    padding: 32px 36px; border: 1px solid var(--exam-border); border-radius: var(--ui-radius-2xl, 32px);
    background: radial-gradient(ellipse at left top, rgba(124,58,237,.065), transparent 60%), radial-gradient(ellipse at right bottom, rgba(37,99,235,.055), transparent 65%), #fff;
    box-shadow: var(--ui-shadow-xs, 0 1px 2px #0f172a0d);
}
.exam-hero__content { flex: 1; }
.exam-hero h1 > span { color: var(--exam-accent); }
.exam-hero__features { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin-top: 22px; }
.exam-hero__features > span { display: inline-flex; align-items: center; gap: 7px; color: #64748b; font-size: .78rem; }
.exam-hero__features .exam-icon { width: 17px; height: 17px; color: var(--exam-accent); }
.exam-hero__aside { display: flex; flex-direction: column; align-items: center; gap: 12px; flex: 0 0 230px; text-align: center; }
.exam-hero__aside > small { color: var(--exam-muted); font-size: .75rem; }
.exam-hero__symbol { display: grid; place-items: center; width: 82px; height: 82px; border: 1px solid #dbeafe; border-radius: 24px; background: #fff; box-shadow: 0 8px 28px #2563eb0b; transform: rotate(-5deg); color: var(--exam-accent); }
.exam-hero__symbol .exam-icon { width: 40px; height: 40px; }
.exam-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.exam-button {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; max-width: 100%; padding: 10px 18px; border: 1px solid var(--exam-border);
    border-radius: var(--ui-radius-pill, 999px); background: #fff; color: var(--exam-navy);
    font: inherit; font-size: .82rem; font-weight: 800; line-height: 1.8; text-align: center;
    text-decoration: none; cursor: pointer; transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.exam-button .exam-icon { width: 18px; height: 18px; }
.exam-button:hover { background: #f8fafc; border-color: #cbd5e1; color: var(--exam-accent); }
.exam-button--primary { border-color: transparent; background: linear-gradient(125deg, var(--exam-accent), var(--ui-color-secondary, #7c3aed)); color: #fff; box-shadow: 0 5px 14px #2563eb1c; }
.exam-button--primary:hover { border-color: transparent; background: linear-gradient(125deg, #1d4ed8, #6d28d9); color: #fff; box-shadow: 0 8px 20px #2563eb29; transform: translateY(-1px); }
.exam-button--danger { color: #b91c1c; border-color: #fecaca; background: #fff7f7; }
.exam-button:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.exam-button:focus-visible, .exam-number:focus-visible, .exam-filter button:focus-visible, .exam-clear:focus-visible, .exam-flag:focus-visible, .exam-mobile-map:focus-visible, .exam-link:focus-visible, .exam-card h2 a:focus-visible { outline: 3px solid #93c5fd; outline-offset: 4px; }
.exam-link { color: var(--exam-accent); font-weight: 800; text-decoration: none; }
.exam-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.exam-catalog-toolbar { justify-content: space-between; padding: 12px; border: 1px solid var(--exam-border); border-radius: 24px; background: #fff; box-shadow: var(--ui-shadow-xs); }
.exam-searchbox { position: relative; display: block; flex: 1 1 280px; max-width: 500px; min-width: 0; }
.exam-searchbox > .exam-icon { position: absolute; inset-inline-start: 16px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.exam-page .exam-searchbox input.exam-search { width: 100%; min-width: 0; min-height: 48px; padding: 11px 46px 11px 14px; border-color: transparent; border-radius: 16px; background: #f8fafc; font-size: .83rem; }
.exam-filter { display: flex; flex-wrap: wrap; gap: 5px; padding: 4px; background: #f1f5f9; border-radius: var(--ui-radius-pill, 999px); }
.exam-filter button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 7px 16px; border: 1px solid transparent; border-radius: var(--ui-radius-pill, 999px); background: transparent; color: var(--exam-muted); font: inherit; font-size: .79rem; font-weight: 750; white-space: nowrap; transition: background 150ms ease, color 150ms ease; }
.exam-filter button:hover { color: var(--exam-accent); background: #ffffffa8; }
.exam-filter button.is-active { background: #fff; color: var(--exam-accent); border-color: #dbeafe; box-shadow: 0 2px 5px #0f172a08; }
.exam-filter__count { color: inherit; opacity: .75; font-size: .75rem; }
.exam-section-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-block: 28px 18px; }
.exam-section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 850; }
.exam-section-head p { margin: 4px 0 0; font-size: .8rem; color: var(--exam-muted); }
.exam-section-head > span { color: var(--exam-muted); font-size: .78rem; }
.exam-section-title { font-size: 1.1rem; margin: 32px 0 18px; }
.exam-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.exam-card, .exam-panel { min-width: 0; padding: 26px; background: var(--exam-white); border: 1px solid var(--exam-border); border-radius: var(--ui-radius-xl, 24px); box-shadow: var(--ui-shadow-xs); }
.exam-card { display: flex; flex-direction: column; gap: 22px; transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease; }
.exam-card:hover { border-color: #c7d7fc; box-shadow: var(--ui-shadow-sm); transform: translateY(-3px); }
.exam-card__top { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.exam-card__icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; color: var(--exam-accent); background: linear-gradient(145deg, #eff6ff, #f5f3ff); border: 1px solid #e7edfc; }
.exam-card__icon .exam-icon { width: 26px; height: 26px; }
.exam-card__eyebrow { display: block; color: var(--exam-muted); font-size: .74rem; margin-bottom: 6px; }
.exam-card h2 { margin: 0; font-size: 1.13rem; font-weight: 850; line-height: 1.8; overflow-wrap: anywhere; }
.exam-card h2 a { color: var(--exam-navy); transition: color 150ms ease; }
.exam-card h2 a:hover { color: var(--exam-accent); }
.exam-card__facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 16px 0; border-block: 1px solid #f0f2f6; }
.exam-card__facts > div + div { border-inline-start: 1px solid #edf0f5; padding-inline-start: 12px; }
.exam-card__facts dt { display: flex; align-items: center; gap: 5px; color: var(--exam-muted); font-size: .73rem; white-space: nowrap; }
.exam-card__facts dt .exam-icon { width: 14px; height: 14px; }
.exam-card__facts dd { margin: 6px 0 0; color: var(--exam-navy); font-size: 1.2rem; font-weight: 850; }
.exam-card__facts dd small { font-size: .7rem; font-weight: 500; color: var(--exam-muted); }
.exam-card__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-top: auto; }
.exam-card__price { display: grid; gap: 2px; min-width: 80px; }
.exam-card__price > small { color: var(--exam-muted); font-size: .72rem; }
.exam-card__price > strong { font-size: .94rem; font-weight: 850; }
.exam-card__foot .exam-button { padding: 9px 16px; font-size: .78rem; }
.exam-card__notice { margin: -4px 0; color: #92400e; font-size: .78rem; line-height: 1.9; }
.exam-card__credits { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; color: #1d4ed8; background: #eff6ff; font-size: .76rem; }
.exam-card__credits .exam-icon { width: 18px; height: 18px; }
.exam-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; color: var(--exam-muted); font-size: .8rem; }
.exam-badge { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 5px 11px; border-radius: var(--ui-radius-pill, 999px); background: #f1f5f9; color: #475569; font-size: .72rem; font-weight: 750; line-height: 1.9; }
.exam-badge--brand, .exam-badge--info { color: #1d4ed8; background: #eff6ff; }
.exam-badge--success { color: #15803d; background: #f0fdf4; }
.exam-badge--danger { color: #b91c1c; background: #fef2f2; }
.exam-badge--warning { color: #92400e; background: #fffbeb; }
.exam-notice { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 15px 18px; margin-bottom: 18px; border: 1px solid #fde68a; border-radius: 16px; background: #fffbeb; color: #92400e; font-size: .82rem; line-height: 2; }
.exam-notice--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.exam-notice--success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.exam-notice p { margin: 0; color: inherit; }
.exam-notice > .exam-button { margin-inline-start: auto; }
.exam-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-width: 0; min-height: 240px; padding: 44px 24px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 24px; text-align: center; }
.exam-state h1, .exam-state h2 { margin: 0; font-size: 1.1rem; font-weight: 850; }
.exam-state p { margin: 0 0 6px; max-width: 520px; color: var(--exam-muted); font-size: .84rem; }
.exam-state__icon { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; margin-bottom: 4px; background: #eff6ff; color: var(--exam-accent); }
.exam-state__icon .exam-icon { width: 28px; height: 28px; }
.exam-state__actions { justify-content: center; }
.exam-loading { display: block; width: 28px; height: 28px; border: 3px solid #dbeafe; border-top-color: var(--exam-accent); border-radius: 50%; animation: exam-spin .8s linear infinite; margin-bottom: 8px; }
@keyframes exam-spin { to { transform: rotate(360deg); } }
.exam-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 350px; align-items: start; gap: 24px; }
.exam-stack { display: grid; min-width: 0; gap: 24px; }
.exam-panel h2 { margin: 0 0 20px; font-size: 1.05rem; font-weight: 850; }
.exam-panel > p:last-child { margin-bottom: 0; }
.exam-panel__title, .exam-panel__heading { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.exam-panel__heading h2 { margin: 0; }
.exam-panel__heading p { margin: 4px 0 0; font-size: .78rem; color: var(--exam-muted); }
.exam-title-icon, .exam-panel__icon { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border-radius: 12px; background: #eff6ff; color: var(--exam-accent); }
.exam-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 0; }
.exam-facts > div { min-width: 0; padding: 14px 16px; border-radius: 14px; background: #f8fafc; border: 1px solid #f0f2f6; }
.exam-facts dt { font-size: .76rem; color: var(--exam-muted); }
.exam-facts dd { margin: 6px 0 0; font-size: .86rem; font-weight: 750; }
.exam-purchase { position: sticky; top: calc(var(--header-height, 72px) + 24px); border-top: 3px solid var(--exam-accent); }
.exam-purchase__heading { display: flex; gap: 12px; align-items: center; margin-bottom: 22px; }
.exam-purchase__heading .exam-eyebrow { margin: 0; font-size: .72rem; }
.exam-purchase__heading h2 { margin: 2px 0 0; font-size: 1.1rem; }
.exam-purchase__price { padding: 18px; margin-bottom: 18px; border: 1px solid #e7edfc; border-radius: 16px; background: linear-gradient(120deg,#eff6ff77,#f5f3ff77); }
.exam-purchase__price > span { color: var(--exam-muted); font-size: .76rem; }
.exam-price { margin-top: 4px; font-size: 1.5rem; font-weight: 900; color: var(--exam-accent); }
.exam-purchase .exam-button { width: 100%; }
.exam-purchase > .exam-button + .exam-button { margin-top: 10px; }
.exam-purchase__buy { margin-top: 14px; }
.exam-purchase__subtitle { font-size: .95rem; }
.exam-muted, .exam-admin-meta { color: var(--exam-muted); font-size: .79rem; line-height: 2; }
.exam-divider { border: 0; border-top: 1px solid var(--exam-border); margin: 24px 0; }
.exam-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; color: var(--exam-slate); font-size: .82rem; font-weight: 700; }
.exam-field input, .exam-field select, .exam-field textarea { min-width: 0; min-height: 46px; border: 1px solid var(--exam-border); border-radius: 14px; background: #fff; color: var(--exam-navy); font: inherit; font-weight: 500; }
.exam-cost-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 10px 0; font-size: .77rem; }
.exam-cost-row > span { color: var(--exam-muted); }
.exam-cost-row strong { font-weight: 800; }
.exam-cost-row--total { border-top: 1px dashed var(--exam-border); margin-top: 6px; padding-top: 16px; font-size: .85rem; }
.exam-overview { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-block: 24px 32px; }
.exam-overview-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 22px; border: 1px solid var(--exam-border); border-radius: 20px; background: #fff; box-shadow: var(--ui-shadow-xs); }
.exam-overview-card__icon { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 16px; background: #eff6ff; color: var(--exam-accent); }
.exam-overview-card:nth-child(2) .exam-overview-card__icon { color: #7c3aed; background: #f5f3ff; }
.exam-overview-card:nth-child(3) .exam-overview-card__icon { color: #b45309; background: #fffbeb; }
.exam-overview-card:nth-child(4) .exam-overview-card__icon { color: #15803d; background: #f0fdf4; }
.exam-overview-card strong { display: block; font-size: 1.6rem; line-height: 1.5; font-weight: 900; }
.exam-overview-card span:not(.exam-overview-card__icon) { display: block; font-size: .76rem; color: var(--exam-muted); }
.exam-history { display: grid; gap: 14px; }
.exam-history-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; background: #fff; border: 1px solid var(--exam-border); border-radius: 20px; }
.exam-history-row__body { min-width: 0; }
.exam-history-row__title { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.exam-history-row h3 { margin: 0; font-size: .98rem; font-weight: 850; }
.exam-history-row p { margin: 0; color: var(--exam-muted); font-size: .77rem; }
.exam-history-row__meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--exam-muted); font-size: .77rem; }
.exam-history-row__meta > span { display: inline-flex; align-items: center; gap: 6px; }
.exam-history-row__meta .exam-icon { width: 16px; height: 16px; }
.exam-history-row__actions { flex-shrink: 0; justify-content: flex-end; }
.exam-history-status { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block: 6px 10px; font-size: .76rem; color: var(--exam-muted); }
.exam-history-result { display: flex; flex-direction: column; align-items: center; min-width: 72px; }
.exam-history-result > span, .exam-history-result > small { color: var(--exam-muted); font-size: .72rem; }
.exam-history-score { color: var(--exam-accent); font-size: 1.5rem; font-weight: 900; }
.exam-report-hero { display: flex; align-items: center; gap: 32px; padding: 32px; margin-bottom: 24px; border: 1px solid #dce6fd; border-radius: 28px; background: linear-gradient(120deg, #fff 15%, #eff6ff 80%, #f5f3ff); color: var(--exam-navy); }
.exam-report-score { display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; width: 132px; height: 132px; border: 6px solid #dbeafe; outline: 1px solid #fff; background: #ffffffc7; border-radius: 50%; color: var(--exam-accent); }
.exam-report-score strong { font-size: 2rem; font-weight: 900; line-height: 1.5; }
.exam-report-score small { color: var(--exam-muted); font-size: .74rem; }
.exam-report-hero__content { min-width: 0; }
.exam-report-hero h1 { margin: 0 0 12px; font-size: 1.6rem; }
.exam-report-hero p { margin: 4px 0; color: var(--exam-muted); font-size: .8rem; }
.exam-report-dates { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-bottom: 14px; color: var(--exam-muted); font-size: .78rem; }
.exam-report-dates > span { display: inline-flex; align-items: center; gap: 7px; }
.exam-report-dates .exam-icon { width: 16px; height: 16px; }
.exam-report-stats { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.exam-report-stat { position: relative; min-width: 0; padding: 22px; background: #fff; border: 1px solid var(--exam-border); border-radius: 20px; }
.exam-report-stat__icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #f1f5f9; color: #64748b; margin-bottom: 12px; }
.exam-report-stat strong { display: block; font-size: 1.75rem; font-weight: 900; line-height: 1.5; }
.exam-report-stat strong small { font-size: .74rem; font-weight: 500; margin-inline-start: 4px; }
.exam-report-stat > span:not(.exam-report-stat__icon) { color: var(--exam-muted); font-size: .77rem; }
.exam-report-stat--correct strong { color: #15803d; }
.exam-report-stat--correct .exam-report-stat__icon { color: #15803d; background: #f0fdf4; }
.exam-report-stat--wrong strong { color: #b91c1c; }
.exam-report-stat--wrong .exam-report-stat__icon { color: #b91c1c; background: #fef2f2; }
.exam-report-stat--time .exam-report-stat__icon { color: var(--exam-accent); background: #eff6ff; }
.exam-review-question { margin-top: 20px; }
.exam-review-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin-top: 10px; border: 1px solid var(--exam-border); border-radius: 14px; min-width: 0; background: #fff; }
.exam-review-option.is-correct { background: #f0fdf4; border-color: #bbf7d0; }
.exam-review-option.is-wrong { background: #fef2f2; border-color: #fecaca; }
.exam-review-option .exam-content { flex: 1; min-width: 0; }
.exam-review-option__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; flex-shrink: 0; }
.exam-explanation { margin-top: 20px; padding: 18px; border-radius: 14px; background: #f8fafc; border: 1px solid #eef2f7; }
.exam-explanation h3 { display: flex; align-items: center; gap: 8px; font-size: .88rem; margin: 0 0 10px; color: var(--exam-accent); }
.exam-table-wrap { overflow-x: auto; border: 1px solid #edf0f5; border-radius: 14px; }
.exam-bank-stats { width: 100%; border-collapse: collapse; font-size: .82rem; white-space: nowrap; }
.exam-bank-stats th, .exam-bank-stats td { padding: 14px 16px; text-align: start; border-bottom: 1px solid #edf0f5; }
.exam-bank-stats thead th { color: var(--exam-muted); background: #f8fafc; font-weight: 750; font-size: .76rem; }
.exam-bank-stats tbody th { font-weight: 700; }
.exam-bank-stats tr:last-child td, .exam-bank-stats tr:last-child th { border-bottom: 0; }
.exam-toolbar--review { padding: 0; margin-top: 12px; }
.exam-report-navigation { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.exam-report-navigation .exam-breadcrumb { margin: 0; }
.exam-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Standalone assessment workspace. */
.exam-shell { display: flex; flex-direction: column; min-height: 100dvh; background: #f8fafc; }
.exam-shell__foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 18px; padding: 20px; margin-top: auto; text-align: center; color: var(--exam-muted); font-size: .74rem; border-top: 1px solid #eef2f7; }
.exam-shell__foot-brand { font-weight: 750; color: #475569; }
.exam-runner { display: flex; flex-direction: column; min-height: calc(100dvh - 70px); }
.exam-topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px max(24px,calc((100vw - 1260px)/2)); background: #ffffffed; backdrop-filter: blur(12px); border-bottom: 1px solid var(--exam-border); }
.exam-brand { display: flex; align-items: center; gap: 20px; min-width: 0; }
.exam-brand__logo { display: block; width: 95px; height: auto; flex-shrink: 0; }
.exam-brand__copy { min-width: 0; padding-inline-start: 20px; border-inline-start: 1px solid var(--exam-border); }
.exam-brand h1 { margin: 0 0 3px; max-width: 520px; font-size: .98rem; font-weight: 850; line-height: 1.7; }
.exam-brand small { display: block; color: var(--exam-muted); font-size: .74rem; }
.exam-topbar__status { display: flex; align-items: center; gap: 22px; flex-shrink: 0; }
.exam-clock { min-width: 140px; padding: 8px 16px; border: 1px solid #dbeafe; border-radius: 16px; background: #eff6ff88; text-align: center; }
.exam-clock__label { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--exam-muted); font-size: .72rem; }
.exam-clock__label .exam-icon { width: 15px; height: 15px; }
.exam-clock strong { display: block; color: var(--exam-accent); font-size: 1.65rem; font-weight: 900; font-variant-numeric: tabular-nums; letter-spacing: .045em; line-height: 1.4; }
.exam-clock strong[data-urgent=true], .exam-runner[data-expired=true] .exam-clock strong { color: #b91c1c; }
.exam-save { display: inline-flex; align-items: center; gap: 6px; color: #15803d; font-size: .75rem; }
.exam-save .exam-icon { width: 16px; height: 16px; }
.exam-save[data-error=true] { color: #b91c1c; }
.exam-workspace { display: grid; grid-template-columns: 250px minmax(0,1fr); align-items: start; gap: 24px; width: min(1260px,100%); margin-inline: auto; padding: 30px 24px; flex: 1; }
.exam-runner-state { grid-column: 1 / -1; }
.exam-navigation { position: sticky; top: 130px; padding: 22px; }
.exam-map-heading { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.exam-map-heading h2 { margin: 0; font-size: .9rem; }
.exam-map-heading__icon { color: var(--exam-accent); }
.exam-map-subtitle { margin: 2px 0 0; color: var(--exam-muted); font-size: .73rem; }
.exam-numbers { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; }
.exam-number { position: relative; display: grid; place-items: center; min-height: 37px; padding: 0; border: 1px solid #dce3ee; border-radius: 10px; background: #fff; color: #64748b; font: inherit; font-size: .79rem; transition: background 150ms ease, border-color 150ms ease; }
.exam-number:hover { border-color: #93c5fd; }
.exam-number.is-answered { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.exam-number.is-current { border-color: var(--exam-accent); background: var(--exam-accent); color: #fff; box-shadow: 0 3px 8px #2563eb29; }
.exam-number.is-flagged::after { content: ""; position: absolute; top: -4px; inset-inline-end: -3px; width: 10px; height: 10px; border: 2px solid #fff; border-radius: 50%; background: #d97706; }
.exam-map-progress { margin-top: 20px; }
.exam-map-progress__copy { display: flex; justify-content: space-between; gap: 8px; color: var(--exam-muted); font-size: .72rem; }
.exam-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #edf2f8; margin: 9px 0; }
.exam-progress > span { display: block; height: 100%; background: var(--exam-accent); border-radius: inherit; transition: width 200ms ease; }
.exam-legend { display: grid; gap: 7px; margin-top: 20px; color: var(--exam-muted); font-size: .72rem; }
.exam-legend > span { display: flex; align-items: center; gap: 8px; }
.exam-legend > span::before { content: ""; display: block; flex-shrink: 0; width: 10px; height: 10px; border: 1px solid #cbd5e1; border-radius: 3px; }
.exam-legend > span:nth-child(2)::before { background: #dbeafe; border-color: #93c5fd; }
.exam-legend > span:nth-child(3)::before { background: #d97706; border-color: #d97706; border-radius: 50%; }
.exam-map-session { display: flex; align-items: center; gap: 8px; padding: 14px 0; margin-top: 18px; border-top: 1px solid #edf0f5; color: var(--exam-muted); font-size: .75rem; }
.exam-map-session .exam-icon { width: 17px; height: 17px; }
.exam-map-actions { display: grid; gap: 8px; }
.exam-map-actions .exam-button { width: 100%; }
.exam-mobile-map { display: none; }
.exam-question-column { min-width: 0; width: 100%; }
.exam-question { padding: 28px 32px; }
.exam-question__head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-bottom: 20px; margin-bottom: 24px; border-bottom: 1px solid #edf0f5; }
.exam-question__head h2 { margin: 0; color: var(--exam-navy); font-size: 1rem; scroll-margin-top: 140px; }
.exam-question__eyebrow { display: block; margin-bottom: 2px; color: var(--exam-muted); font-size: .73rem; }
.exam-question__body { padding-block: 2px 8px; }
.exam-question-instruction { margin: 16px 0 0; color: var(--exam-muted); font-size: .78rem; }
.exam-flag { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: var(--exam-muted); font: inherit; font-size: .74rem; }
.exam-flag .exam-icon { width: 16px; height: 16px; }
.exam-flag.is-active { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.exam-options { display: grid; gap: 12px; margin: 20px 0 12px; padding: 0; border: 0; min-width: 0; }
.exam-options legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.exam-option { display: flex; align-items: flex-start; gap: 12px; padding: 16px; min-width: 0; border: 1px solid #e2e8f0; border-radius: 16px; background: #fff; cursor: pointer; transition: background 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.exam-option:hover { background: #f8fafc; border-color: #a5bff2; }
.exam-option:has(input:checked) { background: #eff6ff; border-color: var(--exam-accent); box-shadow: 0 0 0 1px var(--exam-accent); }
.exam-option:has(input:focus-visible) { outline: 3px solid #93c5fd; outline-offset: 3px; }
.exam-option input { margin-top: 8px; width: 18px; height: 18px; inline-size: 18px; block-size: 18px; min-inline-size: 18px; max-inline-size: 18px; min-block-size: 18px; max-block-size: 18px; flex-shrink: 0; accent-color: var(--exam-accent); }
.exam-option__label { display: grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: 9px; background: #f1f5f9; color: #64748b; font-size: .78rem; margin-top: 3px; }
.exam-option:has(input:checked) .exam-option__label { color: #fff; background: var(--exam-accent); }
.exam-option .exam-content { flex: 1; min-width: 0; }
.exam-answer-actions { display: flex; justify-content: flex-start; }
.exam-clear { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 8px 0; border: 0; background: transparent; color: var(--exam-muted); font: inherit; font-size: .76rem; text-decoration: none; }
.exam-clear:disabled { opacity: .45; cursor: not-allowed; }
.exam-clear:hover:enabled { color: var(--exam-accent); }
.exam-question__footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; padding-top: 22px; margin-top: 18px; border-top: 1px solid #edf0f5; }
.exam-autosave { display: inline-flex; align-items: center; gap: 7px; color: var(--exam-muted); font-size: .73rem; }
.exam-autosave .exam-icon { width: 16px; height: 16px; color: #15803d; }
.exam-question-nav { display: flex; gap: 10px; }
.exam-connection { display: none; }
.exam-runner[data-disconnected=true] .exam-connection { display: flex; }
.exam-runner[data-disconnected=true] .exam-option, .exam-runner[data-expired=true] .exam-option { pointer-events: none; opacity: .65; }
/* Rich content always isolates LTR code and permits local horizontal scrolling. */
.exam-content { min-width: 0; overflow-wrap: anywhere; font-size: .93rem; line-height: 2.05; color: inherit; }
.exam-content p { color: inherit; margin: 0 0 12px; }
.exam-content p:last-child { margin-bottom: 0; }
.exam-content[dir=ltr] { text-align: left; }
.exam-content pre { direction: ltr; text-align: left; unicode-bidi: isolate; white-space: pre; overflow-x: auto; max-width: 100%; background: #152337; color: #e4edf9; padding: 18px; border: 1px solid #263b56; border-radius: 14px; font: .85rem/1.85 Consolas, 'Courier New', monospace; tab-size: 4; margin: 16px 0; }
.exam-content code { direction: ltr; unicode-bidi: isolate; display: inline-block; max-width: 100%; font-family: Consolas, 'Courier New', monospace; font-size: .92em; }
.exam-content pre code { display: block; white-space: pre; overflow-wrap: normal; font-size: inherit; }
.exam-content img { max-width: 100%; height: auto; }
.exam-content table { display: block; max-width: 100%; overflow: auto; }
.exam-content [dir=ltr] { unicode-bidi: isolate; }
.exam-content a { color: var(--exam-accent); }
.exam-dialog-layer { position: fixed; inset: 0; z-index: 1800; display: flex; align-items: center; justify-content: center; padding: 24px; }
.exam-dialog-backdrop { position: absolute; inset: 0; background: #0f172a80; backdrop-filter: blur(5px); }
.exam-dialog { position: relative; width: min(560px,100%); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 32px; border: 1px solid #ffffffa6; border-radius: 28px; background: #fff; color: var(--exam-navy); box-shadow: 0 24px 80px #0f172a38; }
.exam-dialog h2 { margin: 0 0 18px; font-size: 1.25rem; font-weight: 900; }
.exam-dialog__body { margin-bottom: 24px; color: #475569; font-size: .86rem; line-height: 2.1; }
.exam-dialog__body p { color: inherit; }
.exam-dialog .exam-actions { justify-content: flex-end; padding-top: 20px; border-top: 1px solid #edf0f5; }
.exam-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 20px 0; }
.exam-summary > div { padding: 16px 8px; border: 1px solid #e7edfc; border-radius: 16px; background: #f8fafc; text-align: center; }
.exam-summary strong { display: block; font-size: 1.5rem; color: var(--exam-accent); font-weight: 900; }
.exam-summary span { color: var(--exam-muted); font-size: .72rem; }
.exam-skip { position: fixed; top: -90px; inset-inline-start: 20px; z-index: 2000; padding: 12px 18px; border: 2px solid var(--exam-accent); border-radius: 12px; background: #fff; color: var(--exam-navy); }
.exam-skip:focus { top: 10px; }
/* Shared question authoring content; management layout rules live in exam-admin.css. */
.exam-editor-preview, .exam-code-editor { padding: 18px; margin-top: 12px; border: 1px solid var(--exam-border); border-radius: 14px; background: #f8fafc; }
.exam-code-editor { margin-bottom: 12px; }
.exam-code-editor textarea { direction: ltr; text-align: left; unicode-bidi: isolate; white-space: pre; font-family: Consolas,monospace; min-height: 140px; width: 100%; tab-size: 4; }
.exam-editor-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
body:has(.exam-shell) { padding-bottom: 0 !important; background: #f8fafc; }
@media (max-width:1100px) {
    .exam-cards { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .exam-overview { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .exam-history-row { flex-wrap: wrap; }
    .exam-history-row__actions { margin-inline-start: auto; }
    .exam-detail-grid { grid-template-columns: minmax(0,1fr) 320px; }
    .exam-workspace { grid-template-columns: 220px minmax(0,1fr); gap: 20px; padding: 24px 20px; }
    .exam-navigation { padding: 18px; }
    .exam-question { padding: 24px; }
    .exam-save { display: none; }
    .exam-question__footer { flex-direction: column; align-items: stretch; }
    .exam-question-nav { justify-content: space-between; }
}
@media (max-width:800px) {
    .exam-detail-grid { grid-template-columns: 1fr; }
    .exam-details-page .exam-purchase { position: static; grid-row: 1; }
    .exam-hero, .exam-heading--hero { padding: 28px; }
    .exam-hero__aside { flex-basis: 190px; }
    .exam-report-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width:720px) {
    .exam-page { padding-block: 0 16px; }
    .exam-breadcrumb { margin-bottom: 16px; font-size: .74rem; }
    .exam-heading { flex-direction: column; align-items: stretch; gap: 22px; }
    .exam-heading h1 { font-size: 1.65rem; }
    .exam-heading p { font-size: .84rem; }
    .exam-hero, .exam-heading--hero { padding: 24px; border-radius: 24px; margin-bottom: 20px; }
    .exam-hero__features { gap: 10px 16px; margin-top: 18px; }
    .exam-hero__features > span { font-size: .73rem; }
    .exam-hero__aside { flex-basis: auto; align-items: stretch; text-align: start; gap: 8px; }
    .exam-hero__symbol { display: none; }
    .exam-hero__aside > small { text-align: center; }
    .exam-hero--detail .exam-hero__aside { align-items: flex-start; }
    .exam-catalog-toolbar { gap: 10px; padding: 10px; border-radius: 20px; }
    .exam-searchbox { flex-basis: 100%; max-width: none; }
    .exam-filter { width: 100%; gap: 4px; }
    .exam-filter button { flex: 1; padding: 7px 10px; font-size: .76rem; }
    .exam-cards { grid-template-columns: 1fr; gap: 18px; }
    .exam-card, .exam-panel { padding: 22px; border-radius: 22px; }
    .exam-card { gap: 20px; }
    .exam-card__facts dt { font-size: .74rem; }
    .exam-card__facts dd small { display: block; font-size: .73rem; }
    .exam-card__facts > div + div { padding-inline-start: 12px; }
    .exam-card__foot .exam-button { min-width: 155px; }
    .exam-section-head { margin-block: 24px 16px; }
    .exam-section-head h2 { font-size: 1rem; }
    .exam-detail-grid, .exam-stack { gap: 18px; }
    .exam-facts { gap: 10px; }
    .exam-facts > div { padding: 12px; }
    .exam-facts dt { font-size: .73rem; }
    .exam-facts dd { font-size: .8rem; }
    .exam-overview { gap: 12px; margin-block: 20px 24px; }
    .exam-overview-card { flex-direction: column; align-items: flex-start; gap: 10px; padding: 18px; border-radius: 18px; }
    .exam-overview-card__icon { width: 38px; height: 38px; border-radius: 12px; }
    .exam-overview-card strong { font-size: 1.5rem; }
    .exam-history-row { padding: 20px; gap: 18px; }
    .exam-history-row__actions { width: 100%; justify-content: flex-start; margin-inline-start: 0; border-top: 1px solid #edf0f5; padding-top: 16px; }
    .exam-history-row__actions .exam-button { flex: 1; }
    .exam-history-row__meta { flex-direction: column; gap: 5px; }
    .exam-history-result { min-width: 58px; align-items: flex-start; }
    .exam-report-hero { align-items: flex-start; gap: 22px; padding: 24px; border-radius: 24px; flex-direction: column; }
    .exam-report-score { width: 110px; height: 110px; border-width: 5px; }
    .exam-report-score strong { font-size: 1.7rem; }
    .exam-report-hero h1 { font-size: 1.3rem; }
    .exam-report-dates { display: grid; gap: 6px; }
    .exam-report-stat { padding: 18px; border-radius: 18px; }
    .exam-report-stats { gap: 12px; }
    .exam-report-stat strong { font-size: 1.5rem; }
    .exam-review-option { flex-wrap: wrap; padding: 13px; gap: 9px; }
    .exam-review-option > .exam-content { flex-basis: calc(100% - 45px); }
    .exam-review-option__badges { width: 100%; padding-inline-start: 37px; }
    .exam-table-wrap { margin-inline: -6px; }
    .exam-topbar { padding: 12px 16px; gap: 12px; }
    .exam-brand { gap: 12px; }
    .exam-brand__logo { width: 62px; }
    .exam-brand__copy { padding-inline-start: 12px; }
    .exam-brand h1 { max-width: 240px; font-size: .8rem; line-height: 1.8; }
    /* The site's global mobile heading sizes use !important; keep the compact runner header readable. */
    .exam-shell .exam-brand h1 { font-size: .8rem !important; line-height: 1.85; }
    .exam-shell .exam-question__head h2 { font-size: .9rem !important; }
    .exam-brand small { display: none; }
    .exam-clock { min-width: 100px; padding: 7px 9px; border-radius: 12px; }
    .exam-clock__label { font-size: .65rem; gap: 4px; }
    .exam-clock__label .exam-icon { width: 13px; height: 13px; }
    .exam-clock strong { font-size: 1.25rem; }
    .exam-workspace { display: flex; flex-direction: column; width: 100%; gap: 16px; padding: 16px; }
    .exam-runner-state { width: 100%; }
    .exam-navigation { position: static; width: 100%; padding: 14px 16px; border-radius: 18px; }
    .exam-map-heading { display: none; }
    .exam-mobile-map { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; min-height: 38px; padding: 0; border: 0; background: transparent; text-align: start; color: var(--exam-navy); font: inherit; font-size: .8rem; font-weight: 800; }
    .exam-mobile-map > span { display: inline-flex; align-items: center; gap: 6px; }
    .exam-mobile-map > span:nth-child(2) { color: var(--exam-muted); font-size: .72rem; font-weight: 500; }
    .exam-map-chevron { width: 17px; height: 17px; transform: rotate(-90deg); }
    .exam-navigation.is-open .exam-map-chevron { transform: rotate(90deg); }
    .exam-navigation:not(.is-open) .exam-map-body { display: none; }
    .exam-map-body { padding-top: 16px; }
    .exam-numbers { grid-template-columns: repeat(8,minmax(0,1fr)); }
    .exam-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; }
    .exam-question { width: 100%; padding: 20px 16px; border-radius: 20px; }
    .exam-question__head { gap: 10px; padding-bottom: 16px; margin-bottom: 18px; }
    .exam-question__head h2 { font-size: .9rem; scroll-margin-top: 120px; }
    .exam-question__eyebrow { font-size: .7rem; }
    .exam-flag { min-height: 38px; padding: 7px 10px; font-size: .7rem; }
    .exam-flag .exam-icon { width: 14px; height: 14px; }
    .exam-content { font-size: .87rem; }
    .exam-option { gap: 9px; padding: 14px 11px; border-radius: 14px; }
    .exam-option__label { width: 24px; height: 26px; font-size: .74rem; }
    .exam-option input { margin-top: 8px; inline-size: 16px; block-size: 16px; min-inline-size: 16px; max-inline-size: 16px; min-block-size: 16px; max-block-size: 16px; }
    .exam-question__footer { gap: 12px; padding-top: 18px; }
    .exam-autosave { font-size: .7rem; }
    .exam-question-nav .exam-button { flex: 1; padding: 10px 12px; font-size: .76rem; }
    .exam-dialog-layer { padding: 16px; }
    .exam-dialog { max-height: calc(100dvh - 32px); padding: 24px 20px; border-radius: 24px; }
    .exam-dialog h2 { font-size: 1.12rem; }
    .exam-dialog .exam-actions { flex-direction: column; align-items: stretch; }
    .exam-dialog .exam-actions > * { width: 100%; }
}
@media (max-width:380px) {
    .exam-card, .exam-panel { padding: 18px; }
    .exam-hero, .exam-heading--hero { padding: 20px; }
    .exam-card__facts { gap: 8px; }
    .exam-card__facts dt { font-size: .69rem; }
    .exam-card__facts dt .exam-icon { display: none; }
    .exam-card__facts > div + div { padding-inline-start: 9px; }
    .exam-card__foot { gap: 12px; }
    .exam-card__foot .exam-button { min-width: 0; }
    .exam-brand__logo { width: 48px; }
    .exam-brand { gap: 9px; }
    .exam-brand__copy { padding-inline-start: 9px; }
    .exam-clock { min-width: 88px; }
    .exam-clock__label .exam-icon { display: none; }
    .exam-flag { padding-inline: 8px; }
}
@media (prefers-reduced-motion:reduce) {
    .exam-shell *, .exam-page *, .exam-dialog-layer * { transition: none !important; scroll-behavior: auto !important; animation: none !important; }
}
