/* Keep the calculator catalogue and all dedicated tools on the shared site palette. */
.calc-page {
    --c-navy: var(--ux4g-ink, #171426);
    --c-blue: var(--ux4g-primary, #4a2bc2);
    --c-cyan: #7558d4;
    --c-green: #927be0;
    --c-ink: var(--ux4g-ink, #171426);
    --c-muted: var(--ux4g-muted, #5f5b6f);
    --c-line: var(--ux4g-line, #ded9ec);
    --c-soft: #f7f5fd;
}
.calc-hero { background: linear-gradient(135deg, #351e99, #4a2bc2 65%, #684bd0); }
.calc-hero p, .calc-trust { color: #f0ebff; }
.calc-hero__card { box-shadow: 0 28px 60px rgb(25 12 76 / 24%); }
.calc-hero__card small, .calc-hero__card span { color: var(--c-muted); }
.calc-orbit--two, .calc-icon, .calc-icon--eligibility, .calc-icon--ppf,
.calc-icon--fd, .calc-icon--rd, .calc-icon--sip, .calc-icon--gst,
.calc-sidebar-icon, .fd-calendar-mark { background: var(--ux4g-primary-soft, #f1edff); color: var(--c-blue); }
.calc-card { box-shadow: 0 7px 22px rgb(48 30 105 / 6%); }
.calc-card:hover { border-color: #baaaf1; box-shadow: 0 18px 36px rgb(48 30 105 / 12%); }
.calc-filter button { color: var(--c-muted); }
.calc-filter button:hover, .calc-filter button.is-active { background: var(--c-blue); border-color: var(--c-blue); }
.calc-workspace { background: linear-gradient(180deg, #f4f0ff, #faf9ff); border-color: var(--c-line); }
.calc-panel, .calc-detail-sidebar__inner { box-shadow: 0 14px 35px rgb(48 30 105 / 8%); }
.calc-form label { color: var(--c-ink); }
.calc-form input, .calc-form select { border-color: #c9c1df; }
.calc-form input:focus, .calc-form select:focus { box-shadow: 0 0 0 3px rgb(74 43 194 / 17%); }
.calc-results > div { border-color: #e9e3f6; }
.calc-results .calc-primary, .calc-workspace--dedicated .calc-results .calc-primary {
    background: linear-gradient(135deg, #351e99, #4a2bc2);
}
.calc-results .calc-primary small { color: #e9e2ff; }
.calc-benefits > div { border-left-color: #c9bdf2; }
.calc-table-wrap th { background: #351e99; }
.calc-table-wrap th, .calc-table-wrap td { border-bottom-color: #ece7f6; }
.calc-table-wrap tr:nth-child(even) td { background: #faf9fd; }
.calc-detail-number { color: #8269d9; }
.calc-formula-box { background: #f1edff; color: #351e99; }
.calc-detail-steps { background: #351e99; }
.calc-detail-steps li span { color: #e4dcff; }
.calc-detail-more, .calc-detail-sidebar__head,
.calc-sidebar-group a:hover, .calc-sidebar-group a:focus-visible { background: #f1edff; }
.calc-sidebar-group + .calc-sidebar-group { border-top-color: var(--c-line); }
.calc-sidebar-all { background: #351e99; }
.calc-sidebar-all:hover, .calc-sidebar-all:focus { background: var(--c-blue); }
.calc-workspace--dedicated .calc-workspace__head,
.calc-workspace--dedicated .calc-results { background: #f8f6fd; }
.calc-workspace--dedicated .calc-form label, .fd-senior-toggle { border-bottom-color: var(--c-line); }
.calc-native-icon { background: linear-gradient(135deg, #351e99, #684bd0); }
.calc-native-icon svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.calc-section-icon {
    display: inline-grid;
    width: 30px;
    height: 30px;
    margin-right: 8px;
    place-items: center;
    vertical-align: middle;
    color: var(--c-blue);
    background: var(--ux4g-primary-soft, #f1edff);
    border-radius: 9px;
}
.calc-section-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.calc-section-icon--light {
    color: #fff;
    background: rgba(255,255,255,.14);
}
.calc-range { accent-color: var(--c-blue); }
.calc-report-actions button { border-color: #c9c1df; }
.calc-eeat-strip { border-color: #ddd4f7; background: #f8f5ff; }
.calc-eeat-mark { background: #e9e1ff; color: var(--c-blue); }
.calc-eeat-strip strong { color: var(--c-ink); }
.calc-eeat-strip p { color: var(--c-muted); }
.fd-switch input:focus-visible + span { outline-color: var(--ux4g-focus, #ffbf47); }
.fd-interest-stat strong { color: var(--c-blue); }
.fd-dot, .fd-dot--interest { background: var(--c-blue); }
.fd-total-row td { background: #f1edff !important; }
.ux4g-value-control { border-color: #c9c1df; background: #f8f6fd; }
.ux4g-value-control:hover { border-color: #a992ee; background: #fbfaff; }
.ux4g-value-control:focus-within { border-color: var(--c-blue); box-shadow: 0 0 0 3px rgb(74 43 194 / 17%); }
.emi-affix { background: #f1edff; color: #351e99; border-color: #dcd2f7; }
.calc-workspace--dedicated .calc-form .ux4g-value-control .emi-num,
.calc-workspace--dedicated .calc-form .ux4g-value-control .emi-select { color: var(--c-ink); }
.fd-tenure-units { border-color: #c9c1df; background: #f1edff; }
.fd-tenure-unit { color: #351e99; }
.fd-tenure-unit:hover { background: #e4dbff; color: var(--c-blue); }
.fd-tenure-unit.is-active { background: var(--c-blue); box-shadow: 0 2px 7px rgb(74 43 194 / 24%); }
.fd-tenure-unit:focus-visible { outline-color: var(--ux4g-focus, #ffbf47); }

.calc-directory-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #e8e0ff;
    font-size: .82rem;
}
.calc-directory-breadcrumb a {
    color: #fff;
    font-weight: 700;
}
.calc-detail-more .calc-related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
}
.calc-detail-more p > a {
    padding: 6px 9px;
    color: var(--c-blue);
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

/* Dedicated calculator pages use one primary column; the toolkit sits last. */
.calc-page--detail .calc-detail-layout {
    display: block;
    max-width: 980px;
}
.calc-page--detail .calc-detail-sidebar {
    margin-top: 28px;
}
.calc-page--detail .calc-detail-sidebar__inner {
    overflow: hidden;
}
.calc-sidebar-disclosure > summary {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    color: var(--c-blue);
    background: #fff;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}
.calc-sidebar-disclosure > summary::-webkit-details-marker {
    display: none;
}
.calc-sidebar-disclosure > summary span {
    font-size: 1.2rem;
    transition: transform .18s ease;
}
.calc-sidebar-disclosure[open] > summary span {
    transform: rotate(180deg);
}
.calc-sidebar-disclosure[open] > nav {
    border-top: 1px solid var(--c-line);
}
@media (min-width: 760px) {
    .calc-sidebar-disclosure > nav {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: start;
        gap: 0 18px;
        padding: 10px 18px 16px;
    }
    .calc-sidebar-disclosure .calc-sidebar-group + .calc-sidebar-group {
        border-top: 0;
    }
}

/* Mobile calculator directory: expose the tools immediately as a compact app list. */
@media (max-width: 640px) {
    .calc-page--detail {
        margin-top: 64px !important;
        padding: 0 0 82px !important;
        background: #f7f6fb;
    }
    .calc-page--detail .calc-compact-head {
        padding: 10px 16px 12px !important;
        background: #fff;
        border-bottom: 1px solid var(--c-line);
    }
    .calc-page--detail .calc-compact-head .calc-breadcrumb {
        gap: 5px;
        margin-bottom: 6px;
        overflow: hidden;
        font-size: .69rem;
        white-space: nowrap;
    }
    .calc-page--detail .calc-compact-head .calc-kicker,
    .calc-page--detail .calc-compact-head > p {
        display: none;
    }
    .calc-page--detail .calc-compact-head h1 {
        margin: 0;
        font-size: 1.45rem;
        line-height: 1.2;
    }
    .calc-page--detail .calc-detail-layout {
        width: 100%;
        padding: 0 !important;
    }
    .calc-page--detail .calc-workspace--dedicated > .container {
        width: 100%;
        border: 0;
        border-bottom: 1px solid var(--c-line);
        border-radius: 0;
        box-shadow: none;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-workspace__head {
        position: relative;
        z-index: 1;
        top: auto;
        display: flex;
        min-height: 58px;
        align-items: center;
        gap: 10px;
        padding: 9px 13px;
        border-bottom: 1px solid var(--c-line);
    }
    .calc-page--detail .calc-tool-title {
        min-width: 0;
        flex: 1 1 auto;
    }
    .calc-page--detail .calc-tool-title > div {
        min-width: 0;
    }
    .calc-page--detail .calc-workspace__head h2 {
        overflow-wrap: anywhere;
        line-height: 1.2;
    }
    .calc-page--detail .calc-all-tools-link {
        flex: 0 0 auto;
        align-self: center;
        padding: 8px 4px;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-panel {
        clear: both;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-form {
        padding: 0 16px;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-form label {
        padding: 13px 0;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-form label > .calc-input-shell {
        position: relative;
        display: block;
        width: 100%;
        grid-column: 1;
        grid-row: auto;
        margin-top: 8px;
        color: inherit;
    }
    .calc-page--detail .calc-input-shell > input[type="number"] {
        width: 100%;
        margin: 0;
        padding-right: 62px;
        background: #fff;
        border: 1px solid #c9c1df;
        border-radius: 13px;
        font-size: 1rem;
    }
    .calc-page--detail .calc-input-shell > .calc-field-affix {
        position: absolute;
        z-index: 1;
        top: 50%;
        right: 12px;
        display: inline-flex;
        width: auto;
        min-width: 31px;
        height: 28px;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0 8px;
        color: var(--c-blue);
        background: #f1edff;
        border-radius: 8px;
        font-size: .72rem;
        font-weight: 850;
        line-height: 1;
        pointer-events: none;
        transform: translateY(-50%);
    }
    .calc-page--detail .calc-input-shell:focus-within > input {
        border-color: var(--c-blue);
        box-shadow: 0 0 0 3px rgb(74 43 194 / 14%);
    }
    .calc-page--detail .calc-workspace--dedicated .calc-results {
        display: flex;
        margin-top: 0;
        padding: 12px 16px 16px;
        overflow-x: auto;
        gap: 9px;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-results::-webkit-scrollbar,
    .calc-page--detail .calc-detail-grid::-webkit-scrollbar,
    .calc-page--detail .calc-detail-steps ol::-webkit-scrollbar {
        display: none;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-results > div {
        min-width: calc(100vw - 32px);
        flex: 0 0 calc(100vw - 32px);
        padding: 17px;
        background: linear-gradient(145deg, #fff, #f7f4ff);
        border-color: #ddd4f7;
        border-radius: 16px;
        box-shadow: 0 7px 20px rgb(48 30 105 / 8%);
        scroll-snap-align: start;
    }
    .calc-page--detail .calc-workspace--dedicated .calc-results > div:nth-child(2n) {
        background: linear-gradient(145deg, #fff, #f1edff);
    }
    .calc-page--detail .calc-workspace--dedicated .calc-results > .calc-primary {
        background: linear-gradient(135deg, #351e99, #6245cb);
        border-color: transparent;
        box-shadow: 0 9px 24px rgb(53 30 153 / 21%);
    }
    .calc-page--detail .calc-visual-summary,
    .calc-page--detail .fd-visual-section {
        display: none;
    }
    .calc-page--detail .calc-panel > details,
    .calc-page--detail .calc-workspace--dedicated .calc-panel > details {
        margin: 0;
        padding: 14px 16px;
        background: #fff;
    }
    .calc-page--detail .calc-report-actions {
        flex-direction: row;
        padding: 12px 16px 16px;
    }
    .calc-page--detail .calc-report-actions button {
        flex: 1;
        justify-content: center;
        padding: 10px;
        font-size: .78rem;
    }
    .calc-page--detail .calc-disclaimer {
        margin: 0;
        padding: 10px 16px 14px;
        background: #fff;
        font-size: .7rem;
    }
    .calc-page--detail .calc-detail-content {
        padding: 14px 0 0;
    }
    .calc-page--detail .calc-eeat-strip {
        margin: 0 16px 16px;
        padding: 11px 12px;
        grid-template-columns: 30px 1fr;
        gap: 9px;
    }
    .calc-page--detail .calc-eeat-mark {
        width: 30px;
        height: 30px;
    }
    .calc-page--detail .calc-eeat-strip p {
        display: none;
    }
    .calc-page--detail .calc-detail-intro,
    .calc-page--detail .calc-detail-faq {
        margin: 0;
        padding: 16px;
        background: #fff;
        border-block: 1px solid var(--c-line);
    }
    .calc-page--detail .calc-detail-intro h2,
    .calc-page--detail .calc-detail-faq > h2 {
        margin: 5px 0 8px;
        font-size: 1.25rem;
    }
    .calc-page--detail .calc-section-icon {
        width: 27px;
        height: 27px;
        margin-right: 7px;
        border-radius: 8px;
    }
    .calc-page--detail .calc-section-icon svg {
        width: 15px;
        height: 15px;
    }
    .calc-page--detail .calc-detail-intro p,
    .calc-page--detail .calc-detail-faq p {
        font-size: .82rem;
        line-height: 1.55;
    }
    .calc-page--detail .calc-detail-grid {
        display: flex;
        margin: 12px 0;
        padding: 0 16px;
        overflow-x: auto;
        gap: 10px;
        scroll-snap-type: x mandatory;
    }
    .calc-page--detail .calc-detail-grid > section {
        min-width: 82vw;
        flex: 0 0 82vw;
        padding: 18px;
        scroll-snap-align: start;
    }
    .calc-page--detail .calc-detail-steps {
        margin: 12px 0;
        padding: 18px 0;
        border-radius: 0;
    }
    .calc-page--detail .calc-detail-steps > .calc-kicker,
    .calc-page--detail .calc-detail-steps > h2 {
        margin-inline: 16px;
    }
    .calc-page--detail .calc-detail-steps h2 {
        margin-top: 5px;
        font-size: 1.25rem;
    }
    .calc-page--detail .calc-detail-steps ol {
        display: flex;
        margin-top: 15px;
        padding: 0 16px;
        overflow-x: auto;
        gap: 10px;
        scroll-snap-type: x mandatory;
    }
    .calc-page--detail .calc-detail-steps li {
        min-width: 76vw;
        flex: 0 0 76vw;
        padding: 14px;
        background: rgba(255,255,255,.08);
        border-radius: 14px;
        scroll-snap-align: start;
    }
    .calc-page--detail .calc-detail-more {
        margin: 12px 0;
        padding: 18px 16px;
        border-radius: 0;
    }
    .calc-page--detail .calc-detail-sidebar {
        margin: 12px 0 0;
    }
    .calc-page--detail .calc-detail-sidebar__inner {
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: none;
    }
    .calc-page--detail .calc-detail-sidebar__head {
        padding: 16px;
    }
    .calc-page--detail .calc-detail-sidebar__head h2 {
        margin: 3px 0;
        font-size: 1.15rem;
    }
    .calc-page--detail .calc-sidebar-disclosure > summary {
        min-height: 48px;
        padding: 10px 16px;
        font-size: .84rem;
    }
    .calc-page--detail .calc-sidebar-disclosure nav {
        max-height: 55vh;
        overflow-y: auto;
    }
    .calc-page--detail > .calc-benefits {
        display: none;
    }

    .calc-page--directory {
        margin-top: 64px !important;
        padding: 0 0 24px !important;
        background: #fff;
    }

    .calc-page--directory .calc-hero {
        margin-top: 0;
        background: #fff;
        color: var(--c-ink);
        border-bottom: 1px solid var(--c-line);
    }

    .calc-page--directory .calc-hero::after,
    .calc-page--directory .calc-eyebrow,
    .calc-page--directory .calc-hero p,
    .calc-page--directory .calc-trust,
    .calc-page--directory .calc-hero__visual {
        display: none;
    }

    .calc-page--directory .calc-hero__inner {
        min-height: 0;
        padding: 9px 16px 12px;
    }

    .calc-page--directory .calc-directory-breadcrumb {
        gap: 6px;
        margin: 0 0 5px;
        color: var(--c-muted);
        font-size: .72rem;
        line-height: 1.3;
    }

    .calc-page--directory .calc-directory-breadcrumb a {
        color: var(--c-blue);
    }

    .calc-page--directory .calc-hero h1 {
        margin: 0;
        color: var(--c-ink);
        font-size: 1.55rem;
        line-height: 1.2;
        letter-spacing: -.025em;
    }

    .calc-page--directory .calc-catalogue {
        width: 100%;
        max-width: none;
        padding: 0 0 20px;
    }

    .calc-page--directory .calc-section-heading {
        display: block;
        margin: 0;
        padding: 12px 16px 10px;
    }

    .calc-page--directory .calc-section-heading .calc-kicker,
    .calc-page--directory .calc-section-heading > p {
        display: none;
    }

    .calc-page--directory .calc-section-heading h2 {
        margin: 0;
        font-size: 1rem;
        line-height: 1.35;
        letter-spacing: 0;
    }

    .calc-page--directory .calc-filter {
        position: sticky;
        top: 64px;
        z-index: 5;
        display: flex;
        flex-wrap: nowrap;
        gap: 7px;
        margin: 0;
        padding: 8px 16px;
        overflow-x: auto;
        overscroll-behavior-inline: contain;
        scrollbar-width: none;
        background: rgba(255, 255, 255, .97);
        border-top: 1px solid var(--c-line);
        border-bottom: 1px solid var(--c-line);
        box-shadow: 0 3px 10px rgb(48 30 105 / 5%);
    }

    .calc-page--directory .calc-filter::-webkit-scrollbar {
        display: none;
    }

    .calc-page--directory .calc-filter button {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 7px 13px;
        white-space: nowrap;
        font-size: .82rem;
    }

    .calc-page--directory .calc-grid {
        display: block;
    }

    .calc-page--directory .calc-card {
        position: relative;
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) 44px;
        grid-template-areas:
            "icon title action"
            "icon description action";
        column-gap: 12px;
        align-items: center;
        min-height: 78px;
        padding: 11px 12px 11px 16px;
        border: 0;
        border-bottom: 1px solid var(--c-line);
        border-radius: 0;
        box-shadow: none;
    }

    .calc-page--directory .calc-card:hover {
        transform: none;
        border-color: var(--c-line);
        box-shadow: none;
    }

    .calc-page--directory .calc-card__top {
        grid-area: icon;
        display: block;
    }

    .calc-page--directory .calc-icon {
        width: 46px;
        height: 46px;
        border-radius: 13px;
        font-size: .9rem;
    }

    .calc-page--directory .calc-tag {
        display: none;
    }

    .calc-page--directory .calc-card h3 {
        grid-area: title;
        align-self: end;
        min-width: 0;
        margin: 0 0 2px;
        font-size: 1rem;
        line-height: 1.25;
    }

    .calc-page--directory .calc-card p {
        grid-area: description;
        align-self: start;
        min-width: 0;
        margin: 0;
        overflow: hidden;
        color: var(--c-muted);
        font-size: .78rem;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calc-page--directory .calc-card__action {
        grid-area: action;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        margin: 0;
        overflow: hidden;
        color: transparent;
        font-size: 0;
        border-radius: 50%;
        text-decoration: none;
    }

    .calc-page--directory .calc-card__action::before {
        content: "Open";
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .calc-page--directory .calc-card__action span {
        float: none;
        color: var(--c-blue);
        font-size: 1.35rem;
        line-height: 1;
    }

    .calc-page--directory .calc-card__action:focus-visible {
        outline: 3px solid var(--ux4g-focus, #ffbf47);
        outline-offset: 0;
    }

    .calc-page--directory .calc-benefits {
        display: none;
    }
}
