.practice-tests-page {
    background: var(--page-background);
}

.practice-tests-page .container {
    width: min(1180px, 92%);
}

.catalog-hero {
    position: relative;
    width: min(1180px, 92%);
    margin: 42px auto 0;
    padding: clamp(28px, 5vw, 48px);
    overflow: hidden;
    color: var(--text-color);
    border: 1px solid #bfdbfe;
    border-radius: 26px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(14, 165, 233, 0.04));
}

.catalog-hero::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -260px;
    width: 520px;
    height: 520px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 90px rgba(37, 99, 235, 0.025), 0 0 0 180px rgba(37, 99, 235, 0.018);
    pointer-events: none;
}

.catalog-hero > .container {
    width: 100%;
}

.catalog-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
    align-items: center;
    gap: 28px;
}

.catalog-hero-grid > div,
.catalog-route-key {
    animation: catalog-enter 380ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.catalog-route-key {
    animation-delay: 50ms;
}

.catalog-eyebrow {
    margin: 0 0 14px;
    color: #2563eb;
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.catalog-hero h1 {
    margin: 0;
    max-width: 720px;
    font-size: clamp(2rem, 5vw, 3.65rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.catalog-hero h1 span {
    color: #2563eb;
}

.catalog-hero-grid > div > p:not(.catalog-eyebrow) {
    max-width: 660px;
    margin: 18px 0 0;
    color: var(--muted-text);
    font-size: 1.03rem;
    line-height: 1.7;
}

.catalog-hero-pills {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.catalog-hero-pills span {
    padding: 7px 11px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--muted-text);
    background: color-mix(in srgb, var(--card-background) 90%, #2563eb 10%);
    font-size: 0.72rem;
    font-weight: 750;
}

.catalog-route-key {
    padding: 23px;
    display: grid;
    gap: 16px;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-background);
    box-shadow: 0 10px 28px rgba(40, 63, 103, 0.08);
}

.catalog-route-key > p {
    color: var(--muted-text);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.catalog-route-key > div {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    align-items: start;
    gap: 11px;
}

.catalog-route-key span {
    display: grid;
    gap: 2px;
    color: var(--muted-text);
    font-size: 0.73rem;
    line-height: 1.42;
}

.catalog-route-key strong {
    color: var(--text-color);
    font-size: 0.8rem;
}

.catalog-dot {
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
}

.catalog-dot-adaptive { background: #49d3ff; }
.catalog-dot-partial { background: #a492ff; }
.catalog-dot-fixed { background: #f7b955; }

.catalog-main {
    padding: 0 0 80px;
}

.catalog-main > .container {
    gap: 22px;
}

.catalog-guidance {
    position: relative;
    z-index: 3;
    margin-top: 22px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--card-background);
    box-shadow: 0 20px 55px rgba(7, 18, 38, 0.1);
    animation: catalog-enter 380ms 80ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.catalog-guidance article {
    min-height: 106px;
    padding: 22px;
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    gap: 13px;
    align-items: start;
    border-right: 1px solid var(--border-color);
}

.catalog-guidance article:last-child {
    border-right: 0;
}

.catalog-guidance article > span {
    color: #9aa8bb;
    font-size: 0.67rem;
    font-weight: 900;
}

.catalog-guidance strong {
    color: var(--text-color);
    font-size: 0.9rem;
}

.catalog-guidance p {
    margin: 3px 0 0;
    color: var(--muted-text);
    font-size: 0.76rem;
    line-height: 1.5;
}

.catalog-main .test-list-controls {
    margin-top: 12px;
    padding: 14px;
    border-radius: 15px;
    box-shadow: 0 8px 24px rgba(7, 18, 38, 0.045);
}

.catalog-main .tests-summary {
    margin: 0 !important;
}

.catalog-main .tests-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 16px;
}

.catalog-main .test-card {
    position: relative;
    width: 100%;
    min-height: 286px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    color: var(--text-color);
    background: var(--card-background);
    box-shadow: 0 9px 26px rgba(7, 18, 38, 0.045);
    cursor: default;
    transition:
        transform 170ms cubic-bezier(0.22, 1, 0.36, 1),
        border-color 170ms ease;
    animation: catalog-card-enter 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: calc(var(--card-order, 0) * 20ms);
    content-visibility: auto;
    contain-intrinsic-size: auto 286px;
}

.catalog-main .test-card:hover {
    transform: translateY(-2px);
    border-color: #7caeff;
}

.catalog-main .test-card:nth-child(n + 9) {
    animation: none;
}

@keyframes catalog-enter {
    from {
        opacity: 0;
        transform: translateY(22px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes catalog-card-enter {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.99);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .catalog-hero-grid > div,
    .catalog-route-key,
    .catalog-guidance,
    .catalog-main .test-card {
        animation: none !important;
    }
}

.catalog-main .test-card-new {
    border-color: var(--border-color);
}

.catalog-main .test-card-header {
    min-height: 38px;
    align-items: flex-start;
}

.catalog-main .test-card-header h2 {
    color: var(--text-color);
    font-size: 1.2rem;
    line-height: 1.22;
    letter-spacing: -0.025em;
}

.test-card-heading-badges,
.catalog-main .test-status-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.test-mode-badge {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.67rem;
    font-weight: 850;
}

.test-source-badge {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 999px;
    color: #075985;
    background: #e0f2fe;
    border: 1px solid rgba(2, 132, 199, 0.22);
    font-size: 0.67rem;
    font-weight: 850;
}

.test-mode-badge.is-adaptive {
    color: #075985;
    background: #cff3ff;
}

.test-mode-badge.is-partial {
    color: #5136a8;
    background: #e7e1ff;
}

.test-mode-badge.is-fixed {
    color: #884b0d;
    background: #fff0c9;
}

.catalog-main .new-badge,
.catalog-main .progress-badge,
.catalog-main .completed-badge {
    padding: 5px 9px;
    font-size: 0.67rem;
}

.catalog-main .test-meta {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.catalog-main .test-meta span {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 7px;
    color: var(--muted-text);
    background: color-mix(in srgb, var(--card-background) 92%, #2563eb 8%);
    font-size: 0.67rem;
    font-weight: 700;
}

.catalog-main .saved-module {
    margin: 17px 0 20px;
    color: var(--muted-text);
    font-size: 0.82rem;
    line-height: 1.55;
}

.catalog-main .test-score-disclosure {
    margin: -2px 0 18px;
}

.catalog-main .test-details-toggle {
    width: 100%;
    min-height: 43px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #166534;
    border: 1px solid color-mix(in srgb, #22c55e 32%, var(--border-color));
    border-radius: 10px;
    background: color-mix(in srgb, var(--card-background) 88%, #dcfce7 12%);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 850;
    cursor: pointer;
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.catalog-main .test-details-toggle:hover {
    border-color: #22c55e;
    background: color-mix(in srgb, var(--card-background) 78%, #dcfce7 22%);
}

.catalog-main .test-details-toggle:focus-visible {
    outline: 3px solid color-mix(in srgb, #2563eb 28%, transparent);
    outline-offset: 2px;
}

.catalog-main .test-details-toggle-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    transition: transform 180ms ease;
}

.catalog-main .test-details-toggle[aria-expanded="true"] .test-details-toggle-icon {
    transform: rotate(180deg);
}

.catalog-main .test-score-history {
    margin: 10px 0 0;
}

.catalog-main .test-score-history[hidden] {
    display: none;
}

.catalog-main .test-score-history:not([hidden]) {
    animation: catalog-score-details-enter 180ms ease-out both;
}

@keyframes catalog-score-details-enter {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.catalog-main .test-card-actions {
    width: 100%;
    margin-top: auto;
}

.catalog-main .start-test-btn,
.catalog-main .restart-test-btn {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 850;
}

.catalog-main .start-test-btn {
    color: #ffffff;
    background: #2563eb;
    border: 1px solid #2563eb;
}

.catalog-main .start-test-btn:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.catalog-noscript {
    padding: 14px 16px;
    color: #854d0e;
    border: 1px solid #fde68a;
    border-radius: 11px;
    background: #fffbeb;
    font-size: 0.82rem;
}

.catalog-after-test {
    margin-top: 28px;
    padding: clamp(28px, 5vw, 50px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(370px, 0.8fr);
    gap: 50px;
    color: #ffffff;
    border-radius: 23px;
    background:
        radial-gradient(circle at 85% 15%, rgba(73, 211, 255, 0.17), transparent 28%),
        #071226;
}

.catalog-after-test .catalog-eyebrow {
    color: #b7f34a;
}

.catalog-after-test h2 {
    max-width: 650px;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.catalog-after-test ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    list-style: none;
}

.catalog-after-test li {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 10px;
    color: rgba(231, 239, 255, 0.7);
    font-size: 0.83rem;
    line-height: 1.5;
}

.catalog-after-test li span {
    color: #b7f34a;
    font-weight: 900;
}

html[data-theme="dark"] .catalog-guidance,
html[data-theme="dark"] .catalog-main .test-card {
    box-shadow: none;
}

html[data-theme="dark"] .catalog-hero {
    border-color: rgba(96, 165, 250, 0.34);
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.48), rgba(15, 23, 42, 0.62));
}

html[data-theme="dark"] .catalog-hero::after {
    border-color: rgba(96, 165, 250, 0.13);
}

html[data-theme="dark"] .catalog-hero .catalog-eyebrow,
html[data-theme="dark"] .catalog-hero h1 span {
    color: #60a5fa;
}

html[data-theme="dark"] .catalog-route-key {
    box-shadow: none;
}

html[data-theme="dark"] .test-source-badge {
    color: #bae6fd;
    background: rgba(3, 105, 161, 0.28);
    border-color: rgba(125, 211, 252, 0.24);
}

html[data-theme="dark"] .test-mode-badge.is-adaptive {
    color: #bcecff;
    background: #075985;
}

html[data-theme="dark"] .test-mode-badge.is-partial {
    color: #ddd6fe;
    background: #4c1d95;
}

html[data-theme="dark"] .test-mode-badge.is-fixed {
    color: #fde68a;
    background: #78350f;
}

html[data-theme="dark"] .catalog-main .test-details-toggle {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.38);
    background: rgba(20, 83, 45, 0.34);
}

html[data-theme="dark"] .catalog-main .test-details-toggle:hover {
    border-color: #22c55e;
    background: rgba(20, 83, 45, 0.52);
}

@media (max-width: 940px) {
    .catalog-hero-grid,
    .catalog-after-test {
        grid-template-columns: 1fr;
    }

    .catalog-route-key {
        max-width: 620px;
    }

    .catalog-main .tests-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .catalog-hero {
        width: calc(100% - 24px);
        margin-top: 24px;
        padding: 24px;
        border-radius: 20px;
    }

    .catalog-hero h1 {
        font-size: clamp(2.15rem, 11vw, 3.25rem);
    }

    .catalog-guidance {
        grid-template-columns: 1fr;
    }

    .catalog-guidance article {
        min-height: 88px;
        border-right: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .catalog-guidance article:last-child {
        border-bottom: 0;
    }

    .catalog-main {
        padding-inline: 0;
    }

    .catalog-main .test-card {
        min-height: 0;
        padding: 20px 17px;
    }

    .catalog-main .test-card-header {
        min-height: 0;
        margin-bottom: 0;
    }

    .test-card-heading-badges,
    .catalog-main .test-status-badges {
        justify-content: flex-start;
    }

    .catalog-main .test-meta {
        display: flex;
    }

    .catalog-main .test-score-disclosure {
        margin-bottom: 16px;
    }

    .catalog-after-test {
        gap: 30px;
        border-radius: 18px;
    }
}

@media (max-width: 420px) {
    .catalog-hero-grid {
        gap: 28px;
    }

    .catalog-route-key {
        padding: 18px;
    }

    .catalog-main .test-meta span {
        width: auto;
    }
}

.catalog-dot-official {
    background: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.11);
}
