:root {
    --blue: #00414E;
    --blue-dark: #002f38;
    --blue-light: #e6eef0;
    --red: #c0392b;
    --green: #1e8e4e;
    --gray: #6b7280;
    --border: #ddd8d3;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    background: #f5f3f1;
    line-height: 1.5;
}
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; color: var(--blue-dark); margin: 0.4rem 0 0.6rem; }
h2 { font-size: 1.15rem; color: var(--blue-dark); margin-top: 1.6rem; }
h3 { margin-top: 0; }
.muted { color: var(--gray); }
.small { font-size: 0.85rem; }
code { background: var(--blue-light); padding: 0 4px; border-radius: 4px; }

/* ---------- layout / sidebar ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0; width: 250px;
    background: var(--blue); color: #fff; padding: 1.2rem .9rem 0;
    overflow-y: auto; z-index: 30;
    display: flex; flex-direction: column;
}
.sidebar .brand {
    display: flex; align-items: center; gap: .7rem;
    padding: 0 .3rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.18); margin-bottom: .8rem;
}
.brand-icon {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 9px;
    background: rgba(255,255,255,.14); color: #fff;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1rem; }
.brand-text span { font-size: .8rem; color: rgba(255,255,255,.75); }
.sidebar nav a {
    display: flex; align-items: center; gap: .65rem;
    color: rgba(255,255,255,.82); padding: .6rem .8rem; font-size: .92rem;
    border-radius: 8px; margin-bottom: .15rem;
}
.sidebar nav a svg { flex: none; opacity: .85; }
.sidebar nav a:hover { background: rgba(255,255,255,.1); text-decoration: none; color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 1rem .3rem 1.2rem; position: relative; }
.sidebar-mountains { display: block; width: 100%; height: auto; }
.sidebar-tagline {
    margin-top: .6rem; font-size: .82rem; line-height: 1.4;
    color: rgba(255,255,255,.65);
}
.main { flex: 1; margin-left: 250px; padding: 0 2rem 1.5rem; max-width: calc(100% - 250px); }
.topbar {
    display: flex; align-items: center; gap: .9rem;
    background: #fff; border-bottom: 1px solid var(--border);
    margin: 0 -2rem 1.4rem; padding: .7rem 2rem;
}
.topbar-spacer { flex: 1; }
.topbar-icon {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    border: 0; background: transparent; color: #55606c; cursor: pointer;
}
.topbar-icon:hover { background: #f0f4f8; }
.topbar-user { display: flex; align-items: center; gap: .5rem; color: #16212b; font-size: .92rem; font-weight: 600; }
.topbar-avatar {
    display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--blue); color: #fff; font-size: .85rem; font-weight: 700;
}
.topbar-name { margin-right: .1rem; }
.topbar-logout { font-size: .85rem; font-weight: 600; color: var(--gray); padding: .35rem .7rem; border-radius: 8px; }
.topbar-logout:hover { background: #f0f4f8; color: var(--blue); text-decoration: none; }
#sidebar-toggle {
    display: none; position: fixed; top: 10px; left: 10px; z-index: 40;
    background: var(--blue); color: #fff; border: 0; border-radius: 6px;
    font-size: 1.1rem; padding: .35rem .6rem; cursor: pointer;
}
.sidebar-overlay { display: none; }

/* ---------- buttons / badges / cards ---------- */
.btn {
    display: inline-block; border: 1px solid var(--border); background: #fff; color: #1f2937;
    border-radius: 6px; padding: .5rem 1rem; font-size: .95rem; cursor: pointer;
}
.btn:hover { background: #f0f4f8; text-decoration: none; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #a5301f; }
.btn-small { padding: .3rem .7rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn.flagged { background: #fff3cd; border-color: #e0b84c; }

.badge { display: inline-block; padding: .15rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.badge-pass { background: #e2f5e9; color: var(--green); }
.badge-fail { background: #fbe4e1; color: var(--red); }
.badge-neutral { background: #e5eaf0; color: #4b5563; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin: 1rem 0; }
.card {
    background: #fff; border: 1px solid var(--border); border-radius: 10px;
    padding: 1.1rem; text-align: center; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.card-num { font-size: 1.8rem; font-weight: 700; color: var(--blue); }
.card-label { color: var(--gray); font-size: .85rem; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; margin-top: .6rem; }
.table th, .table td { padding: .6rem .8rem; border-bottom: 1px solid var(--border); text-align: left; font-size: .92rem; }
.table th { background: var(--blue-light); color: var(--blue-dark); }
.table tr:last-child td { border-bottom: 0; }
.row-correct td { background: #f4fbf6; }
.row-wrong td { background: #fdf6f5; }

.empty-state {
    background: #fff; border: 1px dashed var(--border); border-radius: 10px;
    padding: 2rem; text-align: center; color: var(--gray); margin-top: 1rem;
}

/* ---------- login ---------- */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--blue-light); }
.login-card {
    background: #fff; border-radius: 12px; box-shadow: 0 4px 18px rgba(0,0,0,.08);
    padding: 2rem; width: 100%; max-width: 360px;
}
.login-card h1 { text-align: center; margin-top: 0; }
.login-card label { display: block; margin: .8rem 0 .25rem; font-size: .9rem; font-weight: 600; }
.login-card input { width: 100%; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 6px; font-size: 1rem; }
.login-card .btn { margin-top: 1.2rem; }
.alert { padding: .6rem .8rem; border-radius: 6px; margin: .8rem 0; font-size: .9rem; }
.alert-error { background: #fbe4e1; color: var(--red); }

/* ---------- subject page header ---------- */
.page-kicker {
    font-size: .72rem; font-weight: 700; letter-spacing: .12em; color: var(--gray);
    margin-bottom: .2rem;
}
.subject-head {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 1.5rem;
}
.subject-head-text { flex: 1; min-width: 0; }
.subject-head h1 { font-size: 1.9rem; margin: .1rem 0 .3rem; }
.subject-meta {
    display: flex; flex-wrap: wrap; gap: 1.2rem; margin-top: .8rem;
    color: var(--gray); font-size: .88rem;
}
.subject-meta-item { display: inline-flex; align-items: center; gap: .4rem; }
.subject-meta-item svg { color: #8a94a0; flex: none; }
.quote-banner {
    flex: none; display: flex; align-items: flex-end; gap: .5rem;
    background: #eef4f4; border: 1px solid #dfe9e9; border-radius: 14px;
    padding: .9rem 1rem .6rem; max-width: 320px; overflow: hidden;
}
.quote-banner-text { font-style: italic; font-weight: 600; color: var(--blue-dark); font-size: .92rem; line-height: 1.35; }
.quote-banner-art { flex: none; width: 140px; height: auto; margin-bottom: -.6rem; }
@media (max-width: 900px) { .quote-banner { display: none; } }

/* ---------- stat cards ---------- */
.stat-cards {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin: 1.2rem 0;
}
@media (max-width: 1000px) { .stat-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .stat-cards { grid-template-columns: 1fr; } }
.stat-card {
    background: #fff; border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 1px 6px rgba(15, 35, 55, .06);
    padding: 1rem 1.1rem; display: flex; gap: .8rem; align-items: flex-start;
}
.stat-card-icon {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; border-radius: 10px;
}
.stat-icon-blue { background: var(--blue-light); color: var(--blue); }
.stat-icon-green { background: #e2f5e9; color: var(--green); }
.stat-card-body { flex: 1; min-width: 0; }
.stat-card-label { font-size: .8rem; color: var(--gray); }
.stat-card-value { font-size: 1.25rem; font-weight: 800; color: #16212b; }
.stat-card-of, .stat-card-scale { font-size: .8rem; font-weight: 500; color: var(--gray); }
.stat-card-bar {
    height: 6px; border-radius: 999px; background: #e8ecef; overflow: hidden; margin-top: .5rem;
}
.stat-card-bar-fill { height: 100%; border-radius: 999px; background: var(--blue); }
.stat-card-bar-fill.fill-green { background: var(--green); }
.stat-card-pct { text-align: right; font-size: .75rem; color: var(--gray); margin-top: .15rem; }
.stat-card-sub { margin-top: .3rem; }

/* ---------- test filter bar ---------- */
.test-filter-bar {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    flex-wrap: wrap; margin: .4rem 0 .2rem;
}
.test-filter-pills { display: flex; gap: .5rem; flex-wrap: wrap; }
.pill {
    border: 1px solid var(--border); background: #fff; color: #37414b;
    border-radius: 999px; padding: .4rem 1rem; font-size: .85rem; font-weight: 600;
    cursor: pointer; font-family: inherit;
}
.pill:hover { background: #f0f4f8; }
.pill.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.test-filter-tools { display: flex; gap: .6rem; align-items: center; }
.test-filter-tools input[type="search"], .test-filter-tools select {
    padding: .5rem .8rem; border: 1px solid var(--border); border-radius: 8px;
    font-size: .9rem; font-family: inherit; background: #fff; color: #1f2937;
}
.test-filter-tools input[type="search"] { width: 200px; }

/* ---------- tests list ---------- */
.test-list {
    display: grid; grid-template-columns: repeat(5, 1fr);
    gap: 1rem; margin-top: 1.2rem;
}
@media (max-width: 1100px) { .test-list { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px) { .test-list { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .test-list { grid-template-columns: repeat(2, 1fr); } }
.test-card {
    background: #fff; border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 2px 10px rgba(15, 35, 55, .07);
    padding: 1.1rem 1rem 1rem; text-align: left;
    display: flex; flex-direction: column; align-items: stretch; gap: .3rem;
}
.test-card-icon {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--blue-light); color: var(--blue); margin-bottom: .2rem;
}
.test-card-title { font-size: .98rem; font-weight: 800; color: #16212b; }
.test-card-meta { margin-top: -.2rem; }
.start-tips { margin: .4rem 0 0; padding-left: 1.1rem; }
.start-tips li { margin-bottom: .2rem; }
.test-card-status { min-height: 1.4rem; display: flex; align-items: center; gap: .4rem; }
.test-card-score { min-height: 1.2rem; color: var(--gray); }
.test-card-bar-row { display: flex; align-items: center; gap: .5rem; margin-top: .2rem; }
.test-card-progress-value { color: #55606c; font-size: .78rem; flex: none; }
.test-card.is-fail { background: #fdf3f2; border-color: #f0d4d0; }
.test-card-bar-fill.fill-red { background: var(--red); }
.test-card-bar {
    flex: 1; height: 5px; border-radius: 999px; background: #e8ecef; overflow: hidden;
}
.test-card-bar-fill {
    height: 100%; border-radius: 999px; background: var(--blue);
    transition: width .3s ease;
}
.test-card .test-actions { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: .5rem; margin-top: .7rem; }
.test-card .test-actions > * { min-width: 0; }
.test-card .test-actions .btn { text-align: center; border-radius: 8px; display: block; white-space: nowrap; height: 100%; }
.test-card .test-actions .inline-form { display: block; }
.test-card .test-actions .inline-form .btn { width: 100%; }
.test-card .test-actions .btn-outline-teal { padding: .3rem .5rem; border-width: 1.5px; }
.inline-form { display: inline; margin: 0; }

/* ---------- score report (result.php) ---------- */
.report-head {
    display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.report-head h1 { font-size: 1.4rem; margin: .4rem 0 1rem; }
.report-actions { display: flex; gap: .5rem; align-items: center; }
.report-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border);
    background: #fff; color: var(--blue); cursor: pointer; font-size: 1rem; text-decoration: none;
}
.report-icon:hover { background: var(--blue-light); }

.report-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    display: flex; gap: 2rem; padding: 1.6rem; flex-wrap: wrap;
}
.report-left { min-width: 220px; }
.report-score { font-size: 1.7rem; color: var(--blue); }
.report-score strong { font-weight: 800; }
.report-verdict { font-size: 1.25rem; font-weight: 800; margin: .3rem 0 .8rem; }
.report-verdict.pass { color: var(--green); }
.report-verdict.fail { color: var(--red); }
.report-meta { color: #4b5563; font-size: .95rem; margin-top: .2rem; }
.report-right { flex: 1; min-width: 300px; display: flex; align-items: center; }

.scale-wrap { width: 100%; padding-top: 2.2rem; }
.scale-bar { position: relative; display: flex; height: 14px; border-radius: 999px; overflow: hidden; }
.scale-seg { height: 100%; }
.scale-below { background: #e5e7eb; }
.scale-passzone { background: #cfe9d8; }
.scale-fill {
    position: absolute; left: 0; top: 0; bottom: 0; background: var(--green);
    border-radius: 999px 0 0 999px;
}
.scale-fill.fail { background: var(--red); }
.scale-marker {
    position: absolute; top: -4px; bottom: -4px; width: 2px; background: #9ca3af;
}
.scale-bubble {
    position: absolute; top: .4rem; transform: translateX(-50%);
    background: #fff; border-radius: 8px; padding: .15rem .6rem;
    font-weight: 800; color: var(--green); box-shadow: 0 1px 5px rgba(0,0,0,.18);
    font-size: .95rem;
}
.scale-bubble.fail { color: var(--red); }
.scale-wrap { position: relative; }
.scale-bubble::after {
    content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
    border: 5px solid transparent; border-top-color: #fff; border-bottom: 0;
}
.scale-labels { display: flex; align-items: flex-start; margin-top: .45rem; font-size: .8rem; color: var(--gray); }
.scale-lbl-below { text-align: center; }
.scale-lbl-pass { text-align: center; color: var(--green); font-weight: 600; }

.skills-card, .breakdown-card {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 1.2rem 1.4rem; margin-top: 1.2rem;
}
.skills-card h2, .breakdown-card h2 { margin-top: 0; }
.skills-list { list-style: none; margin: 0; padding: 0; }
.skills-list li {
    display: grid; grid-template-columns: minmax(140px, 1.2fr) 2fr minmax(90px, auto); align-items: center; gap: 1rem;
    padding: .55rem 0; border-bottom: 1px solid #eee9e4;
}
.skills-list li:last-child { border-bottom: 0; }
.skills-topic { font-weight: 600; }
.skills-count { color: #4b5563; font-size: .88rem; text-align: right; font-variant-numeric: tabular-nums; }
.skills-bar { height: 8px; border-radius: 999px; background: #edf0f2; overflow: hidden; }
.skills-bar-fill { display: block; height: 100%; border-radius: 999px; }
.skills-good { background: var(--green); }
.skills-fair { background: #e0a800; }
.skills-weak { background: var(--red); }
.report-buttons { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.breakdown-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.rq-list { display: flex; flex-direction: column; gap: .45rem; margin-top: .6rem; }
.rq { border: 1px solid var(--border); border-left: 4px solid var(--green); border-radius: 8px; background: #fff; }
.rq-wrong, .rq-blank { border-left-color: var(--red); }
.rq > summary {
    display: grid; grid-template-columns: 2.2rem minmax(120px, 220px) 1fr auto; align-items: center; gap: .8rem;
    padding: .55rem .8rem; cursor: pointer; list-style: none;
}
.rq > summary::-webkit-details-marker { display: none; }
.rq > summary:hover { background: #f8fafb; }
.rq[open] > summary { border-bottom: 1px solid #eee9e4; }
.rq-num { font-weight: 800; color: #16212b; }
.rq-topic { font-size: .82rem; color: var(--gray); }
.rq-your { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rq-body { padding: .9rem 1rem 1rem; }
.rq-passage { margin-bottom: .8rem; background: #f8fafb; border: 1px solid #e3e8ea; border-radius: 8px; padding: .5rem .8rem; }
.rq-passage > summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: .88rem; }
.rq-passage .rich { margin-top: .6rem; font-size: .93rem; }
.rich:not(.rendered) { white-space: pre-wrap; }
.rich p { margin: 0 0 .7em; }
.rq-question { font-weight: 600; margin-bottom: .7rem; }
.rq-options { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35rem; }
.rq-options li { border: 1px solid var(--border); border-radius: 8px; padding: .45rem .7rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.rq-options li.is-correct { border-color: #9ed3b2; background: #f0faf3; }
.rq-options li.is-yours-wrong { border-color: #efb8b0; background: #fdf3f2; }
.rq-tag { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; }
.tag-correct { background: #e2f5e9; color: var(--green); }
.tag-yours { background: #e5eaf0; color: #374151; }
.rq-fill { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0; }
.rq-fill dt { color: var(--gray); font-size: .88rem; }
.rq-fill dd { margin: 0; font-weight: 600; }
.rq-dd { margin-top: 0; }
.blank-mine { background: #e0a800; }
@media (max-width: 700px) {
    .rq > summary { grid-template-columns: 2rem 1fr auto; }
    .rq-topic { display: none; }
    .skills-list li { grid-template-columns: 1fr auto; }
    .skills-bar { grid-column: 1 / -1; grid-row: 2; }
}
@media print {
    .sidebar, .topbar, #sidebar-toggle, .report-actions, .report-buttons, #review-pills { display: none !important; }
    .main { margin: 0; max-width: none; padding: 0; }
    .rq { break-inside: avoid; }
}
.skills-perfect { color: var(--green); font-weight: 600; margin: 0; }
.breakdown-card .table { border: 0; }
.mark { font-weight: 800; font-size: 1rem; }
.mark-ok { color: var(--green); }
.mark-no { color: var(--red); }

/* ---------- my test history (tests.php?view=results) ---------- */
.history-title { font-size: 1.7rem; margin: .1rem 0 .3rem; }
.stat-cards-five { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1200px) { .stat-cards-five { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px) { .stat-cards-five { grid-template-columns: repeat(2, 1fr); } }
.stat-icon-gold { background: #fdf3dd; color: #b8860b; }
.stat-card-trend { display: inline-flex; align-items: center; gap: .25rem; font-size: .78rem; font-weight: 600; margin-top: .4rem; }
.trend-up { color: var(--green); }
.trend-down { color: var(--red); }
.history-table { margin-top: .6rem; border-collapse: separate; border-spacing: 0 .45rem; border: 0; background: transparent; overflow: visible; }
.history-table thead th {
    font-size: .8rem; color: var(--gray); font-weight: 600; text-align: left;
    padding: .3rem .8rem; border: 0;
}
.sort-caret { font-size: .7rem; opacity: .6; }
.history-table tbody tr {
    background: #fff; box-shadow: 0 1px 4px rgba(15, 35, 55, .05);
    cursor: pointer; transition: box-shadow .15s ease;
}
.history-table tbody tr:hover { box-shadow: 0 3px 10px rgba(15, 35, 55, .12); }
.history-table tbody td {
    padding: .8rem; border: 0; font-size: .92rem; vertical-align: middle;
}
.history-table tbody td:first-child { border-radius: 10px 0 0 10px; }
.history-table tbody td:last-child { border-radius: 0 10px 10px 0; }
.history-test { display: flex; align-items: center; gap: .7rem; font-weight: 600; color: #16212b; }
.history-subject-icon {
    flex: none; display: flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: var(--blue-light); color: var(--blue);
}
.history-status {
    display: inline-flex; align-items: center; gap: .3rem;
    padding: .2rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 700;
}
.status-pass { background: #e2f5e9; color: var(--green); }
.status-fail { background: #fbe4e1; color: var(--red); }
.status-progress { background: #fdf3dd; color: #92600a; }
.history-score-pill {
    display: inline-block; min-width: 2.6rem; text-align: center;
    padding: .2rem .6rem; border-radius: 8px; font-weight: 800; font-size: .92rem;
}
.score-pass { background: #e2f5e9; color: var(--green); }
.score-fail { background: #fbe4e1; color: var(--red); }
.history-chevron { color: #9aa4ae; width: 2rem; }
.history-resume { font-weight: 700; }

/* ---------- exam (focus mode) ---------- */
.exam-page { background: #e9eef0; }
.layout-focus { display: block; }
.main.main-focus { margin: 0; padding: 0; max-width: none; }
.exam-shell {
    --exam-scale: 1;
    display: flex; flex-direction: column; min-height: 100vh;
}
.exam-bar {
    position: sticky; top: 0; z-index: 20;
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, 320px) minmax(0, auto);
    align-items: center; gap: 1rem;
    background: var(--blue); color: #fff; padding: .55rem 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 30, 40, .25);
}
.exam-bar-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.exam-bar-title strong { font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.exam-bar-title span { font-size: .8rem; color: #cfe0e4; }
.exam-bar-progress { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; text-align: center; color: #e6f0f2; }
.exam-progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.exam-progress-fill { height: 100%; width: 0; background: #7fd1a1; border-radius: 999px; transition: width .25s ease; }
.exam-bar-tools { display: flex; align-items: center; justify-content: flex-end; gap: .45rem; flex-wrap: wrap; }
.tool-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    border: 1px solid rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .08); color: #fff;
    border-radius: 8px; padding: .4rem .7rem; font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.tool-btn:hover { background: rgba(255, 255, 255, .18); }
.tool-btn.active { background: #fff; color: var(--blue); border-color: #fff; }
.tool-btn.is-locked { opacity: .55; }
.tool-btn-sq { padding: .4rem .55rem; min-width: 2.3rem; justify-content: center; }
.text-size { display: inline-flex; gap: .25rem; }
.timer {
    font: inherit; font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums;
    color: #fff; background: rgba(0, 0, 0, .2); border: 0; border-radius: 8px;
    padding: .35rem .75rem; min-width: 5.2rem; cursor: pointer;
}
.timer-low { background: var(--red); animation: timer-pulse 1s ease-in-out infinite alternate; }
@keyframes timer-pulse { to { background: #e05a4a; } }
.save-status { font-size: .78rem; font-weight: 600; padding: .25rem .65rem; border-radius: 999px; white-space: nowrap; }
.save-saved { color: #d6f5e2; background: rgba(30, 142, 78, .35); }
.save-saving { color: #fff3d6; background: rgba(224, 168, 0, .35); }
.save-offline, .save-auth { color: #fff; background: var(--red); }

.exam-body { flex: 1; display: flex; gap: 1rem; padding: 1rem 1.25rem; align-items: flex-start; }
.exam-main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .7rem; }
.part-note {
    background: #e2f5e9; color: #145c34; border: 1px solid #bfe3cc;
    border-radius: 8px; padding: .45rem .8rem; font-size: .85rem; font-weight: 600;
}
.part-note.part-1 { background: #fdf3dd; color: #7a4f05; border-color: #f0d9a6; }
.exam-split { display: flex; gap: 1rem; align-items: stretch; }
.stimulus-pane, .question-pane {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: 1.3rem 1.4rem; min-width: 0;
    font-size: calc(1rem * var(--exam-scale)); line-height: 1.6;
    max-height: calc(100vh - 205px); overflow-y: auto;
}
.stimulus-pane { flex: 1.1; }
.question-pane { flex: 1; }
.exam-split.no-stimulus .question-pane { max-width: 860px; margin: 0 auto; width: 100%; }
.stimulus-text p { margin: 0 0 .9em; }
.stimulus-text p:last-child { margin-bottom: 0; }

.rt-table-wrap { overflow-x: auto; margin: .3em 0 1em; }
.rt-table { border-collapse: collapse; font-size: .95em; min-width: 50%; }
.rt-table th, .rt-table td { border: 1px solid #cfd6da; padding: .35em .75em; text-align: left; vertical-align: top; }
.rt-table th { background: var(--blue-light); color: var(--blue-dark); font-weight: 700; }
.rt-table tbody tr:nth-child(even) td { background: #f8fafb; }

.q-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .4rem; }
.q-num { font-size: .78em; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gray); }
.q-flag { font-size: .75em; font-weight: 700; color: #92600a; background: #fdf3dd; border-radius: 999px; padding: .1rem .55rem; }
.q-text { font-size: 1.05em; margin: .2rem 0 1rem; }
.q-text p { margin: 0 0 .7em; }
.q-text p:last-child { margin-bottom: 0; }
.q-inline { line-height: 2.1; }
.q-hint { margin: 1rem 0 0; font-size: .82em; color: var(--gray); }

.q-options { display: flex; flex-direction: column; gap: .55rem; }
.opt-row { display: flex; align-items: stretch; gap: .4rem; }
.opt {
    position: relative; flex: 1; display: flex; align-items: flex-start; gap: .7rem;
    border: 1.5px solid var(--border); border-radius: 10px; padding: .65rem .8rem;
    cursor: pointer; background: #fff; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: #9fb9bf; background: #f6fafb; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt-letter {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    width: 1.75em; height: 1.75em; border-radius: 50%;
    border: 1.5px solid #9aa7ad; color: #4b5563; font-weight: 700; font-size: .9em;
}
.opt-label { padding-top: .1em; }
.opt-row.selected .opt { border-color: var(--blue); background: #eaf3f5; box-shadow: 0 0 0 1px var(--blue) inset; }
.opt-row.selected .opt-letter { background: var(--blue); border-color: var(--blue); color: #fff; }
.opt input:focus-visible + .opt-letter { outline: 3px solid #7fb6c2; outline-offset: 2px; }
.opt-row.eliminated .opt-label { text-decoration: line-through; color: #9aa4ae; }
.opt-row.eliminated .opt-letter { opacity: .45; }
.opt-strike {
    flex: none; width: 2.3rem; border: 1px solid transparent; background: transparent; color: #9aa4ae;
    border-radius: 8px; cursor: pointer;
}
.opt-strike:hover { background: #f1f3f5; color: #4b5563; border-color: var(--border); }
.opt-row.eliminated .opt-strike { color: var(--red); }
.strike-icon { text-decoration: line-through; text-decoration-thickness: 2px; font-size: .78rem; font-weight: 700; }

.q-select, .inline-select {
    font: inherit; font-size: .95em; padding: .35em .6em; border: 1.5px solid var(--blue);
    border-radius: 8px; background: #fff; color: #1f2937; max-width: 100%;
}
.q-select { min-width: 240px; }
.inline-select { margin: 0 .25em; }
.mirror-select { display: flex; align-items: center; gap: .6rem; }
.blank-active .inline-select { box-shadow: 0 0 0 3px #ffe08a; }
.blank-num {
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    min-width: 1.4em; height: 1.4em; padding: 0 .3em; border-radius: 6px;
    background: var(--blue); color: #fff; font-size: .75em; font-weight: 700;
}
.blank-chip {
    display: inline-flex; align-items: center; gap: .35em; vertical-align: baseline;
    font: inherit; font-size: .92em; padding: .05em .5em .05em .2em; margin: 0 .15em;
    border: 1.5px dashed #9fb3b9; border-radius: 7px; background: #f4f8f9; color: #6b7a80; cursor: pointer;
}
.blank-chip.filled { border-style: solid; color: #1f2937; background: #eaf3f5; }
.blank-chip:hover { border-color: var(--blue); }

.fill-wrap { max-width: 440px; }
.q-fill {
    width: 100%; font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 1.15em; text-align: center; padding: .7em .9em;
    border: 2px solid var(--blue); border-radius: 10px; background: #fff;
}
.q-fill:focus { outline: 3px solid #b9dbe2; }
.math-keypad { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .6rem; }
.keypad-btn {
    min-width: 44px; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: 8px;
    background: #fff; color: var(--blue-dark); font-size: 1.05rem; cursor: pointer;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
}
.keypad-btn:hover { background: var(--blue-light); border-color: var(--blue); }

.dd { display: flex; flex-direction: column; gap: .9rem; }
.dd-pool {
    display: flex; flex-wrap: wrap; gap: .5rem; min-height: 3.2rem; align-items: center;
    padding: .7rem; border: 2px dashed #c5d0d4; border-radius: 10px; background: #f7f9fa;
}
.dd-empty, .dd-placeholder { color: #9aa4ae; font-size: .85em; }
.dd-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .7rem; }
.dd-target {
    border: 1.5px solid var(--border); border-radius: 10px; background: #fff; overflow: hidden;
    display: flex; flex-direction: column; cursor: default;
}
.dd-target-label { background: var(--blue-light); color: var(--blue-dark); font-weight: 700; font-size: .9em; padding: .45rem .7rem; }
.dd-drop { flex: 1; min-height: 3.4rem; padding: .55rem; display: flex; flex-wrap: wrap; gap: .45rem; align-content: flex-start; }
.dd-tile {
    font: inherit; font-size: .92em; padding: .4em .75em; border-radius: 8px; cursor: grab;
    border: 1.5px solid #8fb0b8; background: #fff; color: #1f2937; box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.dd-tile:hover { border-color: var(--blue); }
.dd-tile.selected { background: #fff7d6; border-color: #e0a800; box-shadow: 0 0 0 2px #ffe08a; }
.dd-tile.dragging { opacity: .5; }
.dd.has-selection .dd-target, .dd.has-selection .dd-pool { cursor: pointer; }
.dd.has-selection .dd-target:hover, .dd-target.over, .dd-pool.over { border-color: var(--blue); box-shadow: 0 0 0 2px #b9dbe2; }

.exam-nav-col {
    width: 220px; flex-shrink: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px;
    padding: .9rem; position: sticky; top: 72px; max-height: calc(100vh - 160px); overflow-y: auto;
}
.exam-nav-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.exam-nav-head h3 { font-size: .95rem; margin: 0; }
.qnav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .3rem; }
.qnav-cell {
    position: relative; border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: .32rem 0;
    cursor: pointer; font-size: .82rem; font-family: inherit; color: #374151;
}
.qnav-cell:hover { border-color: var(--blue); }
.qnav-cell.answered { background: var(--blue); color: #fff; border-color: var(--blue); }
.qnav-cell.flagged::after {
    content: ''; position: absolute; top: -3px; right: -3px; width: 9px; height: 9px;
    border-radius: 50%; background: #e0a800; border: 1.5px solid #fff;
}
.qnav-cell.current { outline: 2px solid #e0a800; outline-offset: 1px; }
.legend { margin-top: .8rem; display: flex; flex-direction: column; gap: .25rem; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: .2rem; }
.dot-answered { background: var(--blue); }
.dot-flagged { background: #e0a800; border-radius: 50%; }
.dot-empty { background: #fff; border: 1px solid #b8c0c6; }

.exam-footer {
    position: sticky; bottom: 0; z-index: 15;
    display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
    background: #fff; border-top: 1px solid var(--border); padding: .65rem 1.25rem;
    box-shadow: 0 -2px 8px rgba(0, 30, 40, .06);
}
.exam-footer-spacer { flex: 1; }
.exam-footer .btn { display: inline-flex; align-items: center; gap: .4rem; font-weight: 600; }
.btn-ghost { border-color: transparent; color: var(--gray); background: transparent; }
.btn-ghost:hover { background: #f1f3f5; color: #1f2937; }
.btn-flag.flagged { background: #fff3cd; border-color: #e0b84c; color: #7a4f05; }

.toast {
    position: fixed; top: 72px; left: 50%; transform: translateX(-50%); z-index: 90;
    background: #1f2937; color: #fff; padding: .7rem 1.1rem; border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: .92rem; max-width: min(92vw, 520px); text-align: center;
}

/* floating tool panels: calculator and formula sheet */
.tool-panel {
    position: fixed; z-index: 60; right: 24px; top: 84px;
    background: #fff; border: 1px solid #b8c4c8; border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 30, 40, .28); display: flex; flex-direction: column;
}
.tool-panel[hidden] { display: none; }
.tool-panel.dragging { opacity: .92; user-select: none; }
.tool-panel-head {
    display: flex; align-items: center; gap: .5rem; padding: .5rem .5rem .5rem .9rem;
    background: var(--blue); color: #fff; border-radius: 11px 11px 0 0; cursor: move; user-select: none;
}
.tool-panel-head strong { font-size: .9rem; }
.tool-panel-head .modal-close { margin-left: auto; color: #fff; }
.tool-panel-body { padding: .8rem 1rem 1rem; overflow-y: auto; }
.formula-sheet { width: 380px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); }
.formula-sheet h4 { margin: .9rem 0 .35rem; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); }
.formula-sheet h4:first-child { margin-top: 0; }
.formula-sheet dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: .25rem .8rem; margin: 0; font-size: .9rem; }
.formula-sheet dt { color: var(--gray); }
.formula-sheet dd { margin: 0; font-family: "Cambria Math", "STIX Two Math", Georgia, serif; font-size: 1rem; }

.calc-panel { width: 300px; background: #2c3138; border-color: #1b1f24; outline: none; }
.calc-panel .tool-panel-head { background: #1b1f24; }
.calc-model { font-size: .7rem; color: #9aa4ae; }
.calc-screen {
    position: relative; margin: .7rem .7rem .4rem; border-radius: 6px; background: #d8e2d0;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, .25); color: #1c2418;
    font-family: "SFMono-Regular", Consolas, Menlo, monospace; font-size: .95rem;
    height: 150px; display: flex; flex-direction: column; padding: .35rem .5rem;
}
.calc-mode { position: absolute; top: .2rem; right: .45rem; font-size: .62rem; letter-spacing: .08em; opacity: .7; }
.calc-hist { flex: 1; overflow-y: auto; padding-top: .7rem; }
.calc-line { border-bottom: 1px dotted rgba(28, 36, 24, .25); padding: .1rem 0; }
.calc-expr { word-break: break-all; }
.calc-res {
    display: block; width: 100%; text-align: right; font: inherit; font-weight: 700;
    background: none; border: 0; padding: 0; color: inherit; cursor: pointer;
}
.calc-res:hover { text-decoration: underline; }
.calc-err { color: #8b1d12; }
.calc-entry { min-height: 1.5rem; word-break: break-all; border-top: 1px solid rgba(28, 36, 24, .35); padding-top: .2rem; }
.calc-caret { display: inline-block; width: 2px; height: 1em; background: #1c2418; vertical-align: -2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.calc-disabled { margin: 0 .7rem .4rem; padding: .4rem .6rem; border-radius: 6px; background: #f8d7a5; color: #5c3a02; font-size: .8rem; }
.calc-keys { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; padding: .3rem .7rem .8rem; }
.calc-key {
    font: inherit; font-size: .82rem; font-weight: 600; padding: .5rem 0; border-radius: 7px; cursor: pointer;
    border: 0; background: #4a525c; color: #fff; box-shadow: 0 2px 0 #1b1f24;
}
.calc-key:hover { filter: brightness(1.15); }
.calc-key:active { transform: translateY(1px); box-shadow: 0 1px 0 #1b1f24; }
.calc-num { background: #e8ebee; color: #1f2937; font-size: .95rem; }
.calc-op { background: #6a7682; }
.calc-edit { background: #8a4b3c; }
.calc-enter { grid-column: span 2; background: #2f7a59; }
.calc-panel.is-disabled .calc-keys { opacity: .4; pointer-events: none; }

.review-summary { margin: .2rem 0 .8rem; }
.review-filters { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.review-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .45rem;
    max-height: 50vh; overflow-y: auto; padding: 2px;
}
.review-cell {
    display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left;
    border: 1px solid var(--border); border-left: 4px solid #c0c7cc; border-radius: 8px;
    background: #fff; padding: .45rem .6rem; cursor: pointer; font-family: inherit;
}
.review-cell:hover { background: #f6fafb; }
.review-cell.answered { border-left-color: var(--blue); }
.review-cell.flagged { border-left-color: #e0a800; background: #fffbea; }
.review-num { font-weight: 800; color: #16212b; }
.review-state { font-size: .75rem; color: var(--gray); }
.review-cell:not(.answered) .review-state { color: var(--red); }

/* ---------- modal ---------- */
.modal-backdrop {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 80;
    align-items: center; justify-content: center; padding: 1rem;
}
.modal-backdrop.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 1.5rem; max-width: 440px; width: 100%; max-height: 92vh; overflow-y: auto; }
.modal-wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.modal-head h3 { margin: 0; }
.modal-close { border: 0; background: transparent; font-size: 1.5rem; line-height: 1; cursor: pointer; color: var(--gray); padding: .1rem .4rem; border-radius: 6px; }
.modal-close:hover { background: rgba(0, 0, 0, .08); }
.modal-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.modal dl.test-facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: .8rem 0; font-size: .92rem; }
.modal dl.test-facts dt { color: var(--gray); }
.modal dl.test-facts dd { margin: 0; font-weight: 600; }

@media (max-width: 1100px) {
    .exam-bar { grid-template-columns: 1fr auto; }
    .exam-bar-progress { grid-column: 1 / -1; grid-row: 2; }
    .tool-btn span { display: none; }
}
@media (max-width: 900px) {
    .exam-body { flex-direction: column; padding: .8rem; }
    .exam-split { flex-direction: column; }
    .stimulus-pane, .question-pane { max-height: none; }
    .exam-nav-col { width: 100%; position: static; max-height: none; }
    .qnav-grid { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
    .legend { flex-direction: row; flex-wrap: wrap; gap: .8rem; }
    .exam-footer { padding: .55rem .8rem; }
    .exam-footer .btn { padding: .45rem .7rem; }
    .text-size { display: none; }
}
@media (max-width: 560px) {
    .exam-bar { padding: .5rem .8rem; gap: .5rem; }
    .save-status { display: none; }
    .btn-flag span, .lbl-long { display: none; }
    .exam-footer { flex-wrap: nowrap; gap: .4rem; }
    .exam-footer-spacer { display: none; }
    .exam-footer .btn { padding: .5rem .65rem; }
    #btn-next { margin-left: auto; }
    .calc-panel { right: 8px; left: 8px !important; width: auto; top: auto !important; bottom: 70px; }
    .formula-sheet { right: 8px; left: 8px !important; width: auto; }
}

/* ---------- home portal (GED "My Scores") ---------- */
.hero {
    background: var(--blue); color: #fff;
    margin: -1.5rem -2rem 2rem; padding: 2.5rem 2rem 2rem;
}
.hero h1 { color: #fff; font-size: 2rem; margin: 0 0 .3rem; }
.hero-sub { color: #cfe0e4; margin: 0 0 1rem; font-size: 1.05rem; }
.hero-stats { font-size: .92rem; color: #cfe0e4; }
.hero-stats strong { color: #fff; }
.hero-dot { margin: 0 .5rem; }

.highest-scores h2, .recent h2 { font-size: 1.35rem; }
.highest-scores > .muted { margin-top: -.2rem; }

.score-cards {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.1rem; margin: 1.2rem 0 1.4rem;
}
.score-card {
    background: var(--pastel, #eef2f6); border-radius: 12px; overflow: hidden;
    border: 1px solid var(--border);
    display: flex; flex-direction: column;
}
.score-card-head {
    background: var(--blue); color: #fff; padding: .8rem 1rem;
    display: flex; align-items: center; gap: .6rem;
}
.score-card-head .medal { color: #f2c94c; flex-shrink: 0; }
.score-card-kicker { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: #cfe0e4; }
.score-card-name { font-weight: 700; font-size: 1.02rem; line-height: 1.2; }
.score-card-body { padding: 1.3rem 1rem 1.1rem; text-align: center; flex: 1; display: flex; flex-direction: column; align-items: center; }
.score-circle {
    width: 96px; height: 96px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.9rem; font-weight: 800; color: var(--blue-dark);
    box-shadow: 0 1px 4px rgba(0,0,0,.10); margin-bottom: .8rem;
}
.score-status { font-size: .92rem; color: #4b5563; margin-bottom: .6rem; }
.score-status.passed { color: var(--green); font-weight: 700; }
.score-report { font-size: .88rem; font-weight: 600; margin-top: auto; }

.cta-empty { text-align: center; margin: .4rem 0 1rem; }
.continue h2 { font-size: 1.35rem; }
.continue-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; margin-bottom: 1.6rem; }
.continue-card {
    display: flex; flex-direction: column; gap: .2rem; background: #fff; border: 1px solid var(--border);
    border-left: 4px solid #e0a800; border-radius: 10px; padding: .9rem 1rem; color: inherit;
    box-shadow: 0 1px 6px rgba(15, 35, 55, .06);
}
.continue-card:hover { text-decoration: none; box-shadow: 0 3px 12px rgba(15, 35, 55, .12); }
.continue-title { font-weight: 700; color: #16212b; }
.continue-go { font-weight: 700; color: var(--blue); margin-top: .3rem; }
.center { text-align: center; margin: .6rem 0 2rem; }
.btn-outline-teal {
    background: transparent; border: 2px solid var(--blue); color: var(--blue);
    border-radius: 999px; padding: .55rem 1.6rem; font-weight: 700;
}
.btn-outline-teal:hover { background: var(--blue); color: #fff; text-decoration: none; }

@media (max-width: 1100px) { .score-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) {
    .hero { margin: -3.2rem -1rem 1.5rem; padding: 4rem 1rem 1.6rem; }
    .score-cards { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.show { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 25; }
    #sidebar-toggle { display: block; }
    .main { margin-left: 0; max-width: 100%; padding: 3.2rem 1rem 1.5rem; }
    .topbar { margin: 0 -1rem 1.2rem; padding: .6rem 1rem; }
    .exam-body { flex-direction: column; }
    .exam-nav-col { width: 100%; }
    .qnav-grid { grid-template-columns: repeat(auto-fill, minmax(44px, 1fr)); }
    .exam-split { flex-direction: column; }
    .stimulus-pane { max-height: none; }
    .table { display: block; overflow-x: auto; }
}
