:root {
    --navy: #07183d;
    --navy-2: #09245c;
    --blue: #1769e0;
    --cyan: #14b8d4;
    --orange: #ff8a3d;
    --yellow: #fbbf24;
    --green: #16a34a;
    --red: #e5484d;
    --ink: #172033;
    --muted: #69758d;
    --line: #dce4f2;
    --soft: #f5f8fc;
    --white: #ffffff;
    --shadow: 0 18px 45px rgba(7, 24, 61, 0.12);
    --radius: 8px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

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

button,
input,
select,
textarea {
    font: inherit;
}

.container {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.top-strip {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.86);
    font-size: 13px;
}

.top-strip-inner {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: max-content;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: var(--white);
    background: linear-gradient(135deg, var(--blue), var(--orange));
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(23, 105, 224, 0.25);
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    color: var(--navy);
    font-size: 20px;
    line-height: 1.1;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-weight: 700;
    color: #22304a;
    font-size: 14px;
}

.site-nav a:not(.nav-button):hover,
.admin-nav a:hover {
    color: var(--blue);
}

.nav-button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: var(--radius);
    background: var(--orange);
    color: var(--white);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(255, 138, 61, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover,
.nav-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px rgba(255, 138, 61, 0.32);
}

.button.secondary,
.nav-button.ghost {
    background: var(--white);
    color: var(--blue);
    border: 1px solid rgba(23, 105, 224, 0.25);
    box-shadow: none;
}

.button.ghost {
    background: #eef5ff;
    color: var(--blue);
    box-shadow: none;
}

.button.danger {
    background: var(--red);
    box-shadow: 0 12px 24px rgba(229, 72, 77, 0.2);
}

.button.small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
}

.button.tiny {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

.button.full {
    width: 100%;
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--blue);
    font-weight: 800;
    cursor: pointer;
}

.icon-button {
    width: 44px;
    height: 44px;
    display: none;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    cursor: pointer;
}

.mobile-menu-button span {
    width: 18px;
    height: 2px;
    display: block;
    margin: 3px 0;
    background: var(--navy);
}

.alert {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: var(--radius);
    font-weight: 800;
}

.alert.success {
    color: #0b6b35;
    background: #eaf8ef;
}

.alert.danger {
    color: #9b1c1f;
    background: #ffeded;
}

.hero-section {
    min-height: 620px;
    color: var(--white);
    background:
        linear-gradient(90deg, rgba(7, 24, 61, 0.95) 0%, rgba(7, 24, 61, 0.84) 38%, rgba(7, 24, 61, 0.2) 74%),
        var(--hero-image) center / cover no-repeat,
        var(--navy);
}

.hero-grid {
    min-height: 620px;
    display: grid;
    grid-template-columns: minmax(0, 560px) 1fr;
    align-items: center;
}

.hero-copy {
    padding: 72px 0;
}

.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--orange);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.hero-copy h1,
.page-hero h1 {
    max-width: 780px;
    margin: 12px 0 18px;
    font-size: clamp(38px, 5vw, 66px);
    line-height: 1.02;
    letter-spacing: 0;
}

.hero-copy p,
.page-hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-size: 19px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero-features span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.section {
    padding: 72px 0;
}

.section.subtle {
    background: var(--soft);
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-heading.wide {
    max-width: 100%;
    text-align: center;
}

.section-heading h2 {
    margin: 8px 0 8px;
    color: var(--navy);
    font-size: clamp(28px, 4vw, 48px);
    line-height: 1.05;
    letter-spacing: 0;
}

.section-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
}

.search-panel {
    max-width: 760px;
    margin: 0 auto 28px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.search-panel input {
    width: 100%;
    height: 58px;
    border: 0;
    outline: 0;
    padding: 0 18px;
    border-radius: var(--radius);
    background: #f7faff;
    color: var(--navy);
    font-size: 18px;
    font-weight: 700;
}

.school-grid,
.test-grid,
.subject-grid,
.steps-grid,
.stats-grid {
    display: grid;
    gap: 20px;
}

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

.school-card,
.test-card,
.content-panel,
.stat-card,
.review-card,
.step-card,
.auth-card,
.table-card,
.admin-form,
.import-panel {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 12px 35px rgba(7, 24, 61, 0.08);
}

.school-card {
    display: flex;
    flex-direction: column;
    min-height: 320px;
    overflow: hidden;
}

.school-media {
    height: 118px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #edf5ff, #fff4e9);
}

.school-media img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.school-media span,
.school-logo-large span {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: var(--navy);
    color: var(--white);
    font-weight: 900;
    font-size: 24px;
}

.school-body {
    flex: 1;
    padding: 18px;
}

.school-body h3,
.test-card h3,
.review-card h3 {
    margin: 0 0 10px;
    color: var(--navy);
    line-height: 1.2;
}

.school-body p,
.test-card p,
.muted {
    color: var(--muted);
}

.school-body p {
    min-height: 72px;
    margin: 0 0 14px;
    font-size: 14px;
}

.school-meta,
.test-card-top,
.review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.school-meta span,
.test-card-top span:not(.badge) {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.school-card > .button {
    border-radius: 0;
}

.subject-grid {
    grid-template-columns: repeat(8, minmax(0, 1fr));
}

.subject-card {
    min-height: 128px;
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 18px 10px;
    border-radius: var(--radius);
    color: var(--white);
    background: var(--subject-color);
    text-align: center;
    box-shadow: 0 14px 28px color-mix(in srgb, var(--subject-color), transparent 72%);
}

.subject-card strong {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.2);
}

.subject-card span {
    font-weight: 900;
}

.subject-card small {
    color: rgba(255, 255, 255, 0.82);
}

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

.test-card {
    padding: 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.badge.free {
    color: #0c6834;
    background: #e9f8ef;
}

.badge.paid {
    color: #9f2c1a;
    background: #fff0e8;
}

.badge.neutral {
    color: var(--navy);
    background: #edf2fa;
}

.test-meta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 18px 0;
}

.test-meta-grid span {
    padding: 10px;
    border-radius: var(--radius);
    background: #f5f8ff;
    color: var(--navy);
    font-size: 12px;
    font-weight: 900;
    text-align: center;
}

.steps-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-card {
    padding: 24px;
}

.step-card span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--blue);
    color: var(--white);
    font-weight: 900;
}

.step-card strong {
    display: block;
    margin-top: 16px;
    color: var(--navy);
    font-size: 18px;
}

.page-hero {
    color: var(--white);
    background: radial-gradient(circle at right top, rgba(255, 138, 61, 0.28), transparent 36%), linear-gradient(135deg, var(--navy), var(--navy-2));
}

.page-hero.compact {
    padding: 72px 0;
}

.school-hero-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.school-logo-large {
    width: 160px;
    height: 160px;
    flex: 0 0 160px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.12);
}

.school-logo-large img {
    max-width: 120px;
    max-height: 120px;
}

.filter-bar {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.filter-bar select,
.filter-bar input,
.form-stack input,
.admin-search input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.auth-card input {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    color: var(--ink);
    outline: 0;
}

.filter-bar select,
.filter-bar input,
.admin-search input,
.admin-form input,
.admin-form select,
.auth-card input {
    height: 44px;
    padding: 0 12px;
}

.admin-form textarea,
.form-stack textarea {
    min-height: 110px;
    padding: 12px;
}

.two-column {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 24px;
}

.content-panel {
    padding: 24px;
}

.content-panel h2 {
    margin: 0 0 16px;
    color: var(--navy);
}

.clean-list {
    padding-left: 20px;
    color: var(--muted);
}

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

.summary-list span {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.auth-section {
    min-height: calc(100vh - 160px);
    display: grid;
    place-items: center;
    padding: 60px 16px;
    background: linear-gradient(135deg, #f5f8fc, #fff7ed);
}

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

.auth-card h1 {
    margin: 8px 0 8px;
    color: var(--navy);
}

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

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

.check-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}

.check-row input {
    width: auto;
    height: auto;
}

.center {
    text-align: center;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 24px;
}

.stat-card {
    padding: 22px;
}

.stat-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card strong {
    display: block;
    margin-top: 8px;
    color: var(--navy);
    font-size: 28px;
}

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

.compact-list a {
    display: grid;
    gap: 4px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbff;
}

.compact-list span {
    color: var(--muted);
    font-size: 13px;
}

.result-hero strong {
    display: block;
    margin-top: 20px;
    font-size: 56px;
}

.review-list {
    display: grid;
    gap: 16px;
}

.review-card {
    padding: 22px;
}

.test-attempt-shell {
    min-height: calc(100vh - 34px);
    background: #edf2fa;
}

.test-topbar {
    position: sticky;
    top: 0;
    z-index: 45;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 24px;
    background: var(--navy);
    color: var(--white);
}

.test-topbar small {
    display: block;
    color: rgba(255, 255, 255, 0.74);
}

.timer {
    min-width: 110px;
    padding: 10px 14px;
    border-radius: var(--radius);
    background: var(--orange);
    text-align: center;
    font-weight: 900;
    font-size: 20px;
}

.test-workspace {
    width: min(1280px, calc(100% - 24px));
    margin: 24px auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
}

.question-area,
.question-palette {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.question-panel {
    padding: 28px;
}

.question-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--blue);
    font-weight: 900;
}

.question-panel h2 {
    margin: 18px 0;
    color: var(--navy);
    font-size: clamp(20px, 3vw, 30px);
}

.question-image {
    max-height: 240px;
    object-fit: contain;
    margin: 0 0 18px;
}

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

.option-item {
    display: grid;
    grid-template-columns: auto 42px 1fr;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
}

.option-item:has(input:checked) {
    border-color: var(--blue);
    background: #f0f6ff;
}

.option-item span {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #eef4fb;
    color: var(--navy);
    font-weight: 900;
}

.test-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    border-top: 1px solid var(--line);
}

.question-palette {
    padding: 20px;
    align-self: start;
    position: sticky;
    top: 96px;
}

.question-palette h3 {
    margin: 0 0 14px;
    color: var(--navy);
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}

.palette-grid button {
    height: 42px;
    border: 0;
    border-radius: var(--radius);
    color: var(--white);
    font-weight: 900;
    cursor: pointer;
}

.palette-grid button.current {
    outline: 3px solid var(--yellow);
}

.answered,
.palette-grid .answered {
    background: var(--green);
}

.not-answered,
.palette-grid .not-answered {
    background: var(--red);
}

.marked,
.palette-grid .marked {
    background: #7c3aed;
}

.not-visited,
.palette-grid .not-visited {
    background: #94a3b8;
}

.legend-grid {
    display: grid;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.legend-grid span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-grid b {
    width: 14px;
    height: 14px;
    display: inline-block;
    border-radius: 4px;
}

.site-footer {
    padding: 48px 0;
    color: rgba(255, 255, 255, 0.82);
    background: var(--navy);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.7fr 1fr;
    gap: 30px;
}

.footer-brand strong {
    color: var(--white);
}

.site-footer h3 {
    color: var(--white);
}

.site-footer a,
.site-footer p {
    display: block;
    margin: 7px 0;
}

.empty-state {
    padding: 18px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    color: var(--muted);
    text-align: center;
}

.admin-body {
    background: #f1f5fb;
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    padding: 22px;
    background: var(--navy);
    color: var(--white);
    overflow-y: auto;
    z-index: 50;
}

.admin-brand {
    margin-bottom: 24px;
}

.admin-brand strong {
    color: var(--white);
}

.admin-nav {
    display: grid;
    gap: 8px;
}

.admin-nav a {
    padding: 12px 14px;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.82);
    font-weight: 800;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.admin-shell {
    min-height: 100vh;
    margin-left: 280px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(14px);
}

.admin-topbar small {
    display: block;
    color: var(--muted);
}

.admin-main {
    padding: 28px;
}

.admin-page-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.admin-search {
    display: flex;
    gap: 10px;
    width: min(520px, 100%);
}

.table-card {
    overflow-x: auto;
}

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

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

.admin-table th {
    color: var(--navy);
    background: #f8fbff;
    font-size: 13px;
    text-transform: uppercase;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.import-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px;
    margin-bottom: 18px;
}

.import-panel span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.admin-form {
    padding: 24px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.full-span {
    grid-column: 1 / -1;
}

.admin-check {
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #f8fbff;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.color-chip {
    width: 18px;
    height: 18px;
    display: inline-block;
    border-radius: 50%;
    border: 1px solid var(--line);
    vertical-align: middle;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-left: 0;
    list-style: none;
}

.page-link,
.page-item span {
    display: grid;
    place-items: center;
    min-width: 36px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.page-item.active .page-link {
    color: var(--white);
    background: var(--blue);
}

@media (max-width: 1180px) {
    .school-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .subject-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .icon-button {
        display: grid;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: calc(100% + 8px);
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--white);
        box-shadow: var(--shadow);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav form,
    .site-nav .nav-button {
        width: 100%;
    }

    .hero-section {
        min-height: 560px;
        background:
            linear-gradient(180deg, rgba(7, 24, 61, 0.94), rgba(7, 24, 61, 0.78)),
            var(--hero-image) center / cover no-repeat,
            var(--navy);
    }

    .hero-grid {
        min-height: 560px;
        grid-template-columns: 1fr;
    }

    .school-grid,
    .test-grid,
    .steps-grid,
    .stats-grid,
    .two-column,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-bar {
        grid-template-columns: 1fr 1fr;
    }

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

    .question-palette {
        position: static;
    }

    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-shell {
        margin-left: 0;
    }

    .admin-topbar .icon-button {
        display: grid;
    }
}

@media (max-width: 640px) {
    .container {
        width: min(100% - 20px, 1180px);
    }

    .top-strip-inner {
        min-height: 44px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 2px;
        font-size: 12px;
    }

    .header-inner {
        min-height: 66px;
    }

    .brand strong {
        font-size: 17px;
    }

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

    .hero-section,
    .hero-grid {
        min-height: 620px;
    }

    .hero-copy {
        padding: 44px 0;
    }

    .hero-copy h1,
    .page-hero h1 {
        font-size: 38px;
    }

    .hero-copy p,
    .page-hero p {
        font-size: 16px;
    }

    .hero-actions,
    .test-actions,
    .form-actions,
    .admin-page-actions,
    .import-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-actions .button,
    .test-actions .button {
        width: 100%;
    }

    .section {
        padding: 46px 0;
    }

    .search-panel input {
        height: 54px;
        font-size: 16px;
    }

    .school-grid,
    .test-grid,
    .subject-grid,
    .steps-grid,
    .stats-grid,
    .two-column,
    .footer-grid,
    .filter-bar,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .school-card {
        min-height: auto;
    }

    .school-body p {
        min-height: 0;
    }

    .subject-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-hero.compact {
        padding: 50px 0;
    }

    .school-hero-grid {
        align-items: flex-start;
        flex-direction: column;
    }

    .school-logo-large {
        width: 112px;
        height: 112px;
        flex-basis: 112px;
    }

    .test-topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px;
    }

    .timer {
        width: 100%;
    }

    .test-workspace {
        width: calc(100% - 16px);
        margin: 12px auto;
    }

    .question-panel {
        padding: 18px;
    }

    .option-item {
        grid-template-columns: auto 34px 1fr;
        padding: 12px;
    }

    .option-item span {
        width: 30px;
        height: 30px;
    }

    .palette-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .admin-main {
        padding: 16px;
    }

    .admin-topbar {
        height: auto;
        min-height: 70px;
        padding: 12px 16px;
    }
}
