@import url("site-chrome.css");

/* =========================================================
   SILAM FINANCE — CALCULATOR
   Cleaned + redesigned to match the home-page theme
   ========================================================= */


/* =========================================================
   01. DESIGN SYSTEM
   ========================================================= */

:root {
    /* Brand */
    --paper: #fff8e7;
    --paper-deep: #f4ead4;

    --navy: #102a43;
    --navy-dark: #0b1f33;
    --navy-soft: #173653;

    --blue: #1769aa;
    --blue-dark: #0f4f82;
    --blue-light: #8fc4e8;
    --blue-pale: #eaf5fb;

    --gold: #d4ad55;
    --gold-light: #ead49a;
    --gold-pale: #fbf3d9;

    --white: #ffffff;

    /* Text */
    --text: #173653;
    --text-soft: #60778c;
    --text-muted: #8092a1;

    /* Borders */
    --border: rgba(16, 42, 67, 0.12);
    --border-strong: rgba(16, 42, 67, 0.2);
    --border-light: rgba(255, 255, 255, 0.2);

    /* Shadows */
    --shadow-sm:
        0 8px 24px rgba(16, 42, 67, 0.07);

    --shadow-md:
        0 18px 48px rgba(16, 42, 67, 0.11);

    --shadow-lg:
        0 30px 80px rgba(16, 42, 67, 0.15);

    /* Radius */
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 26px;
    --radius-xl: 34px;

    /* Motion */
    --transition:
        all 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);

    /* Navigation aliases used by this page */
    --nav-height: 78px;
    --ocean: var(--navy);
    --blueberry: var(--blue);
}


/* =========================================================
   02. RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;

    color: var(--text);

    background:
        radial-gradient(
            circle at 8% 5%,
            rgba(143, 196, 232, 0.18),
            transparent 30%
        ),
        radial-gradient(
            circle at 92% 12%,
            rgba(212, 173, 85, 0.12),
            transparent 28%
        ),
        linear-gradient(
            180deg,
            var(--paper) 0%,
            #fffdf7 48%,
            var(--paper) 100%
        );

    line-height: 1.65;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    max-width: 100%;
    height: auto;
}

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

button {
    cursor: pointer;
}

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

p {
    margin: 0 0 1rem;
    color: var(--text-soft);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    color: var(--navy);
    font-weight: 700;
    letter-spacing: -0.035em;
}


/* =========================================================
   03. GLOBAL CONTAINER
   ========================================================= */

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

section {
    position: relative;
}


/* =========================================================
   04. TYPOGRAPHY
   ========================================================= */

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    margin: 0;

    padding: 7px 13px;

    border-radius: 999px;

    background: rgba(23, 105, 170, 0.08);
    border: 1px solid rgba(23, 105, 170, 0.1);

    color: var(--blue);

    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-label::before {
    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 auto;

    border-radius: 50%;

    background: var(--gold);

    box-shadow:
        0 0 0 4px rgba(212, 173, 85, 0.13);
}

.calculator-heading h2,
.calculator-intro h2,
.understanding-section h2,
.calculator-faq h2,
.schedule-header h2,
.cta-box h2 {
    line-height: 1.05;
}

.calculator-heading h2 span,
.calculator-intro h2 span,
.understanding-section h2 span,
.calculator-faq h2 span,
.schedule-header h2 span,
.cta-box h2 span {
    font-family: "Bodoni Moda", Georgia, serif;
    font-style: italic;
    font-weight: 500;
    letter-spacing: -0.025em;
    color: var(--blue);
}


/* =========================================================
   05. LOGO
   ========================================================= */

.site-logo {
    height: 52px;
    width: auto;
    display: block;

    transition: var(--transition);
}

.site-logo:hover {
    transform: scale(1.03);
}



/* =========================================================
   08. HERO
   ========================================================= */

.calculator-hero {
    position: relative;

    overflow: hidden;

    padding: 185px 0 115px;

    background:
        linear-gradient(
            135deg,
            var(--paper) 0%,
            #fffdf7 55%,
            #edf7fc 100%
        );
}

.calculator-hero::before,
.calculator-hero::after {
    content: "";

    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.calculator-hero::before {
    width: 560px;
    height: 560px;

    top: -220px;
    right: -150px;

    background:
        radial-gradient(
            circle,
            rgba(143, 196, 232, 0.28),
            transparent 70%
        );
}

.calculator-hero::after {
    width: 460px;
    height: 460px;

    bottom: -230px;
    left: -150px;

    background:
        radial-gradient(
            circle,
            rgba(212, 173, 85, 0.14),
            transparent 70%
        );
}

.hero-content {
    position: relative;
    z-index: 2;

    max-width: 780px;
}

.calculator-hero .eyebrow {
    display: inline-flex;

    align-items: center;
    gap: 10px;

    padding: 9px 15px;

    border-radius: 999px;

    background: rgba(255, 255, 255, 0.75);

    border:
        1px solid rgba(16, 42, 67, 0.08);

    color: var(--blue);

    font-size: 0.76rem;
    font-weight: 700;

    letter-spacing: 0.14em;

    text-transform: uppercase;
}

.calculator-hero .eyebrow span {
    width: 28px;
    height: 2px;

    border-radius: 999px;

    background: var(--gold);
}

.calculator-hero h1 {
    max-width: 850px;

    margin: 24px 0 20px;

    color: var(--navy);

    font-size:
        clamp(3.2rem, 7vw, 6rem);

    line-height: 0.94;

    letter-spacing: -0.055em;
}

.calculator-hero h1 span {
    display: block;

    font-family: "Bodoni Moda", Georgia, serif;

    font-style: italic;
    font-weight: 500;

    letter-spacing: -0.025em;

    color: var(--blue);
}

.hero-description {
    max-width: 650px;

    font-size: 1.08rem;
}

.hero-note {
    display: flex;

    align-items: flex-start;

    gap: 11px;

    max-width: 760px;

    margin-top: 25px;

    padding: 15px 18px;

    border-radius: 16px;

    border:
        1px solid rgba(16, 42, 67, 0.09);

    background:
        rgba(255, 255, 255, 0.78);

    box-shadow: var(--shadow-sm);
}

.hero-note i {
    flex: 0 0 auto;

    margin-top: 4px;

    color: var(--gold);
}


/* Decorative circles */

.hero-circle {
    position: absolute;

    border:
        1px solid rgba(23, 105, 170, 0.12);

    border-radius: 50%;

    pointer-events: none;
}

.hero-circle-one {
    width: 520px;
    height: 520px;

    top: -240px;
    right: -220px;
}

.hero-circle-two {
    width: 800px;
    height: 800px;

    top: -380px;
    right: -360px;
}


/* =========================================================
   09. MAIN CALCULATOR SECTION
   ========================================================= */

.calculator-section {
    padding: 90px 0;
}

.calculator-intro {
    max-width: 820px;

    margin: 0 auto 34px;

    text-align: center;
}

.calculator-intro h2 {
    margin: 14px 0;

    font-size:
        clamp(2.3rem, 4.5vw, 3.6rem);
}

.calculator-intro p:last-child {
    max-width: 720px;

    margin: 0 auto;
}


/* =========================================================
   10. CATEGORY SWITCHER
   ========================================================= */

.calculator-category-switcher {
    display: flex;

    justify-content: center;

    gap: 8px;

    max-width: 850px;

    margin: 0 auto 12px;

    padding: 7px;

    border:
        1px solid rgba(16, 42, 67, 0.08);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.82);

    box-shadow: var(--shadow-sm);
}

.calculator-category {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    flex: 1;

    min-height: 48px;

    padding: 12px 20px;

    border: 0;
    border-radius: 13px;

    background: transparent;

    color: var(--text-soft);

    font-weight: 700;
    font-size: 0.9rem;

    transition: var(--transition);
}

.calculator-category:hover {
    color: var(--navy);

    background:
        rgba(23, 105, 170, 0.06);
}

.calculator-category.active {
    background: var(--navy);

    color: var(--white);

    box-shadow:
        0 8px 20px rgba(16, 42, 67, 0.18);
}

.calculator-category.active i {
    color: var(--gold-light);
}


/* =========================================================
   11. SUB SWITCHER
   ========================================================= */

.calculator-sub-switcher {
    min-height: 78px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 28px;
}

.calculator-group {
    display: none;

    align-items: center;
    justify-content: center;

    gap: 8px;

    width: 100%;

    padding: 8px;

    border:
        1px solid rgba(16, 42, 67, 0.07);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.8);

    box-shadow: var(--shadow-sm);
}

.calculator-group.active {
    display: flex;
}

.calculator-group .calc-tab {
    display: flex;

    align-items: center;
    justify-content: center;

    gap: 9px;

    flex: 1;

    min-height: 50px;

    padding: 11px 16px;

    border: 0;

    border-radius: 13px;

    background: transparent;

    color: var(--text-soft);

    font-size: 0.86rem;
    font-weight: 700;

    transition: var(--transition);
}

.calculator-group .calc-tab:hover {
    background:
        rgba(23, 105, 170, 0.07);

    color: var(--navy);
}

.calculator-group .calc-tab.active {
    background:
        linear-gradient(
            135deg,
            var(--blue),
            var(--blue-dark)
        );

    color: var(--white);

    box-shadow:
        0 8px 20px rgba(23, 105, 170, 0.2);
}

.calculator-group .calc-tab.active i {
    color: var(--gold-light);
}


/* =========================================================
   12. IMPORTANT DISCLAIMER
   ========================================================= */

.calculator-disclaimer-important {
    display: flex;

    align-items: flex-start;

    gap: 15px;

    margin: 0 0 26px;

    padding: 18px 20px;

    border:
        1px solid rgba(212, 173, 85, 0.28);

    border-radius: 16px;

    background:
        var(--gold-pale);
}

.calculator-disclaimer-icon {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(212, 173, 85, 0.18);

    color: #96701f;
}

.calculator-disclaimer-content {
    flex: 1;
}

.calculator-disclaimer-content strong {
    display: block;

    margin-bottom: 5px;

    color: var(--navy);

    font-size: 0.94rem;
}

.calculator-disclaimer-content p {
    margin: 4px 0 0;

    color: #725f35;

    font-size: 0.82rem;

    line-height: 1.55;
}


/* =========================================================
   13. CALCULATOR WORKSPACE
   ========================================================= */

.calculator-workspace {
    min-height: 520px;
}

.calc-panel {
    display: none;
}

.calc-panel.active {
    display: block;

    animation:
        calculatorFadeUp 0.35s ease both;
}


/* =========================================================
   14. CALCULATOR CARD
   ========================================================= */

.calculator-card {
    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, 0.95fr);

    overflow: hidden;

    border:
        1px solid rgba(16, 42, 67, 0.1);

    border-radius: var(--radius-xl);

    background:
        var(--white);

    box-shadow: var(--shadow-lg);
}

.calculator-inputs,
.calculator-results {
    padding: 50px;
}

.calculator-inputs {
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fffdf8 100%
        );
}

.calculator-results {
    position: relative;

    overflow: hidden;

    background:
        radial-gradient(
            circle at top right,
            rgba(143, 196, 232, 0.2),
            transparent 38%
        ),
        linear-gradient(
            160deg,
            var(--navy) 0%,
            var(--navy-dark) 100%
        );

    color: var(--white);
}

.calculator-results::before {
    content: "";

    position: absolute;

    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.06),
            transparent 30%
        );
}


/* =========================================================
   15. CALCULATOR HEADINGS
   ========================================================= */

.calculator-heading {
    position: relative;

    z-index: 1;
}

.calculator-heading h2 {
    margin: 16px 0 10px;

    font-size:
        clamp(2rem, 3.2vw, 2.75rem);
}

.calculator-heading > p:last-child {
    max-width: 620px;
}


/* =========================================================
   16. FORM GRID
   ========================================================= */

.form-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 18px;

    margin: 28px 0;
}

.form-field {
    display: flex;

    flex-direction: column;

    gap: 8px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field label {
    color: var(--text);

    font-size: 0.86rem;

    font-weight: 700;
}

.form-field small {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.75rem;

    line-height: 1.4;
}


/* =========================================================
   17. INPUTS
   ========================================================= */

.form-field input,
.form-field select,
input[type="number"],
select {
    width: 100%;

    min-height: 50px;

    padding: 13px 15px;

    border:
        1px solid var(--border);

    border-radius: 14px;

    outline: none;

    background: var(--white);

    color: var(--text);

    font-family: inherit;

    font-size: 0.92rem;

    font-weight: 600;

    transition: var(--transition);
}

.form-field input:hover,
.form-field select:hover,
input[type="number"]:hover,
select:hover {
    border-color:
        rgba(23, 105, 170, 0.28);
}

.form-field input:focus,
.form-field select:focus,
input[type="number"]:focus,
select:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 4px rgba(23, 105, 170, 0.11);

    transform: translateY(-1px);
}

.form-field input::placeholder {
    color: var(--text-muted);
}


/* =========================================================
   18. INPUT PREFIX / SUFFIX
   ========================================================= */

.input-with-prefix,
.input-with-suffix {
    display: flex;

    align-items: stretch;

    width: 100%;
}

.input-with-prefix span,
.input-with-suffix span {
    display: flex;

    align-items: center;
    justify-content: center;

    flex: 0 0 auto;

    min-width: 45px;

    padding: 0 12px;

    background:
        var(--blue-pale);

    border:
        1px solid var(--border);

    color: var(--blue);

    font-size: 0.84rem;

    font-weight: 700;
}

.input-with-prefix span {
    border-right: 0;

    border-radius:
        14px 0 0 14px;
}

.input-with-prefix input {
    border-radius:
        0 14px 14px 0;
}

.input-with-suffix input {
    border-radius:
        14px 0 0 14px;
}

.input-with-suffix span {
    border-left: 0;

    border-radius:
        0 14px 14px 0;
}


/* =========================================================
   19. RESULTS PANEL
   ========================================================= */

.result-top {
    position: relative;

    z-index: 1;
}

.result-top .section-label {
    border:
        1px solid rgba(255, 255, 255, 0.14);

    background:
        rgba(255, 255, 255, 0.08);

    color: var(--gold-light);
}

.result-top .section-label::before {
    background: var(--gold);
}

.result-top h2 {
    margin: 17px 0;

    color: var(--white);

    font-size: 2rem;
}

.main-result {
    display: flex;

    align-items: baseline;

    flex-wrap: wrap;

    gap: 9px;
}

.main-result span {
    color: var(--white);

    font-size:
        clamp(2.8rem, 5vw, 4.8rem);

    line-height: 1;

    font-weight: 800;

    letter-spacing: -0.06em;
}

.main-result small {
    color:
        rgba(255, 255, 255, 0.68);

    font-size: 0.85rem;
}


/* =========================================================
   20. RESULT GRID
   ========================================================= */

.result-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 12px;

    margin-top: 28px;

    position: relative;

    z-index: 1;
}

.result-box {
    padding: 18px;

    border:
        1px solid rgba(255, 255, 255, 0.12);

    border-radius: 18px;

    background:
        rgba(255, 255, 255, 0.065);

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    transition: var(--transition);
}

.result-box:hover {
    transform: translateY(-3px);

    background:
        rgba(255, 255, 255, 0.1);

    border-color:
        rgba(212, 173, 85, 0.25);
}

.result-box i {
    color: var(--gold-light);

    font-size: 1.05rem;
}

.result-box span {
    display: block;

    margin: 8px 0 2px;

    color:
        rgba(255, 255, 255, 0.68);

    font-size: 0.78rem;
}

.result-box strong {
    color: var(--white);

    font-size: 1.05rem;
}

.result-box-highlight {
    border-color:
        rgba(212, 173, 85, 0.2);
}

.result-box-wide {
    margin-top: 14px;
}


/* =========================================================
   21. SMALL PRINT
   ========================================================= */

.small-print {
    margin-top: 14px;

    color:
        rgba(255, 255, 255, 0.62);

    font-size: 0.78rem;

    line-height: 1.55;
}


/* =========================================================
   22. P&I BREAKDOWN
   ========================================================= */

.breakdown {
    position: relative;

    z-index: 1;

    margin-top: 22px;

    padding: 21px;

    border:
        1px solid rgba(255, 255, 255, 0.12);

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.065);
}

.breakdown-header {
    display: flex;

    justify-content: space-between;

    gap: 16px;

    color:
        rgba(255, 255, 255, 0.78);

    font-size: 0.82rem;
}

.breakdown-header strong {
    color: var(--white);
}

.breakdown-bar {
    display: flex;

    overflow: hidden;

    width: 100%;
    height: 12px;

    margin: 16px 0;

    border-radius: 999px;

    background:
        rgba(255, 255, 255, 0.12);
}

#piPrincipalBar {
    width: 42%;

    background:
        linear-gradient(
            90deg,
            var(--blue-light),
            var(--blue)
        );
}

#piInterestBar {
    width: 58%;

    background:
        linear-gradient(
            90deg,
            var(--gold-light),
            var(--gold)
        );
}

.breakdown-legend {
    display: flex;

    justify-content: space-between;

    gap: 16px;

    color:
        rgba(255, 255, 255, 0.7);

    font-size: 0.78rem;
}

.legend-dot {
    display: inline-block;

    width: 8px;
    height: 8px;

    margin-right: 5px;

    border-radius: 50%;
}

.principal-dot {
    background: var(--blue-light);
}

.interest-dot {
    background: var(--gold);
}


/* =========================================================
   23. COMPARISON CARDS
   ========================================================= */

.comparison-grid {
    display: grid;

    grid-template-columns:
        1fr 1fr;

    gap: 14px;

    margin-top: 28px;
}

.comparison-card {
    padding: 22px;

    border:
        1px solid rgba(255, 255, 255, 0.12);

    border-radius: 20px;

    background:
        rgba(255, 255, 255, 0.065);

    transition: var(--transition);
}

.comparison-card:hover {
    transform: translateY(-3px);

    border-color:
        rgba(212, 173, 85, 0.24);

    background:
        rgba(255, 255, 255, 0.095);
}

.comparison-card h3 {
    margin-bottom: 16px;

    color: var(--gold-light);

    font-size: 1rem;
}

.comparison-card strong {
    display: block;

    margin-top: 12px;

    color: var(--white);

    font-size: 1.25rem;
}

.comparison-card span {
    color:
        rgba(255, 255, 255, 0.62);

    font-size: 0.78rem;
}


/* =========================================================
   24. EXTRA REPAYMENT RESULTS
   ========================================================= */
/* =========================================================
   24. EXTRA REPAYMENT RESULTS
   ========================================================= */

.results-section {
    margin-top: 28px;
}

/* Results heading */

.results-header {
    margin-bottom: 18px;
}

.results-header h3 {
    margin: 0 0 5px;
    color: var(--navy) !important;
    font-size: 1.35rem;
    font-weight: 800;
}

.results-header p {
    margin: 0;
    color: var(--text-soft) !important;
    font-size: 0.85rem;
}


/* Result cards */

.results-section .result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 0;
}


.results-section .result-box {
    min-height: 112px;
    padding: 20px;

    border:
        1px solid rgba(16, 42, 67, 0.10);

    border-radius: 18px;

    background:
        #ffffff !important;

    box-shadow:
        0 8px 25px rgba(16, 42, 67, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


.results-section .result-box:hover {
    transform: translateY(-3px);

    border-color:
        rgba(23, 105, 170, 0.20);

    box-shadow:
        0 14px 32px rgba(16, 42, 67, 0.10);
}


/* Icons */

.results-section .result-box i {
    display: block;

    margin-bottom: 9px;

    color:
        var(--blue) !important;

    font-size: 1.1rem;
}


/* Labels */

.results-section .result-box span {
    display: block;

    margin: 0 0 4px;

    color:
        var(--text-soft) !important;

    font-size: 0.78rem;

    font-weight: 600;
}


/* Values */

.results-section .result-box strong {
    display: block;

    color:
        var(--navy) !important;

    font-size: 1.18rem;

    font-weight: 800;
}


/* Highlight cards */

.results-section .result-box-highlight {
    background:
        linear-gradient(
            145deg,
            #fffdf7 0%,
            #ffffff 100%
        ) !important;

    border-color:
        rgba(212, 173, 85, 0.35);
}


.results-section .result-box-highlight i {
    color:
        var(--gold) !important;
}


/* Summary */

.results-section .result-summary {
    display: flex;

    align-items: flex-start;

    gap: 14px;

    margin-top: 18px;

    padding: 18px;

    border:
        1px solid rgba(23, 105, 170, 0.12);

    border-radius: 18px;

    background:
        var(--blue-pale) !important;
}


.results-section .result-summary-icon {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        rgba(23, 105, 170, 0.10);

    color:
        var(--blue) !important;
}


.results-section .result-summary strong {
    display: block;

    margin-bottom: 4px;

    color:
        var(--navy) !important;

    font-size: 0.9rem;
}


.results-section .result-summary p {
    margin: 0;

    color:
        var(--text-soft) !important;

    font-size: 0.8rem;

    line-height: 1.5;
}


/* Mobile */

@media (max-width: 767px) {

    .results-section .result-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   25. AMORTISATION SCHEDULE
   ========================================================= */

.schedule-section {
    margin-top: 56px;

    padding: 40px;

    border:
        1px solid rgba(16, 42, 67, 0.08);

    border-radius: 30px;

    background:
        rgba(255, 255, 255, 0.84);

    box-shadow: var(--shadow-md);
}

.schedule-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 28px;
}

.schedule-header h2 {
    margin: 14px 0 0;

    font-size:
        clamp(2rem, 3.6vw, 2.8rem);
}

.schedule-summary {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 12px;

    margin: 28px 0;
}

.schedule-summary div {
    padding: 20px;

    border:
        1px solid rgba(23, 105, 170, 0.1);

    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            var(--blue-pale),
            #ffffff
        );

    box-shadow: var(--shadow-sm);
}

.schedule-summary span {
    display: block;

    color: var(--text-soft);

    font-size: 0.78rem;
}

.schedule-summary strong {
    display: block;

    margin-top: 5px;

    color: var(--navy);
}


/* =========================================================
   26. TABLE
   ========================================================= */

.table-wrapper {
    display: none;

    max-height: 520px;

    overflow: auto;

    border:
        1px solid var(--border);

    border-radius: 18px;

    background: var(--white);
}

.table-wrapper.visible,
.table-wrapper.show {
    display: block;
}

.amortisation-table {
    width: 100%;

    min-width: 680px;

    border-collapse: collapse;
}

.amortisation-table th,
.amortisation-table td {
    padding: 13px 15px;

    text-align: right;

    border-bottom:
        1px solid rgba(16, 42, 67, 0.06);

    font-size: 0.83rem;
}

.amortisation-table th:first-child,
.amortisation-table td:first-child {
    text-align: left;
}

.amortisation-table th {
    position: sticky;

    top: 0;

    z-index: 2;

    background: var(--navy);

    color: var(--white);

    font-weight: 700;
}

.amortisation-table tr:hover td {
    background:
        rgba(23, 105, 170, 0.045);
}


/* =========================================================
   27. UNDERSTANDING SECTION
   ========================================================= */

.understanding-section {
    padding: 100px 0;

    background:
        radial-gradient(
            circle at 5% 10%,
            rgba(143, 196, 232, 0.16),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #fffdf7,
            var(--paper)
        );
}

.understanding-section h2 {
    max-width: 720px;

    font-size:
        clamp(2.5rem, 5vw, 4rem);
}

.understanding-intro {
    max-width: 720px;
}


/* =========================================================
   28. EXPLANATION CARDS
   ========================================================= */

.explanation-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;

    margin-top: 44px;
}

.explanation-card {
    position: relative;

    min-height: 290px;

    overflow: hidden;

    padding: 30px;

    border:
        1px solid rgba(16, 42, 67, 0.08);

    border-radius: 26px;

    background:
        rgba(255, 255, 255, 0.9);

    box-shadow: var(--shadow-sm);

    transition: var(--transition);
}

.explanation-card::before {
    content: "";

    position: absolute;

    width: 150px;
    height: 150px;

    top: -70px;
    right: -60px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(143, 196, 232, 0.2),
            transparent 70%
        );
}

.explanation-card:hover {
    transform: translateY(-6px);

    border-color:
        rgba(23, 105, 170, 0.15);

    box-shadow: var(--shadow-md);
}

.explanation-number {
    color: var(--gold);

    font-size: 0.76rem;

    font-weight: 800;
}

.explanation-card i {
    display: block;

    margin: 38px 0 18px;

    color: var(--blue);

    font-size: 1.65rem;
}

.explanation-card h3 {
    margin-bottom: 9px;

    font-size: 1.16rem;
}

.explanation-card p {
    font-size: 0.9rem;
}


/* =========================================================
   29. CTA
   ========================================================= */

.calculator-cta {
    padding: 100px 0;

    background:
        radial-gradient(
            circle at 85% 10%,
            rgba(143, 196, 232, 0.22),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            var(--navy-dark),
            var(--navy)
        );

    color: var(--white);
}

.cta-box {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 44px;

    padding: 58px;

    border:
        1px solid rgba(255, 255, 255, 0.1);

    border-radius: 34px;

    background:
        rgba(255, 255, 255, 0.055);

    box-shadow: var(--shadow-lg);
}

.cta-box h2 {
    max-width: 650px;

    margin-bottom: 15px;

    color: var(--white);

    font-size:
        clamp(2.2rem, 4vw, 3.7rem);
}

.cta-box h2 span {
    color: var(--gold-light);
}

.cta-box p {
    max-width: 620px;

    color:
        rgba(255, 255, 255, 0.72);
}


/* =========================================================
   30. FAQ
   ========================================================= */

.calculator-faq {
    padding: 100px 0;

    background:
        #fffdf7;
}

.faq-heading {
    max-width: 720px;

    margin-bottom: 38px;
}

.calculator-faq h2 {
    margin-top: 14px;

    font-size:
        clamp(2.5rem, 5vw, 4rem);
}

.accordion-item {
    overflow: hidden;

    margin-bottom: 12px;

    border:
        1px solid rgba(16, 42, 67, 0.08) !important;

    border-radius: 18px !important;

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.accordion-button {
    padding: 21px 23px;

    color: var(--navy) !important;

    background: var(--white) !important;

    box-shadow: none !important;

    font-weight: 700;
}

.accordion-button:not(.collapsed) {
    color: var(--blue) !important;

    background:
        var(--blue-pale) !important;
}

.accordion-button::after {
    filter:
        none;

    background-size:
        1rem;
}

.accordion-body {
    padding: 0 23px 23px;

    color: var(--text-soft);

    line-height: 1.65;
}

/* =========================================================
   33. UTILITY ANIMATION
   ========================================================= */

.fade-up {
    animation:
        fadeUp 0.7s ease both;
}


/* =========================================================
   34. RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1100px) {

    .calculator-card {
        grid-template-columns: 1fr;
    }

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

    .explanation-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }
}


@media (max-width: 991px) {

    .calculator-inputs,
    .calculator-results {
        padding: 40px;
    }

    .cta-box {
        flex-direction: column;

        align-items: flex-start;
    }
}


/* =========================================================
   35. RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .container {
        width:
            min(
                calc(100% - 30px),
                1180px
            );
    }

    .calculator-hero {
        padding: 150px 0 80px;
    }

    .calculator-hero h1 {
        font-size: 3.25rem;
    }

    .calculator-section,
    .understanding-section,
    .calculator-cta,
    .calculator-faq {
        padding: 70px 0;
    }

    /* Category tabs */

    .calculator-category-switcher {
        overflow-x: auto;

        justify-content: flex-start;
    }

    .calculator-category {
        flex:
            0 0 auto;

        min-width: 145px;
    }

    /* Calculator tabs */

    .calculator-sub-switcher {
        min-height: auto;
    }

    .calculator-group {
        display: none;

        flex-wrap: wrap;

        justify-content: stretch;

        padding: 6px;
    }

    .calculator-group.active {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }

    .calculator-group .calc-tab {
        width: 100%;

        min-height: 54px;

        padding: 10px;
    }

    /* Main card */

    .calculator-inputs,
    .calculator-results {
        padding: 30px 22px;
    }

    /* Forms */

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

    .form-field.full {
        grid-column: auto;
    }

    /* Results */

    .result-grid,
    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .main-result span {
        font-size: 3.3rem;
    }

    /* Schedule */

    .schedule-section {
        padding: 28px 18px;
    }

    .schedule-header {
        flex-direction: column;

        align-items: flex-start;
    }

    .schedule-summary {
        grid-template-columns:
            1fr 1fr;
    }

    /* Explanation */

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

    /* CTA */

    .cta-box {
        padding: 34px 24px;
    }

    /* Footer */

    .footer-top {
        grid-template-columns: 1fr;

        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}


/* =========================================================
   36. RESPONSIVE — SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .container {
        width:
            calc(100% - 28px);
    }

    .custom-nav {
        inset: 10px;
    }

    .calculator-hero {
        padding-top: 135px;
    }

    .calculator-hero h1 {
        font-size: 2.75rem;
    }

    .calculator-hero .eyebrow {
        font-size: 0.68rem;
    }

    .calculator-category {
        min-width: 125px;

        padding:
            11px 14px;

        font-size: 0.8rem;
    }

    .calculator-group.active {
        grid-template-columns: 1fr;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 25px 18px;
    }

    .calculator-heading h2 {
        font-size: 2rem;
    }

    .main-result span {
        font-size: 2.9rem;
    }

    .schedule-summary {
        grid-template-columns: 1fr;
    }

    .calculator-disclaimer-important {
        padding: 15px;

        gap: 11px;
    }

    .calculator-disclaimer-icon {
        width: 32px;
        height: 32px;
    }

    .breakdown-header {
        flex-direction: column;

        gap: 6px;
    }

    .footer-bottom div {
        flex-direction: column;

        gap: 8px;
    }

    .scroll-top {
        right: 16px;
        bottom: 16px;

        width: 46px;
        height: 46px;
    }
}


/* =========================================================
   37. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   CALCULATOR ACTION BUTTON
   ========================================================= */

.calc-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 50px;
    padding: 13px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), var(--blue-dark));
    color: var(--white);
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 10px 28px rgba(23, 105, 170, 0.20);
    transition: var(--transition);
}

.calc-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(16, 42, 67, 0.20);
}

.calc-action:focus-visible {
    outline: none;
    box-shadow:
        0 0 0 4px rgba(23, 105, 170, 0.12),
        0 10px 28px rgba(23, 105, 170, 0.20);
}


/* Extra repayment panel shares the calculator card layout. */
#panel-extra {
    padding: 0;
}

#panel-extra .panel-header {
    margin-bottom: 28px;
}

@media (max-width: 991.98px) {
    .calculator-card {
        grid-template-columns: 1fr;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 34px 28px;
    }
}

@media (max-width: 575.98px) {
    .calculator-category-switcher,
    .calculator-group {
        flex-wrap: wrap;
    }

    .calculator-category,
    .calculator-group .calc-tab {
        flex: 1 1 100%;
    }

    .calculator-inputs,
    .calculator-results {
        padding: 26px 20px;
    }

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

    .form-field.full {
        grid-column: auto;
    }
}
/* =========================================================
   RESPONSIVE NAVIGATION
   The shared chrome owns navbar styling. Calculator only adjusts
   the floating nav position on smaller screens.
   ========================================================= */

@media (max-width: 991px) {
    .calculator-inputs,
    .calculator-results {
        padding: 34px 28px;
    }

    .custom-nav {
        top: 14px;
        right: 14px;
        left: 14px;
        bottom: auto;
        width: auto;
    }
}


@media (max-width: 575.98px) {
    .calculator-category,
    .calculator-group .calc-tab {
        flex: 1 1 100%;
    }
}
