.exam-directory-page {
    background: var(--bg-body);
}

.exam-home-main {
    padding: 34px 0 44px;
}

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

.exam-landing-hero,
.exam-directory-hero {
    display: grid;
    gap: 24px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.exam-landing-hero {
    grid-template-columns: minmax(0, 1.3fr) auto;
    align-items: center;
    padding: 30px 32px;
}

.exam-directory-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    padding: 28px 30px;
}

.exam-directory-hero.is-school-directory {
    grid-template-columns: minmax(0, 1fr) 96px;
    align-items: center;
}

.exam-hero-label,
.exam-back-link,
.exam-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.exam-hero-label,
.exam-back-link {
    gap: 8px;
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    background: #fff1f1;
    color: var(--primary-color);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
}

.exam-back-link {
    box-sizing: border-box;
    height: 34px;
    margin-bottom: 14px;
    font-family: 'Be Vietnam Pro', sans-serif;
    letter-spacing: 0.04em;
}

button.exam-back-link {
    appearance: none;
    cursor: pointer;
    font-family: 'Be Vietnam Pro', sans-serif;
}

.exam-back-link svg,
.dethi-detail-page .exam-chip.is-back-link svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.dethi-detail-page .exam-chip.is-back-link {
    gap: 8px;
    padding-left: 12px;
}

.exam-hero-badge {
    min-height: 44px;
    padding: 0 16px;
    background: #fff1f1;
    border: 1px solid #ffd7d7;
    color: var(--primary-color);
}

.exam-landing-hero h1,
.exam-directory-hero h1 {
    margin-top: 14px;
    color: var(--text-main);
    font-family: 'Sora', 'Be Vietnam Pro', sans-serif;
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.08;
    letter-spacing: -0.03em;
}

.exam-landing-hero p,
.exam-directory-hero p {
    margin-top: 12px;
    max-width: 760px;
    color: var(--text-main);
    font-size: 17px;
    line-height: 1.8;
}

.exam-directory-school-logo {
    display: grid;
    place-items: center;
    justify-self: end;
    width: 86px;
    height: 86px;
    border-radius: 8px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    background: #fff;
}

.exam-directory-school-logo img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    object-position: center;
}

.exam-directory-school-logo span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 28px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
}

.exam-directory-school-name {
    display: block;
    min-width: 0;
    margin-top: 18px;
    color: var(--text-main);
    font-size: clamp(18px, 3vw, 24px);
    line-height: 1.28;
}

.exam-landing-side {
    display: grid;
    gap: 14px;
    justify-items: start;
}

.exam-primary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 56px;
    padding: 0 22px;
    border-radius: 16px;
    background: var(--primary-color);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.exam-primary-link:hover {
    transform: translateY(-2px);
    background: #b8322c;
    box-shadow: var(--shadow-md);
}

.exam-primary-link img {
    width: 48px;
    height: 48px;
    min-width: 48px;
    margin: -3px 0 -3px -10px;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 8px 14px rgba(123, 22, 16, 0.24));
}

.exam-section {
    margin-top: 30px;
}

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

.exam-section-head h2 {
    color: var(--text-main);
    font-family: 'Sora', 'Be Vietnam Pro', sans-serif;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.exam-section-head a {
    color: var(--primary-color);
    font-weight: 800;
}

.exam-card-grid,
.exam-list-grid {
    display: grid;
    gap: 18px;
}

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

.exam-school-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.exam-school-card {
    display: block;
    min-height: 98px;
    padding: 18px;
    border-radius: 8px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(15, 48, 71, 0.07);
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.exam-school-card:hover {
    transform: translateY(-2px);
    border-color: rgba(198, 58, 50, 0.18);
    box-shadow: 0 20px 48px rgba(15, 48, 71, 0.11);
}

.exam-school-card .home-learning-body {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 4px 14px;
    align-items: center;
    padding: 0;
}

.exam-school-card .home-learning-head {
    display: contents;
}

.exam-school-card .home-school-logo {
    display: grid;
    grid-row: 1 / span 2;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 8px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    background: #fff;
}

.exam-school-card .home-school-logo img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    object-position: center;
}

.exam-school-card .home-school-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2563eb;
    font-size: 11px;
    font-weight: 900;
}

.exam-school-card strong {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    color: var(--text-main);
    font-size: 20px;
    line-height: 1.25;
}

.exam-school-card .home-school-action {
    grid-column: 2;
    grid-row: 2;
    min-width: 0;
    margin-top: 2px;
    color: var(--text-sub);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exam-school-quick-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.exam-school-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(15, 48, 71, 0.1);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--secondary-color);
    font-weight: 850;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.exam-school-quick-link:hover,
.exam-school-quick-link.is-active {
    transform: translateY(-1px);
    border-color: rgba(198, 58, 50, 0.22);
    color: var(--primary-color);
    box-shadow: 0 16px 32px rgba(15, 48, 71, 0.1);
}

.exam-school-quick-link small {
    color: var(--text-sub);
    font-size: 12px;
    font-weight: 800;
}

.exam-list-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exam-bank-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border-radius: 24px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(15, 48, 71, 0.07);
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.exam-bank-card:hover {
    transform: translateY(-2px);
    border-color: rgba(198, 58, 50, 0.18);
    box-shadow: 0 20px 48px rgba(15, 48, 71, 0.11);
}

.exam-bank-card__link {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    color: inherit;
}

.exam-bank-card__link.is-static {
    cursor: default;
}

.exam-bank-card h2,
.exam-bank-card h3 {
    color: var(--text-main);
    font-size: 21px;
    line-height: 1.3;
}

.exam-bank-card p,
.exam-bank-card__description {
    color: var(--text-sub);
    line-height: 1.7;
}

.exam-bank-card__description > :first-child {
    margin-top: 0;
}

.exam-bank-card__description > :last-child {
    margin-bottom: 0;
}

.exam-bank-card__meta,
.exam-bank-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.exam-bank-card__meta span,
.exam-bank-card__tags span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.exam-bank-card__meta span {
    background: #eef2f7;
    color: var(--secondary-color);
}

.exam-bank-card__tags span {
    background: #eef2f7;
    color: var(--secondary-color);
}

.exam-bank-card__tags span.is-school {
    background: #eef4ff;
    color: #2563eb;
}

.exam-bank-card__tags span.is-category {
    background: #fff1f1;
    color: var(--primary-color);
}

.exam-bank-card__tags span.is-term {
    background: #eef6fb;
    color: #0f5f80;
}

.exam-bank-card__tags span.is-primary-course {
    background: #fff1f1;
    color: var(--primary-color);
}

.exam-bank-card__meta span.is-question-count {
    background: #f3f6fa;
    color: #334155;
}

.exam-bank-card__meta span.is-duration {
    background: #f3f6fa;
    color: #334155;
}

.exam-bank-card__meta span.is-question-format {
    background: #fff1f1;
    color: var(--primary-color);
}

.exam-bank-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 0 20px 20px;
}

.exam-bank-card__action {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: filter 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.exam-bank-card__action:hover {
    filter: brightness(0.94);
}

.exam-bank-card__action.secondary {
    border-color: var(--border-color);
    background: var(--bg-body);
    color: var(--text-main);
}

.exam-bank-card__action.is-disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.exam-filter-panel {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    padding: 18px;
    border-radius: 24px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 16px 40px rgba(15, 48, 71, 0.07);
    backdrop-filter: blur(12px);
}

.exam-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.exam-filter-head h2 {
    color: var(--text-main);
    font-family: 'Sora', 'Be Vietnam Pro', sans-serif;
    font-size: 22px;
    letter-spacing: 0;
}

.exam-filter-head p {
    margin-top: 2px;
    color: var(--text-sub);
    font-size: 14px;
}

.exam-filter-head > span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(198, 58, 50, 0.1);
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 900;
}

.exam-filter-toggle-control,
.exam-filter-toggle-btn {
    display: none;
}

.exam-filter-grid {
    display: grid;
    grid-template-columns: 150px 150px 112px minmax(320px, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.exam-filter-panel.has-school-filter .exam-filter-grid {
    grid-template-columns: 112px 136px 136px 104px minmax(300px, 1fr) auto;
}

.exam-preset-filters {
    display: grid;
    gap: 12px;
    padding: 13px 14px;
    border: 1px solid rgba(15, 48, 71, 0.08);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.72);
}

.exam-preset-filter-group {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.exam-preset-filter-group > span {
    padding-top: 7px;
    color: var(--text-main);
    font-size: 13px;
    font-weight: 900;
}

.exam-preset-filter-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.exam-preset-filter {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid rgba(15, 48, 71, 0.1);
    border-radius: 999px;
    background: #fff;
    color: var(--secondary-color);
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.exam-preset-filter:hover,
.exam-preset-filter.is-active {
    border-color: rgba(198, 58, 50, 0.24);
    background: #fff1f1;
    color: var(--primary-color);
}

.exam-filter-field {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.exam-filter-field span {
    color: var(--text-main);
    font-size: 13px;
    font-weight: 800;
}

.exam-filter-field .exam-filter-field-label--visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.exam-filter-field input,
.exam-filter-field select {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(15, 48, 71, 0.12);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--text-main);
    font: inherit;
    padding: 0 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.exam-filter-search-box {
    position: relative;
    display: block;
}

.exam-filter-search-box::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 17px;
    height: 17px;
    border: 2px solid currentColor;
    border-radius: 999px;
    color: var(--text-sub);
    transform: translateY(-56%);
    opacity: 0.68;
    pointer-events: none;
}

.exam-filter-search-box::after {
    content: "";
    position: absolute;
    left: 29px;
    top: 29px;
    width: 8px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    color: var(--text-sub);
    opacity: 0.68;
    transform: rotate(45deg);
    transform-origin: left center;
    pointer-events: none;
}

.exam-filter-field--keyword input {
    padding-left: 44px;
}

.exam-filter-field strong {
    min-height: 46px;
    display: flex;
    align-items: center;
    border: 1px solid rgba(15, 48, 71, 0.12);
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.92);
    color: var(--text-main);
    font-size: 14px;
    font-weight: 900;
    padding: 0 13px;
}

.exam-filter-field input:focus,
.exam-filter-field select:focus {
    border-color: rgba(198, 58, 50, 0.46);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(198, 58, 50, 0.1);
}

.exam-filter-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: max-content;
}

.exam-filter-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 0 17px;
    background: var(--primary-color);
    color: #fff;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
}

.exam-filter-button svg,
.exam-filter-toggle-btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.exam-filter-button.is-ghost {
    background: #eef2f7;
    color: var(--secondary-color);
    box-shadow: none;
}

.exam-empty {
    padding: 22px;
    border: 1px dashed rgba(15, 48, 71, 0.18);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-sub);
    line-height: 1.7;
}

.exam-empty p {
    margin-top: 8px;
}

body.dark-mode.exam-directory-page {
    background: var(--bg-body);
}

body.dark-mode .exam-landing-hero,
body.dark-mode .exam-directory-hero {
    border-color: rgba(148, 163, 184, 0.16);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

body.dark-mode .exam-hero-label,
body.dark-mode .exam-back-link,
body.dark-mode .exam-hero-badge {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.18);
    color: #fecaca;
}

body.dark-mode .exam-directory-school-logo {
    border-color: rgba(148, 163, 184, 0.18);
    background: var(--bg-elevated);
}

body.dark-mode .exam-directory-school-logo span {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
}

body.dark-mode .exam-bank-card,
body.dark-mode .exam-school-card,
body.dark-mode .exam-school-quick-link,
body.dark-mode .exam-filter-panel,
body.dark-mode .exam-empty {
    border-color: rgba(148, 163, 184, 0.16);
    background: var(--bg-card);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

body.dark-mode .exam-bank-card:hover {
    border-color: rgba(239, 68, 68, 0.22);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
}

body.dark-mode .exam-school-quick-link:hover,
body.dark-mode .exam-school-quick-link.is-active {
    border-color: rgba(239, 68, 68, 0.22);
    color: #fecaca;
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
}

body.dark-mode .exam-school-quick-link small {
    color: #94a3b8;
}

body.dark-mode .exam-school-card:hover {
    border-color: rgba(239, 68, 68, 0.22);
    box-shadow: 0 20px 42px rgba(0, 0, 0, 0.3);
}

body.dark-mode .exam-school-card .home-school-logo {
    border-color: rgba(148, 163, 184, 0.18);
    background: var(--bg-elevated);
}

body.dark-mode .exam-bank-card__tags span,
body.dark-mode .exam-bank-card__meta span,
body.dark-mode .exam-filter-toggle-btn,
body.dark-mode .exam-filter-button.is-ghost {
    background: rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
}

body.dark-mode .exam-bank-card__tags span.is-school,
body.dark-mode .exam-school-card .home-school-code,
body.dark-mode .exam-bank-card__meta span.is-question-count {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
}

body.dark-mode .exam-bank-card__tags span.is-category,
body.dark-mode .exam-bank-card__tags span.is-primary-course,
body.dark-mode .exam-bank-card__meta span.is-question-format,
body.dark-mode .exam-filter-head > span {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

body.dark-mode .exam-preset-filters {
    border-color: rgba(148, 163, 184, 0.14);
    background: var(--bg-card);
}

body.dark-mode .exam-preset-filter {
    border-color: rgba(148, 163, 184, 0.18);
    background: var(--bg-control);
    color: #cbd5e1;
}

body.dark-mode .exam-preset-filter:hover,
body.dark-mode .exam-preset-filter.is-active {
    border-color: rgba(239, 68, 68, 0.36);
    background: rgba(127, 29, 29, 0.34);
    color: #fecaca;
}

body.dark-mode .exam-bank-card__tags span.is-term,
body.dark-mode .exam-bank-card__meta span.is-duration {
    background: rgba(56, 189, 248, 0.14);
    color: #bae6fd;
}

body.dark-mode .exam-bank-card__action.secondary {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

body.dark-mode .exam-filter-field input,
body.dark-mode .exam-filter-field select,
body.dark-mode .exam-filter-field strong {
    border-color: rgba(148, 163, 184, 0.18);
    background: var(--bg-control);
    color: var(--text-main);
}

body.dark-mode .exam-filter-field input:focus,
body.dark-mode .exam-filter-field select:focus {
    border-color: rgba(239, 68, 68, 0.44);
    background: var(--bg-control);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

body.dark-mode .exam-filter-search-box::before,
body.dark-mode .exam-filter-search-box::after {
    color: #94a3b8;
}

@media (max-width: 1180px) {
    .exam-card-grid,
    .exam-school-grid,
    .exam-list-grid {
        grid-template-columns: 1fr;
    }

    .exam-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-filter-panel.has-school-filter .exam-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .exam-filter-field--keyword,
    .exam-filter-actions {
        grid-column: 1 / -1;
    }

}

@media (max-width: 820px) {
    .exam-shell {
        width: min(100%, calc(100% - 28px));
    }

    .exam-landing-hero,
    .exam-directory-hero {
        grid-template-columns: 1fr;
        padding: 24px;
        border-radius: 26px;
    }

    .exam-landing-hero p,
    .exam-directory-hero p {
        display: none;
    }

    .exam-landing-side {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        justify-items: stretch;
        gap: 10px;
    }

    .exam-hero-badge,
    .exam-primary-link {
        width: 100%;
        text-align: center;
    }

    .exam-hero-badge {
        justify-content: center;
    }

    .exam-directory-hero.is-school-directory {
        grid-template-columns: minmax(0, 1fr) 76px;
        align-items: center;
    }

    .exam-directory-school-logo {
        width: 70px;
        height: 70px;
    }

    .exam-directory-school-logo img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 620px) {
    .exam-home-main {
        padding-top: 24px;
    }

    .exam-directory-hero.is-school-directory {
        grid-template-columns: minmax(0, 1fr) 70px;
        align-items: start;
        column-gap: 12px;
        row-gap: 18px;
    }

    .exam-directory-hero.is-school-directory .exam-directory-hero-copy {
        display: contents;
    }

    .exam-directory-hero.is-school-directory .exam-back-link {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        max-width: 100%;
        margin-bottom: 0;
    }

    .exam-directory-hero.is-school-directory .exam-directory-school-logo {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        justify-self: end;
        margin: 0;
    }

    .exam-directory-hero.is-school-directory h1 {
        grid-column: 1 / -1;
        grid-row: 2;
        margin-top: 0;
    }

    .exam-directory-hero.is-school-directory .exam-directory-school-name {
        grid-column: 1 / -1;
        grid-row: 3;
        margin-top: 0;
    }

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

    .exam-filter-panel.has-school-filter .exam-filter-grid {
        grid-template-columns: 1fr;
    }

    .exam-filter-field--keyword,
    .exam-filter-actions {
        grid-column: auto;
    }

    .exam-preset-filter-group {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .exam-preset-filter-group > span {
        padding-top: 0;
    }

    .exam-school-quick-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }

    .exam-school-quick-link {
        justify-content: center;
        min-height: 38px;
        padding: 0 10px;
        font-size: 13px;
    }

    .exam-school-quick-link small {
        display: none;
    }

    .exam-filter-panel {
        gap: 10px;
        padding: 14px;
        border-radius: 20px;
    }

    .exam-filter-head {
        display: none;
    }

    .exam-filter-toggle-control {
        position: absolute;
        display: block;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        border: 0;
    }

    .exam-filter-toggle-btn {
        display: inline-flex;
        flex: 1 1 auto;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 42px;
        min-width: 0;
        width: auto;
        padding: 0 8px;
        border: 1px solid rgba(15, 48, 71, 0.1);
        border-radius: 14px;
        background: rgba(15, 48, 71, 0.06);
        color: var(--secondary-color);
        font-size: 13px;
        font-weight: 850;
        cursor: pointer;
    }

    .exam-filter-toggle-control:focus-visible ~ .exam-filter-grid .exam-filter-toggle-btn {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }

    .exam-filter-toggle-btn span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .exam-filter-toggle-control:not(:checked) ~ .exam-filter-grid .exam-filter-toggle-btn .is-close,
    .exam-filter-toggle-control:checked ~ .exam-filter-grid .exam-filter-toggle-btn .is-open {
        display: none;
    }

    .exam-filter-toggle-control:not(:checked) ~ .exam-filter-grid .exam-filter-field--advanced {
        display: none;
    }

    .exam-filter-toggle-control:not(:checked) ~ .exam-preset-filters {
        display: none;
    }

    .exam-filter-grid {
        gap: 10px;
    }

    .exam-filter-field--keyword {
        order: -2;
    }

    .exam-filter-actions {
        order: -1;
        align-items: center;
        flex-direction: row;
        justify-content: flex-end;
        min-width: 0;
    }

    .exam-filter-button {
        flex: 0 0 46px;
        width: 46px;
        min-width: 46px;
        padding: 0;
        border-radius: 14px;
    }

    .exam-filter-button span {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .exam-filter-field {
        align-items: stretch;
    }

    .exam-bank-card__link {
        padding: 16px;
    }

    .exam-bank-card__actions {
        display: grid;
        padding: 0 16px 16px;
    }
}

body.dethi-detail-page,
body.dethi-event-page {
    background: var(--bg-body);
}

.dethi-detail-page .site-header {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
    border-bottom-color: rgba(15, 48, 71, 0.08);
}

.dethi-detail-page .home-official-header.site-header {
    background: rgba(255, 255, 255, 0.92);
    border-bottom-color: #e8edf4;
}

.dethi-detail-page .exam-hero,
.dethi-event-page .event-card {
    border-color: var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

.dethi-detail-page .exam-eyebrow,
.dethi-event-page .exam-eyebrow {
    color: var(--primary-color);
}

.dethi-detail-page .exam-chip,
.dethi-event-page .event-feature-label {
    background: #fff1f1;
    color: var(--primary-color);
}

.dethi-detail-page .exam-hero {
    display: grid;
    gap: 18px;
    padding: 28px 24px 20px;
}

.dethi-detail-page .exam-hero > .exam-back-link {
    justify-self: start;
    margin-bottom: 0;
}

.dethi-detail-page .exam-hero-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.dethi-detail-page .exam-hero-row > :first-child {
    min-width: 0;
    max-width: 1040px;
}

.dethi-detail-page .exam-title {
    max-width: 1040px;
    font-size: clamp(34px, 4.2vw, 52px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.dethi-detail-page .exam-topic {
    max-width: 860px;
    line-height: 1.55;
}

.dethi-detail-page .exam-hero-actions {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
    max-width: 1120px;
}

.dethi-detail-page .exam-hero-course-list {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.dethi-detail-page .exam-hero-actions > .exam-chip[aria-disabled="true"] {
    max-width: 100%;
}

.dethi-detail-page .exam-chip.is-school {
    background: #eef4ff;
    color: #2563eb;
}

.dethi-detail-page .exam-chip.is-course {
    background: #eef2f7;
    color: var(--secondary-color);
}

.dethi-detail-page .exam-chip.is-category,
.dethi-detail-page .exam-chip.is-primary-course {
    background: #fff1f1;
    color: var(--primary-color);
}

.dethi-detail-page .exam-chip.is-term {
    background: #eef6fb;
    color: #0f5f80;
}

.dethi-detail-page .exam-chip.is-duration {
    background: #f3f6fa;
    color: #334155;
}

.exam-detail-login-cta {
    padding: 18px;
}

.exam-detail-login-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 0 22px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    font-size: 17px;
    font-weight: 900;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.exam-detail-login-button:hover {
    transform: translateY(-1px);
    background: #b8322c;
    box-shadow: var(--shadow-md);
}

.dethi-detail-page .exam-preview-section-head,
.dethi-detail-page .exam-side-card,
.dethi-event-page .event-kv,
.dethi-event-page .event-feature-card {
    border-color: rgba(15, 48, 71, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 16px 40px rgba(15, 48, 71, 0.07);
}

.dethi-detail-page .exam-preview-section-head {
    padding: 18px 20px;
    border-radius: 18px;
}

.dethi-detail-page .exam-side-card {
    border-radius: 18px;
}

.dethi-event-page .event-btn {
    background: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.dethi-event-page .event-btn.secondary {
    background: rgba(15, 48, 71, 0.08);
    color: var(--secondary-color);
    box-shadow: none;
}

.dethi-event-page .event-countdown {
    border-color: rgba(198, 58, 50, 0.16);
    background: rgba(255, 255, 255, 0.72);
    border-radius: 18px;
}

body.dark-mode.dethi-detail-page,
body.dark-mode.dethi-event-page {
    background: var(--bg-body);
}

body.dark-mode.dethi-detail-page .site-header {
    background: var(--bg-card);
    border-bottom-color: var(--border-color);
}

body.dark-mode.dethi-detail-page .home-official-header.site-header {
    background: var(--bg-card);
    border-bottom-color: var(--border-color);
}

body.dark-mode.dethi-detail-page .exam-hero,
body.dark-mode.dethi-event-page .event-card {
    border-color: rgba(148, 163, 184, 0.16);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

body.dark-mode.dethi-detail-page .exam-chip,
body.dark-mode.dethi-event-page .event-feature-label {
    background: rgba(239, 68, 68, 0.12);
    color: #fecaca;
}

body.dark-mode.dethi-detail-page .exam-chip.is-course,
body.dark-mode.dethi-detail-page .exam-chip.is-school {
    background: rgba(59, 130, 246, 0.16);
    color: #bfdbfe;
}

body.dark-mode.dethi-detail-page .exam-chip.is-term,
body.dark-mode.dethi-detail-page .exam-chip.is-duration {
    background: rgba(56, 189, 248, 0.14);
    color: #bae6fd;
}

body.dethi-detail-page .exam-question-stage .exam-binary-row {
    gap: 14px;
}

body.dethi-detail-page .exam-question-stage .exam-binary-choices {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(0, clamp(94px, 24vw, 108px)));
    gap: 10px;
    justify-content: start;
    width: max-content;
    max-width: 100%;
}

body.dethi-detail-page .exam-question-stage .exam-binary-choice {
    width: 100%;
    min-height: 42px;
    gap: 8px;
    padding: 0 12px;
    border-radius: 999px;
    white-space: nowrap;
}

body.dethi-detail-page .exam-question-stage .exam-binary-marker {
    flex: 0 0 auto;
}

body.dark-mode.dethi-detail-page .exam-question-stage .exam-binary-row {
    border-color: rgba(148, 163, 184, 0.18);
    background: var(--bg-card);
}

body.dark-mode.dethi-detail-page .exam-question-stage .exam-binary-choice {
    border-color: rgba(148, 163, 184, 0.26);
    background: var(--bg-control);
    color: var(--text-main);
}

body.dark-mode.dethi-detail-page .exam-question-stage .exam-binary-marker {
    border-color: rgba(203, 213, 225, 0.74);
    background: var(--bg-body);
}

@media (max-width: 720px) {
    body.dethi-detail-page {
        padding-bottom: 86px;
    }

    body.dethi-detail-page .exam-hero-actions > * {
        display: none;
    }

    body.dethi-detail-page .exam-hero-actions > .exam-chip.is-term,
    body.dethi-detail-page .exam-hero-actions > .exam-chip.is-duration {
        display: inline-flex;
    }

    body.dethi-detail-page .exam-hero-actions > .exam-hero-course-list {
        display: flex;
    }

    body.dethi-detail-page .exam-hero-course-list > .exam-chip {
        display: none;
    }

    body.dethi-detail-page .exam-hero-course-list > .exam-chip.is-course,
    body.dethi-detail-page .exam-hero-course-list > .exam-chip.is-primary-course {
        display: inline-flex;
    }

    body.dethi-detail-page .exam-hero > .exam-preview-attempt-copy,
    body.dethi-detail-page .exam-hero > .exam-event-countdown {
        display: none;
    }

    body.dethi-detail-page .exam-detail-take-cta {
        position: fixed;
        left: max(14px, env(safe-area-inset-left));
        bottom: max(14px, env(safe-area-inset-bottom));
        z-index: 1200;
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: transparent;
        box-shadow: none;
    }

    body.dethi-detail-page .exam-detail-take-cta .exam-detail-login-button {
        width: auto;
        min-width: 0;
        min-height: 46px;
        padding: 0 18px;
        border-radius: 999px;
        box-shadow: var(--shadow-sm);
        white-space: nowrap;
    }
}

body.dark-mode.dethi-detail-page .exam-preview-section-head,
body.dark-mode.dethi-detail-page .exam-side-card,
body.dark-mode.dethi-event-page .event-kv,
body.dark-mode.dethi-event-page .event-feature-card,
body.dark-mode.dethi-event-page .event-countdown {
    border-color: rgba(148, 163, 184, 0.16);
    background: var(--bg-card);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
}

@media (max-width: 720px) {
    body.dark-mode.dethi-detail-page .exam-detail-take-cta {
        border: 0;
        background: transparent;
        box-shadow: none;
    }
}
