:root {
    --page: #eef3f8;
    --sidebar: #ffffff;
    --surface: #ffffff;
    --surface-soft: #f4f8fc;
    --surface-muted: #eaf0f6;
    --text: #06162d;
    --muted: #41546d;
    --soft-text: #7b8da4;
    --border: #dbe4ef;
    --accent: #7d3cff;
    --accent-strong: #6f2cff;
    --accent-soft: #f0e2ff;
    --accent-pale: #f7efff;
    --success: #00a878;
    --success-soft: #e6fbf2;
    --danger: #ef4444;
    --danger-soft: #ffe8e8;
    --warning-soft: #fff7d7;
    --radius: 12px;
    --radius-lg: 18px;
    --shadow-soft: 0 18px 42px rgba(18, 32, 55, 0.08);
    --shadow-card: 0 24px 50px rgba(78, 49, 118, 0.11);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Manrope', sans-serif;
    color: var(--text);
    background: var(--page);
}

button,
input,
select {
    font: inherit;
}

button,
a,
summary {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: currentColor;
}

h1,
h2,
h3,
p {
    overflow-wrap: anywhere;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: var(--page);
}

.auth-card,
.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.auth-card {
    width: min(420px, 100%);
    padding: 32px;
}

.brand {
    margin: 0 0 8px;
    color: var(--accent);
    font-weight: 800;
}

.auth-card h1 {
    margin: 0 0 10px;
    font-size: 34px;
    line-height: 1.08;
}

.muted {
    color: var(--muted);
}

.form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.form label {
    display: grid;
    gap: 8px;
    color: var(--text);
    font-weight: 800;
}

.form input,
.form select,
.inline-form input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    padding: 12px 14px;
}

.form button,
.admin-form button {
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    padding: 12px 16px;
    font-weight: 900;
}

.form-message,
.success-message {
    min-height: 20px;
    margin: 0;
}

.form-message {
    color: var(--danger);
}

.success-message {
    color: var(--success);
}

.student-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    background: var(--page);
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: var(--sidebar);
}

.brand-lockup {
    height: 80px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    box-shadow: 0 8px 24px rgba(18, 32, 55, 0.06);
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--accent-pale);
    color: var(--accent);
}

.brand-mark svg {
    width: 26px;
    height: 26px;
}

.brand-lockup strong {
    display: block;
    font-size: 20px;
    line-height: 1;
}

.brand-lockup small {
    display: block;
    margin-top: 2px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
}

.side-nav {
    display: grid;
    gap: 10px;
    padding: 46px 16px 16px;
}

.side-link,
.theme-toggle {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 14px;
    border-radius: 14px;
    color: #273a55;
    padding: 0 18px;
    font-size: 15px;
    font-weight: 800;
}

.side-link span,
.theme-toggle span {
    color: #314760;
}

.side-link.is-active {
    background: var(--accent-soft);
    color: var(--accent);
}

.side-link.is-active span {
    color: var(--accent);
}

.side-spacer {
    flex: 1;
}

.theme-toggle {
    width: calc(100% - 32px);
    margin: 0 16px 26px;
    background: transparent;
    text-align: left;
}

.sidebar-user {
    min-height: 92px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 36px;
    align-items: center;
    gap: 12px;
    border-top: 1px solid var(--border);
    padding: 24px 16px 30px;
}

.user-avatar {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-pale);
    color: var(--accent);
}

.sidebar-user > span:nth-child(2) {
    min-width: 0;
}

.sidebar-user small {
    display: block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 900;
}

.sidebar-user strong {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.logout-button {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    color: #27415d;
}

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

.student-main {
    min-width: 0;
    padding: 42px 7vw 64px;
}

.page-header,
.test-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
}

.page-header {
    width: min(1100px, 100%);
    margin: 0 auto 42px;
}

.page-header h1,
.test-topbar h1 {
    margin: 0;
    color: #001432;
    line-height: 1.08;
}

.page-header h1 {
    font-size: 34px;
}

.page-header p,
.test-topbar p {
    margin: 12px 0 0;
    color: #263b56;
    font-size: 16px;
    font-weight: 500;
}

.soft-danger-button,
.primary-action,
.ghost-button,
.square-button,
.mini-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 900;
}

.soft-danger-button {
    border: 1px solid #f5bec4;
    background: #fff0f2;
    color: #ff303d;
}

.soft-danger-button:hover {
    background: #ffe5e9;
}

.primary-action {
    background: var(--accent);
    color: #fff;
}

.primary-action:hover {
    background: var(--accent-strong);
}

.ghost-button {
    border: 1px solid var(--border);
    background: var(--surface-soft);
    color: #2d435e;
}

.ghost-button:hover {
    border-color: #c8d4e1;
    background: #e9f0f7;
}

.inline-status {
    width: min(1100px, 100%);
    margin: -20px auto 24px;
    border: 1px solid #c9b6ff;
    border-radius: var(--radius);
    background: #f8f2ff;
    color: var(--accent);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 800;
}

.course-accordion {
    width: min(1100px, 100%);
    display: grid;
    gap: 16px;
    margin: 0 auto;
}

.unit-card {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
}

.unit-summary {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--border);
    padding: 0 18px;
}

.unit-card summary {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 16px;
    padding: 0 18px;
    cursor: pointer;
    list-style: none;
}

.unit-card summary::-webkit-details-marker {
    display: none;
}

.unit-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 900;
}

.unit-icon {
    color: var(--accent);
}

.unit-meta {
    color: var(--soft-text);
    font-size: 13px;
    font-weight: 800;
}

.chevron {
    color: #324a65;
}

.day-accordion[open] > summary .chevron {
    transform: rotate(180deg);
}

.unit-body {
    display: grid;
    gap: 16px;
    padding: 18px;
}

.day-accordion-list {
    gap: 12px;
}

.day-accordion {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fbfdff;
}

.day-accordion summary {
    min-height: 70px;
    background: #fff;
}

.day-accordion summary span:first-child {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.day-accordion summary strong {
    font-size: 17px;
}

.day-accordion summary small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.day-accordion .test-list {
    border-top: 1px solid var(--border);
    padding: 14px;
}

.day-group {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fbfdff;
    padding: 16px;
}

.day-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 12px;
}

.day-heading h2 {
    margin: 0;
    font-size: 18px;
}

.day-heading p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.day-heading > span,
.test-count {
    white-space: nowrap;
    border-radius: 999px;
    background: var(--surface-muted);
    color: #334a63;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.test-list {
    display: grid;
    gap: 10px;
}

.test-row {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    padding: 12px 14px;
    text-align: left;
}

.test-row:hover {
    border-color: #cbb6ff;
    background: #fbf8ff;
}

.test-row span:first-child {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.test-row strong {
    font-size: 15px;
}

.test-row small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.loading-state {
    width: min(1100px, 100%);
    margin: 0 auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    padding: 18px;
    color: var(--muted);
    font-weight: 800;
}

.test-topbar {
    min-height: 98px;
    align-items: center;
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    background: var(--surface);
    margin: -42px -7vw 56px;
    padding: 26px 7vw;
}

.test-topbar > div:nth-child(2) {
    min-width: 0;
    flex: 1;
}

.test-topbar p {
    margin: 0 0 5px;
    color: #1f334f;
    font-size: 12px;
    font-weight: 900;
}

.test-topbar h1 {
    font-size: 22px;
}

.square-button,
.mini-square {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: #001432;
    padding: 0;
}

.square-button {
    width: 42px;
    height: 42px;
}

.square-button:hover,
.mini-square:hover {
    border-color: #c7d2df;
    background: #e1eaf3;
}

.test-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-pill {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 900;
}

.stat-pill svg {
    width: 16px;
    height: 16px;
}

.stat-pill.is-purple {
    background: var(--accent-soft);
    color: var(--accent);
}

.stat-pill.is-green {
    background: var(--success-soft);
    color: var(--success);
}

.test-workspace {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 178px;
    gap: 20px;
    align-items: start;
    margin: 0 auto;
}

.question-card {
    min-width: 0;
    border: 1px solid #eadfff;
    border-radius: 22px;
    background: var(--surface);
    box-shadow: var(--shadow-card);
    padding: 28px;
}

.question-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #071833;
    font-size: 13px;
}

.question-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    padding: 8px 13px;
    font-weight: 900;
}

.question-badge svg {
    width: 15px;
    height: 15px;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eadbff;
    margin: 18px 0 26px;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--accent);
}

.question-copy {
    margin-bottom: 24px;
}

.topic-label {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 900;
}

.question-copy h2 {
    margin: 0;
    color: #001432;
    font-size: 18px;
    line-height: 1.7;
}

.question-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.hint-box {
    border: 1px solid #efd36f;
    border-radius: var(--radius);
    background: var(--warning-soft);
    color: #5f4300;
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 800;
}

.option-list {
    display: grid;
    gap: 12px;
}

.option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 50px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface-muted);
}

.option-row.is-eliminated {
    opacity: 0.62;
}

.option-row.is-eliminated .option-main span:last-child {
    text-decoration: line-through;
}

.option-row.is-correct {
    border-color: #77d9b4;
    background: var(--success-soft);
}

.option-row.is-wrong {
    border-color: #ff9696;
    background: var(--danger-soft);
}

.option-main {
    min-height: 62px;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    width: 100%;
    background: transparent;
    color: #06162d;
    padding: 0 14px;
    text-align: left;
    font-size: 15px;
    font-weight: 800;
}

.option-main:hover {
    background: rgba(255, 255, 255, 0.5);
}

.option-main:disabled {
    opacity: 1;
}

.option-key {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #f8fbff;
    color: #29415d;
    font-size: 13px;
    font-weight: 900;
}

.option-row.is-correct .option-key {
    border-color: #53c99b;
    color: var(--success);
}

.option-row.is-wrong .option-key {
    border-color: #ff8888;
    color: var(--danger);
}

.option-tool {
    display: grid;
    place-items: center;
    border-left: 1px solid var(--border);
    background: transparent;
    color: #344b65;
    font-size: 18px;
    font-weight: 900;
}

.option-tool svg {
    width: 18px;
    height: 18px;
}

.option-tool:hover,
.option-tool.is-active {
    color: var(--danger);
}

.option-feedback {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 13px 16px;
    color: #001432;
    font-size: 14px;
    line-height: 1.45;
}

.option-feedback strong {
    color: inherit;
    white-space: nowrap;
}

.option-feedback.is-correct {
    color: #06764f;
}

.option-feedback.is-wrong {
    color: #be1f1f;
}

.feedback-box {
    margin-top: 18px;
    border-radius: var(--radius);
    padding: 14px;
    font-size: 14px;
    line-height: 1.5;
}

.feedback-box p {
    margin: 6px 0 0;
}

.feedback-box.is-correct {
    border: 1px solid #77d9b4;
    background: var(--success-soft);
    color: #056243;
}

.feedback-box.is-wrong {
    border: 1px solid #ff9696;
    background: var(--danger-soft);
    color: #a21c1c;
}

.question-nav-panel {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    padding: 16px 14px;
}

.nav-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.nav-panel-head > span {
    display: flex;
    gap: 8px;
}

.question-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.question-dot {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-muted);
    color: #24405e;
    font-size: 14px;
    font-weight: 900;
}

.question-dot:hover,
.question-dot.is-current {
    border-color: var(--accent);
    background: var(--accent-pale);
    color: var(--accent);
}

.question-dot.is-answered {
    border-color: #77d9b4;
    background: var(--success-soft);
    color: var(--success);
}

.question-dot.is-wrong {
    border-color: #ff9696;
    background: var(--danger-soft);
    color: var(--danger);
}

.result-card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 20px;
    margin: 0 auto;
}

.result-score,
.result-list {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.result-score {
    display: grid;
    place-items: center;
    align-content: center;
    min-height: 220px;
    padding: 22px;
    text-align: center;
}

.result-score span {
    color: var(--accent);
    font-size: 44px;
    font-weight: 900;
}

.result-score p {
    margin: 10px 0 6px;
    font-weight: 900;
}

.result-score small {
    color: var(--muted);
    line-height: 1.4;
}

.result-list {
    display: grid;
    gap: 10px;
    padding: 16px;
}

.result-row {
    border-left: 4px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-soft);
    padding: 12px 14px;
}

.result-row.is-correct {
    border-left-color: var(--success);
}

.result-row.is-wrong {
    border-left-color: var(--danger);
}

.result-row span {
    margin-left: 8px;
    color: var(--muted);
    font-weight: 900;
}

.result-row p {
    margin: 7px 0 0;
}

.app-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 40px 0;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.topbar h1,
.panel h2 {
    margin: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.secondary-link,
.user-chip,
.pill,
.role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #fff;
    color: var(--text);
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 800;
}

.panel {
    padding: 22px;
    margin-top: 24px;
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.admin-list-panel {
    min-width: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    border-top: 1px solid var(--border);
    padding: 12px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 13px;
}

.inline-form {
    display: grid;
    grid-template-columns: minmax(150px, 1fr) auto;
    gap: 8px;
}

.small-button {
    border-radius: var(--radius);
    background: var(--accent);
    color: #fff;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 900;
}

.danger-button {
    background: var(--danger);
}

@media (max-width: 1100px) {
    .student-main {
        padding-left: 36px;
        padding-right: 36px;
    }

    .test-topbar {
        margin-left: -36px;
        margin-right: -36px;
        padding-left: 36px;
        padding-right: 36px;
    }

    .test-workspace {
        grid-template-columns: 1fr;
    }

    .question-nav-panel {
        order: -1;
    }

    .question-dots {
        grid-template-columns: repeat(8, 34px);
    }
}

@media (max-width: 840px) {
    .student-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .brand-lockup {
        height: 70px;
    }

    .side-nav {
        grid-template-columns: 1fr;
        padding: 14px 14px 8px;
    }

    .side-link {
        min-height: 44px;
        justify-content: center;
        padding: 0 10px;
        font-size: 13px;
    }

    .side-link span {
        display: none;
    }

    .side-spacer,
    .theme-toggle {
        display: none;
    }

    .sidebar-user {
        min-height: auto;
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        padding: 12px 16px;
    }

    .student-main {
        padding: 28px 16px 48px;
    }

    .page-header,
    .test-topbar {
        display: grid;
    }

    .test-topbar {
        margin: -28px -16px 28px;
        padding: 18px 16px;
    }

    .result-card,
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .page-header h1 {
        font-size: 28px;
    }

    .page-header,
    .course-accordion {
        margin-left: 0;
        margin-right: 0;
    }

    .soft-danger-button {
        width: 100%;
    }

    .unit-card summary,
    .day-heading,
    .test-row {
        display: grid;
        justify-items: start;
    }

    .unit-card summary {
        grid-template-columns: 1fr auto;
    }

    .unit-meta {
        grid-column: 1 / -1;
    }

    .question-card {
        border-radius: var(--radius-lg);
        padding: 18px;
    }

    .question-actions,
    .test-stats {
        display: grid;
        justify-items: start;
    }

    .option-row {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .option-main {
        grid-template-columns: 38px minmax(0, 1fr);
        min-height: 58px;
        padding: 0 10px;
    }

    .option-feedback {
        grid-template-columns: 1fr;
    }

    .question-dots {
        grid-template-columns: repeat(5, 34px);
    }

    .inline-form {
        grid-template-columns: 1fr;
    }
}

/* Kolay Ogren Prime visual adaptation for the Lite question bank */
:root {
    --brand-purple: #7c3aed;
    --brand-purple-light: #f3e8ff;
    --brand-purple-dark: #6d28d9;
    --brand-accent: #f59e0b;
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-darker: #cbd5e1;
    --icon-emerald-bg: #ecfdf5;
    --icon-emerald-text: #059669;
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.03);
    --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
    --shadow-purple: 0 10px 20px -5px rgba(124, 58, 237, 0.25);

    --page: var(--bg-main);
    --sidebar: var(--bg-surface);
    --surface: var(--bg-surface);
    --surface-soft: var(--bg-main);
    --surface-muted: var(--bg-main);
    --text: var(--text-main);
    --muted: var(--text-muted);
    --soft-text: var(--text-light);
    --border: var(--border-color);
    --accent: var(--brand-purple);
    --accent-strong: var(--brand-purple-dark);
    --accent-soft: var(--brand-purple-light);
    --accent-pale: var(--brand-purple-light);
    --success: var(--icon-emerald-text);
    --success-soft: var(--icon-emerald-bg);
    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.08);
    --warning-soft: #fff7ed;
    --radius: 12px;
    --radius-lg: 16px;
    --shadow-soft: var(--shadow-sm);
    --shadow-card: var(--shadow-md);
}

body {
    overflow: hidden;
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0;
    background: var(--bg-main);
}

h1,
h2,
h3,
.brand-lockup strong {
    font-family: 'Manrope', sans-serif;
}

svg {
    flex: 0 0 auto;
}

.student-shell {
    min-height: 100vh;
    height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    overflow: hidden;
    background: var(--bg-main);
}

.sidebar {
    position: relative;
    top: auto;
    height: 100vh;
    border-right: 1px solid var(--border-color);
    background: var(--bg-surface);
    padding: 32px 0;
    overflow: hidden;
    white-space: nowrap;
}

.brand-lockup {
    height: auto;
    gap: 16px;
    padding: 0 22px;
    margin-bottom: 40px;
    box-shadow: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
    color: #fff;
    box-shadow: var(--shadow-purple);
}

.brand-mark svg {
    width: 24px;
    height: 24px;
}

.brand-lockup strong {
    color: var(--text-main);
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
}

.brand-lockup small {
    margin-top: 2px;
    color: var(--brand-purple);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.side-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 8px;
    min-height: 0;
    padding: 0 16px;
}

.side-link,
.theme-toggle {
    min-height: 52px;
    border-radius: 16px;
    gap: 14px;
    color: var(--text-muted);
    padding: 0 18px;
    font-size: 15px;
    font-weight: 800;
    transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.side-link span,
.theme-toggle span {
    width: 22px;
    color: var(--text-muted);
}

.side-link:hover,
.theme-toggle:hover {
    background: var(--bg-main);
    color: var(--text-main);
}

.side-link.is-active {
    background: var(--brand-purple-light);
    color: var(--brand-purple);
    box-shadow: inset 4px 0 0 var(--brand-purple);
}

.side-link.is-active span {
    color: var(--brand-purple);
}

.theme-toggle {
    width: calc(100% - 32px);
    margin: 0 16px 26px;
}

.sidebar-user {
    min-height: auto;
    grid-template-columns: 40px minmax(0, 1fr) 32px;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding: 20px 16px 0;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--brand-purple-light);
    color: var(--brand-purple);
}

.sidebar-user small {
    color: var(--brand-purple);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.sidebar-user strong {
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    font-size: 13px;
    font-weight: 900;
}

.logout-button {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-muted);
    transition: color 0.2s ease, background 0.2s ease;
}

.logout-button:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.student-main {
    min-width: 0;
    height: 100vh;
    overflow-y: auto;
    padding: 40px;
    background: var(--bg-main);
}

.student-main::-webkit-scrollbar {
    width: 6px;
}

.student-main::-webkit-scrollbar-track {
    background: transparent;
}

.student-main::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--border-darker);
}

.page-header,
.test-topbar {
    align-items: flex-start;
    gap: 16px;
}

.page-header {
    width: min(1100px, 100%);
    margin: 0 auto 20px;
}

.page-header h1 {
    margin: 0;
    color: var(--text-main);
    font-size: 32px;
    font-weight: 900;
    line-height: 1.15;
}

.page-header p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
}

.soft-danger-button {
    min-height: 42px;
    border: 1px solid rgba(239, 68, 68, 0.22);
    border-radius: 12px;
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 900;
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.soft-danger-button svg {
    width: 18px;
    height: 18px;
}

.soft-danger-button:hover,
.test-row:hover,
.square-button:hover,
.mini-square:hover,
.ghost-button:hover,
.primary-action:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.inline-status {
    width: min(1100px, 100%);
    margin: 0 auto 16px;
    border: 1px solid rgba(124, 58, 237, 0.22);
    border-radius: 12px;
    background: var(--brand-purple-light);
    color: var(--brand-purple);
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 800;
}

.course-accordion {
    width: min(1100px, 100%);
    gap: 8px;
    margin: 0 auto;
}

.question-bank-days {
    display: flex;
    flex-direction: column;
    border-left: 2px solid var(--border-color);
    padding-left: 16px;
}

.unit-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.unit-summary {
    min-height: auto;
    border-bottom: 0;
}

.question-tree-row {
    width: 100%;
    min-height: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text-main);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.question-tree-row:hover {
    border-color: rgba(124, 58, 237, 0.24);
    box-shadow: var(--shadow-sm);
}

.question-tree-course {
    padding: 16px;
}

.unit-title {
    min-width: 0;
    gap: 12px;
    color: var(--text-main);
    font-size: 15px;
    font-weight: 900;
}

.unit-title svg,
.unit-icon svg {
    width: 22px;
    height: 22px;
}

.unit-icon {
    color: var(--brand-purple);
}

.unit-meta,
.test-count {
    border: 0;
    border-radius: 999px;
    background: var(--bg-main);
    color: var(--text-muted);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
}

.unit-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-left: 42px;
    border-left: 2px solid var(--border-color);
    padding: 0 0 0 16px;
}

.day-accordion {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.day-accordion summary {
    min-height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    background: var(--bg-surface);
    padding: 16px;
}

.day-accordion summary strong {
    color: var(--text-main);
    font-size: 15px;
    font-weight: 900;
}

.day-accordion summary small {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
}

.chevron {
    color: var(--text-muted);
    transition: transform 0.25s ease;
}

.chevron svg {
    width: 22px;
    height: 22px;
}

.day-accordion .test-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
    margin-left: 42px;
    border-top: 0;
    border-left: 2px solid var(--border-color);
    padding: 0 0 0 16px;
}

.test-row {
    min-height: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-main);
    color: var(--text-main);
    padding: 12px 16px;
}

.test-row strong {
    color: var(--text-main);
    font-size: 14px;
    font-weight: 800;
}

.test-row small {
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
}

.test-row-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.test-row-meta .test-count {
    display: inline-flex;
    min-width: auto;
}

.test-progress-pill {
    border-radius: 999px;
    background: var(--brand-purple-light);
    color: var(--brand-purple);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.test-progress-pill.is-completed {
    background: var(--icon-emerald-bg);
    color: var(--icon-emerald-text);
}

.loading-state,
.form-message {
    width: min(420px, 100%);
    margin: auto;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    color: var(--text-muted);
    padding: 36px;
    text-align: center;
    font-weight: 800;
}

.test-topbar {
    min-height: auto;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-surface);
    margin: -40px -40px 32px;
    padding: 24px 40px;
}

.test-topbar p {
    margin: 0 0 4px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.test-topbar h1 {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.square-button,
.mini-square {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-main);
    color: var(--text-main);
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.square-button {
    width: 40px;
    height: 40px;
}

.mini-square {
    width: 32px;
    height: 32px;
    border-radius: 10px;
}

.mini-square svg,
.square-button svg {
    width: 18px;
    height: 18px;
}

.mini-square.is-done {
    border-color: transparent;
    background: var(--brand-purple);
    color: #fff;
    box-shadow: var(--shadow-purple);
}

.stat-pill {
    min-height: 32px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
}

.stat-pill svg {
    width: 16px;
    height: 16px;
}

.stat-pill.is-purple {
    background: var(--brand-purple-light);
    color: var(--brand-purple);
}

.stat-pill.is-green {
    background: var(--icon-emerald-bg);
    color: var(--icon-emerald-text);
}

.test-workspace {
    width: min(980px, 100%);
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 18px;
}

.question-card {
    min-width: 0;
    border: 1px solid rgba(124, 58, 237, 0.12);
    border-radius: 24px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-md);
    padding: 28px;
}

.question-card-head {
    margin-bottom: 16px;
    color: var(--text-main);
    font-size: 12px;
}

.question-badge {
    gap: 6px;
    border-radius: 999px;
    background: var(--brand-purple-light);
    color: var(--brand-purple);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 900;
}

.question-badge svg {
    width: 16px;
    height: 16px;
}

.progress-track {
    height: 7px;
    border-radius: 999px;
    background: var(--brand-purple-light);
    margin: 0 0 24px;
}

.progress-track span {
    background: var(--brand-purple);
    transition: width 0.25s ease;
}

.topic-label {
    margin: 0 0 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 800;
}

.question-copy {
    margin-bottom: 22px;
}

.question-copy h2 {
    color: var(--text-main);
    font-family: 'Manrope', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.65;
    letter-spacing: 0;
}

.question-actions {
    margin-bottom: 16px;
}

.ghost-button,
.primary-action {
    min-height: 42px;
    border-radius: 12px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 900;
    transition: box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.ghost-button {
    border: 1px solid var(--border-color);
    background: var(--bg-main);
    color: var(--text-main);
}

.primary-action {
    background: var(--brand-purple);
    color: #fff;
    box-shadow: var(--shadow-purple);
}

.hint-box {
    border: 1px solid rgba(245, 158, 11, 0.28);
    border-radius: 12px;
    background: #fff7ed;
    color: #92400e;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 700;
}

.option-list {
    gap: 12px;
}

.option-row {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--bg-main);
    opacity: 1;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.option-row:hover:not(.is-eliminated):not(.is-correct):not(.is-wrong) {
    box-shadow: var(--shadow-sm);
}

.option-row.is-selected {
    border-color: rgba(124, 58, 237, 0.42);
    background: var(--brand-purple-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.08);
}

.option-row.is-eliminated {
    opacity: 0.48;
}

.option-row.is-correct {
    border-color: rgba(5, 150, 105, 0.42);
    background: var(--icon-emerald-bg);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

.option-row.is-wrong {
    border-color: rgba(239, 68, 68, 0.42);
    background: rgba(239, 68, 68, 0.07);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.07);
}

.option-main {
    min-height: 60px;
    display: flex;
    grid-template-columns: none;
    align-items: center;
    gap: 12px;
    width: 100%;
    background: transparent;
    color: var(--text-main);
    padding: 14px 62px 14px 14px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.45;
}

.option-main:hover {
    background: transparent;
}

.option-key {
    width: 32px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 900;
}

.option-row.is-selected .option-key {
    border-color: rgba(124, 58, 237, 0.42);
    background: var(--bg-surface);
    color: var(--brand-purple);
}

.option-row.is-correct .option-key {
    border-color: rgba(5, 150, 105, 0.42);
    background: var(--bg-surface);
    color: #059669;
}

.option-row.is-wrong .option-key {
    border-color: rgba(239, 68, 68, 0.42);
    background: var(--bg-surface);
    color: #dc2626;
}

.option-tool {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 60px;
    border-left: 1px solid currentColor;
    background: transparent;
    color: var(--text-muted);
    opacity: 0.72;
}

.option-tool svg {
    width: 20px;
    height: 20px;
}

.option-tool:hover,
.option-tool.is-active {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    opacity: 1;
}

.option-row.is-correct .option-tool.is-active,
.option-row.is-correct .option-tool:hover {
    background: rgba(5, 150, 105, 0.08);
    color: #047857;
}

.option-row.is-wrong .option-tool.is-active,
.option-row.is-wrong .option-tool:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.option-tool:disabled {
    opacity: 0.5;
}

.option-feedback {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 9px;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
    padding: 13px 16px 14px;
    color: var(--text-main);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.5;
}

.option-feedback strong {
    width: 22px;
    height: 22px;
    overflow: hidden;
    position: relative;
    border-radius: 999px;
    color: transparent;
    white-space: nowrap;
}

.option-feedback strong::before {
    content: "i";
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    border-radius: 999px;
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.1);
    font-size: 13px;
    font-weight: 900;
}

.option-feedback.is-correct {
    border-color: rgba(5, 150, 105, 0.18);
    background: rgba(5, 150, 105, 0.055);
}

.option-feedback.is-correct strong::before {
    content: "\2713";
    background: rgba(5, 150, 105, 0.12);
    color: #047857;
}

.option-feedback.is-wrong {
    border-color: rgba(239, 68, 68, 0.16);
    background: rgba(239, 68, 68, 0.045);
}

.feedback-box {
    margin-top: 16px;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 700;
}

.test-complete-banner {
    margin-top: 16px;
    border-radius: 14px;
    background: var(--brand-purple-light);
    color: var(--brand-purple);
    padding: 14px 16px;
    font-weight: 900;
}

.question-nav-panel {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-surface);
    padding: 14px;
}

.nav-panel-head {
    margin-bottom: 12px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 900;
}

.question-dots {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.question-dot {
    position: relative;
    width: auto;
    aspect-ratio: 1 / 1;
    height: auto;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-main);
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 900;
}

.question-dot.is-current {
    border: 2px solid var(--brand-purple);
    background: var(--bg-main);
    color: var(--brand-purple);
    box-shadow: 0 0 0 3px var(--brand-purple-light);
}

.question-dot.is-answered {
    border-color: rgba(5, 150, 105, 0.45);
    background: var(--icon-emerald-bg);
    color: var(--icon-emerald-text);
}

.question-dot.is-wrong {
    border-color: rgba(239, 68, 68, 0.45);
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
}

.result-card {
    width: min(980px, 100%);
    gap: 20px;
}

.result-score,
.result-list {
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
}

.result-score span {
    color: var(--brand-purple);
}

.result-row {
    border-radius: 12px;
    background: var(--bg-main);
}

@media (max-width: 1100px) {
    .student-main {
        padding: 32px;
    }

    .test-topbar {
        margin: -32px -32px 28px;
        padding: 18px 32px;
    }

    .test-workspace {
        grid-template-columns: 1fr;
    }

    .question-nav-panel {
        order: 0;
    }

    .question-dots {
        grid-template-columns: repeat(8, minmax(34px, 1fr));
    }
}

@media (max-width: 840px) {
    body {
        overflow: auto;
    }

    .student-shell {
        height: auto;
        min-height: 100vh;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .sidebar {
        position: static;
        height: auto;
        padding: 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .brand-lockup {
        height: 70px;
        margin-bottom: 0;
    }

    .side-nav {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 8px 14px 10px;
    }

    .side-link {
        min-height: 44px;
        justify-content: center;
        border-radius: 12px;
        padding: 0 8px;
        font-size: 13px;
    }

    .side-link span {
        display: none;
    }

    .side-spacer,
    .theme-toggle {
        display: none;
    }

    .sidebar-user {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
        padding: 12px 16px;
    }

    .student-main {
        height: auto;
        overflow: visible;
        padding: 24px 16px 48px;
    }

    .page-header {
        display: grid;
    }

    .test-topbar {
        display: grid;
        margin: -24px -16px 24px;
        padding: 16px 20px;
    }

    .test-stats {
        flex-wrap: wrap;
    }
}

@media (max-width: 560px) {
    .page-header h1 {
        font-size: 22px;
    }

    .soft-danger-button {
        width: 100%;
    }

    .question-bank-days,
    .unit-body,
    .day-accordion .test-list {
        margin-left: 16px;
    }

    .day-accordion summary,
    .test-row,
    .question-tree-course {
        grid-template-columns: minmax(0, 1fr);
        display: grid;
        justify-items: start;
    }

    .unit-summary {
        align-items: flex-start;
    }

    .unit-meta,
    .test-count {
        white-space: normal;
    }

    .question-card {
        border-radius: 18px;
        padding: 18px;
    }

    .question-actions {
        display: grid;
        justify-items: stretch;
    }

    .question-dots {
        grid-template-columns: repeat(5, 1fr);
    }

    .option-main {
        padding: 13px 54px 13px 12px;
        font-size: 14px;
    }

    .option-tool {
        width: 44px;
    }
}

/* Mobile polish: compact app chrome and denser question bank tree */
@media (max-width: 840px) {
    body {
        overflow: auto;
        background: var(--bg-main);
    }

    .student-shell {
        display: block;
        min-height: 100vh;
        height: auto;
        padding-top: 64px;
        padding-bottom: 84px;
        overflow: visible;
    }

    .sidebar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 1000;
        height: 64px;
        display: flex;
        align-items: center;
        gap: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
        padding: 0 14px;
        overflow: visible;
    }

    .brand-lockup {
        flex: 1;
        min-width: 0;
        height: 64px;
        margin: 0;
        padding: 0;
        gap: 11px;
    }

    .brand-mark {
        width: 38px;
        height: 38px;
        border-radius: 13px;
    }

    .brand-mark svg {
        width: 20px;
        height: 20px;
    }

    .brand-lockup strong {
        font-size: 20px;
    }

    .brand-lockup small {
        font-size: 9px;
    }

    .side-nav {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 10px;
        z-index: 1001;
        display: grid;
        grid-template-columns: 1fr;
        border: 1px solid rgba(226, 232, 240, 0.9);
        border-radius: 20px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
        padding: 8px;
        backdrop-filter: blur(12px);
    }

    .side-link {
        min-height: 44px;
        justify-content: center;
        gap: 9px;
        border-radius: 14px;
        padding: 0 12px;
        font-size: 13px;
    }

    .side-link span {
        display: inline-grid;
        width: 20px;
        place-items: center;
    }

    .side-link svg {
        width: 19px;
        height: 19px;
    }

    .side-link.is-active {
        box-shadow: none;
    }

    .side-spacer,
    .theme-toggle {
        display: none;
    }

    .sidebar-user {
        display: grid;
        grid-template-columns: 36px 32px;
        gap: 8px;
        min-height: auto;
        border-top: 0;
        padding: 0;
    }

    .sidebar-user > span:nth-child(2) {
        display: none;
    }

    .user-avatar {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .logout-button {
        width: 32px;
        height: 36px;
    }

    .student-main {
        height: auto;
        overflow: visible;
        padding: 22px 16px 26px;
    }

    .page-header {
        display: flex;
        align-items: flex-start;
        margin-bottom: 16px;
    }

    .page-header h1 {
        font-size: 25px;
        line-height: 1.15;
    }

    .page-header p {
        margin-top: 6px;
        font-size: 14px;
        line-height: 1.45;
    }

    .soft-danger-button {
        min-height: 38px;
        flex: 0 0 auto;
        padding: 0 11px;
        font-size: 0;
    }

    .soft-danger-button svg {
        width: 18px;
        height: 18px;
    }

    .inline-status {
        margin-bottom: 12px;
        padding: 10px 12px;
        font-size: 12px;
    }

    .question-tree-course {
        display: flex;
        align-items: center;
        padding: 14px;
        border-radius: 14px;
    }

    .unit-title {
        font-size: 14px;
    }

    .unit-meta {
        margin-left: auto;
        white-space: nowrap;
    }

    .unit-body {
        gap: 8px;
        margin-top: 8px;
        margin-left: 14px;
        padding-left: 12px;
    }

    .day-accordion summary {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 10px;
        align-items: center;
        min-height: 0;
        padding: 14px;
        border-radius: 14px;
    }

    .day-accordion summary strong {
        font-size: 14px;
        line-height: 1.25;
    }

    .day-accordion summary small {
        font-size: 12px;
        line-height: 1.45;
    }

    .day-accordion .test-list {
        gap: 8px;
        margin-top: 8px;
        margin-left: 14px;
        padding-left: 12px;
    }

    .test-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        justify-items: stretch;
        gap: 12px;
        min-height: 58px;
        padding: 12px 14px;
        border-radius: 14px;
    }

    .test-row strong {
        font-size: 13px;
        line-height: 1.25;
    }

    .test-row small {
        font-size: 12px;
        line-height: 1.35;
    }

    .test-row-meta {
        justify-content: flex-end;
    }

    .test-count,
    .test-progress-pill {
        white-space: nowrap;
    }

    .chevron {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .test-topbar {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        margin: -22px -16px 20px;
        padding: 14px 16px;
    }

    .test-topbar .test-stats {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-start;
    }

    .test-topbar h1 {
        font-size: 17px;
    }

    .question-card {
        padding: 18px;
        border-radius: 18px;
    }

    .question-nav-panel {
        border-radius: 16px;
    }
}

@media (max-width: 430px) {
    .student-main {
        padding-left: 14px;
        padding-right: 14px;
    }

    .unit-meta {
        display: none;
    }

    .day-accordion summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .day-accordion summary .test-count {
        grid-column: 1;
        justify-self: start;
        margin-top: 2px;
    }

    .day-accordion summary .chevron {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .test-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .test-row-meta {
        justify-content: flex-start;
    }

    .question-dots {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Reference-style campaign day accordion */
.course-accordion.question-bank-days {
    width: min(1100px, 100%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-left: 2px solid #dbe5f0;
    margin: 0 auto;
    padding-left: 16px;
}

.question-bank-days .day-accordion {
    position: relative;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.question-bank-days .day-accordion summary {
    min-height: 74px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    border: 1px solid #d9e3ee;
    border-radius: 12px;
    background: #fff;
    padding: 14px 18px;
    color: #06162d;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.question-bank-days .day-accordion summary:hover {
    border-color: #c9d6e5;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
    transform: translateY(-1px);
}

.question-bank-days .day-accordion[open] summary {
    border-color: #d7e1ec;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.day-summary-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
}

.day-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f3e8ff;
    color: #7c3aed;
}

.day-icon svg {
    width: 18px;
    height: 18px;
}

.day-summary-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.question-bank-days .day-accordion summary strong {
    color: #06162d;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
}

.question-bank-days .day-accordion summary small {
    color: #334b68;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.question-bank-days .test-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border: 0;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334b68;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.question-bank-days .chevron {
    color: #334b68;
    transition: transform 0.2s ease;
}

.question-bank-days .chevron svg {
    width: 20px;
    height: 20px;
}

.question-bank-days .day-accordion[open] > summary .chevron {
    transform: rotate(180deg);
}

.question-bank-days .day-accordion .test-list {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 0;
    border-left: 2px solid #dbe5f0;
    margin: 8px 0 8px 42px;
    padding: 0 0 0 18px;
}

.question-bank-days .test-row {
    position: relative;
    --test-accent: #7c3aed;
    --test-soft: #f3e8ff;
    --test-text: #6d28d9;
    min-height: 56px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid #d9e3ee;
    border-radius: 12px;
    background: rgba(248, 251, 255, 0.72);
    color: #06162d;
    padding: 12px 14px;
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.question-bank-days .test-row::before {
    content: "";
    position: absolute;
    inset: 10px auto 10px 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: var(--test-accent);
}

.question-bank-days .test-row:hover {
    border-color: color-mix(in srgb, var(--test-accent) 38%, #d9e3ee);
    background: #fff;
    box-shadow: 0 8px 22px color-mix(in srgb, var(--test-accent) 16%, transparent);
    transform: translateY(-1px);
}

.question-bank-days .test-kind-1 {
    --test-accent: #7c3aed;
    --test-soft: #f3e8ff;
    --test-text: #6d28d9;
}

.question-bank-days .test-kind-2 {
    --test-accent: #2563eb;
    --test-soft: #dbeafe;
    --test-text: #1d4ed8;
}

.question-bank-days .test-kind-3 {
    --test-accent: #0891b2;
    --test-soft: #cffafe;
    --test-text: #0e7490;
}

.question-bank-days .test-kind-4 {
    --test-accent: #f59e0b;
    --test-soft: #fef3c7;
    --test-text: #b45309;
}

.question-bank-days .test-kind-5 {
    --test-accent: #10b981;
    --test-soft: #d1fae5;
    --test-text: #047857;
}

.test-row-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 13px;
}

.test-leading-icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--test-accent);
    color: #fff;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--test-accent) 28%, transparent);
}

.test-leading-icon svg {
    width: 17px;
    height: 17px;
}

.test-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.test-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.question-bank-days .test-row strong {
    color: #06162d;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.25;
}

.test-type-pill {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    background: var(--test-soft);
    color: var(--test-text);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.question-bank-days .test-row small {
    color: #334b68;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.question-bank-days .test-row-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    white-space: nowrap;
}

.question-bank-days .test-progress-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    background: #f3e8ff;
    color: #7c3aed;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
}

.question-bank-days .test-progress-pill.is-completed {
    background: #ecfdf5;
    color: #059669;
}

@media (max-width: 840px) {
    .course-accordion.question-bank-days {
        gap: 8px;
        border-left: 2px solid #dbe5f0;
        margin-left: 0;
        padding-left: 12px;
    }

    .question-bank-days .day-accordion summary {
        min-height: 66px;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 10px;
        padding: 12px 14px;
    }

    .day-summary-main {
        gap: 10px;
    }

    .day-icon {
        width: 26px;
        height: 26px;
    }

    .question-bank-days .day-accordion .test-list {
        margin-left: 26px;
        padding-left: 12px;
    }

    .question-bank-days .test-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 11px 12px;
    }

    .test-leading-icon {
        width: 25px;
        height: 25px;
    }
}

@media (max-width: 520px) {
    .question-bank-days .day-accordion summary {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .question-bank-days .day-accordion summary .test-count {
        grid-column: 1;
        justify-self: start;
        margin-left: 38px;
    }

    .question-bank-days .day-accordion summary .chevron {
        grid-column: 2;
        grid-row: 1 / span 2;
    }

    .question-bank-days .test-row {
        grid-template-columns: minmax(0, 1fr);
        justify-items: stretch;
    }

    .question-bank-days .test-row-meta {
        justify-content: flex-start;
        padding-left: 38px;
    }
}

.question-bank-days .day-accordion summary .day-summary-main {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.question-bank-days .day-accordion summary .day-summary-copy {
    align-self: center;
}

.question-bank-days .test-row .test-row-main {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.question-bank-days .test-row .test-copy {
    align-self: center;
}

.question-bank-days .test-row .test-title-line {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
    width: auto;
    justify-items: start;
}

.question-bank-days .test-row .test-type-pill {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto;
    max-width: max-content;
    justify-self: start;
}

.question-bank-days .test-row {
    --test-tint: #fbf8ff;
    background: linear-gradient(90deg, var(--test-tint) 0%, rgba(248, 251, 255, 0.86) 34%, rgba(248, 251, 255, 0.72) 100%);
}

.question-bank-days .test-row:hover {
    background: linear-gradient(90deg, color-mix(in srgb, var(--test-tint) 72%, #fff) 0%, #fff 42%, #fff 100%);
}

.question-bank-days .test-kind-1 {
    --test-tint: #fbf8ff;
}

.question-bank-days .test-kind-2 {
    --test-tint: #f5f9ff;
}

.question-bank-days .test-kind-3 {
    --test-tint: #f1fdff;
}

.question-bank-days .test-kind-4 {
    --test-tint: #fffaf0;
}

.question-bank-days .test-kind-5 {
    --test-tint: #f2fff9;
}

.camp-header {
    align-items: center;
    margin-bottom: 18px;
}

.camp-heading {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 16px;
}

.camp-title-mark {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, #7c3aed, #9b5cff);
    color: #fff;
    box-shadow: 0 16px 30px rgba(124, 58, 237, 0.22);
}

.camp-title-mark svg {
    width: 27px;
    height: 27px;
}

.camp-title-copy {
    min-width: 0;
}

.camp-title-copy h1 {
    letter-spacing: 0;
}

.camp-title-copy p {
    max-width: 660px;
}

.camp-meta-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.camp-meta-row span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    border: 1px solid #dfe7f1;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    color: #334b68;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
}

.camp-meta-row span:first-child {
    border-color: rgba(124, 58, 237, 0.18);
    background: #f3e8ff;
    color: #6d28d9;
}

.camp-meta-row strong {
    margin-right: 4px;
    color: inherit;
    font-size: inherit;
    font-weight: 950;
}

.question-bank-days::before {
    content: "KPSS Tarih Kampı";
    display: inline-flex;
    align-items: center;
    width: max-content;
    min-height: 28px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 999px;
    background: #f3e8ff;
    color: #6d28d9;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
}

@media (max-width: 560px) {
    .question-bank-days .day-accordion summary,
    .question-bank-days .test-row {
        justify-items: stretch;
    }

    .question-bank-days .day-accordion summary .day-summary-main,
    .question-bank-days .test-row .test-row-main {
        width: 100%;
    }

    .camp-header {
        align-items: flex-start;
    }

    .camp-heading {
        gap: 12px;
    }

    .camp-title-mark {
        width: 44px;
        height: 44px;
        border-radius: 15px;
    }

    .camp-title-mark svg {
        width: 23px;
        height: 23px;
    }

    .camp-meta-row {
        gap: 6px;
        margin-top: 10px;
    }

    .camp-meta-row span {
        min-height: 26px;
        padding: 5px 9px;
        font-size: 11px;
    }
}

/* Typography and hierarchy refinement for the camp program */
body,
.student-shell {
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    letter-spacing: 0;
    text-rendering: optimizeLegibility;
}

.brand-lockup strong,
.sidebar-user strong,
.page-header h1,
.test-topbar h1 {
    font-family: inherit;
    letter-spacing: 0;
}

.brand-lockup small,
.sidebar-user small {
    letter-spacing: 0;
}

.camp-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px;
    width: min(1080px, 100%);
    margin-bottom: 26px;
}

.camp-heading {
    align-items: flex-start;
    gap: 18px;
}

.camp-title-mark {
    width: 50px;
    height: 50px;
    margin-top: 2px;
    border-radius: 14px;
    box-shadow: 0 14px 26px rgba(124, 58, 237, 0.2);
}

.camp-title-mark svg {
    width: 25px;
    height: 25px;
}

.camp-title-copy h1 {
    color: #06162d;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
}

.camp-title-copy p {
    max-width: 620px;
    margin-top: 10px;
    color: #34465f;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.55;
}

.camp-meta-row {
    gap: 8px;
    margin-top: 12px;
}

.camp-meta-row span {
    min-height: 28px;
    border-color: #dce5ef;
    background: rgba(255, 255, 255, 0.86);
    color: #3d5068;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: none;
}

.camp-meta-row span:first-child {
    background: #f2e9ff;
    color: #6d28d9;
}

.camp-meta-row strong {
    font-weight: 800;
}

.camp-header .soft-danger-button {
    margin-top: 6px;
    font-weight: 700;
}

.course-accordion.question-bank-days {
    width: min(1080px, 100%);
    gap: 9px;
    border-left: 1px solid #d7e1ec;
    padding-left: 18px;
}

.question-bank-days::before {
    content: "Kamp Programı";
    display: block;
    width: auto;
    min-height: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #6d28d9;
    padding: 0 0 2px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.35;
    box-shadow: none;
}

.question-bank-days .day-accordion summary {
    min-height: 78px;
    grid-template-columns: minmax(0, 1fr) auto 22px;
    gap: 16px;
    border-color: #d8e2ed;
    border-radius: 12px;
    padding: 15px 18px;
    box-shadow: none;
}

.question-bank-days .day-accordion summary:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.day-summary-main,
.question-bank-days .day-accordion summary .day-summary-main {
    display: flex;
    align-items: center;
    gap: 15px;
}

.day-icon {
    width: 31px;
    height: 31px;
    border-radius: 10px;
    background: #f1e7ff;
}

.day-icon svg {
    width: 17px;
    height: 17px;
}

.day-summary-copy,
.question-bank-days .day-accordion summary .day-summary-copy {
    display: grid;
    gap: 2px;
    align-self: center;
}

.day-kicker,
.question-bank-days .day-accordion summary .day-kicker {
    display: inline-flex;
    width: max-content;
    color: #7c3aed;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
}

.question-bank-days .day-accordion summary strong {
    color: #06162d;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.22;
}

.question-bank-days .day-accordion summary small {
    color: #40526a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.question-bank-days .test-count {
    min-height: 28px;
    background: #f4f7fa;
    color: #334b68;
    padding: 5px 11px;
    font-size: 12px;
    font-weight: 800;
}

.question-bank-days .chevron {
    justify-self: end;
    color: #40526a;
}

.question-bank-days .day-accordion .test-list {
    gap: 10px;
    border-left-color: #d7e1ec;
    margin: 9px 0 10px 38px;
    padding-left: 18px;
}

.question-bank-days .test-row {
    min-height: 76px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    border-color: #d9e3ee;
    padding: 13px 15px;
}

.question-bank-days .test-row::before {
    inset: 12px auto 12px 0;
    width: 3px;
}

.test-leading-icon {
    width: 28px;
    height: 28px;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--test-accent) 18%, transparent);
}

.test-copy,
.question-bank-days .test-row .test-copy {
    display: grid;
    gap: 4px;
    align-self: center;
    justify-items: start;
}

.test-kicker-row,
.question-bank-days .test-row .test-kicker-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    width: auto;
    min-width: 0;
}

.test-index-label,
.question-bank-days .test-row .test-index-label,
.test-type-pill,
.question-bank-days .test-row .test-type-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    max-width: max-content;
    min-height: 20px;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.test-index-label {
    border: 1px solid color-mix(in srgb, var(--test-accent) 18%, #d9e3ee);
    background: rgba(255, 255, 255, 0.72);
    color: var(--test-text);
}

.question-bank-days .test-row strong {
    color: #06162d;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.25;
}

.question-bank-days .test-row small {
    max-width: 700px;
    color: #40526a;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.38;
}

.question-bank-days .test-row-meta {
    align-self: center;
}

.question-bank-days .test-progress-pill {
    font-weight: 800;
}

@media (max-width: 840px) {
    .camp-header {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .camp-header .soft-danger-button {
        margin-top: 0;
        justify-self: start;
    }

    .question-bank-days .day-accordion .test-list {
        margin-left: 28px;
        padding-left: 14px;
    }
}

@media (max-width: 560px) {
    .camp-title-copy h1 {
        font-size: 26px;
    }

    .camp-title-copy p {
        font-size: 14px;
    }

    .question-bank-days .day-accordion summary {
        min-height: 72px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: 13px 14px;
    }

    .question-bank-days .day-accordion summary .test-count {
        margin-left: 46px;
    }

    .question-bank-days .day-accordion summary strong {
        font-size: 15px;
    }

    .question-bank-days .day-accordion summary small {
        font-size: 12px;
    }

    .question-bank-days .test-row {
        gap: 10px;
    }

    .question-bank-days .test-row-meta {
        padding-left: 43px;
    }
}

/* Remove timeline rails and header summary chips for a cleaner campaign list */
.camp-meta-row {
    display: none;
}

.course-accordion.question-bank-days {
    border-left: 0;
    padding-left: 0;
}

.question-bank-days .day-accordion .test-list {
    border-left: 0;
    margin-left: 45px;
    padding-left: 0;
}

.question-bank-days .test-row::before {
    display: none;
}

@media (max-width: 840px) {
    .course-accordion.question-bank-days {
        border-left: 0;
        padding-left: 0;
    }

    .question-bank-days .day-accordion .test-list {
        margin-left: 38px;
        padding-left: 0;
    }
}

@media (max-width: 560px) {
    .question-bank-days .day-accordion .test-list {
        margin-left: 0;
    }
}

/* Admin content builder */
.admin-topbar {
    align-items: center;
    margin-bottom: 22px;
}

.admin-topbar h1 {
    margin-top: 4px;
    color: #06162d;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.1;
}

.admin-topbar .muted {
    max-width: 620px;
    margin: 8px 0 0;
    color: #40526a;
    font-size: 14px;
}

.secondary-link.is-active {
    border-color: rgba(124, 58, 237, 0.22);
    background: #f2e9ff;
    color: #6d28d9;
}

.admin-status {
    width: min(1180px, 100%);
    min-height: auto;
    margin: 0 0 18px;
    border-radius: 12px;
    padding: 12px 14px;
}

.success-message.admin-status {
    border: 1px solid #b7ecd7;
    background: #ecfdf5;
}

.form-message.admin-status {
    border: 1px solid #ffc8c8;
    background: #fff1f1;
}

.admin-content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.camp-builder-panel,
.json-editor-panel {
    margin-top: 0;
    box-shadow: none;
}

.camp-builder-panel {
    padding: 0;
    overflow: hidden;
}

.camp-builder-panel > .section-heading {
    min-height: 92px;
    align-items: center;
    margin: 0;
    padding: 22px 24px;
    background: linear-gradient(135deg, #5b3df1 0%, #8d34e8 100%);
    color: #fff;
}

.camp-builder-panel .brand,
.camp-builder-panel .muted,
.camp-builder-panel h2 {
    color: inherit;
}

.camp-builder-panel .brand {
    margin: 0 0 4px;
    font-size: 13px;
}

.camp-builder-panel .muted {
    margin: 7px 0 0;
    opacity: 0.82;
}

.admin-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.camp-builder-panel .ghost-button {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.camp-builder-panel .primary-action {
    background: #fff;
    color: #5b3df1;
}

.admin-camp-tree {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.admin-day-node {
    position: relative;
    overflow: hidden;
    border: 1px solid #d7e2ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 22px rgba(15, 31, 55, 0.05);
}

.admin-day-node summary {
    min-height: 58px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border-radius: 12px;
    background: #4f46df;
    color: #fff;
    padding: 10px 14px;
    list-style: none;
    cursor: pointer;
}

.admin-day-node[open] summary {
    border-radius: 12px 12px 0 0;
}

.admin-day-node summary::-webkit-details-marker {
    display: none;
}

.admin-node-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-node-main strong,
.admin-test-node strong {
    display: block;
    color: inherit;
    font-weight: 850;
    line-height: 1.25;
}

.admin-node-main small,
.admin-test-node small {
    display: block;
    margin-top: 3px;
    overflow: hidden;
    color: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    opacity: 0.82;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-node-icon {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.17);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
}

.admin-node-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.admin-day-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-day-actions .ghost-button {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.admin-day-actions .ghost-button:hover {
    border-color: rgba(255, 255, 255, 0.76);
    background: #fff;
    color: #4f46df;
}

.admin-day-actions .mini-square {
    width: 34px;
    height: 34px;
    border-color: rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.admin-day-actions .mini-square:hover {
    border-color: rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.28);
}

.admin-day-actions .danger-button {
    border-color: rgba(255, 255, 255, 0.34);
    background: rgba(255, 255, 255, 0.94);
    color: #d92d2d;
}

.admin-node-editor {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1.4fr) auto;
    gap: 10px;
    align-items: end;
    margin: 8px 0 0 20px;
    border-left: 2px solid #ccd6ff;
    padding: 10px 0 0 16px;
}

.admin-node-editor label,
.json-editor-form label {
    display: grid;
    gap: 7px;
    color: #273a55;
    font-size: 12px;
    font-weight: 850;
}

.admin-node-editor input,
.json-editor-form input,
.json-editor-form textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 10px 12px;
    font: inherit;
    font-size: 13px;
}

.admin-row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
    flex-wrap: wrap;
}

.small-button {
    min-height: 34px;
    border-radius: 10px;
    padding: 8px 11px;
    font-size: 12px;
    font-weight: 850;
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid #ffc8c8;
    background: #fff0f0;
    color: #d92d2d;
}

.danger-button:hover {
    background: #ffe4e4;
}

.admin-test-list {
    display: grid;
    gap: 8px;
    margin: 0;
    border-top: 1px solid #dbe4ef;
    background: #fff;
    padding: 12px 14px 14px 58px;
}

.admin-test-fields {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(180px, 1fr) minmax(190px, 1.2fr);
    gap: 10px;
    align-items: end;
}

.admin-test-index {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: end;
    min-height: 34px;
    border: 1px solid rgba(245, 158, 11, 0.26);
    border-radius: 999px;
    background: #fff7e8;
    color: #b45309;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-test-fields label {
    min-width: 0;
    display: grid;
    gap: 6px;
    color: #273a55;
    font-size: 12px;
    font-weight: 850;
}

.admin-test-fields input {
    width: 100%;
    min-height: 36px;
    border: 1px solid #d8e2ed;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    padding: 8px 10px;
    font: inherit;
    font-size: 13px;
    font-weight: 750;
}

.admin-test-fields input:focus {
    border-color: rgba(245, 158, 11, 0.7);
    outline: 3px solid rgba(245, 158, 11, 0.16);
}

.admin-test-node {
    position: relative;
    min-height: 72px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 1px solid #d8e2ed;
    border-radius: 12px;
    background: linear-gradient(90deg, #fff7ec 0%, #fbfdff 38%, #fff 100%);
    color: #06162d;
    padding: 10px 12px 10px 16px;
    text-align: left;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-test-node::before {
    content: "";
    position: absolute;
    inset: 11px auto 11px 0;
    width: 4px;
    border-radius: 0 999px 999px 0;
    background: #f59e0b;
}

.admin-test-node:hover,
.admin-test-node.is-selected {
    border-color: #f0b953;
    box-shadow: 0 10px 22px rgba(245, 158, 11, 0.12);
    transform: translateY(-1px);
}

.admin-test-node.is-selected {
    background: linear-gradient(90deg, #fff3d8 0%, #fffaf0 40%, #fff 100%);
}

.admin-test-node .ghost-button {
    min-height: 30px;
    border-color: #d8e2ed;
    background: #fff;
    color: #334b68;
    padding: 7px 10px;
}

.admin-test-node .ghost-button:hover {
    border-color: #f0b953;
    background: #fff7e8;
    color: #b45309;
}

.admin-test-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
}

.admin-test-meta > span:first-child {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334b68;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 850;
}

.admin-node-actions {
    display: flex;
    align-items: center;
    gap: 5px;
}

.admin-node-actions .mini-square {
    width: 30px;
    height: 30px;
    border-radius: 9px;
}

.mini-square.is-danger {
    border-color: #ffd0d0;
    background: #fff0f0;
    color: #d92d2d;
}

.json-editor-panel {
    position: sticky;
    top: 18px;
}

.json-editor-panel .section-heading {
    align-items: flex-start;
    margin-bottom: 14px;
}

.json-editor-panel h2 {
    font-size: 22px;
    font-weight: 800;
}

.json-editor-panel .muted {
    margin: 7px 0 0;
    font-size: 13px;
    line-height: 1.45;
}

.json-editor-form {
    margin-top: 0;
}

.json-editor-form textarea {
    min-height: 360px;
    resize: vertical;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.55;
}

.json-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.json-example {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-soft);
    padding: 12px;
}

.json-example summary {
    color: #334b68;
    cursor: pointer;
    font-size: 13px;
    font-weight: 850;
}

.json-example pre {
    max-height: 260px;
    overflow: auto;
    margin: 12px 0 0;
    border-radius: 10px;
    background: #06162d;
    color: #dbeafe;
    padding: 12px;
    font-size: 12px;
    line-height: 1.5;
}

.empty-editor {
    min-height: 300px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    text-align: center;
}

.empty-editor h2 {
    margin: 0;
}

.empty-editor p {
    max-width: 320px;
    margin: 0;
}

@media (max-width: 1080px) {
    .admin-content-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .json-editor-panel {
        position: static;
    }
}

@media (max-width: 760px) {
    .camp-builder-panel > .section-heading,
    .admin-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-node-editor {
        grid-template-columns: minmax(0, 1fr);
        margin-left: 12px;
    }

    .admin-test-list {
        padding: 10px 12px 12px;
    }

    .admin-test-node,
    .admin-day-node summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-day-actions {
        justify-content: flex-start;
    }

    .admin-test-fields {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-test-meta,
    .admin-node-count {
        justify-self: start;
    }
}

body.admin-page {
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

body.admin-page .app-shell {
    padding-bottom: 72px;
}

body.admin-page .camp-builder-panel {
    overflow: visible;
}

body.admin-page .json-editor-panel {
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.json-validation-card {
    display: grid;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
}

.json-validation-card.is-valid {
    border-color: #b7ecd7;
    background: #f2fff9;
}

.json-validation-card.is-invalid {
    border-color: #ffc8c8;
    background: #fff7f7;
}

.json-validation-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.json-validation-head strong {
    font-size: 13px;
    font-weight: 850;
}

.json-validation-head span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.78);
    color: #334b68;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 850;
    white-space: nowrap;
}

.json-validation-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.json-validation-list span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 25px;
    border-radius: 999px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 800;
}

.json-validation-list i {
    width: 16px;
    height: 16px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    font-style: normal;
    font-size: 11px;
    line-height: 1;
}

.json-validation-list .is-ok {
    background: #ecfdf5;
    color: #047857;
}

.json-validation-list .is-ok i {
    background: #10b981;
}

.json-validation-list .is-bad {
    background: #fff0f0;
    color: #c02626;
}

.json-validation-list .is-bad i {
    background: #ef4444;
}

.json-validation-errors {
    display: grid;
    gap: 5px;
    margin: 0;
    padding-left: 18px;
    color: #a52323;
    font-size: 12px;
    line-height: 1.45;
}

@media (max-width: 1080px) {
    body.admin-page .json-editor-panel {
        max-height: none;
        overflow: visible;
    }
}

/* Modal-based admin editing */
.admin-node-editor.admin-card-actions {
    display: flex;
    grid-template-columns: none;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    border-top: 1px solid #dbe4ef;
    border-left: 0;
    background: #fff;
    padding: 12px 14px;
    flex-wrap: wrap;
}

.admin-node-editor.admin-card-actions .ghost-button {
    border-color: #d8e2ed;
    background: #fff;
    color: #334b68;
}

.admin-node-editor.admin-card-actions .ghost-button:hover {
    border-color: #c9d6e5;
    background: #f8fbff;
    color: #06162d;
}

.admin-test-copy {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.admin-test-copy > span:last-child {
    min-width: 0;
}

.admin-test-copy strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-test-copy small {
    max-width: 520px;
}

.json-editor-context {
    display: grid;
    gap: 4px;
    border: 1px solid #d8e2ed;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
}

.json-editor-context strong {
    color: #06162d;
    font-size: 14px;
    font-weight: 850;
}

.json-editor-context small {
    color: #40526a;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    background: rgba(6, 22, 45, 0.42);
    padding: 24px;
}

.admin-modal {
    width: min(520px, 100%);
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 28px 72px rgba(6, 22, 45, 0.22);
    padding: 22px;
}

.admin-json-modal {
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
}

.admin-test-modal {
    width: min(720px, 100%);
}

.admin-json-modal .admin-modal-head .muted {
    margin: 7px 0 0;
    color: #40526a;
    font-size: 13px;
    line-height: 1.45;
}

.admin-json-modal .json-editor-form textarea {
    min-height: 420px;
    max-height: 52vh;
}

.admin-json-modal .json-example {
    margin-top: 16px;
}

.admin-modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-modal-head h2 {
    margin: 4px 0 0;
    color: #06162d;
    font-size: 22px;
    font-weight: 850;
    line-height: 1.15;
}

.admin-modal-form {
    margin-top: 0;
}

.admin-modal-form textarea {
    width: 100%;
    min-height: 110px;
    resize: vertical;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
}

.admin-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 760px) {
    .admin-node-editor.admin-card-actions {
        justify-content: flex-start;
        margin-left: 0;
    }

    .admin-test-copy {
        grid-template-columns: minmax(0, 1fr);
    }

    .admin-test-copy strong,
    .admin-test-copy small {
        white-space: normal;
    }
}

/* Top navigation shell */
.student-shell {
    --content-x: clamp(18px, 4vw, 40px);
    --content-y: 34px;
    min-height: 100vh;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
    padding: 0;
    background: var(--bg-main);
}

.student-top-menu {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid rgba(216, 226, 237, 0.9);
    background: rgba(255, 255, 255, 0.94);
    padding: 12px var(--content-x);
    box-shadow: 0 12px 28px rgba(15, 31, 55, 0.06);
    backdrop-filter: blur(12px);
}

.student-top-menu .brand-lockup {
    height: auto;
    min-width: 0;
    gap: 12px;
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.student-top-menu .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
}

.student-top-menu .brand-lockup strong {
    color: var(--text-main);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.student-top-menu .brand-lockup small {
    margin-top: 2px;
    color: var(--brand-purple);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.student-menu-nav {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.student-menu-nav .side-link {
    min-height: 42px;
    border: 1px solid rgba(124, 58, 237, 0.16);
    border-radius: 999px;
    background: var(--brand-purple-light);
    color: var(--brand-purple);
    box-shadow: none;
    padding: 0 16px;
    white-space: nowrap;
}

.student-menu-nav .side-link span {
    width: 20px;
    color: currentColor;
}

.student-menu-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.student-admin-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: #334b68;
    padding: 0 13px;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

.student-user-chip {
    min-width: 0;
    display: grid;
    grid-template-columns: 36px minmax(0, auto);
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    padding: 5px 13px 5px 5px;
}

.student-user-chip .user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.student-user-chip small {
    display: block;
    color: var(--brand-purple);
    font-size: 10px;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: 0;
}

.student-user-chip strong {
    display: block;
    max-width: 160px;
    overflow: hidden;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-menu-logout {
    width: 38px;
    height: 38px;
    border: 1px solid #ffd0d0;
    border-radius: 999px;
    background: #fff5f5;
    color: #d92d2d;
}

.student-main {
    min-width: 0;
    min-height: calc(100vh - 68px);
    height: auto;
    overflow: visible;
    padding: var(--content-y) var(--content-x) 64px;
    background: var(--bg-main);
}

.student-main .test-topbar {
    margin: calc(var(--content-y) * -1) calc(var(--content-x) * -1) 32px;
    padding: 20px var(--content-x);
}

body.admin-page .app-shell {
    width: min(1220px, calc(100% - 32px));
    padding: 18px 0 72px;
}

.admin-menu-bar {
    position: sticky;
    top: 12px;
    z-index: 35;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 1px solid rgba(216, 226, 237, 0.92);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 34px rgba(15, 31, 55, 0.08);
    padding: 10px;
    backdrop-filter: blur(12px);
}

.admin-menu-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 2px 2px;
}

.admin-menu-brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--brand-purple), var(--brand-purple-dark));
    color: #fff;
}

.admin-menu-brand strong,
.admin-menu-brand small {
    display: block;
    line-height: 1.1;
}

.admin-menu-brand strong {
    color: #06162d;
    font-size: 16px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-menu-brand small {
    margin-top: 3px;
    color: var(--brand-purple);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.admin-menu-tabs {
    min-width: 0;
    justify-self: center;
    display: flex;
    align-items: center;
    gap: 4px;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    background: #eef3f8;
    padding: 4px;
}

.admin-menu-item,
.admin-menu-link {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0 14px;
    color: #334b68;
    font-size: 13px;
    font-weight: 900;
    white-space: nowrap;
}

.admin-menu-item {
    background: transparent;
}

.admin-menu-item svg,
.admin-menu-link svg {
    width: 17px;
    height: 17px;
}

.admin-menu-item.is-active {
    border-color: rgba(124, 58, 237, 0.18);
    background: #fff;
    color: var(--brand-purple);
    box-shadow: 0 8px 18px rgba(80, 62, 176, 0.12);
}

.admin-menu-quick {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.admin-menu-link {
    border-color: #dbe4ef;
    background: #fff;
}

.admin-menu-link.is-danger {
    border-color: #ffd0d0;
    background: #fff5f5;
    color: #d92d2d;
}

.admin-page-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 26px 0 22px;
}

.admin-page-intro h1 {
    margin: 4px 0 0;
    color: #06162d;
    font-size: 34px;
    font-weight: 900;
    line-height: 1.08;
}

.admin-page-intro .muted {
    max-width: 650px;
    margin: 8px 0 0;
    color: #40526a;
    font-size: 14px;
}

@media (max-width: 940px) {
    .student-top-menu,
    .admin-menu-bar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .student-menu-nav,
    .admin-menu-tabs {
        grid-column: 1 / -1;
        justify-self: stretch;
        justify-content: flex-start;
        overflow-x: auto;
    }

    .admin-menu-quick {
        justify-content: flex-end;
    }
}

@media (max-width: 640px) {
    .student-shell {
        --content-x: 16px;
        --content-y: 22px;
    }

    .student-top-menu {
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .student-top-menu .brand-mark,
    .admin-menu-brand .brand-mark {
        width: 38px;
        height: 38px;
    }

    .student-top-menu .brand-lockup strong,
    .admin-menu-brand strong {
        font-size: 16px;
    }

    .student-user-chip {
        grid-template-columns: 34px;
        padding: 3px;
    }

    .student-user-chip > span:last-child,
    .student-admin-link {
        display: none;
    }

    .top-menu-logout {
        width: 36px;
        height: 36px;
    }

    .student-main .test-topbar {
        display: grid;
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .student-main .test-topbar .test-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    body.admin-page .app-shell {
        width: min(1220px, calc(100% - 24px));
        padding-top: 12px;
    }

    .admin-menu-bar {
        top: 8px;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .admin-menu-quick {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .admin-page-intro {
        display: block;
        margin: 20px 0 18px;
    }

    .admin-page-intro h1 {
        font-size: 28px;
    }
}

/* Admin-controlled test type colors */
.question-bank-days .test-row {
    --test-accent: #7C3AED;
    --test-soft: #FBF8FF;
    --test-text: var(--test-accent);
    --test-tint: #FBF8FF;
    border-color: color-mix(in srgb, var(--test-accent) 18%, #d9e3ee);
    background: linear-gradient(90deg, var(--test-tint) 0%, rgba(248, 251, 255, 0.86) 40%, rgba(248, 251, 255, 0.72) 100%);
}

.question-bank-days .test-row:hover {
    border-color: color-mix(in srgb, var(--test-accent) 34%, #d9e3ee);
    background: linear-gradient(90deg, color-mix(in srgb, var(--test-tint) 74%, #fff) 0%, #fff 48%, #fff 100%);
    box-shadow: 0 10px 24px color-mix(in srgb, var(--test-accent) 12%, transparent);
}

.question-bank-days .test-leading-icon,
.test-style-preview .test-leading-icon {
    background: var(--test-accent);
    color: #fff;
    box-shadow: 0 8px 16px color-mix(in srgb, var(--test-accent) 24%, transparent);
}

.question-bank-days .test-index-label {
    border-color: color-mix(in srgb, var(--test-accent) 28%, #d9e3ee);
    color: var(--test-text);
}

.question-bank-days .test-type-pill,
.test-style-preview .test-type-pill {
    background: var(--test-soft);
    color: var(--test-text);
}

.test-style-editor {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) 112px 112px;
    gap: 12px;
    border: 1px solid #dbe4ef;
    border-radius: 14px;
    background: #f8fbff;
    padding: 14px;
}

.test-style-editor label {
    min-width: 0;
}

.test-style-editor select,
.test-style-editor input[type="text"],
.test-style-editor input[type="datetime-local"],
.test-style-editor input[type="color"] {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    padding: 8px 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 750;
}

.test-style-editor input[type="color"] {
    padding: 5px;
}

.test-style-preview {
    --test-accent: #7C3AED;
    --test-soft: #FBF8FF;
    --test-text: var(--test-accent);
    --test-tint: #FBF8FF;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid color-mix(in srgb, var(--test-accent) 20%, #d9e3ee);
    border-radius: 12px;
    background: linear-gradient(90deg, var(--test-tint), #fff);
    padding: 12px;
}

.test-style-preview strong,
.test-style-preview small {
    display: block;
}

.test-style-preview strong {
    color: #06162d;
    font-size: 14px;
    font-weight: 900;
}

.test-style-preview small {
    margin-top: 2px;
    color: #40526a;
    font-size: 12px;
    font-weight: 650;
}

.admin-test-node {
    --test-accent: #F59E0B;
    --test-soft: #FFFAF0;
    --test-text: var(--test-accent);
    --test-tint: #FFFAF0;
    border-color: color-mix(in srgb, var(--test-accent) 18%, #d8e2ed);
    background: linear-gradient(90deg, var(--test-tint) 0%, #fbfdff 42%, #fff 100%);
}

.admin-test-node::before {
    background: var(--test-accent);
}

.admin-test-node:hover,
.admin-test-node.is-selected {
    border-color: color-mix(in srgb, var(--test-accent) 42%, #d8e2ed);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--test-accent) 12%, transparent);
}

.admin-test-node.is-selected {
    background: linear-gradient(90deg, color-mix(in srgb, var(--test-tint) 82%, #fff) 0%, #fffaf0 42%, #fff 100%);
}

.admin-test-index {
    border-color: color-mix(in srgb, var(--test-accent) 28%, #d8e2ed);
    background: var(--test-soft);
    color: var(--test-text);
}

.admin-test-title-line {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-test-kind-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    border-radius: 999px;
    background: var(--test-soft);
    color: var(--test-text);
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.admin-test-kind-pill i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--test-accent);
}

.package-manager-panel {
    margin-bottom: 14px;
}

.package-strip {
    display: flex;
    gap: 10px;
    align-items: stretch;
    overflow-x: auto;
    padding: 2px 2px 8px;
}

.package-tab,
.package-add-button,
.student-package-card {
    border: 1px solid #d8e4f2;
    background: #fff;
    color: #001a3d;
    border-radius: 16px;
    font: inherit;
}

.package-tab {
    min-width: 220px;
    display: flex;
    gap: 10px;
    align-items: center;
    text-align: left;
    padding: 12px 14px;
    cursor: pointer;
}

.package-tab.is-active {
    border-color: var(--package-accent, #7C3AED);
    background: linear-gradient(90deg, var(--package-tint, #F5F0FF), #fff);
    box-shadow: 0 14px 30px rgba(124, 58, 237, .12);
}

.package-dot {
    width: 14px;
    height: 14px;
    border-radius: 5px;
    background: var(--package-accent, #7C3AED);
    box-shadow: 0 0 0 6px var(--package-tint, #F5F0FF);
    flex: 0 0 auto;
}

.package-tab strong,
.student-package-card strong {
    display: block;
    font-weight: 850;
}

.package-tab small,
.student-package-card small,
.student-package-card em {
    display: block;
    color: #49627f;
    font-size: .82rem;
    font-style: normal;
}

.exam-countdown {
    display: inline-grid;
    gap: 2px;
    border: 1px solid color-mix(in srgb, var(--package-accent, #7C3AED) 24%, #d8e4f2);
    background: linear-gradient(90deg, var(--package-tint, #F5F0FF), #fff);
    color: #001a3d;
}

.exam-countdown small {
    color: #6b4bd8;
    font-size: .72rem;
    font-weight: 900;
}

.exam-countdown strong {
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0;
}

.exam-countdown-card {
    width: fit-content;
    margin-top: 8px;
    border-radius: 999px;
    padding: 7px 11px;
}

.exam-countdown-panel {
    margin: -4px 0 16px;
    border-radius: 16px;
    padding: 14px 18px;
}

.package-add-button {
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 14px;
    font-weight: 850;
    color: #7C3AED;
    cursor: pointer;
}

.package-access-box {
    display: grid;
    gap: 8px;
}

.package-check-list {
    display: grid;
    gap: 8px;
}

.package-check-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #d8e4f2;
    border-radius: 12px;
    background: #f8fbff;
    font-weight: 750;
}

.package-access-form {
    display: grid;
    gap: 8px;
    min-width: 220px;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    font-weight: 800;
}

.student-package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.student-package-card {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 124px;
    padding: 18px;
    text-align: left;
    cursor: pointer;
    background: linear-gradient(90deg, var(--package-tint, #F5F0FF), #fff 70%);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.student-package-card:hover {
    transform: translateY(-1px);
    border-color: var(--package-accent, #7C3AED);
    box-shadow: 0 18px 36px rgba(32, 49, 78, .12);
}

.package-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--package-accent, #7C3AED);
    color: #fff;
    flex: 0 0 auto;
}

.package-card-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.empty-state {
    max-width: 620px;
    padding: 28px;
    border: 1px solid #d8e4f2;
    border-radius: 18px;
    background: #fff;
}

@media (max-width: 760px) {
    .test-style-editor {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Student redesign: Modern Ders Platformu */
:root {
    --student-bg: #f7f1e6;
    --student-bg-soft: #fbf7ee;
    --student-surface: #fffdf8;
    --student-surface-strong: #ffffff;
    --student-navy: #16283f;
    --student-navy-soft: #213a59;
    --student-gold: #b8913a;
    --student-gold-soft: #f5ead0;
    --student-burgundy: #9f3341;
    --student-burgundy-soft: #fff1ef;
    --student-petrol: #0f6e7a;
    --student-green: #247a55;
    --student-green-soft: #edf8f1;
    --student-red: #b23a45;
    --student-red-soft: #fff1f1;
    --student-border: #dfd0ad;
    --student-border-soft: #eadfca;
    --student-shadow: 0 18px 42px rgba(36, 31, 22, 0.08);
    --student-shadow-sm: 0 8px 22px rgba(36, 31, 22, 0.06);
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

.student-shell {
    --content-x: clamp(16px, 4vw, 48px);
    --content-y: clamp(22px, 4vw, 40px);
    min-height: 100vh;
    height: auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    overflow: visible;
    color: var(--student-navy);
    background:
        radial-gradient(circle at 0 0, rgba(184, 145, 58, 0.12), transparent 34%),
        linear-gradient(180deg, #fbf7ee 0%, var(--student-bg) 100%);
}

.student-shell * {
    letter-spacing: 0;
}

.student-top-menu {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(223, 208, 173, 0.72);
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 10px 26px rgba(30, 40, 63, 0.06);
    padding: 12px var(--content-x);
    backdrop-filter: blur(14px);
}

.student-top-menu .brand-lockup {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    box-shadow: none;
}

.student-top-menu .brand-mark {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(184, 145, 58, 0.35);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--student-navy), #233c5d);
    color: var(--student-gold-soft);
    box-shadow: none;
}

.student-top-menu .brand-mark svg {
    width: 22px;
    height: 22px;
}

.student-top-menu .brand-lockup strong {
    color: var(--student-navy);
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
}

.student-top-menu .brand-lockup small {
    margin-top: 3px;
    color: var(--student-gold);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
}

.student-menu-actions {
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.student-admin-link,
.student-user-chip,
.top-menu-logout {
    border-color: rgba(223, 208, 173, 0.9);
    background: #fffdf8;
}

.student-user-chip {
    grid-template-columns: 34px minmax(0, auto);
    border-radius: 999px;
    padding: 4px 12px 4px 4px;
}

.student-user-chip .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    background: var(--student-gold-soft);
    color: var(--student-navy);
}

.student-user-chip small {
    color: var(--student-gold);
    font-size: 10px;
    font-weight: 900;
}

.student-user-chip strong {
    color: var(--student-navy);
    font-size: 13px;
    font-weight: 900;
}

.student-admin-link {
    color: var(--student-navy-soft);
    font-weight: 850;
}

.auth-forbidden-card {
    max-width: 560px;
}

.auth-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.auth-action-row .ghost-button,
.auth-action-row .primary-action {
    min-height: 44px;
    flex: 1 1 210px;
    text-decoration: none;
}

.top-menu-logout {
    width: 38px;
    height: 38px;
    border-color: rgba(159, 51, 65, 0.26);
    background: var(--student-burgundy-soft);
    color: var(--student-burgundy);
}

.student-main {
    min-width: 0;
    min-height: calc(100vh - 65px);
    overflow: visible;
    padding: var(--content-y) var(--content-x) 72px;
    background: transparent;
}

.loading-state,
.empty-state {
    width: min(1040px, 100%);
    border: 1px solid var(--student-border-soft);
    border-radius: 12px;
    background: var(--student-surface);
    box-shadow: var(--student-shadow-sm);
    color: var(--student-navy-soft);
}

.page-header.camp-header {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 22px;
    margin: 0 auto 18px;
}

.camp-heading {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.camp-title-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(184, 145, 58, 0.42);
    border-radius: 12px;
    background: var(--student-surface);
    color: var(--student-gold);
    box-shadow: var(--student-shadow-sm);
}

.camp-title-mark svg {
    width: 25px;
    height: 25px;
}

.camp-title-copy h1 {
    margin: 0;
    color: var(--student-navy);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 900;
    line-height: 1.05;
}

.camp-title-copy p {
    max-width: 660px;
    margin: 10px 0 0;
    color: #4b5d70;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.55;
}

.camp-header-actions {
    display: flex;
    justify-content: flex-end;
}

.ghost-button {
    min-height: 42px;
    border: 1px solid var(--student-border);
    border-radius: 10px;
    background: var(--student-surface);
    color: var(--student-navy);
    box-shadow: var(--student-shadow-sm);
    font-size: 13px;
    font-weight: 900;
}

.ghost-button:hover {
    border-color: var(--student-gold);
    background: #fffaf0;
}

.camp-dashboard {
    width: min(1120px, 100%);
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 0 auto 22px;
    flex-wrap: wrap;
}

.exam-countdown,
.camp-kpi {
    min-height: 58px;
    display: inline-grid;
    align-content: center;
    gap: 2px;
    border: 1px solid var(--student-border);
    border-radius: 12px;
    background: linear-gradient(135deg, #fffdf8, #f7edd4);
    color: var(--student-navy);
    box-shadow: var(--student-shadow-sm);
    padding: 10px 16px;
}

.exam-countdown-panel {
    margin: 0;
}

.exam-countdown small,
.camp-kpi small {
    color: var(--student-gold);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
}

.exam-countdown strong,
.camp-kpi strong {
    color: var(--student-navy);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.15;
}

.camp-kpi {
    min-width: 88px;
    text-align: center;
}

.course-accordion.question-bank-days,
.student-package-grid {
    width: min(1120px, 100%);
    margin: 0 auto;
}

.course-accordion.question-bank-days {
    display: grid;
    gap: 12px;
    padding: 0;
    border: 0;
}

.question-bank-days::before {
    content: "Kamp Programı";
    display: inline-flex;
    width: max-content;
    border: 1px solid rgba(184, 145, 58, 0.45);
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.8);
    color: var(--student-gold);
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 900;
    box-shadow: none;
}

.question-bank-days .day-accordion {
    overflow: hidden;
    border: 1px solid var(--student-border-soft);
    border-radius: 12px;
    background: rgba(255, 253, 248, 0.9);
    box-shadow: var(--student-shadow-sm);
}

.question-bank-days .day-accordion summary {
    min-height: 96px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 34px;
    align-items: center;
    gap: 14px;
    border: 0;
    border-radius: 0;
    background: linear-gradient(90deg, #fffdf8 0%, #fbf4e4 100%);
    padding: 18px 20px;
}

.question-bank-days .day-accordion[open] summary {
    border-bottom: 1px solid var(--student-border-soft);
}

.question-bank-days .day-accordion summary:hover {
    background: linear-gradient(90deg, #fffaf0 0%, #f8edd4 100%);
    box-shadow: none;
}

.day-summary-main,
.question-bank-days .day-accordion summary .day-summary-main {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.day-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(184, 145, 58, 0.36);
    border-radius: 10px;
    background: #fffaf0;
    color: var(--student-gold);
}

.day-icon svg {
    width: 21px;
    height: 21px;
}

.day-summary-copy,
.question-bank-days .day-accordion summary .day-summary-copy {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.day-kicker,
.question-bank-days .day-accordion summary .day-kicker {
    width: max-content;
    border-radius: 999px;
    background: var(--student-navy);
    color: #fffaf0;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.question-bank-days .day-accordion summary strong {
    color: var(--student-navy);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.18;
}

.question-bank-days .day-accordion summary small {
    color: #4d5f72;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.45;
}

.day-goal {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.day-goal em {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(184, 145, 58, 0.42);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--student-navy-soft);
    padding: 5px 10px;
    font-size: 12px;
    font-style: normal;
    font-weight: 850;
    line-height: 1.2;
}

.day-goal svg {
    width: 14px;
    height: 14px;
    color: var(--student-gold);
}

.question-bank-days .test-count {
    min-height: 30px;
    border: 1px solid rgba(184, 145, 58, 0.34);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--student-navy);
    padding: 6px 11px;
    font-size: 12px;
    font-weight: 900;
}

.question-bank-days .chevron {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(22, 40, 63, 0.07);
    color: var(--student-navy);
}

.question-bank-days .day-accordion[open] > summary .chevron {
    transform: rotate(180deg);
}

.question-bank-days .day-accordion .test-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 14px;
    border: 0;
    background: rgba(255, 253, 248, 0.58);
}

.question-bank-days .test-row {
    position: relative;
    min-height: 82px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    width: 100%;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--test-accent) 22%, var(--student-border-soft));
    border-radius: 10px;
    background: linear-gradient(90deg, var(--test-tint) 0%, #fffdf8 64%);
    color: var(--student-navy);
    padding: 13px 14px;
    text-align: left;
    box-shadow: none;
}

.question-bank-days .test-row:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--test-accent) 44%, var(--student-border-soft));
    background: linear-gradient(90deg, color-mix(in srgb, var(--test-tint) 78%, #fff) 0%, #fffdf8 68%);
    box-shadow: 0 12px 26px color-mix(in srgb, var(--test-accent) 12%, transparent);
}

.question-bank-days .test-leading-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: var(--test-accent);
    color: #fff;
}

.question-bank-days .test-leading-icon svg {
    width: 17px;
    height: 17px;
}

.question-bank-days .test-row .test-row-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.question-bank-days .test-row .test-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.question-bank-days .test-row .test-kicker-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.question-bank-days .test-row .test-index-label,
.question-bank-days .test-row .test-type-pill {
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
}

.question-bank-days .test-row .test-index-label {
    border: 1px solid color-mix(in srgb, var(--test-accent) 26%, var(--student-border-soft));
    background: rgba(255, 253, 248, 0.78);
    color: var(--test-text);
}

.question-bank-days .test-row .test-type-pill {
    background: var(--test-soft);
    color: var(--test-text);
}

.question-bank-days .test-row strong {
    color: var(--student-navy);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.question-bank-days .test-row small {
    max-width: 740px;
    color: #4d5f72;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.4;
}

.question-bank-days .test-row-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.question-bank-days .test-progress-pill,
.test-action-label {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
}

.question-bank-days .test-progress-pill {
    border: 1px solid rgba(15, 110, 122, 0.22);
    background: #eff9f8;
    color: var(--student-petrol);
}

.question-bank-days .test-progress-pill.is-completed {
    border-color: rgba(36, 122, 85, 0.24);
    background: var(--student-green-soft);
    color: var(--student-green);
}

.test-action-label {
    background: var(--student-navy);
    color: #fffaf0;
}

.test-action-label svg {
    width: 14px;
    height: 14px;
}

.student-package-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.student-package-card {
    min-height: 178px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    border: 1px solid color-mix(in srgb, var(--package-accent, var(--student-gold)) 30%, var(--student-border-soft));
    border-radius: 12px;
    background: linear-gradient(135deg, var(--package-tint, #fbf6e8), #fffdf8 72%);
    color: var(--student-navy);
    box-shadow: var(--student-shadow-sm);
    padding: 18px;
    text-align: left;
}

.student-package-card:hover {
    transform: translateY(-2px);
    border-color: var(--package-accent, var(--student-gold));
    box-shadow: var(--student-shadow);
}

.package-card-icon {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    background: var(--package-accent, var(--student-navy));
}

.package-card-copy {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.student-package-card small,
.student-package-card em,
.package-access-line {
    color: #4d5f72;
    font-style: normal;
}

.student-package-card small {
    color: var(--student-gold);
    font-size: 12px;
    font-weight: 900;
}

.student-package-card strong {
    color: var(--student-navy);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.18;
}

.student-package-card em,
.package-access-line {
    font-size: 13px;
    font-weight: 650;
    line-height: 1.38;
}

.package-card-action {
    width: max-content;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border-radius: 999px;
    background: var(--student-navy);
    color: #fffaf0;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
}

.package-card-action svg {
    width: 14px;
    height: 14px;
}

.student-main .test-topbar,
.test-topbar {
    min-height: 86px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    border: 0;
    border-bottom: 1px solid rgba(184, 145, 58, 0.32);
    border-radius: 0;
    background: linear-gradient(135deg, var(--student-navy), #203957);
    margin: calc(var(--content-y) * -1) calc(var(--content-x) * -1) 30px;
    padding: 18px var(--content-x);
    box-shadow: 0 16px 32px rgba(22, 40, 63, 0.16);
}

.test-topbar > div:nth-child(2) {
    min-width: 0;
}

.test-topbar p {
    margin: 0 0 5px;
    color: var(--student-gold-soft);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.1;
}

.test-topbar h1 {
    color: #fffdf8;
    font-size: clamp(17px, 2vw, 22px);
    font-weight: 900;
    line-height: 1.22;
}

.square-button,
.mini-square {
    border: 1px solid var(--student-border-soft);
    border-radius: 10px;
    background: #fffdf8;
    color: var(--student-navy);
}

.test-topbar .square-button {
    border-color: rgba(255, 253, 248, 0.24);
    background: rgba(255, 253, 248, 0.1);
    color: #fffdf8;
}

.test-topbar .square-button:hover {
    border-color: rgba(245, 234, 208, 0.52);
    background: rgba(255, 253, 248, 0.16);
}

.square-button:hover,
.mini-square:hover {
    border-color: var(--student-gold);
    background: #fff7e6;
}

.test-stats {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-pill {
    min-height: 34px;
    border-radius: 999px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 900;
}

.stat-pill.is-navy,
.stat-pill.is-purple {
    background: var(--student-navy);
    color: #fffaf0;
}

.stat-pill.is-green {
    background: var(--student-green-soft);
    color: var(--student-green);
}

.test-topbar .stat-pill.is-navy,
.test-topbar .stat-pill.is-purple {
    background: #fffdf8;
    color: var(--student-navy);
}

.test-topbar .stat-pill.is-green {
    background: #e7f7ed;
}

.test-workspace {
    width: min(1120px, 100%);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    gap: 18px;
    align-items: start;
    margin: 0 auto;
}

.question-card,
.question-nav-panel {
    border: 1px solid var(--student-border-soft);
    border-radius: 14px;
    background: var(--student-surface);
    box-shadow: var(--student-shadow);
}

.question-card {
    min-width: 0;
    padding: clamp(18px, 3vw, 28px);
}

.question-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--student-navy);
    font-size: 13px;
}

.question-card-head > strong {
    color: #5b6878;
    font-size: 12px;
    font-weight: 900;
}

.question-badge {
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(184, 145, 58, 0.34);
    border-radius: 999px;
    background: #fff7e6;
    color: var(--student-gold);
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 900;
}

.progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #eadfca;
    margin: 16px 0 24px;
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--student-gold), var(--student-burgundy));
}

.question-copy {
    margin-bottom: 18px;
}

.topic-label {
    margin: 0 0 9px;
    color: var(--student-gold);
    font-size: 13px;
    font-weight: 900;
}

.question-copy h2 {
    margin: 0;
    color: var(--student-navy);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 850;
    line-height: 1.58;
}

.question-help {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
}

.study-note-toggle {
    width: max-content;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(184, 145, 58, 0.42);
    border-radius: 999px;
    background: #fff7e6;
    color: var(--student-navy);
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 900;
}

.study-note-toggle svg {
    width: 17px;
    height: 17px;
    color: var(--student-gold);
}

.study-note-toggle strong {
    color: var(--student-gold);
    font-size: 12px;
}

.study-note-toggle:hover,
.study-note-toggle.is-open {
    border-color: var(--student-gold);
    background: #fff1cf;
}

.option-list {
    display: grid;
    gap: 11px;
}

.option-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 50px;
    overflow: hidden;
    border: 1px solid #e2d7c2;
    border-radius: 12px;
    background: #fffaf1;
}

.option-row:hover:not(.is-eliminated):not(.is-correct):not(.is-wrong) {
    border-color: rgba(184, 145, 58, 0.52);
    background: #fff7e6;
}

.option-main {
    min-height: 62px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    background: transparent;
    color: var(--student-navy);
    padding: 0 13px;
    text-align: left;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.38;
}

.option-main:disabled {
    opacity: 1;
}

.option-key {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid var(--student-border);
    border-radius: 999px;
    background: #fffdf8;
    color: var(--student-navy);
    font-size: 13px;
    font-weight: 900;
}

.option-tool {
    display: grid;
    place-items: center;
    border-left: 1px solid #e2d7c2;
    background: rgba(255, 253, 248, 0.72);
    color: #5a6877;
}

.option-tool:hover,
.option-tool.is-active {
    color: var(--student-burgundy);
    background: var(--student-burgundy-soft);
}

.option-row.is-eliminated {
    opacity: 0.62;
}

.option-row.is-eliminated .option-main span:last-child {
    text-decoration: line-through;
}

.option-row.is-correct {
    border-color: rgba(36, 122, 85, 0.42);
    background: var(--student-green-soft);
}

.option-row.is-wrong {
    border-color: rgba(178, 58, 69, 0.42);
    background: var(--student-red-soft);
}

.option-row.is-correct .option-key {
    border-color: rgba(36, 122, 85, 0.5);
    color: var(--student-green);
}

.option-row.is-wrong .option-key {
    border-color: rgba(178, 58, 69, 0.5);
    color: var(--student-red);
}

.option-feedback {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    border-top: 1px solid rgba(90, 71, 34, 0.12);
    padding: 12px 15px;
    color: var(--student-navy);
    font-size: 14px;
    line-height: 1.45;
}

.option-feedback strong {
    white-space: nowrap;
}

.option-feedback.is-correct {
    color: var(--student-green);
}

.option-feedback.is-wrong {
    color: var(--student-red);
}

.learning-note-stack {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.study-note {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid var(--student-border-soft);
    border-radius: 12px;
    background: #fffdf8;
    padding: 13px 14px;
}

.study-note-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
}

.study-note-icon svg {
    width: 19px;
    height: 19px;
}

.study-note strong {
    display: block;
    color: var(--student-navy);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.study-note p {
    margin: 5px 0 0;
    color: #3d4f62;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.52;
}

.study-note-tip {
    border-color: rgba(15, 110, 122, 0.24);
    background: #eff9f8;
}

.study-note-tip .study-note-icon {
    background: #dff1f0;
    color: var(--student-petrol);
}

.study-note-mixup {
    border-color: rgba(159, 51, 65, 0.3);
    background: var(--student-burgundy-soft);
}

.study-note-mixup .study-note-icon {
    background: #f5d9d5;
    color: var(--student-burgundy);
}

.study-note-exam {
    border-color: rgba(184, 145, 58, 0.38);
    background: #fff7e6;
}

.study-note-exam .study-note-icon {
    background: var(--student-gold-soft);
    color: var(--student-gold);
}

.study-note-info .study-note-icon {
    background: #eef3f8;
    color: var(--student-navy-soft);
}

.test-complete-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(36, 122, 85, 0.28);
    border-radius: 12px;
    background: var(--student-green-soft);
    color: var(--student-green);
    margin-top: 18px;
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 850;
}

.test-complete-banner svg {
    width: 20px;
    height: 20px;
}

.question-nav-panel {
    position: sticky;
    top: 92px;
    padding: 14px;
}

.nav-panel-head {
    margin-bottom: 12px;
}

.nav-panel-head strong {
    color: var(--student-navy);
    font-size: 14px;
    font-weight: 900;
}

.nav-panel-head > span {
    display: flex;
    gap: 7px;
}

.question-dots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 7px;
}

.question-dot {
    width: 34px;
    height: 34px;
    border: 1px solid var(--student-border-soft);
    border-radius: 9px;
    background: #fffaf1;
    color: var(--student-navy);
    font-size: 13px;
    font-weight: 900;
}

.question-dot:hover,
.question-dot.is-current {
    border-color: var(--student-gold);
    background: #fff1cf;
    color: var(--student-navy);
}

.question-dot.is-answered {
    border-color: rgba(36, 122, 85, 0.36);
    background: var(--student-green-soft);
    color: var(--student-green);
}

.question-dot.is-wrong {
    border-color: rgba(178, 58, 69, 0.34);
    background: var(--student-red-soft);
    color: var(--student-red);
}

@media (max-width: 960px) {
    .test-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .question-nav-panel {
        position: static;
        order: -1;
    }

    .question-dots {
        display: flex;
        gap: 7px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .question-dot {
        flex: 0 0 34px;
    }
}

@media (max-width: 700px) {
    .student-top-menu {
        gap: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .student-top-menu .brand-mark {
        width: 36px;
        height: 36px;
    }

    .student-top-menu .brand-lockup strong {
        font-size: 16px;
    }

    .student-user-chip {
        grid-template-columns: 32px;
        padding: 3px;
    }

    .student-user-chip > span:last-child,
    .student-admin-link {
        display: none;
    }

    .page-header.camp-header {
        grid-template-columns: minmax(0, 1fr);
    }

    .camp-header-actions {
        justify-content: flex-start;
    }

    .camp-heading {
        gap: 12px;
    }

    .camp-title-mark {
        width: 44px;
        height: 44px;
    }

    .camp-dashboard {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .camp-dashboard .exam-countdown {
        grid-column: 1 / -1;
    }

    .question-bank-days .day-accordion summary {
        grid-template-columns: minmax(0, 1fr) 34px;
        gap: 10px;
        padding: 15px;
    }

    .question-bank-days .day-accordion summary .test-count {
        grid-column: 1 / 2;
        justify-self: start;
        margin-left: 56px;
    }

    .question-bank-days .chevron {
        grid-row: 1 / 2;
        grid-column: 2 / 3;
    }

    .question-bank-days .day-accordion summary strong {
        font-size: 17px;
    }

    .day-goal {
        align-items: stretch;
    }

    .day-goal em {
        width: 100%;
        max-width: 100%;
        justify-content: flex-start;
        border-radius: 10px;
        padding: 8px 10px;
        line-height: 1.28;
    }

    .question-bank-days .test-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .question-bank-days .test-row-meta {
        justify-content: flex-start;
        padding-left: 46px;
    }

    .student-main .test-topbar,
    .test-topbar {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 12px;
    }

    .test-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .option-row {
        grid-template-columns: minmax(0, 1fr) 46px;
    }

    .option-main {
        min-height: 60px;
        grid-template-columns: 34px minmax(0, 1fr);
        font-size: 14px;
    }

    .option-feedback,
    .study-note {
        grid-template-columns: minmax(0, 1fr);
    }

    .study-note-icon {
        width: 34px;
        height: 34px;
    }
}

@media (max-width: 430px) {
    .student-shell {
        --content-x: 14px;
        --content-y: 20px;
    }

    .camp-dashboard {
        grid-template-columns: minmax(0, 1fr);
    }

    .question-bank-days .day-accordion summary .test-count,
    .question-bank-days .test-row-meta {
        margin-left: 0;
        padding-left: 0;
    }

    .question-bank-days .test-row .test-row-main {
        align-items: flex-start;
    }

    .study-note-toggle {
        width: 100%;
        justify-content: space-between;
    }
}

/* Student app shell v2: camp sidebar + Stitch question workspace */
:root {
    --student-bg: #f8f9fa;
    --student-bg-soft: #f3f4f6;
    --student-surface: #ffffff;
    --student-surface-strong: #ffffff;
    --student-navy: #0f2947;
    --student-navy-soft: #243b5a;
    --student-gold: #b18e2d;
    --student-gold-soft: #f6ead0;
    --student-burgundy: #9f3341;
    --student-burgundy-soft: #fde8e8;
    --student-petrol: #1e6078;
    --student-petrol-soft: #eef7fb;
    --student-green: #10b981;
    --student-green-soft: #d1fae5;
    --student-red: #ef4444;
    --student-red-soft: #fee2e2;
    --student-border: #e1cfa5;
    --student-border-soft: #e5e7eb;
    --student-shadow: 0 16px 32px rgba(15, 41, 71, 0.08);
    --student-shadow-sm: 0 8px 18px rgba(15, 41, 71, 0.06);
}

.student-shell {
    --content-x: clamp(20px, 3vw, 36px);
    --content-y: clamp(22px, 3vw, 32px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    min-height: 100vh;
    background: var(--student-bg);
    color: #071833;
}

.student-top-menu {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: 80px;
    border: 0;
    border-bottom: 1px solid rgba(15, 41, 71, 0.18);
    border-radius: 0 0 14px 14px;
    background: var(--student-navy);
    box-shadow: 0 8px 20px rgba(15, 41, 71, 0.22);
    padding: 14px clamp(20px, 3vw, 42px);
    backdrop-filter: none;
}

.student-top-menu .brand-mark {
    border-color: rgba(177, 142, 45, 0.75);
    background: transparent;
    color: var(--student-gold);
}

.student-top-menu .brand-lockup strong {
    color: #ffffff;
}

.student-top-menu .brand-lockup small,
.student-user-chip small {
    color: var(--student-gold);
}

.student-user-chip,
.student-admin-link,
.top-menu-logout {
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.96);
}

.student-layout {
    min-width: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 28px;
    padding: 28px clamp(18px, 2vw, 28px) 64px;
}

.student-sidebar {
    position: sticky;
    top: 108px;
    align-self: start;
    display: grid;
    gap: 22px;
}

.student-sidebar-nav {
    display: grid;
    gap: 12px;
}

.student-sidebar-link {
    min-height: 54px;
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #64748b;
    padding: 0 18px;
    text-align: left;
    font-size: 16px;
    font-weight: 750;
}

.student-sidebar-link svg {
    width: 22px;
    height: 22px;
}

.student-sidebar-link:hover:not(.is-disabled):not(:disabled),
.student-sidebar-link.is-active {
    border-color: var(--student-border);
    background: var(--student-surface);
    color: var(--student-navy);
    box-shadow: var(--student-shadow-sm);
}

.student-sidebar-link.is-active svg {
    color: var(--student-navy);
}

.student-sidebar-link.is-disabled,
.student-sidebar-link:disabled {
    cursor: default;
    opacity: 0.72;
}

.student-sidebar-card {
    display: grid;
    gap: 7px;
    border: 1px solid var(--student-border);
    border-radius: 14px;
    background: var(--student-surface);
    box-shadow: var(--student-shadow-sm);
    padding: 24px;
}

.sidebar-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.sidebar-card-kicker svg {
    width: 18px;
    height: 18px;
    color: #c51f2f;
}

.student-sidebar-card > strong {
    color: var(--student-navy);
    font-size: 16px;
    font-weight: 850;
}

.student-sidebar-card > small {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.student-sidebar-card .exam-countdown-sidebar {
    min-height: 88px;
    justify-items: start;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 8px 0;
}

.student-sidebar-card .exam-countdown-sidebar small {
    display: none;
}

.student-sidebar-card .exam-countdown-sidebar strong {
    color: var(--student-navy);
    font-size: clamp(34px, 5vw, 48px);
    font-weight: 900;
    line-height: 1;
}

.sidebar-card-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-top: 1px solid var(--student-border);
    color: var(--student-navy-soft);
    margin-top: 12px;
    padding-top: 18px;
    font-size: 13px;
    font-weight: 800;
}

.sidebar-card-link svg {
    width: 16px;
    height: 16px;
}

.student-sidebar-user {
    display: none;
}

.student-main {
    min-width: 0;
    min-height: calc(100vh - 136px);
    overflow: visible;
    padding: 0 0 48px;
}

.page-header.camp-header,
.camp-dashboard,
.course-accordion.question-bank-days,
.student-package-grid,
.test-workspace {
    width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.page-header.camp-header {
    margin-bottom: 28px;
}

.student-main .test-topbar,
.test-topbar {
    min-height: 76px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    border: 0;
    border-radius: 0;
    background: var(--student-navy);
    box-shadow: 0 6px 16px rgba(15, 41, 71, 0.18);
    margin: -28px 0 28px;
    padding: 14px clamp(18px, 3vw, 30px);
}

.test-back-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 10px;
    background: transparent;
    color: #ffffff;
    padding: 0;
    font-size: 16px;
    font-weight: 850;
}

.test-back-button svg {
    width: 22px;
    height: 22px;
}

.test-back-button:hover {
    color: var(--student-gold-soft);
}

.test-title-block {
    min-width: 0;
    text-align: center;
}

.test-topbar h1 {
    color: #ffffff;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 900;
    line-height: 1.25;
}

.test-topbar h1 span {
    color: rgba(255, 255, 255, 0.55);
    margin: 0 12px;
}

.test-stats {
    gap: 12px;
}

.test-topbar .stat-pill {
    min-height: 42px;
    border: 1px solid rgba(15, 41, 71, 0.12);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 3px 8px rgba(15, 41, 71, 0.1);
    padding: 0 16px;
    font-size: 15px;
}

.test-topbar .stat-pill.is-navy {
    color: var(--student-navy);
}

.test-topbar .stat-pill.is-green {
    border-color: var(--student-green);
    color: var(--student-green);
}

.test-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 24px;
    align-items: start;
}

.question-card,
.question-nav-panel,
.question-hint-panel {
    border: 1px solid var(--student-border-soft);
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--student-shadow-sm);
}

.question-card {
    padding: clamp(24px, 3vw, 34px);
}

.question-progress-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 34px;
}

.question-progress-row > span {
    color: #64748b;
    font-size: 15px;
    font-weight: 800;
}

.question-progress-row > strong {
    color: #06142e;
    font-size: 15px;
    font-weight: 900;
}

.question-progress-row .progress-track {
    height: 8px;
    margin: 0;
    background: #e5e7eb;
}

.question-progress-row .progress-track span {
    background: var(--student-gold);
}

.topic-label {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    background: #eff6ff;
    color: #2563eb;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.question-copy h2 {
    max-width: 900px;
    color: #0b1d3a;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 900;
    line-height: 1.32;
}

.option-list {
    gap: 14px;
}

.option-row {
    grid-template-columns: minmax(0, 1fr) auto;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
}

.option-row:hover:not(.is-eliminated):not(.is-correct):not(.is-wrong) {
    border-color: var(--student-gold);
    background: #fffdf8;
}

.option-main {
    min-height: 74px;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
    padding: 0 18px;
    font-size: clamp(16px, 1.45vw, 20px);
    font-weight: 800;
}

.option-key {
    width: 40px;
    height: 40px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    color: #4b5563;
    font-size: 16px;
}

.option-tools {
    min-width: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-right: 18px;
}

.option-tool {
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #9ca3af;
}

.option-tool svg,
.option-result-marker svg {
    width: 22px;
    height: 22px;
}

.option-result-marker {
    display: grid;
    place-items: center;
}

.option-result-marker.is-correct,
.option-row.is-correct .option-tool {
    color: var(--student-green);
}

.option-result-marker.is-wrong,
.option-row.is-wrong .option-tool {
    color: var(--student-red);
}

.option-row.is-correct {
    border-color: var(--student-green);
    background: var(--student-green-soft);
}

.option-row.is-wrong {
    border-color: var(--student-red);
    background: var(--student-red-soft);
}

.option-row.is-correct .option-key,
.option-row.is-wrong .option-key {
    border-color: transparent;
    color: #ffffff;
}

.option-row.is-correct .option-key {
    background: var(--student-green);
}

.option-row.is-wrong .option-key {
    background: var(--student-red);
}

.option-feedback {
    border-top-color: rgba(15, 41, 71, 0.1);
    padding: 14px 18px;
    color: #334155;
}

.answer-feedback-banner {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    border: 1px solid;
    border-radius: 14px;
    margin-top: 28px;
    padding: 18px 20px;
}

.answer-feedback-banner.is-correct {
    border-color: var(--student-green);
    background: var(--student-green-soft);
}

.answer-feedback-banner.is-wrong {
    border-color: var(--student-red);
    background: var(--student-red-soft);
}

.answer-feedback-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    color: #ffffff;
}

.answer-feedback-banner.is-correct .answer-feedback-icon {
    background: var(--student-green);
}

.answer-feedback-banner.is-wrong .answer-feedback-icon {
    background: var(--student-red);
}

.answer-feedback-banner strong {
    color: inherit;
    font-size: 18px;
    font-weight: 900;
}

.answer-feedback-banner p {
    margin: 4px 0 0;
    color: #0b1d3a;
    font-size: 14px;
}

.answer-feedback-banner button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 9px;
    background: var(--student-red);
    color: #ffffff;
    padding: 0 18px;
    font-size: 14px;
    font-weight: 900;
}

.answer-feedback-banner.is-correct button {
    background: var(--student-green);
}

.answer-feedback-banner button svg {
    width: 18px;
    height: 18px;
}

.learning-note-stack {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.study-note {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    min-height: 150px;
    border-radius: 12px;
    padding: 18px;
}

.study-note-icon {
    width: 26px;
    height: 26px;
    border-radius: 0;
    background: transparent !important;
}

.study-note strong {
    font-size: 17px;
}

.study-note p {
    font-size: 15px;
}

.test-side-rail {
    display: grid;
    gap: 24px;
}

.question-nav-panel,
.question-hint-panel {
    position: static;
    padding: 28px;
}

.question-nav-panel h2,
.question-hint-panel h2 {
    margin: 0;
    color: #071833;
    font-size: 24px;
    font-weight: 900;
}

.question-nav-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 18px;
    margin: 26px 0 28px;
    color: #334155;
    font-size: 15px;
    font-weight: 650;
}

.question-nav-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 13px;
    height: 13px;
    border: 1px solid #94a3b8;
    border-radius: 999px;
    background: #ffffff;
}

.legend-dot.is-answered {
    border-color: var(--student-green);
    background: var(--student-green);
}

.legend-dot.is-current {
    border: 4px solid var(--student-navy);
}

.question-dots {
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
}

.question-dot {
    width: 52px;
    height: 52px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #475569;
    font-size: 17px;
    font-weight: 900;
}

.question-dot.is-answered {
    border-color: var(--student-green);
    background: var(--student-green);
    color: #ffffff;
}

.question-dot.is-current {
    border-color: var(--student-navy);
    background: var(--student-navy);
    color: #ffffff;
    box-shadow: 0 8px 14px rgba(15, 41, 71, 0.18);
}

.question-rail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.rail-nav-button {
    min-height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid var(--student-navy);
    border-radius: 12px;
    background: var(--student-navy);
    color: #ffffff;
    font-size: 16px;
    font-weight: 900;
}

.rail-nav-button.is-ghost {
    background: #ffffff;
    color: var(--student-navy);
}

.rail-nav-button:disabled {
    opacity: 0.45;
}

.question-hint-panel {
    border-color: rgba(177, 142, 45, 0.36);
    background: #fdfbf7;
}

.question-hint-head {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.question-hint-head > span {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(177, 142, 45, 0.18);
    color: var(--student-gold);
}

.question-hint-head svg {
    width: 30px;
    height: 30px;
}

.question-hint-panel p {
    margin: 10px 0 0;
    color: #334155;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.7;
}

.hint-open-button {
    width: 100%;
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid var(--student-gold);
    border-radius: 10px;
    background: #ffffff;
    color: var(--student-gold);
    margin-top: 22px;
    padding: 0 16px;
    font-size: 15px;
    font-weight: 900;
}

.hint-open-button.is-open {
    background: var(--student-gold);
    color: #ffffff;
}

@media (max-width: 1180px) {
    .student-layout {
        grid-template-columns: 240px minmax(0, 1fr);
        gap: 22px;
    }

    .test-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .test-side-rail {
        grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
        align-items: start;
    }
}

@media (max-width: 920px) {
    .student-top-menu {
        min-height: 68px;
        border-radius: 0;
    }

    .student-layout {
        grid-template-columns: minmax(0, 1fr);
        padding: 20px 16px 56px;
    }

    .student-sidebar {
        display: none;
    }

    .student-main .test-topbar,
    .test-topbar {
        margin: -20px 0 22px;
        grid-template-columns: minmax(0, 1fr);
        justify-items: start;
    }

    .test-title-block {
        width: 100%;
        text-align: left;
    }

    .test-topbar h1 {
        display: flex;
        flex-wrap: wrap;
        gap: 2px 10px;
        font-size: 19px;
    }

    .test-topbar h1 span {
        margin: 0;
    }

    .test-stats {
        justify-content: flex-start;
    }

    .test-side-rail,
    .learning-note-stack {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .student-menu-actions {
        gap: 6px;
    }

    .student-user-chip > span:last-child,
    .student-admin-link {
        display: none;
    }

    .question-card,
    .question-nav-panel,
    .question-hint-panel {
        padding: 18px;
    }

    .question-progress-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        margin-bottom: 24px;
    }

    .question-progress-row > span {
        grid-column: 1 / -1;
    }

    .question-copy h2 {
        font-size: 21px;
    }

    .option-main {
        min-height: 64px;
        grid-template-columns: 40px minmax(0, 1fr);
        font-size: 15px;
    }

    .option-key {
        width: 34px;
        height: 34px;
    }

    .option-tools {
        min-width: 58px;
        gap: 6px;
        padding-right: 10px;
    }

    .answer-feedback-banner {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .answer-feedback-banner button {
        grid-column: 1 / -1;
        width: 100%;
    }

    .question-dots {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        overflow: visible;
    }

    .question-dot {
        width: 42px;
        height: 42px;
        justify-self: center;
    }

    .question-rail-actions {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Stitch desktop pixel pass: source HTML/CSS translated to vanilla */
@media (min-width: 1024px) {
    body {
        background: #FAF8F5;
    }

    .student-shell.stitch-shell {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        background: #FAF8F5;
        color: #1f2937;
        font-family: "Inter", sans-serif;
    }

    .stitch-main-header {
        position: sticky;
        top: 0;
        z-index: 50;
        height: 100px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 28px;
        margin: 0;
        border: 0;
        border-radius: 0;
        background: #0B1E36;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
        padding: 20px 32px;
    }

    .stitch-main-header .brand-lockup {
        display: flex;
        align-items: center;
        gap: 12px;
        height: auto;
        padding: 0;
        box-shadow: none;
    }

    .stitch-main-header .brand-mark {
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #D4AF37;
        box-shadow: none;
    }

    .stitch-main-header .brand-mark svg {
        width: 36px;
        height: 36px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
    }

    .stitch-main-header .brand-wordmark {
        display: flex;
        align-items: baseline;
        color: #fff;
        font-size: 24px;
        line-height: 32px;
        letter-spacing: 0;
    }

    .stitch-main-header .brand-wordmark span {
        font-weight: 400;
    }

    .stitch-main-header .brand-wordmark strong {
        color: #D4AF37;
        font-size: inherit;
        font-weight: 800;
        line-height: inherit;
    }

    .stitch-top-nav {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .stitch-top-nav .student-top-nav-item {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid transparent;
        border-radius: 999px;
        background: transparent;
        color: rgba(255, 255, 255, 0.72);
        padding: 0 13px;
        font-size: 14px;
        font-weight: 600;
        line-height: 1;
        white-space: nowrap;
    }

    .stitch-top-nav .student-top-nav-item svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-top-nav .student-top-nav-item.is-active {
        border-color: rgba(212, 175, 55, 0.58);
        background: rgba(212, 175, 55, 0.12);
        color: #F7E3A0;
    }

    .stitch-top-nav .student-top-nav-item:not(.is-disabled):not(:disabled):hover {
        background: rgba(255, 255, 255, 0.08);
        color: #fff;
    }

    .stitch-top-nav .student-top-nav-item.is-disabled,
    .stitch-top-nav .student-top-nav-item:disabled {
        opacity: 0.48;
        cursor: default;
    }

    .stitch-main-header .student-menu-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 20px;
    }

    .stitch-main-header .student-admin-link {
        min-height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(212, 175, 55, 0.65);
        border-radius: 999px;
        background: rgba(212, 175, 55, 0.12);
        color: #F7E3A0;
        padding: 0 16px;
        font-size: 13px;
        font-weight: 800;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
    }

    .stitch-main-header .student-admin-link:hover {
        background: rgba(212, 175, 55, 0.2);
        color: #fff;
    }

    .stitch-user-chip {
        display: flex;
        align-items: center;
        gap: 16px;
        border: 0;
        background: transparent;
        padding: 0;
    }

    .stitch-user-copy {
        display: block;
        min-width: 0;
        text-align: right;
    }

    .stitch-user-copy small {
        display: block;
        margin: 0 0 2px;
        color: #D4AF37;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .stitch-user-copy strong {
        display: block;
        max-width: 190px;
        overflow: hidden;
        color: #fff;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-avatar {
        width: 52px;
        height: 52px;
        border-radius: 999px;
        background: #fff;
        color: #0B1E36;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    }

    .stitch-avatar svg {
        width: 28px;
        height: 28px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .stitch-logout {
        width: 32px;
        height: 32px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: #fff;
    }

    .stitch-logout:hover {
        background: transparent;
        color: #D4AF37;
    }

    .stitch-logout svg {
        width: 28px;
        height: 28px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.5;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .stitch-layout {
        flex: 1;
        width: 100%;
        max-width: none;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        gap: 0;
        margin: 0;
        padding: 0 36px 24px;
    }

    .stitch-sidebar {
        position: sticky;
        top: 100px;
        flex: 0 0 256px;
        width: 256px;
        display: flex;
        flex-direction: column;
        gap: 32px;
        align-self: flex-start;
        height: calc(100vh - 100px);
        overflow-y: auto;
        border-right: 1px solid #E5D5B5;
        background: #FDFBF7;
        padding: 24px 16px;
    }

    .stitch-sidebar-nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 0;
    }

    .stitch-sidebar .student-sidebar-link {
        min-height: 52px;
        display: flex;
        align-items: center;
        gap: 16px;
        width: 100%;
        border: 1px solid transparent;
        border-radius: 12px;
        background: transparent;
        color: #4b5563;
        padding: 14px 16px;
        box-shadow: none;
        font-size: 16px;
        font-weight: 500;
    }

    .stitch-sidebar .student-sidebar-link svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        color: #9ca3af;
    }

    .stitch-sidebar .student-sidebar-link.is-active {
        border-color: #E5D5B5;
        background: #FDFBF7;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        color: #0B1E36;
        font-weight: 600;
    }

    .stitch-sidebar .student-sidebar-link.is-active svg {
        color: #0B1E36;
    }

    .stitch-sidebar .student-sidebar-link.is-disabled {
        opacity: 1;
    }

    .stitch-sidebar-divider {
        height: 1px;
        display: block;
        background: #e5e7eb;
        margin: 8px 16px;
    }

    .stitch-countdown-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        border: 1px solid #E5D5B5;
        border-radius: 16px;
        background: #FDFBF7;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        padding: 24px;
        text-align: center;
    }

    .stitch-countdown-head {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        gap: 12px;
        width: 100%;
        margin-bottom: 20px;
        text-align: left;
    }

    .stitch-countdown-flag {
        display: grid;
        place-items: center;
        color: #b91c1c;
        margin-top: 4px;
    }

    .stitch-countdown-flag svg {
        width: 28px;
        height: 28px;
    }

    .stitch-countdown-head small {
        display: block;
        color: #6b7280;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        text-transform: uppercase;
    }

    .stitch-countdown-head strong {
        display: block;
        color: #1f2937;
        margin-top: 3px;
        font-size: 14px;
        font-weight: 500;
    }

    .stitch-countdown-head em {
        display: block;
        color: #6b7280;
        margin-top: 4px;
        font-size: 12px;
        font-style: normal;
    }

    .stitch-countdown-days {
        display: flex;
        align-items: baseline;
        gap: 6px;
        color: #0B1E36;
        margin-bottom: 12px;
        font-size: 48px;
        font-weight: 800;
        letter-spacing: -1.8px;
        line-height: 1;
    }

    .stitch-countdown-days span {
        color: #4b5563;
        font-size: 20px;
        font-weight: 400;
        letter-spacing: 0;
    }

    .stitch-countdown-time {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 6px;
        color: #1f2937;
        margin-bottom: 24px;
        font-size: 14px;
        font-weight: 500;
    }

    .stitch-countdown-time b {
        color: #111827;
        font-size: 18px;
        font-weight: 800;
    }

    .stitch-countdown-time span {
        color: #6b7280;
        font-weight: 400;
    }

    .stitch-countdown-card .sidebar-card-link {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border-top: 1px solid #E5D5B5;
        color: #4b5563;
        margin: 0;
        padding-top: 16px;
        font-size: 14px;
        font-weight: 500;
    }

    .stitch-countdown-card .sidebar-card-link svg {
        width: 16px;
        height: 16px;
    }

    .student-sidebar-user {
        display: none;
    }

    .student-main,
    .student-main-camp,
    .student-main-test {
        min-width: 0;
        flex: 0 1 1280px;
        width: min(1280px, calc(100vw - 72px));
        max-width: 1280px;
        padding: 24px 0 0;
        background: transparent;
    }

    .student-main-camp {
        flex-basis: 1160px;
        width: min(1160px, calc(100vw - 72px));
        max-width: 1160px;
        margin-left: auto;
        margin-right: auto;
    }

    .stitch-camp-hero {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 24px;
        margin: 30px 0 32px;
    }

    .stitch-camp-hero h1 {
        margin: 0 0 8px;
        color: #0B1E36;
        font-family: "Merriweather", serif;
        font-size: 32px;
        font-weight: 700;
        line-height: 1.22;
    }

    .stitch-camp-hero p {
        margin: 0;
        color: #4b5563;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.55;
    }

    .stitch-hero-actions {
        display: flex;
        align-items: stretch;
        gap: 16px;
    }

    .stitch-mini-timer {
        min-width: 288px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        border: 1px solid #E5D5B5;
        border-radius: 12px;
        background: #FDFBF7;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        padding: 12px 20px;
    }

    .stitch-mini-timer small {
        display: block;
        color: #6b7280;
        font-size: 12px;
        font-weight: 500;
        line-height: 1.2;
    }

    .stitch-mini-timer strong {
        display: flex;
        align-items: baseline;
        gap: 6px;
        color: #0B1E36;
        font-size: 20px;
        font-weight: 800;
        line-height: 1.2;
        margin: 3px 0;
    }

    .stitch-mini-timer em {
        color: #4b5563;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
    }

    .stitch-mini-timer i {
        display: grid;
        place-items: center;
        width: 40px;
        height: 40px;
        border: 1px solid #E5D5B5;
        border-radius: 8px;
        background: #FAF8F5;
        color: #D4AF37;
        font-style: normal;
    }

    .stitch-package-switch {
        min-height: 62px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid #d1d5db;
        border-radius: 12px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        color: #374151;
        padding: 14px 20px;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
    }

    .stitch-package-switch svg {
        width: 20px;
        height: 20px;
        color: #6b7280;
    }

    .stitch-package-hero {
        margin-bottom: 24px;
    }

    .stitch-package-grid {
        display: grid;
        gap: 14px;
    }

    .stitch-package-card {
        position: relative;
        min-height: 116px;
        display: grid;
        grid-template-columns: 52px minmax(0, 1.2fr) minmax(210px, 0.65fr) auto;
        align-items: center;
        gap: 18px;
        overflow: hidden;
        border: 1px solid #E5D5B5;
        border-radius: 14px;
        background: #FDFBF7;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        color: #0B1E36;
        padding: 18px 22px;
        text-align: left;
    }

    .stitch-package-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #D4AF37;
    }

    .stitch-package-card:hover {
        border-color: #D4AF37;
        box-shadow: 0 8px 20px rgba(15, 41, 71, 0.08);
        transform: translateY(-1px);
    }

    .stitch-package-card-mark {
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border: 1px solid #E5D5B5;
        border-radius: 999px;
        background: #fff;
        color: #D4AF37;
    }

    .stitch-package-card-mark svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-package-card-copy {
        min-width: 0;
        display: grid;
        gap: 5px;
    }

    .stitch-package-card-copy small {
        color: #B18E2D;
        font-size: 12px;
        font-weight: 800;
        line-height: 1.2;
    }

    .stitch-package-card-copy strong {
        overflow: hidden;
        color: #0B1E36;
        font-family: "Merriweather", serif;
        font-size: 22px;
        font-weight: 700;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-package-card-copy em {
        overflow: hidden;
        color: #4b5563;
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 1.45;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-package-card-meta {
        display: grid;
        gap: 8px;
        justify-items: start;
    }

    .stitch-package-card .exam-countdown-package {
        min-width: 164px;
        display: inline-grid;
        gap: 2px;
        border: 1px solid #E5D5B5;
        border-radius: 10px;
        background: #fff;
        padding: 10px 14px;
    }

    .stitch-package-card .exam-countdown-package small {
        color: #B18E2D;
        font-size: 11px;
        font-weight: 800;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .stitch-package-card .exam-countdown-package strong {
        color: #0B1E36;
        font-size: 16px;
        font-weight: 800;
        line-height: 1.2;
    }

    .stitch-package-access {
        color: #6b7280;
        font-size: 12px;
        font-weight: 500;
    }

    .stitch-package-card-action {
        min-width: 136px;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid #0B1E36;
        border-radius: 12px;
        background: #0B1E36;
        color: #fff;
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
    }

    .stitch-package-card-action svg {
        width: 16px;
        height: 16px;
        fill: currentColor;
    }

    .stitch-program-list {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .stitch-day-card {
        overflow: hidden;
        border: 1px solid #E5D5B5;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-day-card summary {
        list-style: none;
    }

    .stitch-day-card summary::-webkit-details-marker {
        display: none;
    }

    .stitch-day-summary {
        min-height: 66px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        position: relative;
        background: #FDFBF7;
        color: #0B1E36;
        cursor: pointer;
        padding: 16px 22px;
    }

    .stitch-day-card:not([open]) > .stitch-day-summary::before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: #D4AF37;
        opacity: 0.9;
    }

    .stitch-day-card[open] > .stitch-day-summary {
        background: #0B1E36;
        color: #fff;
    }

    .stitch-day-heading {
        display: flex;
        align-items: baseline;
        gap: 12px;
        min-width: 0;
    }

    .stitch-day-heading strong {
        color: #D4AF37;
        font-size: 24px;
        font-weight: 800;
        line-height: 1.2;
        white-space: nowrap;
    }

    .stitch-day-card[open] .stitch-day-heading strong {
        color: #D4AF37;
    }

    .stitch-day-heading em {
        overflow: hidden;
        color: #0B1E36;
        font-size: 18px;
        font-style: normal;
        font-weight: 600;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-day-card[open] .stitch-day-heading em {
        color: #fff;
        font-size: 20px;
    }

    .stitch-day-meta {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 20px;
    }

    .stitch-day-meta small {
        color: #4b5563;
        font-size: 14px;
        font-weight: 400;
    }

    .stitch-day-meta b {
        min-width: 76px;
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #E5D5B5;
        border-radius: 999px;
        background: #fff;
        color: #0B1E36;
        padding: 6px 16px;
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-day-card[open] .stitch-day-meta b {
        border-color: #4b5563;
        background: #142C4A;
        color: #fff;
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.16);
    }

    .stitch-day-meta i {
        color: #9ca3af;
        font-style: normal;
        transition: transform 0.2s ease;
    }

    .stitch-day-card[open] .stitch-day-meta i {
        color: #d1d5db;
        transform: rotate(180deg);
    }

    .stitch-day-meta svg {
        width: 24px;
        height: 24px;
    }

    .stitch-day-body {
        display: flex;
        flex-direction: column;
    }

    .stitch-day-goal {
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: flex-start;
        gap: 20px;
        border-bottom: 1px solid #E5D5B5;
        background: #FDFBF7;
        padding: 24px;
    }

    .stitch-day-goal > span {
        flex: 0 0 56px;
        width: 56px;
        height: 56px;
        display: grid;
        place-items: center;
        border: 1px solid #E5D5B5;
        border-radius: 999px;
        background: #fff;
        color: #D4AF37;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-day-goal > span svg {
        width: 28px;
        height: 28px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-day-goal strong {
        display: block;
        margin: 2px 0 6px;
        color: #1f2937;
        font-size: 14px;
        font-weight: 700;
        letter-spacing: 0.35px;
    }

    .stitch-day-goal p {
        max-width: 920px;
        margin: 0;
        color: #4b5563;
        font-size: 16px;
        font-weight: 400;
        line-height: 1.65;
    }

    .stitch-day-goal > i {
        position: absolute;
        right: -38px;
        top: -28px;
        width: 256px;
        height: 160px;
        color: #E5D5B5;
        opacity: 0.2;
        font-style: normal;
    }

    .stitch-day-goal > i svg {
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-width: 1;
    }

    .stitch-test-list {
        display: flex;
        flex-direction: column;
    }

    .stitch-test-row {
        min-height: 92px;
        display: grid;
        grid-template-columns: minmax(360px, 1fr) 96px 160px 144px;
        align-items: center;
        gap: 24px;
        width: 100%;
        border: 0;
        border-bottom: 1px solid #f3f4f6;
        border-radius: 0;
        background: #fff;
        color: #1f2937;
        padding: 14px 22px;
        text-align: left;
    }

    .stitch-test-row:last-child {
        border-bottom: 0;
    }

    .stitch-test-row:hover {
        background: #f9fafb;
        box-shadow: none;
    }

    .stitch-test-kind {
        display: flex;
        align-items: center;
        gap: 16px;
        min-width: 0;
    }

    .stitch-test-kind i {
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: color-mix(in srgb, var(--test-accent) 12%, #fff);
        color: var(--test-accent);
        box-shadow: inset 0 1px 2px rgba(15, 41, 71, 0.08);
        font-style: normal;
    }

    .stitch-test-kind i svg {
        width: 24px;
        height: 24px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-test-kind strong {
        display: block;
        color: var(--test-accent);
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
    }

    .stitch-test-copy {
        min-width: 0;
        display: grid;
        gap: 5px;
    }

    .stitch-test-copy em {
        display: block;
        overflow: hidden;
        color: #1f2937;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.45;
        font-style: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-question-count {
        color: #6b7280;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
    }

    .stitch-progress-pill {
        justify-self: center;
        min-width: 74px;
        min-height: 31px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #f3f4f6;
        color: #6b7280;
        padding: 6px 14px;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

    .stitch-progress-pill.is-progress {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #1d4ed8;
    }

    .stitch-progress-pill.is-completed {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #15803d;
    }

    .stitch-progress-pill svg {
        width: 14px;
        height: 14px;
    }

    .stitch-row-action {
        justify-self: end;
        min-width: 144px;
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #E5D5B5;
        border-radius: 12px;
        background: #fff;
        color: #374151;
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-row-action.is-primary {
        border-color: #0B1E36;
        background: #0B1E36;
        color: #fff;
    }

    .student-main-test {
        flex-basis: 1180px;
        width: min(1180px, calc(100vw - 72px));
        max-width: 1180px;
        padding-top: 20px;
        background: #F9FAFB;
        font-family: "Inter", sans-serif;
    }

    .student-main-test .test-topbar {
        min-height: 64px;
        display: grid;
        grid-template-columns: 180px minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        border: 0;
        border-radius: 0;
        background: #0F2947;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.14);
        margin: 0 0 22px;
        padding: 12px 20px;
    }

    .student-main-test .test-back-button {
        min-height: 32px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        background: transparent;
        color: #fff;
        padding: 0;
        font-size: 16px;
        font-weight: 500;
    }

    .student-main-test .test-back-button svg {
        width: 24px;
        height: 24px;
    }

    .student-main-test .test-title-block {
        text-align: center;
    }

    .student-main-test .test-topbar h1 {
        margin: 0;
        color: #fff;
        font-size: 20px;
        font-weight: 700;
        line-height: 1.25;
        letter-spacing: 0;
    }

    .student-main-test .test-topbar h1 span {
        color: #9ca3af;
        margin: 0 10px;
    }

    .student-main-test .test-stats {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .student-main-test .stat-pill {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border-radius: 999px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        padding: 0 14px;
        font-size: 15px;
        font-weight: 700;
    }

    .student-main-test .stat-pill svg {
        width: 18px;
        height: 18px;
    }

    .student-main-test .stat-pill.is-navy {
        color: #0F2947;
    }

    .student-main-test .stat-pill.is-green {
        border: 1px solid #10B981;
        color: #10B981;
    }

    .student-main-test .test-workspace {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.46fr);
        gap: 18px;
        align-items: start;
        width: 100%;
        max-width: 1180px;
        margin: 0 auto;
    }

    .student-main-test .question-card,
    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .student-main-test .question-card {
        padding: 24px;
    }

    .student-main-test .question-progress-row {
        display: grid;
        grid-template-columns: 80px minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        margin: 0 0 22px;
    }

    .student-main-test .question-progress-row > span {
        color: #6b7280;
        font-size: 14px;
        font-weight: 500;
    }

    .student-main-test .question-progress-row > strong {
        color: #0F2947;
        font-size: 14px;
        font-weight: 700;
    }

    .student-main-test .progress-track {
        height: 8px;
        overflow: hidden;
        border-radius: 999px;
        background: #e5e7eb;
        margin: 0;
    }

    .student-main-test .progress-track span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: #B18E2D;
    }

    .student-main-test .topic-label {
        display: inline-block;
        min-height: 28px;
        border: 1px solid #3B82F6;
        border-radius: 6px;
        background: #eff6ff;
        color: #3B82F6;
        margin: 0 0 18px;
        padding: 5px 10px;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.05em;
        line-height: 1.5;
        text-transform: uppercase;
    }

    .student-main-test .question-copy {
        margin: 0;
    }

    .student-main-test .question-copy h2 {
        max-width: 760px;
        margin: 0 0 24px;
        color: #0F2947;
        font-family: "Inter", sans-serif;
        font-size: 21px;
        font-weight: 700;
        line-height: 1.48;
        letter-spacing: 0;
    }

    .student-main-test .option-list {
        display: grid;
        gap: 10px;
        margin-bottom: 20px;
    }

    .student-main-test .option-row {
        position: relative;
        min-height: 70px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 72px;
        overflow: hidden;
        border: 1px solid #dfe4ea;
        border-radius: 12px;
        background: #fff;
    }

    .student-main-test .option-row.is-correct {
        border-color: #10B981;
        background: #d1fae5;
    }

    .student-main-test .option-row.is-wrong {
        border-color: #EF4444;
        background: #fee2e2;
    }

    .student-main-test .option-main {
        min-height: 68px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 14px;
        background: transparent;
        color: #111827;
        padding: 12px 18px;
        text-align: left;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.55;
    }

    .student-main-test .option-key {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border: 2px solid #d1d5db;
        border-radius: 8px;
        background: #fff;
        color: #4b5563;
        font-size: 15px;
        font-weight: 700;
    }

    .student-main-test .option-row.is-correct .option-key {
        border-color: transparent;
        background: #10B981;
        color: #fff;
    }

    .student-main-test .option-row.is-wrong .option-key {
        border-color: transparent;
        background: #EF4444;
        color: #fff;
    }

    .student-main-test .option-tools {
        width: 72px;
        display: grid;
        align-items: center;
        justify-content: center;
        align-self: stretch;
        padding: 0;
    }

    .student-main-test .option-tool {
        position: static;
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border: 0;
        background: transparent;
        color: #9ca3af;
    }

    .student-main-test .option-result-marker svg,
    .student-main-test .option-tool svg {
        width: 22px;
        height: 22px;
    }

    .student-main-test .answer-feedback-banner {
        min-height: 86px;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr) auto;
        align-items: center;
        gap: 16px;
        border: 1px solid #EF4444;
        border-radius: 12px;
        background: #fee2e2;
        margin: 0 0 20px;
        padding: 12px 16px;
    }

    .student-main-test .answer-feedback-banner.is-correct {
        border-color: #10B981;
        background: #d1fae5;
    }

    .student-main-test .answer-feedback-icon {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: #EF4444;
        color: #fff;
    }

    .student-main-test .answer-feedback-banner.is-correct .answer-feedback-icon {
        background: #10B981;
    }

    .student-main-test .answer-feedback-banner strong {
        color: #EF4444;
        font-size: 18px;
        font-weight: 700;
    }

    .student-main-test .answer-feedback-banner.is-correct strong {
        color: #10B981;
    }

    .student-main-test .answer-feedback-banner p {
        margin: 4px 0 0;
        color: #374151;
        font-size: 14px;
        line-height: 1.4;
    }

    .student-main-test .answer-feedback-banner button {
        min-width: 224px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border-radius: 8px;
        background: #EF4444;
        color: #fff;
        padding: 9px 18px;
        font-size: 15px;
        font-weight: 700;
    }

    .student-main-test .learning-note-stack {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        margin: 0;
    }

    .student-main-test .study-note {
        min-height: 142px;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-content: start;
        column-gap: 8px;
        border-radius: 12px;
        padding: 14px;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .student-main-test .study-note-icon {
        width: auto;
        height: auto;
        display: inline-grid;
        place-items: center;
        margin: 1px 0 0;
        background: transparent !important;
    }

    .student-main-test .study-note-icon svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .student-main-test .study-note strong {
        display: block;
        margin: 0 0 8px;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.3;
    }

    .student-main-test .study-note p {
        margin: 0;
        color: #374151;
        font-size: 13px;
        font-weight: 400;
        line-height: 1.45;
    }

    .student-main-test .study-note-tip {
        border: 1px solid #3B82F6;
        background: #eff6ff;
    }

    .student-main-test .study-note-tip,
    .student-main-test .study-note-tip strong,
    .student-main-test .study-note-tip .study-note-icon {
        color: #3B82F6;
    }

    .student-main-test .study-note-mixup {
        border: 1px solid #EF4444;
        background: #fee2e2;
    }

    .student-main-test .study-note-mixup,
    .student-main-test .study-note-mixup strong,
    .student-main-test .study-note-mixup .study-note-icon {
        color: #EF4444;
    }

    .student-main-test .study-note-exam {
        border: 1px solid #facc15;
        background: #fefce8;
    }

    .student-main-test .study-note-exam,
    .student-main-test .study-note-exam strong,
    .student-main-test .study-note-exam .study-note-icon {
        color: #ca8a04;
    }

    .student-main-test .test-side-rail {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        padding: 20px;
    }

    .student-main-test .question-nav-panel h2,
    .student-main-test .question-hint-panel h2 {
        margin: 0;
        color: #0F2947;
        font-family: "Merriweather", serif;
        font-size: 18px;
        font-weight: 700;
    }

    .student-main-test .question-nav-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 12px 14px;
        margin: 24px 0 20px;
        color: #4b5563;
        font-size: 13px;
        font-weight: 400;
    }

    .student-main-test .question-nav-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

    .student-main-test .legend-dot {
        width: 12px;
        height: 12px;
        border: 1px solid #9ca3af;
        border-radius: 999px;
        background: #fff;
    }

    .student-main-test .legend-dot.is-answered {
        border-color: #10B981;
        background: #10B981;
    }

    .student-main-test .legend-dot.is-current {
        border: 4px solid #0F2947;
    }

    .student-main-test .question-dots {
        display: grid;
        grid-template-columns: repeat(5, 42px);
        gap: 12px;
        margin-bottom: 24px;
    }

    .student-main-test .question-dot {
        width: 42px;
        height: 42px;
        border: 1px solid #d1d5db;
        border-radius: 999px;
        background: #fff;
        color: #4b5563;
        font-size: 16px;
        font-weight: 700;
    }

    .student-main-test .question-dot.is-answered {
        border-color: #10B981;
        background: #10B981;
        color: #fff;
    }

    .student-main-test .question-dot.is-current {
        border-color: #0F2947;
        background: #0F2947;
        color: #fff;
        box-shadow: 0 4px 8px rgba(15, 41, 71, 0.18);
        transform: scale(1.1);
    }

    .student-main-test .question-rail-actions {
        display: flex;
        gap: 12px;
        margin: 0;
    }

    .student-main-test .rail-nav-button {
        flex: 1;
        min-height: 54px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 2px solid #0F2947;
        border-radius: 12px;
        background: #0F2947;
        color: #fff;
        box-shadow: 0 4px 8px rgba(15, 41, 71, 0.16);
        font-size: 15px;
        font-weight: 700;
    }

    .student-main-test .rail-nav-button.is-ghost {
        background: #fff;
        color: #0F2947;
        box-shadow: none;
    }

    .student-main-test .question-hint-panel {
        position: relative;
        overflow: hidden;
        border-color: rgba(177, 142, 45, 0.3);
        background: #FDFBF7;
    }

    .student-main-test .question-hint-panel::after {
        content: "";
        position: absolute;
        right: -16px;
        top: -16px;
        width: 96px;
        height: 96px;
        border-radius: 999px;
        background: rgba(177, 142, 45, 0.1);
        filter: blur(16px);
    }

    .student-main-test .question-hint-head {
        position: relative;
        z-index: 1;
        display: flex;
        align-items: flex-start;
        gap: 14px;
        margin-bottom: 18px;
    }

    .student-main-test .question-hint-head > span {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: rgba(177, 142, 45, 0.2);
        color: #B18E2D;
    }

    .student-main-test .question-hint-head svg {
        width: 24px;
        height: 24px;
    }

    .student-main-test .question-hint-panel p {
        margin: 4px 0 0;
        color: #4b5563;
        font-size: 14px;
        line-height: 1.6;
    }

    .student-main-test .hint-open-button {
        position: relative;
        z-index: 1;
        width: 100%;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid #B18E2D;
        border-radius: 12px;
        background: #fff;
        color: #B18E2D;
        margin-top: 0;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 600;
    }
}

.learning-launcher-meta {
    position: relative;
    z-index: 1;
    margin: -4px 0 14px 56px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.learning-open-button svg {
    width: 18px;
    height: 18px;
}

.learning-open-button.is-learning-ready,
.mobile-learning-trigger.is-learning-ready {
    border-color: #D4AF37;
    background: #fff7d6;
    color: #8a6818;
    animation: learningButtonBreath 1.85s ease-in-out infinite;
}

.learning-open-button.is-learning-ready svg,
.mobile-learning-trigger.is-learning-ready svg {
    color: currentColor;
}

.student-main-test .learning-open-button {
    margin-bottom: 10px;
}

@keyframes learningButtonBreath {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.42), 0 10px 24px rgba(5, 16, 31, 0.12);
        transform: translateZ(0) scale(1);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(212, 175, 55, 0), 0 14px 30px rgba(177, 142, 45, 0.22);
        transform: translateZ(0) scale(1.025);
    }
}

.learning-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: grid;
    place-items: center;
    background: rgba(7, 24, 51, 0.68);
    padding: 28px;
}

.learning-modal {
    width: min(740px, calc(100vw - 56px));
    max-height: min(760px, calc(100vh - 56px));
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.72);
    border-radius: 14px;
    background: #FAF8F5;
    box-shadow: 0 24px 70px rgba(7, 24, 51, 0.34);
    font-family: "Inter", sans-serif;
}

.learning-modal-header {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 40px;
    align-items: center;
    gap: 16px;
    border-bottom: 2px solid #D4AF37;
    background: #0B1E36;
    padding: 18px 22px;
}

.learning-modal-mark {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: rgba(212, 175, 55, 0.16);
    color: #D4AF37;
}

.learning-modal-mark svg {
    width: 26px;
    height: 26px;
}

.learning-modal-header small {
    display: block;
    margin-bottom: 2px;
    color: #D4AF37;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.learning-modal-header h2 {
    margin: 0;
    color: #ffffff;
    font-family: "Merriweather", serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
}

.learning-modal-header p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 14px;
    font-weight: 600;
}

.learning-modal-close {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.learning-modal-close svg {
    width: 20px;
    height: 20px;
}

.learning-modal-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 1px solid rgba(177, 142, 45, 0.28);
    background: #FFFDF8;
    padding: 14px 20px;
    -ms-overflow-style: none;
}

.learning-modal-tabs::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
}

.learning-modal-tabs button {
    min-height: 40px;
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(177, 142, 45, 0.3);
    border-radius: 999px;
    background: #ffffff;
    color: #0F2947;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 800;
}

.learning-modal-tabs button span {
    display: grid;
    place-items: center;
}

.learning-modal-tabs button svg {
    width: 17px;
    height: 17px;
}

.learning-modal-tabs button.is-active {
    border-color: #D4AF37;
    background: #0F2947;
    color: #ffffff;
    box-shadow: none;
}

.learning-modal-body {
    overflow: auto;
    background: #FAF8F5;
    padding: 20px 22px 24px;
}

.test-completion-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 310;
    display: grid;
    place-items: center;
    background: rgba(5, 16, 31, 0.56);
    padding: max(20px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.test-completion-modal {
    width: min(560px, 100%);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.48);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 28px 78px rgba(5, 16, 31, 0.32);
}

.test-completion-modal-head {
    min-height: 108px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 16px;
    background: #0B1E36;
    color: #ffffff;
    padding: 20px 22px;
}

.test-completion-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
}

.test-completion-mark svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.test-completion-modal-head small {
    display: block;
    margin-bottom: 4px;
    color: #F7E3A0;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0;
}

.test-completion-modal-head h2 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 22px;
    font-weight: 900;
    line-height: 1.24;
}

.test-completion-modal-head p {
    margin: 5px 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.35;
}

.test-completion-modal-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    background: #FFFCF6;
    padding: 20px 22px;
}

.test-completion-score {
    min-width: 94px;
    min-height: 82px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(16, 185, 129, 0.34);
    border-radius: 14px;
    background: #ECFDF5;
    color: #047857;
    padding: 10px;
}

.test-completion-score strong {
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.test-completion-score span {
    font-size: 12px;
    font-weight: 900;
}

.test-completion-modal-body p {
    margin: 0;
    color: #334155;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.55;
}

.test-completion-modal-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    border-top: 1px solid #eadbb7;
    background: #ffffff;
    padding: 16px;
}

.test-completion-action {
    min-width: 0;
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #D7C49E;
    border-radius: 12px;
    background: #ffffff;
    color: #0B1E36;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 900;
    line-height: 1.1;
}

.test-completion-action svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex: 0 0 auto;
}

.test-completion-action.is-primary {
    border-color: #0B1E36;
    background: #0B1E36;
    color: #ffffff;
}

.test-completion-action.is-secondary {
    border-color: rgba(16, 185, 129, 0.42);
    background: #ECFDF5;
    color: #047857;
}

.test-completion-action.is-ghost {
    background: #F8FAFC;
}

.learning-modal-note-list {
    display: grid;
    gap: 14px;
}

.learning-modal .study-note {
    min-height: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 12px;
    border: 1px solid rgba(177, 142, 45, 0.34);
    border-left: 4px solid #D4AF37;
    border-radius: 12px;
    background: #FFFDF8;
    padding: 18px;
    box-shadow: 0 1px 2px rgba(15, 41, 71, 0.04);
}

.learning-modal .study-note.is-modal {
    display: block;
}

.learning-modal .study-note-icon {
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    margin-top: 1px;
    background: transparent !important;
}

.learning-modal .study-note-icon svg {
    width: 21px;
    height: 21px;
}

.learning-modal .study-note strong {
    display: block;
    margin-bottom: 8px;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
}

.learning-modal .study-note > div {
    display: contents;
}

.learning-modal .study-note p {
    grid-column: 1 / -1;
    margin: 0;
    color: #334155;
    font-size: 15px;
    line-height: 1.65;
}

.study-note-hint {
    border-color: rgba(177, 142, 45, 0.34);
    border-left-color: #D4AF37;
    background: #FFFDF8;
}

.study-note-hint,
.study-note-hint strong,
.study-note-hint .study-note-icon {
    color: #B18E2D;
}

.study-note-memory {
    border: 1px solid rgba(177, 142, 45, 0.55);
    background: #fffbeb;
}

.study-note-memory,
.study-note-memory strong,
.study-note-memory .study-note-icon {
    color: #B18E2D;
}

.study-note-logic {
    border: 1px solid #0F6E7A;
    background: #EFF9F8;
}

.study-note-logic,
.study-note-logic strong,
.study-note-logic .study-note-icon {
    color: #0F6E7A;
}

.study-note-info {
    border: 1px solid rgba(15, 41, 71, 0.18);
    background: #F8FAFC;
}

.study-note-info,
.study-note-info strong,
.study-note-info .study-note-icon {
    color: #0F2947;
}

.student-main-test .learning-modal .study-note-hint {
    border-color: rgba(177, 142, 45, 0.34);
    border-left-color: #D4AF37;
    background: #FFFDF8;
}

.student-main-test .learning-modal .study-note-hint,
.student-main-test .learning-modal .study-note-hint strong,
.student-main-test .learning-modal .study-note-hint .study-note-icon {
    color: #B18E2D;
}

.student-main-test .learning-modal .study-note-mixup {
    border-color: rgba(159, 51, 65, 0.26);
    border-left-color: #9F3341;
    background: #FFF7F6;
}

.student-main-test .learning-modal .study-note-mixup,
.student-main-test .learning-modal .study-note-mixup strong,
.student-main-test .learning-modal .study-note-mixup .study-note-icon {
    color: #9F3341;
}

.student-main-test .learning-modal .study-note-exam,
.student-main-test .learning-modal .study-note-memory {
    border-color: rgba(177, 142, 45, 0.34);
    border-left-color: #D4AF37;
    background: #FFFDF8;
}

.student-main-test .learning-modal .study-note-exam,
.student-main-test .learning-modal .study-note-exam strong,
.student-main-test .learning-modal .study-note-exam .study-note-icon,
.student-main-test .learning-modal .study-note-memory,
.student-main-test .learning-modal .study-note-memory strong,
.student-main-test .learning-modal .study-note-memory .study-note-icon {
    color: #B18E2D;
}

.student-main-test .learning-modal .study-note-logic,
.student-main-test .learning-modal .study-note-info {
    border-color: rgba(15, 41, 71, 0.18);
    border-left-color: #0F2947;
    background: #FFFFFF;
}

.student-main-test .learning-modal .study-note-logic,
.student-main-test .learning-modal .study-note-logic strong,
.student-main-test .learning-modal .study-note-logic .study-note-icon,
.student-main-test .learning-modal .study-note-info,
.student-main-test .learning-modal .study-note-info strong,
.student-main-test .learning-modal .study-note-info .study-note-icon {
    color: #0F2947;
}

.option-explanation-list {
    display: grid;
    gap: 12px;
}

.option-explanation-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    background: #ffffff;
    padding: 14px;
}

.option-explanation-item.is-correct {
    border-color: #10B981;
    background: #ecfdf5;
}

.option-explanation-item.is-wrong.is-selected {
    border-color: #EF4444;
    background: #fef2f2;
}

.option-explanation-item .option-key {
    width: 36px;
    height: 36px;
}

.option-explanation-item.is-correct .option-key {
    border-color: transparent;
    background: #10B981;
    color: #ffffff;
}

.option-explanation-item.is-wrong.is-selected .option-key {
    border-color: transparent;
    background: #EF4444;
    color: #ffffff;
}

.option-explanation-item strong {
    display: block;
    color: #0F2947;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.option-explanation-item p {
    margin: 6px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

@media (max-width: 640px) {
    .test-completion-modal-backdrop {
        padding: 14px;
    }

    .test-completion-modal {
        width: calc(100vw - 28px);
        border-radius: 16px;
    }

    .test-completion-modal-head {
        min-height: 92px;
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .test-completion-mark {
        width: 48px;
        height: 48px;
    }

    .test-completion-modal-head h2 {
        font-size: 19px;
    }

    .test-completion-modal-body {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 16px;
    }

    .test-completion-score {
        min-height: 66px;
        grid-template-columns: auto auto;
        justify-content: center;
        gap: 8px;
    }

    .test-completion-modal-actions {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .test-completion-action {
        min-height: 48px;
    }

    .learning-modal-backdrop {
        padding: 14px;
    }

    .learning-modal {
        width: calc(100vw - 28px);
        max-height: calc(100vh - 28px);
    }

    .learning-modal-header {
        grid-template-columns: 44px minmax(0, 1fr) 36px;
        gap: 12px;
        padding: 16px;
    }

    .learning-modal-mark {
        width: 44px;
        height: 44px;
    }

    .learning-modal-header h2 {
        font-size: 20px;
    }

    .learning-modal-body {
        padding: 16px;
    }
}

@media (min-width: 1024px) {
    .student-main-test .test-topbar {
        min-height: 54px;
        grid-template-columns: auto;
        justify-content: start;
        margin-bottom: 18px;
        padding: 10px 20px;
    }

    .student-main-test .test-back-button {
        width: fit-content;
    }

    .student-main-test .question-panel-test-summary {
        display: grid;
        gap: 14px;
        border-bottom: 1px solid #e5e7eb;
        margin: -2px 0 18px;
        padding-bottom: 18px;
    }

    .student-main-test .question-panel-title-block {
        display: grid;
        gap: 5px;
    }

    .student-main-test .question-panel-title-block h2 {
        margin: 0;
        color: #0F2947;
        font-family: "Merriweather", serif;
        font-size: 20px;
        font-weight: 700;
        line-height: 1.25;
    }

    .student-main-test .question-panel-title-block p {
        margin: 0;
        color: #475569;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.35;
    }

    .student-main-test .question-panel-stats {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .student-main-test .question-panel-stats .stat-pill {
        min-height: 36px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #ffffff;
        padding: 0 12px;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .student-main-test .question-panel-stats .stat-pill svg {
        width: 16px;
        height: 16px;
    }

    .student-main-test .question-panel-stats .stat-pill.is-navy {
        color: #0F2947;
    }

    .student-main-test .question-panel-stats .stat-pill.is-green {
        border-color: #10B981;
        background: #ecfdf5;
        color: #10B981;
    }

    .student-main-test .question-nav-panel > h3 {
        margin: 0;
        color: #0F2947;
        font-family: "Merriweather", serif;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.25;
    }

    .student-main-test .question-nav-legend {
        margin-top: 18px;
    }
}

.student-main-test .test-topbar {
    min-height: 0;
    display: flex;
    justify-content: flex-start;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    margin: 0 0 16px;
    padding: 0;
}

.student-main-test .test-back-button {
    min-height: 42px;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(177, 142, 45, 0.42);
    border-radius: 999px;
    background: #FFFDF8;
    color: #0F2947;
    padding: 0 16px 0 13px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
}

.student-main-test .test-back-button svg {
    width: 20px;
    height: 20px;
}

.student-main-test .test-back-button:hover {
    border-color: #B18E2D;
    background: #fff8e8;
    color: #0F2947;
}

/* Responsive consolidation for the Lite MVP student/admin surfaces */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

.auth-page {
    padding: clamp(16px, 4vw, 24px);
}

.auth-card {
    max-width: 100%;
}

.auth-card .form-message {
    width: auto;
    min-height: 0;
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--danger);
    padding: 0;
    text-align: left;
    font-weight: 700;
}

.auth-card .form-message:empty {
    display: none;
}

@media (max-width: 1023px) {
    .student-shell.stitch-shell {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow: visible;
        background: #FAF8F5;
        color: #0B1E36;
        font-family: "Inter", sans-serif;
    }

    .stitch-main-header {
        position: sticky;
        top: 0;
        z-index: 70;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        border: 0;
        border-radius: 0;
        background: #0B1E36;
        box-shadow: 0 8px 24px rgba(7, 24, 51, 0.22);
        padding: 12px clamp(14px, 4vw, 28px) 10px;
    }

    .stitch-main-header .brand-lockup {
        min-width: 0;
        height: auto;
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0;
        padding: 0;
        color: #ffffff;
        text-decoration: none;
        box-shadow: none;
    }

    .stitch-main-header .brand-mark {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        border: 1px solid rgba(212, 175, 55, 0.72);
        border-radius: 12px;
        background: rgba(212, 175, 55, 0.12);
        color: #D4AF37;
        box-shadow: none;
    }

    .stitch-main-header .brand-mark svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-main-header .brand-wordmark {
        min-width: 0;
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 2px;
        color: rgba(255, 255, 255, 0.76);
        font-size: 18px;
        line-height: 1.05;
    }

    .stitch-main-header .brand-wordmark strong {
        color: #ffffff;
        font-size: inherit;
        font-weight: 900;
        line-height: inherit;
    }

    .stitch-top-nav {
        grid-column: 1 / -1;
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        margin: 0 -4px;
        padding: 2px 4px 0;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .stitch-top-nav::-webkit-scrollbar {
        display: none;
    }

    .stitch-top-nav .student-top-nav-item {
        flex: 0 0 auto;
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid transparent;
        border-radius: 999px;
        background: transparent;
        color: rgba(255, 255, 255, 0.72);
        padding: 0 12px;
        font-size: 13px;
        font-weight: 750;
        line-height: 1;
        text-decoration: none;
        white-space: nowrap;
    }

    .stitch-top-nav .student-top-nav-item svg {
        width: 17px;
        height: 17px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-top-nav .student-top-nav-item.is-active {
        border-color: rgba(212, 175, 55, 0.62);
        background: rgba(212, 175, 55, 0.14);
        color: #F7E3A0;
    }

    .stitch-top-nav .student-top-nav-item.is-disabled,
    .stitch-top-nav .student-top-nav-item:disabled {
        opacity: 0.58;
    }

    .stitch-main-header .student-menu-actions {
        min-width: 0;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .stitch-main-header .student-admin-link {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(212, 175, 55, 0.58);
        border-radius: 999px;
        background: rgba(212, 175, 55, 0.12);
        color: #F7E3A0;
        padding: 0 12px;
        font-size: 12px;
        font-weight: 850;
        text-decoration: none;
        white-space: nowrap;
    }

    .stitch-user-chip {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        border: 0;
        background: transparent;
        padding: 0;
    }

    .stitch-user-copy {
        min-width: 0;
        display: block;
        text-align: right;
    }

    .stitch-user-copy small {
        display: block;
        color: #D4AF37;
        font-size: 10px;
        font-weight: 900;
        line-height: 1.1;
    }

    .stitch-user-copy strong {
        display: block;
        max-width: 120px;
        overflow: hidden;
        color: #ffffff;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-avatar,
    .stitch-logout {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border-radius: 999px;
    }

    .stitch-avatar {
        background: #ffffff;
        color: #0B1E36;
    }

    .stitch-avatar svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-logout {
        border: 1px solid rgba(255, 255, 255, 0.22);
        background: rgba(255, 255, 255, 0.08);
        color: #ffffff;
    }

    .stitch-logout svg {
        width: 19px;
        height: 19px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-layout {
        flex: 1;
        width: 100%;
        max-width: none;
        display: block;
        margin: 0;
        padding: 0 clamp(16px, 4vw, 28px) 48px;
    }

    .stitch-sidebar {
        display: none;
    }

    .student-main,
    .student-main-camp,
    .student-main-test {
        min-width: 0;
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 22px 0 0;
        background: transparent;
    }

    .student-main-test {
        background: #F9FAFB;
    }

    .stitch-camp-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        margin: 24px 0 20px;
    }

    .stitch-camp-hero h1 {
        margin: 0 0 8px;
        color: #0B1E36;
        font-family: "Merriweather", serif;
        font-size: clamp(28px, 6vw, 34px);
        font-weight: 700;
        line-height: 1.18;
    }

    .stitch-camp-hero p {
        margin: 0;
        color: #4b5563;
        font-size: 15px;
        line-height: 1.55;
    }

    .stitch-hero-actions {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .stitch-mini-timer,
    .stitch-package-switch {
        width: 100%;
        min-width: 0;
        min-height: 54px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        border: 1px solid #E5D5B5;
        border-radius: 12px;
        background: #FDFBF7;
        color: #0B1E36;
        padding: 12px 14px;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-mini-timer small {
        display: block;
        color: #6b7280;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.2;
    }

    .stitch-mini-timer strong {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 5px;
        color: #0B1E36;
        margin: 3px 0;
        font-size: 20px;
        font-weight: 900;
        line-height: 1.18;
    }

    .stitch-mini-timer em {
        color: #4b5563;
        font-size: 13px;
        font-style: normal;
        font-weight: 600;
    }

    .stitch-mini-timer i,
    .stitch-package-switch svg {
        flex: 0 0 auto;
        color: #D4AF37;
        font-style: normal;
    }

    .stitch-mini-timer i {
        width: 38px;
        height: 38px;
        display: grid;
        place-items: center;
        border: 1px solid #E5D5B5;
        border-radius: 10px;
        background: #ffffff;
    }

    .stitch-package-switch {
        justify-content: center;
        background: #ffffff;
        font-size: 14px;
        font-weight: 850;
    }

    .stitch-package-grid,
    .stitch-program-list {
        display: grid;
        gap: 14px;
    }

    .stitch-package-card {
        position: relative;
        width: 100%;
        min-height: 0;
        display: grid;
        grid-template-columns: 48px minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        overflow: hidden;
        border: 1px solid #E5D5B5;
        border-radius: 14px;
        background: #FDFBF7;
        color: #0B1E36;
        padding: 16px;
        text-align: left;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-package-card::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
        background: #D4AF37;
    }

    .stitch-package-card-mark {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 1px solid #E5D5B5;
        border-radius: 999px;
        background: #ffffff;
        color: #D4AF37;
    }

    .stitch-package-card-mark svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-package-card-copy {
        min-width: 0;
        display: grid;
        gap: 5px;
    }

    .stitch-package-card-copy small {
        color: #B18E2D;
        font-size: 12px;
        font-weight: 850;
        line-height: 1.2;
    }

    .stitch-package-card-copy strong {
        color: #0B1E36;
        font-family: "Merriweather", serif;
        font-size: clamp(20px, 5vw, 24px);
        font-weight: 700;
        line-height: 1.24;
        white-space: normal;
    }

    .stitch-package-card-copy em {
        color: #4b5563;
        font-size: 14px;
        font-style: normal;
        line-height: 1.45;
        white-space: normal;
    }

    .stitch-package-card-meta {
        grid-column: 1 / -1;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
        min-width: 0;
    }

    .stitch-package-card .exam-countdown-package {
        min-width: 0;
        display: inline-grid;
        gap: 2px;
        border: 1px solid #E5D5B5;
        border-radius: 10px;
        background: #ffffff;
        padding: 9px 12px;
    }

    .stitch-package-card .exam-countdown-package small {
        color: #B18E2D;
        font-size: 10px;
        font-weight: 900;
        line-height: 1.1;
        text-transform: uppercase;
    }

    .stitch-package-card .exam-countdown-package strong {
        color: #0B1E36;
        font-size: 16px;
        font-weight: 900;
        line-height: 1.2;
    }

    .stitch-package-access {
        color: #6b7280;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
    }

    .stitch-package-card-action {
        grid-column: 1 / -1;
        min-height: 42px;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid #0B1E36;
        border-radius: 12px;
        background: #0B1E36;
        color: #ffffff;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 850;
        white-space: nowrap;
    }

    .stitch-day-card {
        overflow: hidden;
        border: 1px solid #E5D5B5;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .stitch-day-card summary {
        list-style: none;
    }

    .stitch-day-card summary::-webkit-details-marker {
        display: none;
    }

    .stitch-day-summary {
        position: relative;
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        background: #FDFBF7;
        color: #0B1E36;
        cursor: pointer;
        padding: 15px 16px;
    }

    .stitch-day-card:not([open]) > .stitch-day-summary::before {
        content: "";
        position: absolute;
        inset: 0 auto 0 0;
        width: 4px;
        background: #D4AF37;
    }

    .stitch-day-card[open] > .stitch-day-summary {
        background: #0B1E36;
        color: #ffffff;
    }

    .stitch-day-heading {
        min-width: 0;
        display: grid;
        gap: 4px;
    }

    .stitch-day-heading strong {
        color: #D4AF37;
        font-size: 20px;
        font-weight: 900;
        line-height: 1.15;
    }

    .stitch-day-heading em {
        color: inherit;
        overflow-wrap: anywhere;
        font-size: 16px;
        font-style: normal;
        font-weight: 750;
        line-height: 1.32;
    }

    .stitch-day-meta {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
        min-width: 0;
    }

    .stitch-day-meta small {
        color: inherit;
        opacity: 0.72;
        font-size: 12px;
        font-weight: 650;
        line-height: 1.25;
    }

    .stitch-day-meta b {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #E5D5B5;
        border-radius: 999px;
        background: #ffffff;
        color: #0B1E36;
        padding: 5px 10px;
        font-size: 12px;
        font-weight: 900;
        white-space: nowrap;
    }

    .stitch-day-meta i {
        width: 28px;
        height: 28px;
        display: grid;
        place-items: center;
        color: currentColor;
        font-style: normal;
    }

    .stitch-day-body,
    .stitch-test-list {
        display: grid;
    }

    .stitch-day-goal {
        position: relative;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr);
        align-items: start;
        gap: 14px;
        overflow: hidden;
        border-bottom: 1px solid #E5D5B5;
        background: #FDFBF7;
        padding: 18px 16px;
    }

    .stitch-day-goal > span {
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border: 1px solid #E5D5B5;
        border-radius: 999px;
        background: #ffffff;
        color: #D4AF37;
    }

    .stitch-day-goal > span svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-day-goal strong {
        display: block;
        margin: 0 0 6px;
        color: #1f2937;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.2;
    }

    .stitch-day-goal p {
        margin: 0;
        color: #4b5563;
        font-size: 15px;
        line-height: 1.6;
    }

    .stitch-day-goal > i {
        display: none;
    }

    .stitch-test-row {
        min-height: 0;
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 12px;
        border: 0;
        border-bottom: 1px solid #f3f4f6;
        border-radius: 0;
        background: #ffffff;
        color: #1f2937;
        padding: 14px 16px;
        text-align: left;
    }

    .stitch-test-row:last-child {
        border-bottom: 0;
    }

    .stitch-test-kind {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .stitch-test-kind i {
        flex: 0 0 42px;
        width: 42px;
        height: 42px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: color-mix(in srgb, var(--test-accent, #D4AF37) 12%, #ffffff);
        color: var(--test-accent, #B18E2D);
        font-style: normal;
    }

    .stitch-test-kind i svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .stitch-test-copy {
        min-width: 0;
        display: grid;
        gap: 4px;
    }

    .stitch-test-title-line {
        min-width: 0;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        gap: 4px;
    }

    .stitch-test-kind strong {
        color: var(--test-accent, #B18E2D);
        font-size: 14px;
        font-weight: 850;
        line-height: 1.2;
    }

    .stitch-test-copy em {
        color: #1f2937;
        overflow-wrap: anywhere;
        font-size: 15px;
        font-style: normal;
        font-weight: 650;
        line-height: 1.4;
    }

    .stitch-question-count,
    .stitch-progress-pill {
        justify-self: start;
        color: #6b7280;
        font-size: 12px;
        font-weight: 800;
        white-space: nowrap;
    }

    .stitch-progress-pill {
        min-height: 30px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #f3f4f6;
        padding: 5px 10px;
    }

    .stitch-progress-pill.is-progress {
        border-color: #bfdbfe;
        background: #eff6ff;
        color: #1d4ed8;
    }

    .stitch-progress-pill.is-completed {
        border-color: #bbf7d0;
        background: #dcfce7;
        color: #15803d;
    }

    .stitch-progress-pill-inline {
        display: none;
    }

    .stitch-row-action {
        grid-column: 1 / -1;
        min-height: 42px;
        width: 100%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 1px solid #E5D5B5;
        border-radius: 12px;
        background: #ffffff;
        color: #374151;
        padding: 10px 16px;
        font-size: 14px;
        font-weight: 850;
    }

    .stitch-row-action.is-primary {
        border-color: #0B1E36;
        background: #0B1E36;
        color: #ffffff;
    }

    .student-main-test .test-topbar {
        margin: 0 0 16px;
    }

    .student-main-test .test-workspace {
        width: 100%;
        max-width: none;
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
        align-items: start;
        margin: 0;
    }

    .student-main-test .question-card,
    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        width: 100%;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .student-main-test .question-card,
    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        padding: clamp(16px, 4vw, 24px);
    }

    .student-main-test .question-progress-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        margin: 0 0 20px;
    }

    .student-main-test .question-copy h2 {
        max-width: none;
        margin: 0 0 22px;
        color: #0F2947;
        font-family: "Inter", sans-serif;
        font-size: clamp(21px, 5vw, 26px);
        font-weight: 850;
        line-height: 1.35;
    }

    .student-main-test .option-list {
        display: grid;
        gap: 10px;
    }

    .student-main-test .option-row {
        min-height: 66px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 56px;
        overflow: hidden;
        border: 1px solid #dfe4ea;
        border-radius: 12px;
        background: #ffffff;
    }

    .student-main-test .option-main {
        min-height: 64px;
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        text-align: left;
        font-size: 15px;
        font-weight: 750;
        line-height: 1.45;
    }

    .student-main-test .option-key {
        width: 34px;
        height: 34px;
        display: grid;
        place-items: center;
        border: 2px solid #d1d5db;
        border-radius: 8px;
        background: #ffffff;
        color: #4b5563;
        font-size: 15px;
        font-weight: 850;
    }

    .student-main-test .option-tools {
        width: 56px;
        min-width: 56px;
        display: grid;
        place-items: center;
        padding: 0;
    }

    .student-main-test .option-tool,
    .student-main-test .option-result-marker {
        width: 40px;
        height: 40px;
        display: grid;
        place-items: center;
    }

    .student-main-test .question-panel-test-summary {
        display: grid;
        gap: 12px;
        border-bottom: 1px solid #e5e7eb;
        margin: 0 0 16px;
        padding-bottom: 16px;
    }

    .student-main-test .question-panel-title-block h2,
    .student-main-test .question-nav-panel > h3,
    .student-main-test .question-hint-panel h2 {
        margin: 0;
        color: #0F2947;
        font-family: "Merriweather", serif;
        font-size: 19px;
        font-weight: 700;
        line-height: 1.28;
    }

    .student-main-test .question-panel-title-block p {
        margin: 4px 0 0;
        color: #475569;
        font-size: 14px;
        line-height: 1.4;
    }

    .student-main-test .question-panel-stats,
    .student-main-test .question-nav-legend {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .student-main-test .question-dots {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
        gap: 8px;
    }

    .student-main-test .question-dot {
        width: 42px;
        height: 42px;
        justify-self: center;
    }

    .student-main-test .question-rail-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .student-main-test .rail-nav-button {
        min-width: 0;
        min-height: 44px;
    }
}

@media (min-width: 700px) and (max-width: 1023px) {
    .stitch-layout {
        padding-left: 24px;
        padding-right: 24px;
    }

    .stitch-camp-hero {
        grid-template-columns: minmax(0, 1fr) minmax(260px, auto);
        align-items: end;
    }

    .stitch-package-card {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        align-items: center;
    }

    .stitch-package-card-meta {
        grid-column: 2 / 3;
    }

    .stitch-package-card-action {
        grid-column: 3;
        width: auto;
        min-width: 132px;
    }

    .stitch-test-row {
        grid-template-columns: minmax(0, 1fr) auto auto auto;
    }

    .stitch-row-action {
        grid-column: auto;
        width: auto;
        min-width: 124px;
    }

    .student-main-test .option-main {
        font-size: 16px;
    }
}

@media (min-width: 1024px) and (max-width: 1180px) {
    .stitch-main-header {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 18px;
        padding-left: 24px;
        padding-right: 24px;
    }

    .stitch-main-header .brand-wordmark {
        font-size: 21px;
    }

    .stitch-top-nav {
        justify-content: flex-start;
        gap: 4px;
        overflow: hidden;
    }

    .stitch-top-nav .student-top-nav-item {
        padding-left: 11px;
        padding-right: 11px;
    }

    .stitch-top-nav .student-top-nav-item.is-disabled {
        display: none;
    }

    .stitch-main-header .student-menu-actions {
        gap: 12px;
    }

    .stitch-main-header .student-admin-link {
        padding-left: 14px;
        padding-right: 14px;
    }

    .stitch-user-copy {
        display: none;
    }

    .stitch-avatar {
        width: 44px;
        height: 44px;
    }

    .stitch-layout {
        padding-left: 24px;
        padding-right: 24px;
    }
}

@media (max-width: 640px) {
    .auth-card {
        padding: 24px;
    }

    .auth-card h1 {
        font-size: 32px;
    }

    .stitch-main-header {
        grid-template-columns: minmax(0, 1fr) auto;
        padding: 12px 16px 10px;
    }

    .stitch-main-header .brand-wordmark {
        display: grid;
        gap: 0;
        font-size: 16px;
    }

    .stitch-top-nav .student-top-nav-item.is-disabled {
        display: none;
    }

    .stitch-main-header .student-admin-link,
    .stitch-user-copy {
        display: none;
    }

    .stitch-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .stitch-day-summary {
        grid-template-columns: minmax(0, 1fr);
    }

    .stitch-day-meta {
        justify-content: flex-start;
    }

    .stitch-day-meta small {
        display: none;
    }

    .stitch-day-goal {
        grid-template-columns: minmax(0, 1fr);
    }

    .stitch-day-goal > span {
        width: 38px;
        height: 38px;
    }

    .stitch-test-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .stitch-question-count,
    .stitch-progress-pill {
        justify-self: start;
    }

    .student-main-test .question-progress-row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .student-main-test .question-progress-row > span {
        grid-column: 1 / -1;
    }

    .student-main-test .option-row {
        grid-template-columns: minmax(0, 1fr) 52px;
    }

    .student-main-test .option-main {
        grid-template-columns: 34px minmax(0, 1fr);
        padding: 10px 12px;
    }

    .student-main-test .option-key {
        width: 32px;
        height: 32px;
    }

    .student-main-test .option-tools {
        width: 52px;
        min-width: 52px;
    }

    .student-main-test .question-rail-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .learning-modal {
        border-radius: 12px;
    }

    .learning-modal-tabs {
        padding: 12px 14px;
    }
}

@media (max-width: 760px) {
    body.admin-page .app-shell {
        width: 100%;
        padding: 14px 14px 56px;
    }

    .admin-menu-bar {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .admin-menu-tabs,
    .admin-menu-quick,
    .package-strip {
        width: 100%;
        justify-content: flex-start;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-page-intro,
    .admin-topbar,
    .camp-builder-panel > .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .admin-page-intro h1,
    .admin-topbar h1 {
        font-size: 28px;
    }

    .admin-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .admin-table {
        min-width: 760px;
    }

    .inline-form,
    .package-access-form,
    .package-check-list {
        min-width: 0;
        flex-wrap: wrap;
    }

    .admin-modal-backdrop {
        align-items: stretch;
        padding: 12px;
    }

    .admin-modal,
    .admin-json-modal,
    .admin-test-modal {
        width: 100%;
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        border-radius: 14px;
        padding: 16px;
    }
}

/* Flexible mobile/tablet navigation and feedback sheet */
html,
body {
    width: 100%;
    max-width: 100%;
}

.student-shell.stitch-shell {
    min-height: 100vh;
    min-height: 100svh;
    min-height: 100dvh;
}

.mobile-menu-toggle,
.mobile-menu-backdrop,
.mobile-student-menu {
    display: none;
}

.mobile-menu-toggle {
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0;
}

.mobile-menu-toggle svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.option-feedback-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 240;
    display: grid;
    align-items: center;
    justify-items: center;
    background: rgba(5, 16, 31, 0.48);
    padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
}

.option-feedback-modal {
    width: min(560px, 100%);
    max-height: min(620px, calc(100dvh - 36px));
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(15, 41, 71, 0.12);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 24px 72px rgba(5, 16, 31, 0.28);
}

.option-feedback-modal-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 12px;
    background: #0B1E36;
    color: #ffffff;
    padding: 16px;
}

.option-feedback-modal .option-key {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, 0.68);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.option-feedback-modal-head small {
    display: block;
    margin-bottom: 3px;
    color: #F7E3A0;
    font-size: 12px;
    font-weight: 850;
    line-height: 1.2;
}

.option-feedback-modal-head h2 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #ffffff;
    font-family: "Inter", sans-serif;
    font-size: 17px;
    font-weight: 850;
    line-height: 1.35;
}

.option-feedback-modal-close {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0;
}

.option-feedback-modal-close svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.option-feedback-modal-body {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
    background: #FAF8F5;
    padding: 18px 20px 22px;
}

.option-feedback-modal-body p {
    margin: 0;
    overflow-wrap: anywhere;
    color: #1f2937;
    font-size: 15px;
    line-height: 1.65;
}

.option-feedback-modal.is-correct .option-feedback-modal-head {
    background: #0F3D34;
}

.option-feedback-modal.is-wrong .option-feedback-modal-head {
    background: #5B1B25;
}

@media (min-width: 641px) and (max-width: 900px) {
    .stitch-main-header {
        padding-left: max(22px, env(safe-area-inset-left));
        padding-right: max(22px, env(safe-area-inset-right));
    }

    .stitch-top-nav .student-top-nav-item {
        min-height: 44px;
    }

    .student-main-test .test-workspace {
        gap: 18px;
    }
}

@media (min-width: 901px) and (max-width: 1180px) {
    .stitch-top-nav .student-top-nav-item {
        min-height: 44px;
    }
}

@media (max-width: 640px) {
    body {
        min-width: 0;
    }

    .student-shell.stitch-shell {
        overflow-x: hidden;
    }

    .stitch-main-header {
        min-height: 64px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        padding: max(10px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) 10px max(14px, env(safe-area-inset-left));
    }

    .stitch-main-header .brand-lockup {
        gap: 9px;
    }

    .stitch-main-header .brand-mark {
        flex-basis: 36px;
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .stitch-main-header .brand-wordmark {
        font-size: 15px;
        line-height: 1.05;
    }

    .stitch-top-nav {
        display: none;
    }

    .stitch-main-header .student-menu-actions {
        gap: 8px;
    }

    .stitch-main-header .student-admin-link,
    .stitch-user-chip {
        display: none;
    }

    .stitch-logout {
        width: 44px;
        height: 44px;
    }

    .mobile-menu-toggle {
        display: grid;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 210;
        background: rgba(5, 16, 31, 0.44);
    }

    .mobile-student-menu {
        position: fixed;
        top: calc(max(10px, env(safe-area-inset-top)) + 58px);
        right: max(12px, env(safe-area-inset-right));
        left: max(12px, env(safe-area-inset-left));
        z-index: 220;
        max-height: calc(100dvh - 84px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(212, 175, 55, 0.22);
        border-radius: 16px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 24px 56px rgba(5, 16, 31, 0.28);
        padding: 14px;
    }

    .student-shell.is-mobile-menu-open .mobile-menu-backdrop,
    .student-shell.is-mobile-menu-open .mobile-student-menu {
        display: block;
    }

    .mobile-menu-user {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid #E5D5B5;
        padding: 0 0 12px;
    }

    .mobile-menu-user .stitch-avatar {
        width: 44px;
        height: 44px;
        background: #0B1E36;
        color: #ffffff;
    }

    .mobile-menu-user small {
        display: block;
        color: #B18E2D;
        font-size: 11px;
        font-weight: 900;
        line-height: 1.15;
    }

    .mobile-menu-user strong {
        display: block;
        overflow: hidden;
        color: #0B1E36;
        font-size: 15px;
        font-weight: 850;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu-nav {
        display: grid;
        gap: 8px;
        padding-top: 12px;
    }

    .mobile-menu-item {
        min-height: 48px;
        width: 100%;
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: transparent;
        color: #0B1E36;
        padding: 11px 12px;
        text-align: left;
        text-decoration: none;
        font-size: 15px;
        font-weight: 800;
    }

    .mobile-menu-item svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .mobile-menu-item.is-active {
        border-color: #E5D5B5;
        background: #FFF8E8;
        color: #0B1E36;
    }

    .mobile-menu-item.is-danger {
        color: #9F3341;
    }

    .mobile-menu-item:disabled {
        opacity: 0.48;
    }

    .stitch-layout {
        padding-left: max(14px, env(safe-area-inset-left));
        padding-right: max(14px, env(safe-area-inset-right));
        padding-bottom: max(44px, env(safe-area-inset-bottom));
    }

    .student-main,
    .student-main-camp,
    .student-main-test {
        padding-top: 18px;
    }

    .student-main-test .test-topbar {
        margin-bottom: 14px;
    }

    .student-main-test .test-back-button {
        min-height: 44px;
        max-width: 100%;
        white-space: normal;
    }

    .student-main-test .question-card,
    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        border-radius: 14px;
        padding: 16px;
    }

    .student-main-test .question-copy h2 {
        margin-bottom: 18px;
        font-size: 22px;
        line-height: 1.32;
    }

    .student-main-test .option-row {
        grid-template-columns: minmax(0, 1fr) 52px;
        align-items: stretch;
    }

    .student-main-test .option-main {
        min-width: 0;
        min-height: 64px;
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 10px;
        padding: 10px 12px;
        font-size: 15px;
        line-height: 1.42;
    }

    .student-main-test .option-main span:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .student-main-test .option-tools {
        width: 52px;
        min-width: 52px;
        background: transparent;
    }

    .student-main-test .option-tool,
    .student-main-test .option-result-marker {
        width: 44px;
        height: 44px;
        border-radius: 999px;
    }

    .student-main-test .option-tool.is-active {
        background: rgba(15, 41, 71, 0.08);
    }

    .student-main-test .option-row.is-correct .option-tool.is-active,
    .student-main-test .option-row.is-wrong .option-tool.is-active {
        background: rgba(255, 255, 255, 0.62);
    }

    .student-main-test .option-feedback {
        display: none;
    }

    .option-feedback-modal-backdrop {
        align-items: end;
        justify-items: stretch;
        padding: 0;
    }

    .option-feedback-modal {
        width: 100%;
        max-height: min(72svh, 560px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
        box-shadow: 0 -18px 48px rgba(5, 16, 31, 0.28);
    }

    .option-feedback-modal-head {
        grid-template-columns: 38px minmax(0, 1fr) 44px;
        gap: 10px;
        padding: 14px max(14px, env(safe-area-inset-right)) 14px max(14px, env(safe-area-inset-left));
    }

    .option-feedback-modal .option-key {
        width: 36px;
        height: 36px;
    }

    .option-feedback-modal-head h2 {
        font-size: 16px;
    }

    .option-feedback-modal-body {
        padding: 16px max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    }
}

@media (max-width: 480px) {
    .stitch-main-header {
        min-height: 60px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
    }

    .stitch-main-header .brand-mark {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .stitch-main-header .brand-wordmark {
        font-size: 14px;
    }

    .stitch-logout,
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
    }

    .student-main-test .question-copy h2 {
        font-size: 21px;
    }

    .student-main-test .question-card,
    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        padding: 14px;
    }
}

@media (min-width: 641px) and (max-width: 900px) {
    .stitch-main-header {
        min-height: 68px;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        padding: 12px max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left));
    }

    .stitch-main-header .brand-mark {
        flex-basis: 40px;
        width: 40px;
        height: 40px;
    }

    .stitch-main-header .brand-wordmark {
        display: flex;
        font-size: 18px;
        white-space: nowrap;
    }

    .stitch-top-nav {
        display: none;
    }

    .stitch-main-header .student-admin-link,
    .stitch-user-chip {
        display: none;
    }

    .stitch-main-header .student-menu-actions {
        gap: 8px;
    }

    .stitch-logout,
    .mobile-menu-toggle {
        width: 44px;
        height: 44px;
    }

    .mobile-menu-toggle {
        display: grid;
    }

    .mobile-menu-backdrop {
        position: fixed;
        inset: 0;
        z-index: 210;
        background: rgba(5, 16, 31, 0.38);
    }

    .mobile-student-menu {
        position: fixed;
        top: calc(max(12px, env(safe-area-inset-top)) + 62px);
        right: max(20px, env(safe-area-inset-right));
        left: auto;
        z-index: 220;
        width: min(360px, calc(100vw - 40px));
        max-height: calc(100dvh - 92px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        border: 1px solid rgba(212, 175, 55, 0.22);
        border-radius: 16px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 24px 56px rgba(5, 16, 31, 0.24);
        padding: 14px;
    }

    .student-shell.is-mobile-menu-open .mobile-menu-backdrop,
    .student-shell.is-mobile-menu-open .mobile-student-menu {
        display: block;
    }

    .mobile-menu-user {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        border-bottom: 1px solid #E5D5B5;
        padding: 0 0 12px;
    }

    .mobile-menu-user .stitch-avatar {
        width: 44px;
        height: 44px;
        background: #0B1E36;
        color: #ffffff;
    }

    .mobile-menu-user small {
        display: block;
        color: #B18E2D;
        font-size: 11px;
        font-weight: 900;
        line-height: 1.15;
    }

    .mobile-menu-user strong {
        display: block;
        overflow: hidden;
        color: #0B1E36;
        font-size: 15px;
        font-weight: 850;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-menu-nav {
        display: grid;
        gap: 8px;
        padding-top: 12px;
    }

    .mobile-menu-item {
        min-height: 48px;
        width: 100%;
        display: grid;
        grid-template-columns: 24px minmax(0, 1fr);
        align-items: center;
        gap: 12px;
        border: 1px solid transparent;
        border-radius: 12px;
        background: transparent;
        color: #0B1E36;
        padding: 11px 12px;
        text-align: left;
        text-decoration: none;
        font-size: 15px;
        font-weight: 800;
    }

    .mobile-menu-item svg {
        width: 22px;
        height: 22px;
        fill: none;
        stroke: currentColor;
        stroke-width: 2;
    }

    .mobile-menu-item.is-active {
        border-color: #E5D5B5;
        background: #FFF8E8;
        color: #0B1E36;
    }

    .mobile-menu-item.is-danger {
        color: #9F3341;
    }

    .student-main,
    .student-main-camp,
    .student-main-test {
        padding-top: 20px;
    }
}

@media (max-width: 640px) {
    .student-main-test .test-side-rail {
        gap: 12px;
    }

    .student-main-test .question-nav-panel,
    .student-main-test .question-hint-panel {
        padding: 14px;
    }

    .student-main-test .question-panel-test-summary {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .student-main-test .question-panel-title-block h2,
    .student-main-test .question-nav-panel > h3,
    .student-main-test .question-hint-panel h2 {
        font-size: 17px;
        line-height: 1.24;
    }

    .student-main-test .question-panel-title-block p,
    .student-main-test .question-hint-panel p {
        font-size: 13px;
        line-height: 1.45;
    }

    .student-main-test .question-panel-stats {
        gap: 6px;
    }

    .student-main-test .question-panel-stats .stat-pill {
        min-height: 32px;
        padding: 0 10px;
        font-size: 13px;
    }

    .student-main-test .question-panel-stats .stat-pill svg {
        width: 15px;
        height: 15px;
    }

    .student-main-test .question-nav-legend {
        gap: 8px 10px;
        margin: 10px 0 12px;
        font-size: 12px;
    }

    .student-main-test .question-dots {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        margin-bottom: 12px;
        padding: 2px 2px 4px;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .student-main-test .question-dots::-webkit-scrollbar {
        display: none;
    }

    .student-main-test .question-dot {
        flex: 0 0 40px;
        width: 40px;
        height: 40px;
        justify-self: auto;
        font-size: 15px;
    }

    .student-main-test .question-rail-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .student-main-test .rail-nav-button {
        min-height: 42px;
        padding: 0 10px;
        font-size: 14px;
    }

    .student-main-test .rail-nav-button span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .student-main-test .question-hint-head {
        gap: 10px;
        margin-bottom: 12px;
    }

    .student-main-test .question-hint-head > span {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
    }

    .student-main-test .question-hint-head svg {
        width: 20px;
        height: 20px;
    }

    .student-main-test .hint-open-button {
        min-height: 42px;
        border-radius: 10px;
        padding: 10px 12px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .student-main-test .question-nav-legend span:nth-child(2),
    .student-main-test .question-nav-legend span:nth-child(3) {
        display: none;
    }

    .student-main-test .question-panel-title-block p {
        font-size: 12px;
    }

    .student-main-test .question-panel-stats .stat-pill {
        min-height: 30px;
        padding: 0 9px;
        font-size: 12px;
    }

    .student-main-test .question-dot {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .student-main-test .rail-nav-button {
        min-height: 40px;
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .stitch-camp-hero {
        gap: 12px;
        margin: 18px 0 16px;
    }

    .stitch-camp-hero h1 {
        margin-bottom: 6px;
        font-size: clamp(24px, 7vw, 30px);
        line-height: 1.12;
    }

    .stitch-camp-hero p {
        font-size: 14px;
        line-height: 1.45;
    }

    .stitch-hero-actions {
        gap: 8px;
    }

    .stitch-mini-timer,
    .stitch-package-switch {
        min-height: 48px;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 10px;
    }

    .stitch-mini-timer strong {
        font-size: 18px;
        line-height: 1.1;
    }

    .stitch-mini-timer small,
    .stitch-mini-timer em,
    .stitch-package-switch {
        font-size: 12px;
    }

    .stitch-mini-timer i {
        width: 34px;
        height: 34px;
        border-radius: 9px;
    }

    .stitch-program-list {
        gap: 10px;
    }

    .stitch-day-card {
        border-radius: 14px;
    }

    .stitch-day-summary {
        gap: 10px;
        padding: 12px 14px;
    }

    .stitch-day-heading {
        gap: 2px;
    }

    .stitch-day-heading strong {
        font-size: 17px;
        line-height: 1.1;
    }

    .stitch-day-heading em {
        font-size: 15px;
        line-height: 1.25;
    }

    .stitch-day-meta b {
        min-height: 26px;
        padding: 4px 9px;
        font-size: 11px;
    }

    .stitch-day-meta i {
        width: 24px;
        height: 24px;
    }

    .stitch-day-goal {
        gap: 12px;
        padding: 14px;
    }

    .stitch-day-goal > span {
        width: 36px;
        height: 36px;
    }

    .stitch-day-goal > span svg {
        width: 19px;
        height: 19px;
    }

    .stitch-day-goal strong {
        margin-bottom: 4px;
        font-size: 12px;
    }

    .stitch-day-goal p {
        font-size: 14px;
        line-height: 1.5;
    }

    .stitch-test-row {
        gap: 8px 10px;
        padding: 12px 14px;
    }

    .stitch-test-kind {
        gap: 10px;
    }

    .stitch-test-kind i {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
    }

    .stitch-test-kind i svg {
        width: 18px;
        height: 18px;
    }

    .stitch-test-copy {
        gap: 3px;
    }

    .stitch-test-kind strong {
        font-size: 13px;
    }

    .stitch-test-copy em {
        font-size: 14px;
        line-height: 1.32;
    }

    .stitch-question-count,
    .stitch-progress-pill {
        font-size: 11px;
    }

    .stitch-progress-pill {
        min-height: 28px;
        padding: 4px 8px;
    }

    .stitch-row-action {
        min-height: 40px;
        border-radius: 10px;
        padding: 9px 14px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stitch-camp-hero {
        margin-top: 14px;
        margin-bottom: 14px;
    }

    .stitch-camp-hero h1 {
        font-size: 22px;
    }

    .stitch-camp-hero p {
        font-size: 13px;
    }

    .stitch-day-summary {
        padding: 11px 12px;
    }

    .stitch-day-heading strong {
        font-size: 16px;
    }

    .stitch-day-heading em {
        font-size: 14px;
    }

    .stitch-day-goal {
        padding: 12px;
    }

    .stitch-day-goal p {
        font-size: 13px;
        line-height: 1.45;
    }

    .stitch-test-row {
        padding: 11px 12px;
    }

    .stitch-test-kind {
        align-items: flex-start;
    }
}

@media (max-width: 640px) {
    .stitch-day-card[open] {
        box-shadow: 0 10px 24px rgba(15, 41, 71, 0.08);
    }

    .stitch-day-card[open] > .stitch-day-summary {
        padding-bottom: 14px;
    }

    .stitch-day-summary {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    .stitch-day-heading {
        gap: 4px;
    }

    .stitch-day-meta {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 8px 10px;
    }

    .stitch-day-meta small {
        flex-basis: 100%;
        order: 3;
        margin-top: 2px;
        line-height: 1.4;
    }

    .stitch-day-card[open] .stitch-day-meta small {
        color: rgba(255, 255, 255, 0.74);
    }

    .stitch-day-body {
        background: #ffffff;
    }

    .stitch-day-goal {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 12px;
        border-bottom: 1px solid #efe2c2;
        background: #fffaf0;
    }

    .stitch-day-goal > span {
        align-self: start;
        margin-top: 2px;
        background: #fffdf7;
    }

    .stitch-day-goal strong {
        font-size: 11px;
        letter-spacing: 0.04em;
    }

    .stitch-day-goal p {
        color: #475467;
        line-height: 1.55;
    }

    .stitch-test-list {
        background: #ffffff;
    }

    .stitch-test-row {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "kind kind"
            "question progress"
            "action action";
        gap: 10px 10px;
        align-items: start;
        padding: 14px;
        background: #ffffff;
    }

    .stitch-test-kind {
        grid-area: kind;
        align-items: flex-start;
        gap: 12px;
    }

    .stitch-test-kind i {
        margin-top: 2px;
    }

    .stitch-test-copy {
        display: grid;
        gap: 4px;
    }

    .stitch-test-kind strong {
        font-size: 14px;
        line-height: 1.2;
    }

    .stitch-test-copy em {
        font-size: 15px;
        line-height: 1.38;
    }

    .stitch-question-count,
    .stitch-progress-pill {
        min-height: 28px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 800;
    }

    .stitch-question-count {
        grid-area: question;
        background: #f4f6f8;
        color: #526173;
    }

    .stitch-progress-pill {
        grid-area: progress;
        justify-self: end;
    }

    .stitch-row-action {
        grid-area: action;
        width: 100%;
        min-height: 44px;
        margin-top: 2px;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 800;
    }
}

@media (max-width: 480px) {
    .stitch-day-meta small {
        font-size: 12px;
    }

    .stitch-test-row {
        padding: 12px;
    }

    .stitch-test-copy em {
        font-size: 14px;
    }
}

@media (max-width: 640px) {
    .stitch-day-card[open] {
        border-color: #d8c18a;
    }

    .stitch-day-card[open] > .stitch-day-summary {
        padding: 12px 14px;
    }

    .stitch-day-card[open] .stitch-day-meta small {
        display: none;
    }

    .stitch-day-goal {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid #eadbb7;
        background: #fffaf0;
    }

    .stitch-day-goal > span,
    .stitch-day-goal > i {
        display: none;
    }

    .stitch-day-goal strong {
        margin: 0 0 4px;
        color: #8a6818;
        font-size: 11px;
        font-weight: 900;
        letter-spacing: 0;
    }

    .stitch-day-goal p {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        color: #475467;
        font-size: 13px;
        line-height: 1.45;
    }

    .stitch-test-row {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "kind progress action";
        align-items: center;
        gap: 7px 10px;
        padding: 12px 14px;
    }

    .stitch-test-kind {
        grid-area: kind;
        min-width: 0;
        align-items: center;
        gap: 10px;
    }

    .stitch-test-kind i {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
        margin-top: 0;
    }

    .stitch-test-kind i svg {
        width: 17px;
        height: 17px;
    }

    .stitch-test-copy {
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .stitch-test-title-line {
        max-width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: baseline;
        justify-content: flex-start;
        gap: 3px;
    }

    .stitch-test-kind strong {
        display: none;
    }

    .stitch-test-copy em {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        font-size: 13px;
        line-height: 1.28;
    }

    .stitch-question-count {
        display: none;
    }

    .stitch-progress-pill-inline {
        display: none;
    }

    .stitch-progress-pill-rail.is-empty,
    .stitch-progress-pill-rail.is-progress,
    .stitch-progress-pill-rail.is-completed {
        display: inline-flex;
        grid-area: progress;
        justify-self: end;
        width: max-content;
        min-height: 24px;
        margin-top: 0;
        padding: 0 8px;
        font-size: 11px;
    }

    .stitch-row-action {
        grid-area: action;
        width: auto;
        min-width: 82px;
        min-height: 36px;
        margin-top: 0;
        padding: 0 10px;
        border-radius: 10px;
        font-size: 12px;
        white-space: nowrap;
    }

    .stitch-progress-pill-rail + .stitch-row-action {
        align-self: center;
    }
}

@media (max-width: 390px) {
    .stitch-test-row {
        padding: 11px 12px;
    }

    .stitch-test-kind {
        gap: 8px;
    }

    .stitch-test-kind i {
        flex-basis: 32px;
        width: 32px;
        height: 32px;
    }

    .stitch-row-action {
        min-width: 76px;
        padding: 0 8px;
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .stitch-program-list {
        gap: 8px;
    }

    .stitch-day-card {
        border-radius: 12px;
    }

    .stitch-day-summary {
        min-height: 62px;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        padding: 11px 12px 11px 14px;
    }

    .stitch-day-card[open] > .stitch-day-summary {
        min-height: 62px;
        padding: 11px 12px 11px 14px;
    }

    .stitch-day-heading {
        min-width: 0;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        gap: 9px;
    }

    .stitch-day-heading strong {
        min-width: 48px;
        color: #b8913a;
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
    }

    .stitch-day-card[open] .stitch-day-heading strong {
        color: #f6dfa0;
    }

    .stitch-day-heading em {
        min-width: 0;
        overflow: hidden;
        color: #06162d;
        font-size: 14px;
        font-weight: 900;
        line-height: 1.25;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .stitch-day-card[open] .stitch-day-heading em {
        color: #ffffff;
    }

    .stitch-day-meta {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
    }

    .stitch-day-meta b {
        min-height: 30px;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 11px;
        line-height: 1;
    }

    .stitch-day-meta i {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 999px;
    }

    .stitch-day-card[open] .stitch-day-meta i {
        background: rgba(255, 255, 255, 0.08);
    }

    .stitch-day-meta svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 390px) {
    .stitch-day-summary,
    .stitch-day-card[open] > .stitch-day-summary {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding-right: 10px;
    }

    .stitch-day-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 3px;
    }

    .stitch-day-heading strong {
        min-width: 0;
    }

    .stitch-day-heading em {
        white-space: normal;
    }
}

.stitch-day-detail-topbar {
    margin: 14px 0 14px;
}

.student-main-day-detail .test-back-button {
    min-height: 42px;
    border: 1px solid #e5d5b5;
    border-radius: 999px;
    background: #ffffff;
    color: #0b1e36;
    box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    padding: 0 14px;
    font-size: 14px;
    font-weight: 850;
}

.student-main-day-detail .test-back-button:hover {
    border-color: #d4af37;
    color: #0b1e36;
}

.stitch-day-detail-hero {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    border: 1px solid #123257;
    border-radius: 14px;
    background: #0b1e36;
    color: #ffffff;
    padding: 16px;
}

.stitch-day-detail-hero span {
    flex: 0 0 auto;
    color: #f6dfa0;
    font-size: 22px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;
}

.stitch-day-detail-hero h1 {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: 21px;
    line-height: 1.14;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stitch-day-detail-hero small {
    flex: 0 0 auto;
    width: fit-content;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    border-radius: 999px;
    background: #ffffff;
    color: #0b1e36;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 900;
}

.stitch-day-detail-panel {
    overflow: hidden;
    border: 1px solid #e5d5b5;
    border-radius: 14px;
    background: #ffffff;
}

.student-main-day-detail .stitch-day-detail-hero {
    margin-bottom: 0;
    border-radius: 14px 14px 0 0;
}

.student-main-day-detail .stitch-day-detail-panel {
    border-top: 0;
    border-radius: 0 0 14px 14px;
}

@media (min-width: 641px) and (max-width: 1180px) {
    .student-main-day-detail .stitch-day-detail-hero {
        min-height: 68px;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
    }

    .student-main-day-detail .stitch-day-detail-hero span {
        flex: 0 0 auto;
        font-size: 20px;
        white-space: nowrap;
    }

    .student-main-day-detail .stitch-day-detail-hero h1 {
        font-size: 19px;
        line-height: 1.2;
    }

    .student-main-day-detail .stitch-day-detail-hero small {
        flex: 0 0 auto;
        margin-left: auto;
    }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .student-main-camp:not(.student-main-day-detail) .stitch-day-card > .stitch-day-body {
        display: none;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] {
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] > .stitch-day-summary {
        background: #fdfbf7;
        color: #0b1e36;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-heading strong {
        color: #b8913a;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-heading em {
        color: #06162d;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-meta b {
        border-color: #e5d5b5;
        background: #ffffff;
        color: #0b1e36;
        box-shadow: none;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-meta i {
        background: transparent;
        color: #0b1e36;
        transform: none;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-summary {
        cursor: pointer;
    }

    .student-main-day-detail .stitch-day-detail-topbar {
        margin: 10px 0 12px;
    }

    .student-main-day-detail .test-back-button {
        min-height: 40px;
        border-color: #e5d5b5;
        border-radius: 999px;
        background: #ffffff;
        color: #0b1e36;
        padding: 0 13px;
        font-size: 13px;
    }
}

@media (max-width: 640px) {
    .student-main-camp:not(.student-main-day-detail) .stitch-day-card > .stitch-day-body {
        display: none;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] {
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] > .stitch-day-summary {
        background: #fdfbf7;
        color: #0b1e36;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-heading strong {
        color: #b8913a;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-heading em {
        color: #06162d;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-meta b {
        border-color: #e5d5b5;
        background: #ffffff;
        color: #0b1e36;
        box-shadow: none;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-card[open] .stitch-day-meta i {
        background: transparent;
        color: #0b1e36;
        transform: none;
    }

    .student-main-camp:not(.student-main-day-detail) .stitch-day-summary {
        cursor: pointer;
    }

    .student-main-day-detail .stitch-day-detail-topbar {
        margin: 10px 0 12px;
    }

    .student-main-day-detail .test-back-button {
        min-height: 40px;
        border-color: #e5d5b5;
        border-radius: 999px;
        background: #ffffff;
        color: #0b1e36;
        padding: 0 13px;
        font-size: 13px;
    }

    .student-main-day-detail .stitch-day-detail-hero {
        min-height: 66px;
        gap: 8px;
        margin-bottom: 0;
        padding: 13px 14px;
    }

    .student-main-day-detail .stitch-day-detail-hero span {
        font-size: 18px;
    }

    .student-main-day-detail .stitch-day-detail-hero h1 {
        font-size: 17px;
    }

    .student-main-day-detail .stitch-day-detail-hero small {
        min-height: 26px;
        padding: 0 9px;
        font-size: 11px;
    }

    .student-main-day-detail .stitch-day-goal {
        border-bottom-color: #eadbb7;
    }
}

@keyframes mobileViewForward {
    from {
        opacity: 0;
        transform: translate3d(18px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes mobileViewBack {
    from {
        opacity: 0;
        transform: translate3d(-16px, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes mobileViewSoft {
    from {
        opacity: 0;
        transform: translate3d(0, 10px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes wideViewForward {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0) scale(0.995);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

@keyframes wideViewBack {
    from {
        opacity: 0;
        transform: translate3d(0, 8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes wideAccordionReveal {
    from {
        opacity: 0;
        transform: translate3d(0, -8px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 640px) {
    .student-main.view-transition-forward {
        animation: mobileViewForward 260ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .student-main.view-transition-back {
        animation: mobileViewBack 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .student-main.view-transition-soft {
        animation: mobileViewSoft 220ms ease-out both;
    }

    .stitch-package-card,
    .stitch-day-summary,
    .stitch-test-row,
    .test-back-button {
        transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background-color 150ms ease;
    }

    .stitch-package-card:active,
    .stitch-day-summary:active,
    .stitch-test-row:active,
    .test-back-button:active {
        transform: scale(0.985);
    }

    .student-main-day-detail .stitch-day-detail-hero,
    .student-main-day-detail .stitch-day-detail-panel,
    .student-main-test.view-transition-forward .question-card,
    .student-main-test.view-transition-back .question-card,
    .student-main-test.view-transition-soft .question-card {
        animation: mobileViewSoft 260ms ease-out both;
    }

    .student-main-day-detail .stitch-day-detail-panel {
        animation-delay: 45ms;
    }
}

@media (min-width: 641px) {
    .student-main.view-transition-forward {
        animation: wideViewForward 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .student-main.view-transition-back,
    .student-main.view-transition-soft {
        animation: wideViewBack 210ms ease-out both;
    }

    .stitch-day-card[open] > .stitch-day-body,
    .stitch-day-card[open] .stitch-test-list {
        animation: wideAccordionReveal 220ms ease-out both;
    }

    .stitch-package-card,
    .stitch-day-summary,
    .stitch-test-row,
    .test-back-button {
        transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
    }

    .stitch-package-card:active,
    .stitch-day-summary:active,
    .stitch-test-row:active,
    .test-back-button:active {
        transform: scale(0.992);
    }

    .student-main-test.view-transition-forward .question-card,
    .student-main-test.view-transition-back .question-card,
    .student-main-test.view-transition-soft .question-card {
        animation: wideViewForward 220ms ease-out both;
    }
}

@media (prefers-reduced-motion: reduce) {
    .student-main.view-transition-forward,
    .student-main.view-transition-back,
    .student-main.view-transition-soft,
    .student-main-day-detail .stitch-day-detail-hero,
    .student-main-day-detail .stitch-day-detail-panel,
    .student-main-test .question-card,
    .stitch-day-card[open] > .stitch-day-body,
    .stitch-day-card[open] .stitch-test-list,
    .learning-open-button.is-learning-ready,
    .mobile-learning-trigger.is-learning-ready {
        animation: none !important;
    }

    .stitch-package-card,
    .stitch-day-summary,
    .stitch-test-row,
    .test-back-button {
        transition: none !important;
    }
}

.mobile-question-nav-dock,
.mobile-learning-trigger,
.mobile-question-actions,
.mobile-question-counter,
.mobile-test-top-actions,
.question-nav-sheet-head,
.question-nav-backdrop {
    display: none;
}

@keyframes mobileSheetUp {
    from {
        opacity: 0;
        transform: translate3d(0, 100%, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes mobileDrawerIn {
    from {
        opacity: 0;
        transform: translate3d(100%, 0, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (max-width: 640px) {
    .student-main-test {
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
    }

    .student-main-test .test-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
    }

    .student-main-test .test-back-button {
        min-width: 0;
        justify-self: start;
    }

    .mobile-test-top-actions {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
    }

    .student-main-test .test-back-button span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-question-counter {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        border: 1px solid rgba(212, 175, 55, 0.45);
        border-radius: 999px;
        background: #0B1E36;
        color: #ffffff;
        box-shadow: 0 10px 24px rgba(5, 16, 31, 0.16);
        padding: 0 12px;
        font-size: 13px;
        font-weight: 950;
        white-space: nowrap;
        cursor: pointer;
    }

    .mobile-question-counter svg {
        width: 17px;
        height: 17px;
        fill: currentColor;
    }

    .mobile-question-actions {
        position: fixed;
        right: max(14px, env(safe-area-inset-right));
        bottom: max(10px, env(safe-area-inset-bottom));
        left: max(14px, env(safe-area-inset-left));
        z-index: 225;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
        margin-top: 0;
        padding: 0;
        backdrop-filter: none;
    }

    .mobile-question-step-button {
        min-width: 0;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid #D7C49E;
        border-radius: 14px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 12px 30px rgba(5, 16, 31, 0.12);
        padding: 0 12px;
        font-size: 14px;
        font-weight: 900;
        line-height: 1.1;
    }

    .mobile-question-step-button.is-primary {
        border-color: #0B1E36;
        background: #0B1E36;
        color: #ffffff;
        box-shadow: 0 14px 32px rgba(5, 16, 31, 0.22);
    }

    .mobile-question-step-button:disabled {
        opacity: 0.45;
    }

    .mobile-question-step-button svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
        flex: 0 0 auto;
    }

    .student-main-test .test-side-rail {
        display: block;
    }

    .student-main-test .question-hint-panel {
        display: none;
    }

    .student-main-test .question-nav-panel {
        position: fixed;
        right: max(0px, env(safe-area-inset-right));
        bottom: 0;
        left: max(0px, env(safe-area-inset-left));
        z-index: 260;
        width: auto;
        max-height: min(76svh, 560px);
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 22px 22px 0 0;
        background: #ffffff;
        box-shadow: 0 -22px 58px rgba(5, 16, 31, 0.3);
        padding: 14px max(16px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
        opacity: 0;
        pointer-events: none;
        transform: translate3d(0, 112%, 0);
        transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
    }

    .student-main-test .question-nav-panel.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .question-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 250;
        display: block;
        border: 0;
        background: rgba(5, 16, 31, 0.42);
        padding: 0;
    }

    .question-nav-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid #e5e7eb;
        margin: -2px 0 12px;
        padding: 0 0 12px;
    }

    .question-nav-sheet-head strong {
        color: #0F2947;
        font-size: 16px;
        font-weight: 900;
    }

    .question-nav-sheet-head button {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #ffffff;
        color: #0F2947;
    }

    .question-nav-sheet-head button svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .student-main-test .question-nav-panel .question-panel-test-summary {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .student-main-test .question-nav-panel > h3 {
        font-size: 16px;
    }

    .student-main-test .question-dots {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        overflow: visible;
        margin-bottom: 14px;
        padding: 0;
    }

    .student-main-test .question-dot {
        width: 100%;
        min-width: 0;
        height: 42px;
        flex: none;
        justify-self: stretch;
    }

    .mobile-question-nav-dock {
        display: none;
    }

    .mobile-question-nav-button {
        width: auto;
        min-height: 46px;
        display: inline-grid;
        grid-template-columns: auto auto auto;
        align-items: center;
        gap: 8px;
        border: 1px solid rgba(212, 175, 55, 0.4);
        border-radius: 999px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 14px 34px rgba(5, 16, 31, 0.2);
        padding: 0 12px 0 8px;
        pointer-events: auto;
        text-align: left;
    }

    .mobile-question-nav-button.is-open {
        border-color: rgba(212, 175, 55, 0.72);
        background: #FFF8E8;
    }

    .mobile-question-nav-index {
        min-width: 0;
        height: 34px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: #D4AF37;
        color: #0B1E36;
        padding: 0 10px;
        font-size: 13px;
        font-weight: 950;
    }

    .mobile-question-nav-copy {
        min-width: 0;
        display: grid;
        gap: 2px;
    }

    .mobile-question-nav-copy strong {
        overflow: hidden;
        font-size: 13px;
        font-weight: 900;
        line-height: 1.15;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-question-nav-copy small {
        display: none;
    }

    .mobile-question-nav-icon {
        width: 30px;
        height: 30px;
        display: grid;
        place-items: center;
        border-radius: 999px;
        background: rgba(15, 41, 71, 0.08);
        color: #0B1E36;
    }

    .mobile-question-nav-icon svg {
        width: 17px;
        height: 17px;
        fill: currentColor;
    }

    .mobile-learning-trigger {
        min-height: 42px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(212, 175, 55, 0.4);
        border-radius: 999px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 10px 24px rgba(5, 16, 31, 0.14);
        padding: 0 12px;
        font-size: 13px;
        font-weight: 900;
    }

    .mobile-learning-trigger svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .mobile-question-nav-button {
        min-height: 46px;
        display: inline-flex;
        grid-template-columns: none;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 0 14px;
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
    }

    .mobile-question-nav-button svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .learning-modal-backdrop {
        z-index: 280;
        align-items: stretch;
        justify-items: end;
        padding: 0;
        background: rgba(5, 16, 31, 0.42);
    }

    .learning-modal {
        width: min(88vw, 368px);
        height: 100dvh;
        min-height: 100svh;
        max-height: none;
        border-top: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 20px 0 0 20px;
        box-shadow: -24px 0 58px rgba(5, 16, 31, 0.32);
        animation: mobileDrawerIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }

    .learning-modal-header {
        grid-template-columns: 42px minmax(0, 1fr) 40px;
        gap: 10px;
        padding: max(16px, env(safe-area-inset-top)) 14px 14px;
    }

    .learning-modal-mark {
        width: 42px;
        height: 42px;
    }

    .learning-modal-header h2 {
        font-size: 19px;
    }

    .learning-modal-header p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .learning-modal-tabs {
        padding: 12px 12px;
    }

    .learning-modal-body {
        padding: 16px 14px max(20px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 380px) {
    .student-main-test .question-dots {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .mobile-test-top-actions {
        gap: 6px;
    }

    .mobile-question-counter {
        padding: 0 10px;
    }

    .mobile-learning-trigger {
        width: 46px;
        padding: 0;
    }

    .mobile-question-nav-button {
        width: 46px;
        padding: 0;
    }

    .mobile-question-nav-button span,
    .mobile-learning-trigger span {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .student-main-test .question-nav-panel,
    .learning-modal {
        animation: none !important;
        transition: none !important;
    }
}

/* Tablet question experience: mobile-like controls with a landscape side panel */
@media (min-width: 641px) and (max-width: 1180px) {
    .student-main-test {
        padding-bottom: calc(104px + env(safe-area-inset-bottom));
    }

    .student-main-test .test-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
    }

    .student-main-test .test-back-button {
        min-width: 0;
        justify-self: start;
    }

    .student-main-test .test-back-button span {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-test-top-actions {
        min-width: 0;
        display: inline-flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
    }

    .mobile-learning-trigger,
    .mobile-question-counter {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        border: 1px solid rgba(212, 175, 55, 0.42);
        border-radius: 999px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 10px 24px rgba(5, 16, 31, 0.12);
        padding: 0 14px;
        font-size: 13px;
        font-weight: 900;
        line-height: 1;
        white-space: nowrap;
    }

    .mobile-question-counter {
        border-color: rgba(11, 30, 54, 0.2);
        background: #0B1E36;
        color: #ffffff;
    }

    .mobile-learning-trigger svg,
    .mobile-question-counter svg {
        width: 19px;
        height: 19px;
        fill: currentColor;
        flex: 0 0 auto;
    }

    .student-main-test .question-hint-panel {
        display: none;
    }

    .student-main-test .question-nav-panel .question-rail-actions {
        display: none;
    }

    .student-main-test .option-feedback {
        display: none;
    }

    .mobile-question-actions {
        position: fixed;
        right: max(24px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        left: max(24px, env(safe-area-inset-left));
        z-index: 225;
        width: min(720px, calc(100vw - 48px));
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 0 auto;
        border: 0;
        background: transparent;
        padding: 0;
    }

    .mobile-question-step-button {
        min-width: 0;
        min-height: 52px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 9px;
        border: 1px solid #D7C49E;
        border-radius: 14px;
        background: #ffffff;
        color: #0B1E36;
        box-shadow: 0 14px 34px rgba(5, 16, 31, 0.14);
        padding: 0 16px;
        font-size: 14px;
        font-weight: 900;
        line-height: 1.1;
    }

    .mobile-question-step-button.is-primary {
        border-color: #0B1E36;
        background: #0B1E36;
        color: #ffffff;
        box-shadow: 0 16px 36px rgba(5, 16, 31, 0.22);
    }

    .mobile-question-step-button:disabled {
        opacity: 0.45;
    }

    .mobile-question-step-button svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
        flex: 0 0 auto;
    }

    .question-nav-backdrop {
        position: fixed;
        inset: 0;
        z-index: 250;
        display: block;
        border: 0;
        background: rgba(5, 16, 31, 0.42);
        padding: 0;
    }

    .question-nav-sheet-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid #e5e7eb;
        margin: -2px 0 14px;
        padding: 0 0 12px;
    }

    .question-nav-sheet-head strong {
        color: #0F2947;
        font-size: 16px;
        font-weight: 900;
    }

    .question-nav-sheet-head button {
        width: 44px;
        height: 44px;
        display: grid;
        place-items: center;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #ffffff;
        color: #0F2947;
    }

    .question-nav-sheet-head button svg {
        width: 20px;
        height: 20px;
        fill: currentColor;
    }

    .learning-modal-backdrop,
    .option-feedback-modal-backdrop {
        z-index: 280;
        align-items: stretch;
        justify-items: end;
        padding: 0;
        background: rgba(5, 16, 31, 0.42);
    }

    .learning-modal,
    .option-feedback-modal {
        width: min(430px, 86vw);
        height: 100dvh;
        min-height: 100svh;
        max-height: none;
        border-top: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 20px 0 0 20px;
        box-shadow: -24px 0 58px rgba(5, 16, 31, 0.3);
        animation: mobileDrawerIn 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
    }
}

@media (min-width: 641px) and (max-width: 899px),
       (min-width: 641px) and (max-width: 1180px) and (orientation: portrait) {
    .student-main-test .test-workspace {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .student-main-test .test-side-rail {
        display: block;
    }

    .student-main-test .question-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        z-index: 260;
        width: min(430px, 86vw);
        max-height: none;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        border-top: 0;
        border-right: 0;
        border-bottom: 0;
        border-radius: 20px 0 0 20px;
        background: #ffffff;
        box-shadow: -24px 0 58px rgba(5, 16, 31, 0.3);
        padding: max(18px, env(safe-area-inset-top)) 18px max(18px, env(safe-area-inset-bottom));
        opacity: 0;
        pointer-events: none;
        transform: translate3d(100%, 0, 0);
        transition: transform 240ms cubic-bezier(0.22, 1, 0.36, 1), opacity 180ms ease;
    }

    .student-main-test .question-nav-panel.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translate3d(0, 0, 0);
    }

    .student-main-test .question-dots {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 9px;
        margin-bottom: 0;
    }

    .student-main-test .question-dot {
        width: 100%;
        min-width: 0;
        height: 44px;
        justify-self: stretch;
    }
}

@media (min-width: 900px) and (max-width: 1180px) and (max-height: 900px) {
    .student-main-test {
        flex-basis: 100%;
        width: min(100%, calc(100vw - 48px));
        max-width: 1120px;
    }

    .student-main-test .test-workspace {
        grid-template-columns: minmax(0, 1fr) minmax(244px, 284px);
        gap: 14px;
        align-items: start;
    }

    .student-main-test .question-card {
        padding: 22px;
    }

    .student-main-test .test-side-rail {
        display: block;
        position: sticky;
        top: 88px;
    }

    .student-main-test .question-nav-panel {
        position: static;
        width: auto;
        max-height: calc(100dvh - 172px);
        overflow: auto;
        border: 1px solid #e5e7eb;
        border-radius: 16px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(15, 41, 71, 0.05);
        padding: 16px;
        opacity: 1;
        pointer-events: auto;
        transform: none;
    }

    .student-main-test .question-nav-panel.is-open {
        transform: none;
    }

    .question-nav-backdrop,
    .question-nav-sheet-head {
        display: none;
    }

    .student-main-test .question-panel-test-summary {
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .student-main-test .question-panel-title-block h2,
    .student-main-test .question-nav-panel > h3 {
        font-size: 16px;
        line-height: 1.25;
    }

    .student-main-test .question-panel-title-block p {
        font-size: 12px;
        line-height: 1.35;
    }

    .student-main-test .question-panel-stats,
    .student-main-test .question-nav-legend {
        gap: 6px;
    }

    .student-main-test .question-panel-stats .stat-pill {
        min-height: 30px;
        padding: 0 9px;
        font-size: 12px;
    }

    .student-main-test .question-nav-legend {
        margin: 10px 0 12px;
        font-size: 12px;
    }

    .student-main-test .question-nav-legend span:nth-child(2),
    .student-main-test .question-nav-legend span:nth-child(3) {
        display: none;
    }

    .student-main-test .question-dots {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-bottom: 0;
    }

    .student-main-test .question-dot {
        width: 100%;
        min-width: 0;
        height: 40px;
        justify-self: stretch;
        font-size: 14px;
    }

    .mobile-question-counter {
        cursor: default;
    }
}

/* Question navigation states: correct, wrong, blank, and current are distinct. */
.student-main-test .legend-dot.is-correct,
.student-main-test .legend-dot.is-answered {
    border-color: #10B981;
    background: #10B981;
}

.student-main-test .legend-dot.is-wrong {
    border-color: #EF4444;
    background: #EF4444;
}

.student-main-test .legend-dot.is-current {
    border-color: #0F2947;
    background: #ffffff;
    box-shadow: inset 0 0 0 3px #0F2947;
}

.student-main-test .question-nav-legend span {
    display: inline-flex;
}

.student-main-test .question-dot.is-correct {
    border-color: #10B981;
    background: #10B981;
    color: #ffffff;
}

.student-main-test .question-dot.is-wrong {
    border-color: #EF4444;
    background: #EF4444;
    color: #ffffff;
}

.student-main-test .question-dot.is-current {
    border-color: #0F2947;
    box-shadow: 0 0 0 3px rgba(15, 41, 71, 0.2), 0 6px 14px rgba(15, 41, 71, 0.2);
    transform: scale(1.08);
}

.student-main-test .question-dot.is-current:not(.is-correct):not(.is-wrong):not(.is-answered) {
    background: #0F2947;
    color: #ffffff;
}

.student-main-test .question-dot.is-current.is-correct {
    background: #10B981;
    color: #ffffff;
}

.student-main-test .question-dot.is-current.is-wrong {
    background: #EF4444;
    color: #ffffff;
}

@keyframes optionFeedbackPopupIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Compact option tools: keep eliminate/explanation icons optically centered in the card cell. */
@media (max-width: 1023px),
       (min-width: 641px) and (max-width: 1180px) and (max-height: 900px),
       (min-width: 641px) and (max-width: 1180px) and (orientation: portrait) {
    .student-main-test .option-row {
        align-items: stretch;
    }

    .student-main-test .option-tools {
        align-self: stretch;
        justify-self: stretch;
        min-height: inherit;
        display: grid;
        place-items: center;
        align-content: center;
        justify-content: center;
        padding: 0;
        line-height: 0;
    }

    .student-main-test .option-tool,
    .student-main-test .option-result-marker {
        position: static;
        inset: auto;
        align-self: center;
        justify-self: center;
        display: grid;
        place-items: center;
        margin: 0;
        padding: 0;
        line-height: 0;
    }

    .student-main-test .option-tool svg,
    .student-main-test .option-result-marker svg {
        display: block;
        margin: 0;
    }

    .option-feedback-modal-backdrop {
        z-index: 285;
        align-items: center;
        justify-items: center;
        padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
        background: rgba(5, 16, 31, 0.48);
    }

    .option-feedback-modal {
        width: min(560px, calc(100vw - 36px));
        height: auto;
        min-height: 0;
        max-height: min(620px, calc(100dvh - 36px));
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        border: 1px solid rgba(15, 41, 71, 0.12);
        border-radius: 18px;
        box-shadow: 0 24px 72px rgba(5, 16, 31, 0.28);
        animation: optionFeedbackPopupIn 180ms ease-out both;
    }

    .option-feedback-modal-body {
        max-height: min(46svh, 360px);
        overflow: auto;
    }
}

@media (max-width: 640px) {
    .option-feedback-modal {
        width: min(430px, calc(100vw - 28px));
        max-height: calc(100dvh - 28px);
        border-radius: 16px;
    }

    .option-feedback-modal-head {
        min-height: auto;
        grid-template-columns: 38px minmax(0, 1fr) 42px;
        gap: 10px;
        padding: 14px;
    }

    .option-feedback-modal-body {
        max-height: min(48svh, 340px);
        padding: 16px 16px 18px;
    }
}

/* JSON-authored rich text: only explicit **bold** and <u>underline</u> carry emphasis. */
.rich-text {
    overflow-wrap: anywhere;
}

.rich-text p {
    margin: 0;
}

.rich-text p + p {
    margin-top: 0.9em;
}

.rich-text strong {
    font-weight: 850;
}

.rich-text u {
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.14em;
}

.student-main-test .question-copy .question-stem {
    max-width: none;
    margin: 0 0 18px;
    color: #0F2947;
    font-family: "Inter", sans-serif;
    font-size: clamp(17px, 1.35vw, 20px);
    font-weight: 500;
    line-height: 1.58;
    letter-spacing: 0;
}

.student-main-test .question-copy .question-stem strong {
    font-weight: 850;
}

.student-main-test .option-main {
    font-weight: 500;
}

.student-main-test .option-main .option-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.student-main-test .option-main .option-text strong {
    font-weight: 820;
}

.student-main-test .option-main .option-key {
    font-weight: 850;
}

.study-note-copy {
    color: inherit;
}

.study-note-copy p {
    margin: 0;
    color: inherit;
    font-size: 15px;
    line-height: 1.6;
}

.learning-modal .study-note-copy {
    grid-column: 1 / -1;
    color: #334155;
}

.learning-modal .study-note-copy p {
    color: inherit;
    line-height: 1.65;
}

.option-explanation-title {
    color: #0F2947;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
}

.option-explanation-title strong {
    font-weight: 850;
}

.option-explanation-copy {
    margin-top: 6px;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
}

.option-feedback-modal-body.rich-text p {
    color: #1f2937;
    font-size: 15px;
    line-height: 1.65;
}

.option-feedback .rich-text strong,
.option-explanation-copy strong,
.study-note-copy strong {
    width: auto;
    height: auto;
    display: inline;
    overflow: visible;
    position: static;
    margin: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 850;
    line-height: inherit;
    white-space: normal;
}

.option-feedback .rich-text strong::before,
.option-explanation-copy strong::before,
.study-note-copy strong::before {
    content: none;
    display: none;
}

.stitch-progress-pill-inline {
    display: none !important;
}

@media (max-width: 640px) {
    .stitch-progress-pill-inline.is-empty,
    .stitch-progress-pill-inline.is-progress,
    .stitch-progress-pill-inline.is-completed {
        display: none !important;
    }

    .stitch-progress-pill-rail.is-empty,
    .stitch-progress-pill-rail.is-progress,
    .stitch-progress-pill-rail.is-completed {
        display: inline-flex !important;
    }
}
