.nd-header {
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    display: block;
    border-bottom: 1px solid rgba(225, 218, 204, .75);
    background: rgba(255, 253, 248, .96);
    box-shadow: 0 8px 24px rgba(20, 43, 95, .08);
}

.nd-header-inner {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 24px;
    gap: 24px;
}

.nd-nav { align-items: center; }
.nd-nav-dropdown-toggle {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--nd-navy);
    font: inherit;
    font-weight: 700;
}
.nd-nav-dropdown-toggle::after {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin: 0 0 3px 7px;
    border-right: 2px solid var(--nd-teal);
    border-bottom: 2px solid var(--nd-teal);
    content: '';
    transform: rotate(45deg);
}
.nd-nav-dropdown-menu {
    min-width: 190px;
    margin-top: 12px !important;
    padding: 8px;
    border: 1px solid var(--nd-line);
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(20, 43, 95, .13);
}
.nd-nav-dropdown-menu .dropdown-item {
    padding: 9px 12px;
    border-radius: 9px;
    color: var(--nd-navy);
    font-weight: 700;
}
.nd-nav-dropdown-menu .dropdown-item:hover,
.nd-nav-dropdown-menu .dropdown-item:focus { background: #eef9f7; color: var(--nd-teal); }
.nd-header-search { position: relative; width: min(240px,20vw); margin-left: auto; }
.nd-header-search input { width: 100%; height: 40px; padding: 8px 36px 8px 14px; border: 1px solid #dfd8ca; border-radius: 11px; outline: none; background: #fff; color: var(--nd-navy); font-size: 14px; }
.nd-header-search::after { position: absolute; top: 12px; right: 14px; width: 12px; height: 12px; border: 2px solid var(--nd-teal); border-radius: 50%; content: ''; pointer-events: none; }
.nd-header-search::before { position: absolute; z-index: 1; top: 25px; right: 11px; width: 7px; height: 2px; background: var(--nd-teal); content: ''; transform: rotate(45deg); pointer-events: none; }
.nd-header-search input:focus { border-color: var(--nd-teal); box-shadow: 0 0 0 3px rgba(34,166,164,.12); }
.nd-search-results { position: absolute; z-index: 1050; top: calc(100% + 7px); right: 0; left: 0; overflow: hidden; border: 1px solid var(--nd-line); border-radius: 13px; background: #fff; box-shadow: 0 14px 28px rgba(20,43,95,.14); }
.nd-search-result { display: block; padding: 10px 13px; color: var(--nd-navy); text-decoration: none; line-height: 1.25; }
.nd-search-result + .nd-search-result { border-top: 1px solid #f2ece2; }
.nd-search-result:hover,.nd-search-result:focus { background: #eef9f7; color: var(--nd-navy); }
.nd-search-result-title { display: block; font-size: 14px; font-weight: 800; }
.nd-search-result-grade { display: block; margin-top: 3px; color: #61708a; font-size: 12px; }
.nd-search-empty { padding: 12px 13px; color: #61708a; font-size: 14px; }

.nd-site {
    position: relative;
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 50% -10%, rgba(255, 255, 255, .96) 0, rgba(255, 253, 247, .78) 34%, transparent 62%),
        linear-gradient(180deg, #fffdf7 0%, #fffaf0 48%, #fff7e9 100%);
    background-attachment: fixed;
}

.nd-site .nd-home {
    --nd-section-gap: 32px;
    background: transparent;
    padding-bottom: var(--nd-section-gap);
}

/*
 * Keep every homepage section after the hero on one 1180px grid.
 * Component padding belongs to the card itself; the shared shell must not
 * make bordered cards narrower than their neighbours.
 */
.nd-home > .nd-grade-picker,
.nd-home > .nd-grade-picker ~ .nd-shell {
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: 1180px;
    margin-right: auto;
    margin-left: auto;
    padding-right: 0;
    padding-left: 0;
}

.nd-home > .nd-grade-picker {
    margin-top: 0;
    margin-bottom: 0;
}

.nd-home > .nd-grade-picker ~ .nd-shell {
    margin-top: var(--nd-section-gap);
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.nd-site > .nd-header,
.nd-site > .nd-main,
.nd-site > .nd-footer {
    position: relative;
    z-index: 1;
}

.nd-site > .nd-header { z-index: 1030; }

.nd-math-bg {
    position: absolute;
    z-index: 0;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.nd-math-bg span {
    position: absolute;
    color: rgba(241, 147, 45, .16);
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(20px, 2.3vw, 38px);
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
}

.nd-math-bg span:nth-child(1) { top: 2%; left: 1.5%; font-size: 52px; transform: rotate(-16deg); }
.nd-math-bg span:nth-child(2) { top: 8%; left: 2%; transform: rotate(-3deg); }
.nd-math-bg span:nth-child(3) { top: 5%; left: 43%; transform: rotate(-10deg); }
.nd-math-bg span:nth-child(4) { top: 7%; right: 3%; transform: rotate(7deg); }
.nd-math-bg span:nth-child(5) { top: 13%; left: 56%; font-size: 46px; }
.nd-math-bg span:nth-child(6) { top: 17%; right: 2.5%; transform: rotate(8deg); }
.nd-math-bg span:nth-child(7) { top: 25%; left: 2%; transform: rotate(-8deg); }
.nd-math-bg span:nth-child(8) { top: 31%; right: 3%; font-size: 48px; transform: rotate(12deg); }
.nd-math-bg span:nth-child(9) { top: 40%; left: 1.5%; transform: rotate(-5deg); }
.nd-math-bg span:nth-child(10) { top: 46%; right: 4%; font-size: 46px; transform: rotate(8deg); }
.nd-math-bg span:nth-child(11) { top: 57%; left: 3%; transform: rotate(-12deg); }
.nd-math-bg span:nth-child(12) { top: 62%; right: 2%; transform: rotate(5deg); }
.nd-math-bg span:nth-child(13) { top: 72%; left: 2%; transform: rotate(-7deg); }
.nd-math-bg span:nth-child(14) { top: 78%; right: 4%; font-size: 42px; transform: rotate(16deg); }
.nd-math-bg span:nth-child(15) { top: 87%; left: 3%; transform: rotate(-4deg); }
.nd-math-bg span:nth-child(16) { top: 92%; right: 3%; font-size: 48px; transform: rotate(9deg); }

.nd-brand {
    gap: 10px;
    font-family: "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
    font-size: 31px;
    font-weight: 900;
    letter-spacing: -1.2px;
    line-height: 1;
}

.nd-brand img {
    display: block;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
}

.nd-features article {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
}

.nd-feature-icon {
    display: block;
    width: 100%;
    max-width: 180px;
    height: 160px;
    margin: 0 auto 14px;
    object-fit: contain;
}

.nd-features article h3 {
    margin-top: 0;
}

.nd-grade-picker {
    box-sizing: border-box;
    padding: 26px 32px 30px;
    border: 1px solid var(--nd-line);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(50, 39, 19, .08);
}

.nd-grade-picker h2 {
    margin: 0 0 22px;
    color: var(--nd-navy);
    text-align: center;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 900;
}

.nd-grade-picker .nd-grades {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
	padding: 0px 14px;
}

.nd-grade-picker .nd-grade,
.nd-grade-picker .nd-grade:nth-child(3n) {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 72px;
    padding: 10px 4px;
    border: 1px solid #e4e1da;
    border-radius: 17px;
    color: var(--nd-navy);
    background: #fff;
    box-shadow: 0 4px 12px rgba(20, 43, 95, .04);
    transition: border-color .18s ease, box-shadow .18s ease, color .18s ease, transform .18s ease;
}

.nd-grade-picker .nd-grade:hover {
    border-color: var(--nd-teal);
    color: var(--nd-teal);
    box-shadow: 0 8px 20px rgba(34, 166, 164, .14);
    transform: translateY(-2px);
}

.nd-grade-picker .nd-grade:focus-visible {
    outline: 3px solid rgba(255, 113, 56, .28);
    outline-offset: 3px;
}

.nd-grade-picker .nd-grade strong {
    display: block;
    font-size: clamp(27px, 2.4vw, 35px);
    font-weight: 900;
    line-height: 1;
}

.nd-grade-picker .nd-grade span {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.nd-grade-picker .nd-grade.is-disabled {
    opacity: .32;
    filter: grayscale(1);
}

.nd-parents {
    box-sizing: border-box;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 42px;
    padding: 34px 42px;
    overflow: hidden;
    border: 1px solid var(--nd-line);
    border-radius: 24px;
    background: #fffdf8;
    box-shadow: 0 12px 34px rgba(50, 39, 19, .07);
}

.nd-parents-art img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 360px;
    object-fit: contain;
}

.nd-parents-copy {
    align-self: center;
}

.nd-parents-copy h2 {
    margin: 6px 0 16px;
    font-size: clamp(27px, 3vw, 40px);
    line-height: 1.12;
}

.nd-parents-copy > p:not(.nd-eyebrow) {
    margin: 0 0 24px;
    font-size: 16px;
}

.nd-how {
    background: transparent;
}

.nd-how-card {
    padding: 34px 44px 32px;
    border: 1px solid var(--nd-line);
    border-radius: 24px;
    background: #fffdf8;
    box-shadow: 0 12px 32px rgba(50, 39, 19, .06);
}

.nd-how-card > .nd-eyebrow {
    margin: 0 0 24px;
    text-align: center;
}

.nd-steps {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr) 90px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
}

.nd-step {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    text-align: center;
}

.nd-step-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 84px;
}

.nd-step-visual b {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: var(--nd-teal);
    font-size: 21px;
    box-shadow: 0 6px 14px rgba(34, 166, 164, .22);
}

.nd-step-icon {
    display: block;
    flex: 0 0 auto;
    width: 108px;
    height: 108px;
    object-fit: contain;
}

.nd-step h3 {
    margin: 4px 0 0;
    color: var(--nd-navy);
    font-size: 18px;
    font-weight: 900;
}

.nd-step-arrow {
    position: relative;
    display: block;
    height: 2px;
    border-top: 2px dashed #476491;
}

.nd-step-arrow::after {
    content: "";
    position: absolute;
    top: -6px;
    right: 0;
    width: 10px;
    height: 10px;
    border-top: 2px solid #476491;
    border-right: 2px solid #476491;
    transform: rotate(45deg);
}

.nd-trust {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 0 24px;
    overflow: hidden;
    border: 1px solid var(--nd-line);
    border-radius: 20px;
    background: #fffdf8;
    box-shadow: 0 10px 28px rgba(50, 39, 19, .05);
    margin: var(--nd-section-gap) auto 0;
}

.nd-trust-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 94px;
    padding: 16px 22px;
    color: var(--nd-navy);
}

.nd-trust-item + .nd-trust-item {
    border-left: 1px solid var(--nd-line);
}

.nd-trust-item strong {
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.nd-trust-icon {
    display: block;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    object-fit: contain;
}

.nd-footer {
    color: var(--nd-navy);
    background: #fffaf0;
    border-top: 1px solid var(--nd-line);
}

.nd-text-page {
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: 1180px;
    margin: 40px auto;
    padding: clamp(30px, 5vw, 64px) clamp(24px, 6vw, 84px);
    border: 1px solid var(--nd-line);
    border-radius: 24px;
    background: rgba(255, 253, 248, .96);
    box-shadow: 0 12px 34px rgba(50, 39, 19, .07);
}

.nd-text-page-header {
    padding-bottom: 24px;
    border-bottom: 1px solid var(--nd-line);
}

.nd-text-page-header h1 {
    max-width: 850px;
    margin: 0;
    color: var(--nd-navy);
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.08;
}

.nd-text-page-content {
    max-width: 850px;
    padding-top: 12px;
    color: #3f4e68;
    font-size: 16px;
    line-height: 1.72;
}

.nd-text-page-content h2 {
    margin: 34px 0 12px;
    color: var(--nd-navy);
    font-size: clamp(23px, 3vw, 30px);
    line-height: 1.2;
}

.nd-text-page-content h3 {
    margin: 26px 0 10px;
    color: var(--nd-navy);
    font-size: 20px;
}

.nd-text-page-content p,
.nd-text-page-content ul,
.nd-text-page-content ol {
    margin: 0 0 16px;
}

.nd-text-page-content li + li {
    margin-top: 7px;
}

.nd-text-page-content a {
    color: var(--nd-teal);
    font-weight: 800;
}

.nd-footer-main,
.nd-footer-bottom,
.nd-footer-partners {
    box-sizing: border-box;
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.nd-footer-feedback {
    box-sizing: border-box;
    width: calc(100% - 48px);
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 0 28px;
}

.nd-footer-feedback p {
    margin: 0;
    padding: 15px 20px;
    border: 1px solid rgba(34, 166, 164, .16);
    border-radius: 14px;
    color: #526079;
    background: rgba(34, 166, 164, .055);
    text-align: center;
    font-size: 14px;
}

.nd-footer-feedback a {
    color: var(--nd-orange);
    font-weight: 900;
    text-decoration: none;
}

.nd-footer-main {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) repeat(2, minmax(150px, 1fr));
    gap: 48px;
    padding-top: 48px;
    padding-bottom: 38px;
}

.nd-footer-brand .nd-brand {
    width: max-content;
    font-size: 27px;
}

.nd-footer-brand .nd-brand img {
    width: 40px;
    height: 40px;
}

.nd-footer-brand p {
    max-width: 280px;
    margin: 14px 0 0;
    color: #526079;
    line-height: 1.55;
}

.nd-footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.nd-footer-column h2 {
    margin: 4px 0 8px;
    font-size: 16px;
    font-weight: 900;
}

.nd-footer-column a {
    color: #526079;
    text-decoration: none;
    font-size: 14px;
}

.nd-footer-column a:hover {
    color: var(--nd-orange);
}

.nd-footer-partners {
    display: flex;
    align-items: center;
    gap: 18px;
    padding-top: 0;
    padding-bottom: 26px;
}

.nd-footer-partners h2 {
    flex: 0 0 auto;
    margin: 0;
    color: var(--nd-navy);
    font-size: 14px;
    font-weight: 900;
}

.nd-footer-partners > div { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.nd-footer-partners a { color: #526079; font-size: 14px; text-decoration: none; }
.nd-footer-partners a:hover { color: var(--nd-orange); }

.nd-footer-social > div {
    display: flex;
    gap: 10px;
}

.nd-footer-social a {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: var(--nd-navy);
    font-size: 15px;
    font-weight: 900;
}

.nd-footer-social a:hover {
    color: #fff;
    background: var(--nd-orange);
}

.nd-footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 18px;
    padding-bottom: 22px;
    border-top: 1px solid var(--nd-line);
    color: #68748a;
    font-size: 12px;
}

.nd-footer-bottom nav {
    display: flex;
    gap: 24px;
}

.nd-footer-bottom a {
    color: inherit;
    text-decoration: none;
}

@media (max-width: 800px) {
    .nd-site .nd-home {
        --nd-section-gap: 24px;
    }

    .nd-home > .nd-grade-picker,
    .nd-home > .nd-grade-picker ~ .nd-shell {
        width: calc(100% - 36px);
    }

    .nd-text-page {
        width: calc(100% - 36px);
        margin: 24px auto;
        padding: 28px 20px 34px;
        border-radius: 20px;
    }

    .nd-header-inner {
        padding: 16px 18px;
        flex-wrap: wrap;
    }

    .nd-header-search { order: 3; width: 100%; }

    .nd-math-bg span {
        opacity: .65;
        font-size: 21px;
    }

    .nd-math-bg span:nth-child(even) {
        display: none;
    }

    .nd-parents {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 28px 20px 30px;
        text-align: center;
    }

    .nd-parents-art img {
        max-height: 330px;
    }

    .nd-grade-picker {
        padding: 24px 18px 26px;
    }

    .nd-grade-picker .nd-grades {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 10px;
    }

    .nd-grade-picker .nd-grade,
    .nd-grade-picker .nd-grade:nth-child(3n) {
        min-height: 62px;
    }

    .nd-how-card {
        padding: 30px 20px;
    }

    .nd-steps {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .nd-step-arrow {
        width: 2px;
        height: 34px;
        margin: 0 auto;
        border-top: 0;
        border-left: 2px dashed #476491;
    }

    .nd-step-arrow::after {
        top: auto;
        right: -4px;
        bottom: 0;
        transform: rotate(135deg);
    }

    .nd-trust {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 0;
    }

    .nd-trust-item {
        min-height: 86px;
        padding: 14px;
    }

    .nd-trust-item + .nd-trust-item {
        border-left: 0;
    }

    .nd-trust-item:nth-child(even) {
        border-left: 1px solid var(--nd-line);
    }

    .nd-trust-item:nth-child(n + 3) {
        border-top: 1px solid var(--nd-line);
    }

    .nd-footer-main {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 24px;
        padding: 38px 18px 30px;
    }

    .nd-footer-brand {
        grid-column: 1 / -1;
    }

    .nd-footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 18px 20px;
    }

    .nd-footer-feedback {
        width: calc(100% - 36px);
        padding: 0 0 24px;
    }

    .nd-footer-partners { padding-right: 18px; padding-left: 18px; }
}

@media (max-width: 480px) {
    .nd-grade-picker .nd-grades {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .nd-trust {
        grid-template-columns: 1fr;
    }

    .nd-trust-item:nth-child(even) {
        border-left: 0;
    }

    .nd-trust-item + .nd-trust-item {
        border-top: 1px solid var(--nd-line);
    }

    .nd-footer-main {
        grid-template-columns: 1fr;
    }

    .nd-footer-brand {
        grid-column: auto;
    }

    .nd-footer-partners { align-items: flex-start; flex-direction: column; gap: 8px; }

    .nd-footer-bottom nav {
        flex-direction: column;
        gap: 8px;
    }
}

/* Mathematics catalogue */
.nd-catalog {
    padding: 28px 0 64px;
}

.nd-catalog-hero,
.nd-catalog-chooser,
.nd-catalog-seo {
    border: 1px solid var(--nd-line);
    border-radius: 26px;
    box-shadow: 0 10px 28px rgba(30, 48, 81, .08);
}

.nd-catalog-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 300px;
    overflow: hidden;
    padding: 52px 58px;
    background: linear-gradient(116deg, #fffdf8 0%, #fff8e9 100%);
}

.nd-catalog-hero-copy {
    position: relative;
    z-index: 1;
    max-width: 690px;
}

.nd-catalog h1 {
    max-width: 680px;
    margin: 7px 0 16px;
    color: var(--nd-navy);
    font-size: clamp(34px, 4.4vw, 58px);
    line-height: 1.04;
    letter-spacing: -.045em;
}

.nd-catalog-lead {
    max-width: 650px;
    margin: 0;
    color: #283b62;
    font-size: 18px;
    line-height: 1.55;
}

.nd-catalog-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 27px;
}

.nd-catalog-stats span {
    padding: 9px 13px;
    border: 1px solid rgba(13, 158, 151, .26);
    border-radius: 999px;
    background: rgba(255, 255, 255, .72);
    color: #0c766f;
    font-size: 14px;
    font-weight: 800;
}

.nd-catalog-stats strong {
    color: var(--nd-navy);
}

.nd-catalog-formulas {
    position: absolute;
    z-index: 0;
    inset: 0 0 0 auto;
    width: 44%;
    color: rgba(241, 113, 33, .26);
    font-size: clamp(24px, 3vw, 44px);
    font-weight: 800;
    pointer-events: none;
}

.nd-catalog-formulas span { position: absolute; transform: rotate(-12deg); }
.nd-catalog-formulas span:nth-child(1) { top: 18%; left: 16%; }
.nd-catalog-formulas span:nth-child(2) { top: 56%; left: 10%; color: rgba(15, 159, 151, .28); }
.nd-catalog-formulas span:nth-child(3) { top: 25%; right: 6%; }
.nd-catalog-formulas span:nth-child(4) { right: 17%; bottom: 18%; color: rgba(15, 159, 151, .24); }

.nd-catalog-chooser {
    margin-top: 24px;
    padding: 31px 46px 35px;
    background: rgba(255, 255, 255, .9);
}

.nd-catalog-section-head { text-align: center; }
.nd-catalog-section-head h2,
.nd-catalog-seo h2 {
    margin: 5px 0 0;
    color: var(--nd-navy);
    font-size: clamp(26px, 3vw, 37px);
    letter-spacing: -.035em;
}

.nd-catalog-grade-nav {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 12px;
    margin-top: 25px;
}

.nd-catalog-grade-nav a {
    display: grid;
    min-height: 62px;
    place-items: center;
    border: 1px solid #e6e1d7;
    border-radius: 15px;
    background: #fffefa;
    box-shadow: 0 5px 12px rgba(30, 48, 81, .04);
    color: var(--nd-navy);
    font-size: 25px;
    font-weight: 900;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.nd-catalog-grade-nav a:hover,
.nd-catalog-grade-nav a:focus {
    transform: translateY(-3px);
    border-color: var(--nd-orange);
    background: #fff4e7;
    color: var(--nd-orange-dark);
}

.nd-catalog-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 24px;
}

.nd-catalog-card {
    display: flex;
    min-height: 300px;
    flex-direction: column;
    padding: 26px;
    border: 1px solid var(--nd-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, .93);
    box-shadow: 0 8px 22px rgba(30, 48, 81, .07);
}

.nd-catalog-card-top { display: flex; align-items: center; gap: 15px; }
.nd-catalog-grade-number {
    display: grid;
    width: 59px;
    height: 59px;
    flex: 0 0 59px;
    place-items: center;
    border-radius: 17px;
    background: linear-gradient(145deg, #14afa5, #078d8a);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 7px 13px rgba(6, 128, 124, .18);
    color: #fff;
    font-size: 28px;
    font-weight: 900;
}
.nd-catalog-card:nth-child(3n+2) .nd-catalog-grade-number { background: linear-gradient(145deg, #ff9832, #ff5b1a); }
.nd-catalog-card:nth-child(3n) .nd-catalog-grade-number { background: linear-gradient(145deg, #517bd9, #3758ad); }
.nd-catalog-card h2 { margin: 0; color: var(--nd-navy); font-size: 23px; font-weight: 900; }
.nd-catalog-card-top p { margin: 2px 0 0; color: #60708e; font-size: 14px; font-weight: 700; }

.nd-catalog-test-list { margin: 23px 0 8px; padding: 0; list-style: none; }
.nd-catalog-test-list li { position: relative; padding: 8px 0 8px 17px; border-bottom: 1px solid #f0ece3; }
.nd-catalog-test-list li::before { position: absolute; top: 16px; left: 0; width: 7px; height: 7px; border-radius: 50%; background: var(--nd-teal); content: ''; }
.nd-catalog-test-list a { color: #405d8c; font-size: 15px; font-weight: 500; line-height: 1.3; text-decoration: none; }
.nd-catalog-test-list a:hover { color: #2f4e7e; text-decoration: none; }
.nd-catalog-more { margin: 6px 0 15px; color: #6e7b91; font-size: 13px; font-weight: 700; }
.nd-catalog-card-action { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; color: var(--nd-teal); font-weight: 900; text-decoration: none; }
.nd-catalog-card-action span { font-size: 23px; line-height: .7; transition: transform .18s ease; }
.nd-catalog-card-action:hover { color: var(--nd-orange); }
.nd-catalog-card-action:hover span { transform: translateX(4px); }

.nd-catalog-seo {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
    margin-top: 24px;
    padding: 35px 44px;
    background: linear-gradient(110deg, #f1fbf9, #fffdf6);
}
.nd-catalog-seo-icon { display: grid; width: 78px; height: 78px; place-items: center; border-radius: 24px; background: var(--nd-teal); color: #fff; font-size: 44px; font-weight: 900; }
.nd-catalog-seo p { max-width: 900px; margin: 14px 0 0; color: #344464; font-size: 16px; line-height: 1.62; }

@media (max-width: 900px) {
    .nd-catalog-hero { padding: 42px 34px; }
    .nd-catalog-formulas { width: 37%; opacity: .7; }
    .nd-catalog-grade-nav { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .nd-catalog-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .nd-catalog { padding: 16px 0 43px; }
    .nd-catalog-hero, .nd-catalog-chooser, .nd-catalog-seo { border-radius: 19px; }
    .nd-catalog-hero { min-height: 0; padding: 31px 22px; }
    .nd-catalog-lead { font-size: 16px; }
    .nd-catalog-formulas { display: none; }
    .nd-catalog-chooser { margin-top: 16px; padding: 25px 17px 27px; }
    .nd-catalog-grade-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
    .nd-catalog-grade-nav a { min-height: 52px; border-radius: 12px; font-size: 21px; }
    .nd-catalog-list { grid-template-columns: 1fr; gap: 15px; margin-top: 16px; }
    .nd-catalog-card { min-height: 0; padding: 22px; border-radius: 19px; }
    .nd-catalog-seo { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; padding: 27px 22px; }
    .nd-catalog-seo-icon { width: 63px; height: 63px; border-radius: 18px; font-size: 34px; }
}

/* Grade test pages */
.nd-grade-page { padding: 28px 0 64px; }
.nd-grade-hero, .nd-grade-tests, .nd-grade-curriculum, .nd-grade-seo, .nd-grade-switcher { border: 1px solid var(--nd-line); border-radius: 26px; box-shadow: 0 10px 28px rgba(30,48,81,.08); }
.nd-grade-hero { position: relative; overflow: hidden; padding: 40px 54px 48px; background: linear-gradient(118deg, #fffefa, #fff8e9); }
.nd-breadcrumbs { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 30px; color: #687893; font-size: 14px; font-weight: 700; }
.nd-breadcrumbs a { color: var(--nd-teal); text-decoration: none; }
.nd-breadcrumbs a:hover { color: var(--nd-orange); }
.nd-grade-hero h1 { position: relative; z-index: 1; max-width: 720px; margin: 7px 0 14px; color: var(--nd-navy); font-size: clamp(35px, 4.3vw, 56px); letter-spacing: -.045em; line-height: 1.05; }
.nd-grade-lead { position: relative; z-index: 1; max-width: 730px; margin: 0; color: #344464; font-size: 18px; line-height: 1.58; }
.nd-grade-hero-mark { position: absolute; right: 7%; bottom: -39px; color: rgba(245, 190, 105, .15); font-size: 260px; font-weight: 900; letter-spacing: -.1em; line-height: 1; }
.nd-grade-tests { margin-top: 24px; padding: 35px 42px 43px; background: rgba(255,255,255,.92); }
.nd-grade-section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.nd-grade-section-head h2, .nd-grade-curriculum h2, .nd-grade-seo h2 { margin: 5px 0 0; color: var(--nd-navy); font-size: clamp(27px, 3vw, 38px); letter-spacing: -.035em; }
.nd-grade-count { padding: 8px 12px; border-radius: 999px; background: #eff9f7; color: #087d77; font-size: 14px; font-weight: 900; white-space: nowrap; }
.nd-grade-test-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.nd-grade-test-card { display: flex; min-height: 180px; overflow: hidden; border: 1px solid #ece7de; border-radius: 18px; background: #fff; }
.nd-grade-test-card--full { border: 1px solid #82d7ce; background: #fff; box-shadow: none; }
.nd-grade-test-card--full img { background: #fff; }
.nd-grade-test-card--full .nd-grade-test-card-copy { border-left-color: #ccece7; background: linear-gradient(125deg,#f1fbf9 0%,#fffdf8 100%); }
.nd-full-test-badge { display: inline-flex; align-self: flex-start; margin: 0 0 8px; padding: 4px 8px; border: 1px solid #9edfd7; border-radius: 999px; background: #e4f7f4; color: #087d77; font-size: 11px; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.nd-grade-test-card img { width: 112px; height: 156px; flex: 0 0 112px; align-self: center; padding: 10px; object-fit: contain; background: #fff; }
.nd-grade-test-card-copy { display: flex; flex: 1; align-self: stretch; flex-direction: column; padding: 20px 21px; border-left: 1px solid #f0ece4; background: #fffefa; }
.nd-grade-test-card h3 { margin: 0; color: var(--nd-navy); font-size: 19px; font-weight: 900; line-height: 1.18; }
.nd-grade-test-card p { display: -webkit-box; overflow: hidden; margin: 9px 0 15px; color: #61708b; font-size: 14px; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.nd-test-card-title { color: #405d8c; font-weight: 500; text-decoration: none; }
.nd-test-card-title:hover { color: #2f4e7e; text-decoration: none; }
.nd-grade-test-card .nd-test-card-actions > a { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--nd-teal); font-size: 14px; font-weight: 900; text-decoration: none; }
.nd-test-card-solve { min-width: 148px; padding: 8px 13px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #ff8d2c, #ff5b1a); box-shadow: 0 5px 11px rgba(255,99,29,.18); color: #fff !important; font-size: 14px; font-weight: 900; line-height: 1.2; text-align: center; }
.nd-test-card-solve:hover { background: linear-gradient(135deg, #ff7c20, #ec4d12); color: #fff !important; }
.nd-test-card-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; }
.nd-grade-test-card .nd-test-card-actions > a { margin-top: 0; }
.nd-share-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 7px 10px; border: 1px solid #b9e1dc; border-radius: 10px; background: #f3fbfa; color: #087d77; font-size: 13px; font-weight: 900; line-height: 1.2; white-space: nowrap; transition: transform .16s ease, background .16s ease, border-color .16s ease; }
.nd-share-trigger:hover { transform: translateY(-1px); border-color: var(--nd-teal); background: #ddf5f1; color: #076f6a; }
.nd-share-icon { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.nd-grade-empty { margin: 0; color: #61708b; }
.nd-grade-curriculum { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 25px; align-items: start; margin-top: 24px; padding: 36px 43px; background: linear-gradient(118deg, #fff7e9, #fffdfa); }
.nd-grade-curriculum-icon { display: grid; width: 76px; height: 76px; place-items: center; border-radius: 23px; background: linear-gradient(145deg, #ff9a30, #ff5c1c); color: #fff; font-size: 36px; font-weight: 900; }
.nd-grade-curriculum-intro { max-width: 850px; margin: 13px 0 13px; color: #40506c; line-height: 1.55; }
.nd-grade-curriculum ul { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px 28px; max-width: 1000px; margin: 0; padding: 0; list-style: none; }
.nd-grade-curriculum li { position: relative; padding: 7px 0 7px 19px; color: #263b63; font-weight: 700; line-height: 1.38; }
.nd-grade-curriculum li::before { position: absolute; top: 15px; left: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--nd-orange); content: ''; }
.nd-curriculum-note { margin: 16px 0 0; color: #6f7b91; font-size: 13px; line-height: 1.45; }
.nd-grade-seo { margin-top: 24px; padding: 33px 42px; background: rgba(255,255,255,.84); }
.nd-grade-seo p { max-width: 950px; margin: 13px 0 0; color: #3d4d6b; line-height: 1.62; }
.nd-grade-switcher { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: 24px; padding: 21px 30px; background: #fffefa; }
.nd-grade-switcher > span { margin-right: 8px; color: var(--nd-navy); font-weight: 900; }
.nd-grade-switcher a { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid #e5dfd4; border-radius: 10px; color: var(--nd-navy); font-weight: 900; text-decoration: none; }
.nd-grade-switcher a:hover, .nd-grade-switcher a.is-active { border-color: var(--nd-teal); background: var(--nd-teal); color: #fff; }
@media (max-width: 700px) {
 .nd-grade-page { padding: 16px 0 43px; }
 .nd-grade-hero,.nd-grade-tests,.nd-grade-curriculum,.nd-grade-seo,.nd-grade-switcher { border-radius: 19px; }
 .nd-grade-hero { padding: 28px 22px 33px; } .nd-breadcrumbs { margin-bottom: 22px; font-size: 13px; } .nd-grade-lead { font-size: 16px; } .nd-grade-hero-mark { right: 4%; font-size: 150px; }
 .nd-grade-tests { margin-top: 16px; padding: 27px 21px; } .nd-grade-section-head { align-items: start; flex-direction: column; margin-bottom: 20px; }
 .nd-grade-test-grid { grid-template-columns: 1fr; gap: 13px; } .nd-grade-test-card img { width: 90px; height: 136px; flex-basis: 90px; padding: 8px; }
 .nd-grade-curriculum { grid-template-columns: 1fr; gap: 16px; margin-top: 16px; padding: 27px 22px; } .nd-grade-curriculum-icon { width: 63px; height: 63px; border-radius: 18px; } .nd-grade-curriculum ul { grid-template-columns: 1fr; gap: 2px; }
 .nd-grade-seo { margin-top: 16px; padding: 27px 22px; } .nd-grade-switcher { margin-top: 16px; padding: 19px; }
}

/* Test workspace: the original semantic hooks and JavaScript remain unchanged. */
.nd-test-hero { position: relative; display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 30px; overflow: hidden; margin-top: 28px; padding: 31px 43px 37px; border: 1px solid var(--nd-line); border-radius: 26px; background: linear-gradient(118deg, #fffefa, #fff8eb); box-shadow: 0 10px 28px rgba(30,48,81,.08); }
.nd-test-breadcrumbs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: #687893; font-size: 14px; font-weight: 700; }
.nd-test-breadcrumbs a { color: var(--nd-teal); text-decoration: none; }
.nd-test-breadcrumbs a:hover { color: var(--nd-orange); }
.nd-test-hero-copy { align-self: center; }
.nd-test-hero-copy h1 { margin: 6px 0 13px; color: var(--nd-navy); font-size: clamp(34px, 4vw, 52px); font-weight: 900; letter-spacing: -.045em; line-height: 1.06; }
.nd-test-hero-copy > p:not(.nd-section-eyebrow) { max-width: 720px; margin: 0; color: #40506c; font-size: 17px; line-height: 1.58; }
.nd-test-hero-facts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.nd-test-hero-facts span { padding: 8px 12px; border: 1px solid #efdcc4; border-radius: 999px; background: rgba(255,255,255,.72); color: #4c5a74; font-size: 14px; font-weight: 800; }
.nd-test-hero-image { display: grid; min-height: 178px; place-items: center; align-self: end; border: 1px solid #eee3d4; border-radius: 21px; background: #fff; }
.nd-test-hero-image img { width: 100%; height: 178px; padding: 13px; object-fit: contain; }
.nd-test-hero-image span { color: var(--nd-teal); font-size: 92px; font-weight: 900; }
.nd-test-start-row { display: flex; flex-wrap: wrap; grid-column: 1 / -1; justify-content: center; gap: 12px; padding-top: 4px; }
.nd-test-start-btn { display: inline-flex; align-items: center; gap: 15px; padding: 17px 30px; border-radius: 15px; background: linear-gradient(135deg, #ff8d2c, #ff5b1a); box-shadow: 0 10px 20px rgba(255,99,29,.25); color: #fff; font-size: 19px; font-weight: 900; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.nd-test-share-btn { padding: 15px 19px; border-radius: 15px; font-size: 16px; }
.nd-test-start-btn:hover { transform: translateY(-2px); box-shadow: 0 13px 24px rgba(255,99,29,.32); color: #fff; }
.nd-test-start-btn span { font-size: 25px; line-height: .7; }
.nd-class-test-options { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; width: 100%; }
.nd-class-test-options p { width: 100%; margin: 0 0 4px; color: var(--nd-navy); font-size: 17px; font-weight: 900; text-align: center; }
.nd-class-test-option { display: inline-flex; flex-direction: column; align-items: center; min-width: 104px; padding: 13px 18px; border: 1px solid #f0d8b5; border-radius: 14px; background: #fff; box-shadow: 0 5px 12px rgba(30,48,81,.06); color: var(--nd-navy); text-decoration: none; }
.nd-class-test-option strong { color: var(--nd-orange); font-size: 24px; line-height: 1; }
.nd-class-test-option span { margin-top: 4px; color: #596982; font-size: 13px; font-weight: 800; }
.nd-class-test-option:hover { border-color: var(--nd-orange); background: #fff8ec; color: var(--nd-navy); transform: translateY(-2px); }
.nd-site .testMainContainer { width: calc(100% - 48px); max-width: 1180px; margin: 24px auto 0; padding: 38px 44px; border: 1px solid var(--nd-line); border-radius: 26px; background: rgba(255,255,255,.94); box-shadow: 0 10px 28px rgba(30,48,81,.08); }
.nd-site .testMainContainer > h1, .nd-site .testMainContainer > p.mb-4.descrTest:not(.lead) { display: none; }
.nd-site .testMainContainer h1 { max-width: 760px; margin: 0 0 14px; color: var(--nd-navy); font-size: clamp(31px, 4vw, 48px); font-weight: 900; letter-spacing: -.04em; }
.nd-site .testMainContainer .descrTest { max-width: 1090px; color: #40506c; font-size: 17px; line-height: 1.6; }
.nd-site .testNotStarted .descrTest.lead { display: grid; grid-template-columns: repeat(2, max-content); gap: 7px 28px; align-items: center; padding: 19px 22px; border: 1px solid #f1dfc7; border-radius: 17px; background: #fff8ed; color: #314260; font-size: 16px; }
.nd-site .testNotStarted .descrTest.lead br { display: none; }
.nd-site .testNotStarted .descrTest.lead .btn { grid-column: 1 / -1; justify-self: start; margin: 10px 0 0 !important; }
.nd-site .testNotStarted .nd-legacy-start { display: none !important; }
.nd-site .testMainContainer .btn-orange { border: 0; border-radius: 13px; background: linear-gradient(135deg, #ff8d2c, #ff5b1a); box-shadow: 0 7px 15px rgba(255,99,29,.2); color: #fff; font-weight: 900; }
.nd-site .testMainContainer .btn-orange:hover { background: linear-gradient(135deg, #ff7c20, #ec4d12); color: #fff; }
.modal-dialog .btn-orange { border: 0; border-radius: 13px; background: linear-gradient(135deg, #ff8d2c, #ff5b1a); box-shadow: 0 7px 15px rgba(255,99,29,.2); color: #fff; font-weight: 900; }
.modal-dialog .btn-orange:hover { background: linear-gradient(135deg, #ff7c20, #ec4d12); color: #fff; }
.nd-site .testMainContainer .klausimu-cont { overflow: hidden; border: 1px solid #e9e3da; border-radius: 21px !important; background: #fffefa; box-shadow: none; }
.nd-site .testMainContainer .klausimas-cont h5 { display: flex; justify-content: space-between; margin: 0; padding: 18px 23px !important; border-color: #eee8de !important; background: #f7fbfa; color: var(--nd-navy); font-size: 16px; font-weight: 900; }
.nd-site .testMainContainer .klausimu-is { color: #0a8d86; font-size: 14px; }
.nd-question-head-actions { display: inline-flex; align-items: center; gap: 12px; }
.nd-question-report { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; border: 1px solid #f2c99b; border-radius: 11px; background: #fff8ed; color: #7c8aa2; transition: transform .16s ease, color .16s ease, border-color .16s ease, background .16s ease; }
.nd-question-report:hover { transform: translateY(-1px); border-color: #f2a39b; background: #fff3f1; color: #d85046; }
.nd-question-report:disabled { opacity: .55; cursor: wait; }
.nd-question-report svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nd-question-report .nd-report-paw { display: block; width: 24px; height: 24px; }
.nd-question-report-saved { padding: 7px 10px; border: 1px solid #bfe5db; border-radius: 10px; background: #effaf6; color: #087d70; font-size: 12px; font-weight: 900; }
.nd-site .testMainContainer .salygos { display: flex; align-items: center; justify-content: center; min-height: clamp(310px, 44vh, 500px); padding: 34px 24px !important; border-color: #eee8de !important; color: var(--nd-navy); font-size: clamp(22px, 3vw, 31px); font-weight: 800; line-height: 1.45; }
.nd-site .testMainContainer .nd-question-content { width: 100%; }
/* Iliustruoti tekstiniai uždaviniai: paveikslėlis yra atskiras akcentas
   virš sąlygos, todėl jis neardo teksto eilučių dešinėje pusėje. */
.nd-site .testMainContainer .nd-question-content:has(.nd-question-context-icon) { display: flex; width: min(100%, 1040px); flex-direction: column; align-items: center; margin: 0 auto; font-size: clamp(21px, 2.25vw, 28px); text-align: center; }
.nd-site .testMainContainer .nd-question-content:has(.nd-question-context-icon) .nd-question-context-icon { display: block; order: -1; width: clamp(78px, 10vw, 112px); height: auto; margin: 0 auto 18px; object-fit: contain; }
.nd-site .testMainContainer .salygos svg { max-width: 100%; height: auto; font-size: initial; }
.nd-site .testMainContainer .atsakymai { gap: 10px; padding: 20px 24px !important; }
.nd-site .testMainContainer .atsakymas { min-width: 150px; margin: 0 !important; padding: 0 !important; border: 1px solid #dbe5e4; border-radius: 14px !important; background: #fff; transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease; }
.nd-site .testMainContainer .atsakymas:hover { transform: translateY(-2px); border-color: #11a89f; box-shadow: 0 7px 15px rgba(10,143,135,.12); }
.nd-site .testMainContainer .atsakymas input { position: absolute; opacity: 0; pointer-events: none; }
.nd-site .testMainContainer .atsakymas label { width: 100%; padding: 14px 18px; color: #203760; cursor: pointer; font-size: 18px; }
.nd-site .testMainContainer .atsakymas:has(input:checked) { border-color: #0a9b93; background: #eaf9f6; }
.nd-site .testMainContainer .atsakymas.text-bg-success { border-color: #1b9f69; background: #dff6e9 !important; color: #144e38; }
.nd-site .testMainContainer .atsakymas.text-bg-danger { border-color: #f06153; background: #fff0ee !important; color: #7d302b; }
.nd-site .testMainContainer .pagination { gap: 10px; }
.nd-site .testMainContainer .page-item .page-link { display: flex; width: 48px; height: 48px; align-items: center; justify-content: center; padding: 0; border: 1px solid #e6ded2; border-radius: 14px; background: #fffefa; box-shadow: 0 5px 11px rgba(31,49,79,.07); color: var(--nd-navy); font-size: 16px; font-weight: 900; text-align: center; transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease; }
.nd-site .testMainContainer .page-item .page-link:hover { transform: translateY(-2px); border-color: #f4b16d; background: #fff8ed; color: #d75a1d; box-shadow: 0 8px 15px rgba(31,49,79,.11); }
.nd-site .testMainContainer .page-item.direction .page-link { width: auto; min-width: 88px; padding: 0 16px; border-radius: 14px; }
.nd-site .testMainContainer .page-item.active .page-link { border-color: #0a9b93; background: linear-gradient(145deg,#17afa7,#078d8a); box-shadow: 0 8px 15px rgba(9,145,137,.24); color: #fff; }
.nd-site .testMainContainer .page-item.choice-made .page-link { border-color: #91d9cb; background: #ecfaf6; box-shadow: inset 0 -3px #18a992; color: #087d70; }
.nd-site .testMainContainer .page-item.active.choice-made .page-link { border-color: #0a9b93; background: linear-gradient(145deg,#17afa7,#078d8a); box-shadow: 0 8px 15px rgba(9,145,137,.24); color: #fff; }
.nd-site .testMainContainer .page-item .page-link.text-danger { border-color: #f0aaa2; background: #fff1ef; box-shadow: inset 0 -3px #ed695d; color: #c4453c !important; }
.nd-site .testMainContainer .test-tools .btn-outline-secondary { margin: 0; border: 1px solid #d7e0df; border-radius: 12px; background: #f6fbfa; color: #24716d; font-weight: 900; }
.nd-site .testMainContainer .test-tools-2 { margin-top: 22px !important; }
.nd-site .testMainContainer .btn-warning { border: 1px solid #ead8b7; border-radius: 12px; background: #fff8eb; color: #8b5b21; font-weight: 800; }
.modal-dialog .btn-warning { border: 1px solid #ead8b7; border-radius: 12px; background: #fff8eb; color: #8b5b21; font-weight: 800; }
.nd-site .test-question-examples { width: calc(100% - 48px); max-width: 1180px; padding: 0; }
.nd-site .seoKlausimai { margin-top: 34px !important; padding: 26px 28px; border: 1px solid #eadfce; border-radius: 18px; background: #fff8ed; color: #52617a; }
.nd-site .seoKlausimai h2 { margin-bottom: 15px; color: var(--nd-navy); font-size: 21px; font-weight: 900; }
.nd-site .seoKlausimai ol { margin: 0; padding-left: 24px; }
.nd-site .seoKlausimai li + li { margin-top: 8px; }
.nd-site .test-educational-content, .nd-site .related-tests { width: calc(100% - 48px); max-width: 1180px; padding: 34px 42px; border: 1px solid var(--nd-line); border-radius: 23px; background: rgba(255,255,255,.9); box-shadow: 0 8px 22px rgba(30,48,81,.06); }
.nd-site .test-educational-content { display: grid; grid-template-columns: minmax(0,1fr) 270px; gap: 28px; align-items: center; }
.nd-test-educational-copy { min-width: 0; }
.nd-test-educational-cat { display: block; width: 100%; max-width: 270px; height: auto; justify-self: end; }
.nd-site .related-tests .card { display: flex !important; flex-direction: row !important; align-items: stretch; height: 100%; min-height: 180px; overflow: hidden; border: 1px solid #ece6dc; border-radius: 17px; background: #fff; }
.nd-site .related-tests .card::before { display: grid; width: 102px; flex: 0 0 102px; place-items: center; align-self: stretch; background: #fff; color: var(--nd-teal); content: '÷'; font-size: 50px; font-weight: 900; }
.nd-site .related-tests .card:has(.nd-related-thumb)::before { display: none; }
.nd-site .related-tests .nd-related-thumb { display: block !important; width: 112px !important; min-width: 112px; max-width: 112px !important; height: 156px; flex: 0 0 112px; align-self: center; padding: 10px; object-fit: contain; background: #fff; }
.nd-site .related-tests .col-md-6:nth-child(3n+2) .card::before { color: var(--nd-orange); content: '×'; }
.nd-site .related-tests .col-md-6:nth-child(3n) .card::before { color: #446dc8; content: '+'; }
.nd-site .related-tests .card-body { display: flex; width: auto; flex: 1 1 0; flex-direction: column; padding: 21px; border-left: 1px solid #f0ece4; background: #fffefa; }
.nd-site .related-tests .card-title { margin: 0; color: var(--nd-navy); font-weight: 900; }
.nd-site .related-tests .card-text { display: -webkit-box; overflow: hidden; margin: 9px 0 15px; color: #61708b; line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.nd-site .related-tests .card .btn { align-self: flex-start; margin-top: auto; }
.nd-related-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: auto; }
.nd-site .related-tests .nd-related-actions .btn { margin-top: 0; }
.nd-site .related-tests .nd-test-card-title { color: #405d8c; font-weight: 500; text-decoration: none; }
.nd-site .related-tests .nd-test-card-title:hover { color: #2f4e7e; text-decoration: none; }
.nd-site .related-tests .nd-test-card-solve { align-self: auto; padding: 10px 13px; }
.nd-related-actions .nd-share-trigger { padding: 10px 13px; }
.nd-share-modal .modal-content { border: 1px solid #dbe8e6; border-radius: 22px; box-shadow: 0 18px 48px rgba(18,36,70,.2); }
.nd-share-modal .modal-header { padding: 21px 24px; border-bottom: 0; background: linear-gradient(135deg,#effaf8,#fffaf0); }
.nd-share-modal .modal-title { color: var(--nd-navy); font-size: 21px; font-weight: 900; }
.nd-share-modal .modal-body { padding: 6px 24px 25px; }
.nd-share-modal .modal-body > p:first-child { margin: 0 0 17px; color: #52617b; line-height: 1.45; }
.nd-share-copy-row { display: flex; gap: 9px; }
.nd-share-copy-row .form-control { min-width: 0; border-color: #d5e3e1; border-radius: 11px; color: #40506c; }
.nd-share-copy-row .btn { flex: 0 0 auto; border: 0; border-radius: 11px; background: var(--nd-teal); color: #fff; font-weight: 900; }
.nd-share-copy-row .btn:hover { background: #078d8a; color: #fff; }
.nd-share-copy-feedback { margin: 10px 0 0 !important; color: #078d77; font-size: 14px; font-weight: 800; }
.nd-share-networks { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 19px; }
.nd-share-networks a { padding: 9px 12px; border: 1px solid #ece3d5; border-radius: 10px; background: #fffdfa; color: var(--nd-navy); font-size: 14px; font-weight: 800; text-decoration: none; }
.nd-share-networks a:hover { border-color: #f5b16b; background: #fff3e4; color: #d75a1d; }
.modal-backdrop { z-index: 1050; }
body > .modal { z-index: 1055; }
body > .modal .modal-content { overflow: hidden; border: 1px solid #e8e1d6; border-radius: 22px; box-shadow: 0 16px 44px rgba(18,36,70,.18); }
body > .modal .modal-header { padding: 21px 24px; border-color: #eee8de; background: #fff8ed; color: var(--nd-navy); }
body > .modal .modal-title { font-size: 22px; font-weight: 900; }
body > .modal .modal-body { padding: 24px; color: #314260; font-size: 17px; }
body > #testo_pabaiga_modalas .modal-header { position: relative; justify-content: center; padding: 19px 56px; border-bottom: 0; background: linear-gradient(135deg,#fff8ed 0%,#fffdf8 100%); }
body > #testo_pabaiga_modalas .modal-header:before { display: none; }
body > #testo_pabaiga_modalas .nd-result-modal-check { width: 34px; height: 34px; margin-right: 10px; border-radius: 12px; background: #12a7a2; box-shadow: inset 0 -3px 0 rgba(0,0,0,.09); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 34px; }
body > #testo_pabaiga_modalas .nd-result-modal-check svg { width: 21px; height: 21px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
body > #testo_pabaiga_modalas .btn-close { position: absolute; right: 20px; top: 24px; }
body > #testo_pabaiga_modalas .modal-body { padding: 8px 28px 25px; text-align: center; }
body > #testo_pabaiga_modalas .nd-result-summary { display: flex; align-items: center; justify-content: center; gap: 17px; min-height: 150px; padding: 12px 18px; border: 1px solid #d9eeee; border-radius: 20px; background: linear-gradient(135deg,#f4fbfa 0%,#fffdf8 100%); }
body > #testo_pabaiga_modalas .nd-result-summary img { width: 128px; height: 128px; flex: 0 0 128px; object-fit: contain; }
body > #testo_pabaiga_modalas .nd-result-score { text-align: left; }
body > #testo_pabaiga_modalas .nd-result-label { margin: 0 0 5px; color: var(--nd-navy); font-size: 18px; font-weight: 900; }
body > #testo_pabaiga_modalas .modal-body .testo-resultatas { margin: 0; color: #079b93; font-size: 25px; font-weight: 900; line-height: 1.18; }
body > #testo_pabaiga_modalas .errorsNotify { margin: 16px 0 0; padding: 10px 14px; border: 1px solid #ffd5d1; border-radius: 12px; background: #fff5f3; font-size: 15px; }
body > .modal .modal-footer { padding: 18px 24px 23px; border-color: #eee8de; }
body > .modal .modal-footer .btn { padding: 12px 20px; border-radius: 13px; font-size: 17px; font-weight: 900; }
@media (max-width: 500px) { body > #testo_pabaiga_modalas .modal-header { padding-left: 48px; padding-right: 48px; } body > #testo_pabaiga_modalas .nd-result-modal-check { width: 28px; height: 28px; margin-right: 7px; border-radius: 10px; flex-basis: 28px; } body > #testo_pabaiga_modalas .nd-result-modal-check svg { width: 17px; height: 17px; } body > #testo_pabaiga_modalas .modal-body { padding: 6px 18px 20px; } body > #testo_pabaiga_modalas .nd-result-summary { gap: 10px; min-height: 116px; padding: 10px; border-radius: 16px; } body > #testo_pabaiga_modalas .nd-result-summary img { width: 90px; height: 90px; flex-basis: 90px; } body > #testo_pabaiga_modalas .nd-result-label { font-size: 16px; } body > #testo_pabaiga_modalas .modal-body .testo-resultatas { font-size: 21px; } body > .modal .modal-footer .btn { padding: 11px 16px; font-size: 16px; } }
@media (max-width: 700px) {
 .nd-test-hero { grid-template-columns: 1fr; gap: 18px; margin-top: 16px; padding: 25px 21px; border-radius: 19px; } .nd-test-breadcrumbs { font-size: 13px; } .nd-test-hero-image { width: 132px; min-height: 110px; } .nd-test-hero-image img { height: 110px; } .nd-site .testMainContainer { width: calc(100% - 32px); margin-top: 16px; padding: 27px 20px; border-radius: 19px; }
 .nd-site .testNotStarted .descrTest.lead { grid-template-columns: 1fr; padding: 16px; }
 .nd-site .testMainContainer .salygos { min-height: clamp(230px, 36vh, 320px); padding: 27px 15px !important; }
 .nd-site .testMainContainer .nd-question-content:has(.nd-question-context-icon) { font-size: clamp(20px, 5.4vw, 24px); }
 .nd-site .testMainContainer .nd-question-content:has(.nd-question-context-icon) .nd-question-context-icon { width: 82px; margin-bottom: 12px; }
 .nd-site .testMainContainer .atsakymai { padding: 15px !important; } .nd-site .testMainContainer .atsakymas { width: 100%; }
 .nd-site .testMainContainer .klausimas-cont h5 { padding: 15px !important; } .nd-site .testMainContainer .page-item:not(.direction) { display: none; }
 .nd-site .test-educational-content,.nd-site .related-tests { width: calc(100% - 32px); margin-top: 16px !important; padding: 27px 20px; border-radius: 19px; } .nd-site .test-educational-content { grid-template-columns: 1fr; gap: 12px; } .nd-test-educational-cat { width: min(230px,100%); justify-self: center; } .nd-site .related-tests .card::before { width: 76px; flex-basis: 76px; font-size: 38px; } .nd-site .related-tests .nd-related-thumb { width: 90px !important; min-width: 90px; max-width: 90px !important; height: 136px; flex-basis: 90px; padding: 8px; }
}

/* Topic directory */
.nd-topics-page { padding: 28px 0 64px; }
.nd-topics-hero, .nd-topic-tests { border: 1px solid var(--nd-line); border-radius: 26px; box-shadow: 0 10px 28px rgba(30,48,81,.08); }
.nd-topics-hero { position: relative; overflow: hidden; padding: 31px 46px 38px; background: linear-gradient(118deg, #fffefa, #fff8eb); }
.nd-topics-hero .nd-breadcrumbs { margin-bottom: 30px; }
.nd-topics-hero h1 { position: relative; z-index: 1; max-width: 760px; margin: 7px 0 13px; color: var(--nd-navy); font-size: clamp(34px,4vw,54px); letter-spacing: -.045em; line-height: 1.06; }
.nd-topics-hero > p:not(.nd-section-eyebrow) { position: relative; z-index: 1; max-width: 750px; margin: 0; color: #40506c; font-size: 17px; line-height: 1.58; }
.nd-topics-hero-symbol { position: absolute; right: 8%; bottom: -65px; color: rgba(244,185,87,.17); font-size: 250px; font-weight: 900; line-height: 1; }
.nd-topics-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-top: 24px; }
.nd-topic-card { display: flex; min-height: 218px; overflow: hidden; border: 1px solid #e9e3d9; border-radius: 20px; background: #fff; box-shadow: 0 8px 22px rgba(30,48,81,.06); }
.nd-topic-card-icon { display: grid; width: 82px; flex: 0 0 82px; place-items: center; align-self: stretch; background: #fff; color: var(--nd-teal); font-size: 38px; font-weight: 900; }
.nd-topic-card-icon img { width: 100%; max-width: 82px; height: 100%; max-height: 150px; padding: 8px; object-fit: contain; }
.nd-topic-card-copy { display: flex; flex: 1; flex-direction: column; padding: 21px; border-left: 1px solid #f0ece4; background: #fffefa; }
.nd-topic-card h2 { margin: 0; color: var(--nd-navy); font-size: 20px; font-weight: 900; line-height: 1.16; }
.nd-topic-card p { display: -webkit-box; overflow: hidden; margin: 9px 0; color: #64728b; font-size: 13px; line-height: 1.42; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.nd-topic-card-copy > span { margin-top: auto; color: #0c817a; font-size: 13px; font-weight: 800; }
.nd-topic-card a { display: flex; align-items: center; justify-content: space-between; margin-top: 13px; color: var(--nd-teal); font-size: 14px; font-weight: 900; text-decoration: none; }
.nd-topic-card a:hover { color: var(--nd-orange); }
.nd-topic-card b { font-size: 20px; }
.nd-topic-tests { margin-top: 24px; padding: 35px 42px 42px; background: rgba(255,255,255,.92); }
.nd-topic-grade { display: block; margin-bottom: 6px; color: #0a8d86; font-size: 13px; font-weight: 900; }
.nd-topic-back { margin-top: 20px; }
.nd-topic-back a { color: var(--nd-teal); font-weight: 900; text-decoration: none; }
.nd-topic-back a:hover { color: var(--nd-orange); }
@media (max-width: 900px) { .nd-topics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 700px) { .nd-topics-page { padding: 16px 0 43px; } .nd-topics-hero,.nd-topic-tests { border-radius: 19px; } .nd-topics-hero { padding: 25px 21px; } .nd-topics-hero .nd-breadcrumbs { margin-bottom: 22px; font-size: 13px; } .nd-topics-hero-symbol { right: 4%; font-size: 150px; } .nd-topics-grid { grid-template-columns: 1fr; gap: 14px; margin-top: 16px; } .nd-topic-card { min-height: 185px; } .nd-topic-tests { margin-top: 16px; padding: 27px 20px; } }

.nd-not-found { margin-top: 28px; margin-bottom: 64px; border: 1px solid var(--nd-line); border-radius: 26px; background: #fffefa; box-shadow: 0 10px 28px rgba(30,48,81,.08); text-align: center; }
.nd-not-found h1 { margin: 6px 0 13px; color: var(--nd-navy); font-size: clamp(34px,4vw,54px); letter-spacing: -.045em; }
.nd-not-found p { max-width: 560px; margin: 0 auto 24px; color: #40506c; font-size: 17px; line-height: 1.58; }

.q-number { line-height: 30px; }
