/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Ensure proper Rupee symbol display */
.rupee-symbol {
    font-family: 'Segoe UI', 'Arial Unicode MS', 'Lucida Grande', sans-serif;
    font-weight: bold;
}

.container {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    overflow: visible;
    min-height: 100px;
    z-index: 100000;
}

.header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100000;
    padding: 0 2rem;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 22px;
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.3);
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Circular logo image */
.logo-img {
    width: 56px; /* slightly larger than previous square badge */
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border: 2px solid rgba(255,255,255,0.6);
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: -1px;
    line-height: 1.1;
}

/* removed subtitle from header */

.nav-menu {
    display: flex;
    gap: 1rem;
}

.menu-toggle { display: none; }

/* Ensure drawer/backdrop are hidden and not affecting desktop layout */
.side-drawer { display: none; position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; transform: translateX(-100%); z-index: 100002; }
.side-drawer.open { display: flex; }
.backdrop { display: none; }

.nav-link {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 20px;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 15px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    /* Make button look identical to anchor-based .nav-link */
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.1);
    color: inherit;
    padding: 10px 18px;
    border-radius: 20px;
    font: inherit;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    min-width: 220px;
    background: white;
    color: #333;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    padding: 8px;
    display: none;
    z-index: 1000;
}

/* open state toggled by JS */
.dropdown.open .dropdown-menu { display: block; }
/* Fallback: open on hover or keyboard focus when JS fails */
.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { display: block; }

.dropdown-item {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    color: #333;
    text-decoration: none;
}

.dropdown-item:hover {
    background: #f3f4f6;
}

/* Main Content */
.main-content {
    background: white;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    min-height: calc(100vh - 100px);
    overflow: visible;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #ff6b6b, #ffa500, #4ecdc4, #45b7d1);
}

/* Compact modes: ensure calculators fit in one viewport without scrolling */
.mode-swp .main-content,
.mode-sip .main-content {
    overflow-y: auto;
}

.mode-swp .calculator-container,
.mode-sip .calculator-container {
    /*padding: 1rem 1.25rem;*/
    height: 100%;
}

.mode-swp .calculator-title,
.mode-sip .calculator-title,
.mode-roi .calculator-title,
.mode-pv .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-swp .calculator-header,
.mode-sip .calculator-header,
.mode-roi .calculator-header,
.mode-pv .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-swp .calculator-header h2,
.mode-sip .calculator-header h2,
.mode-roi .calculator-header h2,
.mode-pv .calculator-header h2 { font-size: 1.7rem; }
.mode-swp .calculator-header p,
.mode-sip .calculator-header p,
.mode-roi .calculator-header p,
.mode-pv .calculator-header p { font-size: 0.9rem; }

.mode-mf .main-content { overflow-y: auto; }
.mode-mf .calculator-container { /*padding: 1rem 1.25rem;*/ height: 100%; }
.mode-mf .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-mf .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-mf .calculator-header h2 { font-size: 1.7rem; }
.mode-mf .calculator-header p { font-size: 0.9rem; }
.mode-mf .calculator-content { gap: 0.8rem; padding: 0.8rem; height: 100%; align-items: stretch; }
.mode-mf .inputs-section { gap: 0.8rem; height: 100%; justify-content: space-between; }
.mode-mf .input-group { padding: 0.7rem; }
.mode-mf .value-display { padding: 0.6rem; font-size: 1rem; }
.mode-mf .results-section { height: 100%; justify-content: space-between; }
.mode-mf .result-item { padding: 0.7rem; }
.mode-mf .result-item.total .result-value { font-size: 1.15rem; }

/* Mutual Fund: Hide inline results container by default (mobile and pie chart) */
.mf-inline-results-container {
    display: none;
}

/* Mutual Fund: Hide original results on desktop when area chart is active */
.mf-result-desktop-hide {
    display: flex;
}

/* Desktop: Show inline results when area chart is active */
@media (min-width: 992px) {
    body.mode-mf.mf-area-chart-active .mf-inline-results-container {
        display: flex;
        gap: 0.8rem;
        width: 100%;
    }
    
    body.mode-mf.mf-area-chart-active .mf-inline-result-desktop {
        display: flex;
        flex: 1;
        padding: 0.7rem;
        margin-top: 0;
    }
    
    body.mode-mf.mf-area-chart-active .mf-result-desktop-hide {
        display: none;
    }
}

/* EMI compact mode */
.mode-emi .main-content { overflow-y: auto; }
.mode-emi .calculator-container { /*padding: 1rem 1.25rem;*/ height: 100%; }
.mode-emi .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-emi .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-emi .calculator-header h2 { font-size: 1.7rem; }
.mode-emi .calculator-header p { font-size: 0.9rem; }
.mode-emi .calculator-content { gap: 0.8rem; padding: 0.8rem 0.8rem; height: 100%; align-items: stretch; }
.mode-emi .inputs-section { gap: 0.8rem; height: 100%; justify-content: space-between; }
.mode-emi .input-group { padding: 0.7rem; }
.mode-emi .value-display { padding: 0.6rem; font-size: 1rem; }
.mode-emi .results-section { height: 100%; justify-content: space-between; gap: 0.5rem; }
.mode-emi .result-item { padding: 0.7rem; }
.mode-emi .result-item.total .result-value { font-size: 1.15rem; }

/* EMI with amortization schedule - enable scrolling */
.mode-emi .main-content:has(#emiAmortizationSchedule[style*="display: block"]) { 
    overflow-y: auto; 
}

/* Fallback for browsers that don't support :has() */
.mode-emi.emi-with-amortization .main-content { 
    overflow-y: auto; 
}

/* EMI with amortization - adjust container height to allow scrolling */
.mode-emi.emi-with-amortization .calculator-container {
    height: auto;
    min-height: 100%;
}

/* PPF compact mode */
.mode-ppf .main-content { overflow-y: auto; }
.mode-ppf .calculator-container 
{ 
    /*padding: 1rem 1.25rem;*/ 
    height: 100%; }
.mode-ppf .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-ppf .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-ppf .calculator-header h2 { font-size: 1.7rem; }
.mode-ppf .calculator-header p { font-size: 0.9rem; }
.mode-ppf .calculator-content { gap: 0.8rem; padding: 0.8rem; height: 100%; align-items: stretch; }
.mode-ppf .inputs-section { gap: 0.8rem; height: 100%; justify-content: space-between; }
.mode-ppf .input-group { padding: 0.7rem; }
.mode-ppf .value-display { padding: 0.6rem; font-size: 1rem; }
.mode-ppf .results-section { height: 100%; justify-content: space-between; }
.mode-ppf .result-item { padding: 0.7rem; }
.mode-ppf .result-item.total .result-value { font-size: 1.15rem; }

/* FD compact mode: no scroll, fit within viewport */
.mode-fd .main-content { overflow-y: auto; }
.mode-fd .calculator-container { /*padding: 1rem 1.25rem;*/ height: 100%; }
.mode-fd .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-fd .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-fd .calculator-header h2 { font-size: 1.7rem; }
.mode-fd .calculator-header p { font-size: 0.9rem; }
.mode-fd .calculator-content { gap: 0.8rem; padding: 0.8rem; height: 100%; align-items: stretch; }
.mode-fd .inputs-section { gap: 0.8rem; height: 100%; justify-content: space-between; }
.mode-fd .input-group { padding: 0.7rem; }
.mode-fd .value-display { padding: 0.6rem; font-size: 1rem; }
.mode-fd .results-section { height: 100%; justify-content: space-between; }
.mode-fd .result-item { padding: 0.7rem; }
.mode-fd .result-item.total .result-value { font-size: 1.15rem; }

.mode-swp .calculator-content,
.mode-sip .calculator-content { gap: 0.8rem; padding: 0.8rem; height: 100%; align-items: stretch; }
.mode-swp .inputs-section,
.mode-sip .inputs-section { gap: 0.8rem; height: 100%; justify-content: space-between; }
.mode-swp .input-group,
.mode-sip .input-group { padding: 0.7rem; }
.mode-swp .value-display,
.mode-sip .value-display { padding: 0.6rem; font-size: 1rem; }
.mode-swp .results-section,
.mode-sip .results-section { height: 100%; justify-content: space-between; }

.mode-swp .result-item,
.mode-sip .result-item { padding: 0.7rem; }
.mode-swp .result-item.total .result-value,
.mode-sip .result-item.total .result-value { font-size: 1.15rem; }

/* Lumpsum compact mode: ensure no scroll, match SIP/SWP compact sizing */
.mode-ls .main-content { overflow-y: auto; }
.mode-ls .calculator-container { /*padding: 1rem 1.25rem;*/ height: 100%; }
.mode-ls .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-ls .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-ls .calculator-header h2 { font-size: 1.7rem; }
.mode-ls .calculator-header p { font-size: 0.9rem; }
.mode-ls .calculator-content { gap: 0.8rem; padding: 0.8rem; height: 100%; align-items: stretch; }
.mode-ls .inputs-section { gap: 0.8rem; height: 100%; justify-content: space-between; }
.mode-ls .input-group { padding: 0.7rem; }
.mode-ls .value-display { padding: 0.6rem; font-size: 1rem; }
.mode-ls .results-section { height: 100%; justify-content: space-between; }
.mode-ls .result-item { padding: 0.7rem; }
.mode-ls .result-item.total .result-value { font-size: 1.15rem; }

.calculator-container {
    padding: 1.5rem clamp(7rem, 2vw, 2.5rem);
    width: 100%;
    max-width: none;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calculator-title {
    text-align: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}


/* Calculator Sections */
.calculator-section {
    display: block;
    width: 100%;
}

/* EMI Amortization Schedule Section - Full Width */
#emiAmortizationSchedule {
    width: 100%;
    margin: 0rem 0 1.5rem 0;
    padding: 0;
}

/* Step-Up SIP Monthly Breakdown Section - Full Width */
#stepSipBreakdownSection {
    width: 100%;
    margin: 0rem 0 1.5rem 0;
    padding: 1rem 0rem;
}

/* SWP Monthly Breakdown Section - Full Width */
#swpBreakdownSection {
    width: 100%;
    margin: 0rem 0 1.5rem 0;
    padding: 1rem 0rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    color: white;
    position: relative;
    /* Keep decorative glow inside the header to avoid extra scrollbars */
    overflow: hidden;
}

.calculator-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.calculator-header h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.3rem;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.calculator-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin: 0;
    position: relative;
    z-index: 1;
    font-weight: 300;
    /* Improve wrapping for long subtitles (e.g., SWP description) */
    line-height: 1.35;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    word-wrap: break-word;
}

.calculator-header-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.4rem;
    width: calc(100% - 2.2rem);
    margin: 0.75rem auto 1.1rem auto;
    padding: 1.15rem 1.4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    color: white;
    box-shadow: 0 14px 28px rgba(0,0,0,0.2);
    position: relative;
    min-height: 5rem;
    word-wrap: break-word;
    overflow: hidden;
    box-sizing: border-box;
}

.calculator-header-mobile::before {
    content: '';
    position: absolute;
    inset: -45% 5% auto 5%;
    height: 220%;
    background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.calculator-header-mobile h2,
.calculator-header-mobile p {
    position: relative;
    z-index: 1;
    margin: 0;
    color: white;
    width: 100%;
    text-align: center;
    word-break: break-word;
    white-space: normal;
}

.calculator-header-mobile h2 {
    font-size: clamp(1rem, 4vw, 1.25rem);
    font-weight: 800;
    text-shadow: 0 2px 6px rgba(0,0,0,0.35);
    letter-spacing: -0.2px;
}

.calculator-header-mobile p {
    font-size: clamp(0.8rem, 3.3vw, 0.95rem);
    line-height: 1.45;
    color: rgba(255,255,255,0.95);
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

@media (min-width: 769px) {
    .calculator-header-mobile {
        display: none;
    }
}

.calculator-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    position: relative;
    flex: 1;
}

.calculator-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23667eea" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');*/
    border-radius: 25px;
    pointer-events: none;
}

/* Input Groups */
.inputs-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    background: white;
    padding: 1.2rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
}

/* Radio options container - ensure exact 2rem gap and left alignment */
.radio-options-container {
    gap: 2rem !important;
    justify-content: flex-start !important;
    width: auto !important;
    max-width: none !important;
}

.radio-options-container > label {
    margin: 0 !important;
    padding: 0 !important;
}

.input-group:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.input-group label {
    font-weight: 700;
    color: #333;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0;
    flex: 1;
}

.roi-inline-metrics {
    display: none;
}

@media (min-width: 992px) {
    #roiCalculator.roi-inline-active .roi-inline-metrics {
        display: grid;
        gap: 0.75rem;
        margin-top: 0.75rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #roiCalculator.roi-inline-active .roi-inline-metrics .result-item {
        margin: 0;
    }
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Ensure consistent spacing for Annual Increase section in Step-Up SIP */
/* Add margin-top to slider-container to match spacing of other input groups */
#stepSipIncreasePercentGroup .slider-container {
    margin-top: 0.8rem;
}

/* SIP Continue group - horizontal layout for desktop */
.input-group.sip-continue-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.input-group.sip-continue-group > label {
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.input-group.sip-continue-group .slider-container.radio-options-container {
    display: flex;
    flex-direction: row;
    gap: 2rem;
    align-items: center;
    justify-content: flex-start;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 12px;
    border-radius: 10px;
    background: linear-gradient(90deg, #e0e0e0 0%, #f0f0f0 100%);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    position: relative;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    border: 3px solid white;
    transition: all 0.3s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.value-display {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    padding: 0.5rem 0.8rem;
    background-color: rgba(102, 126, 234, 0.1);
    border-radius: 12px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    min-width: fit-content;
    color: transparent;
    background-image: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    background-clip: text;
}

.value-display > span {
    display: inline-block;
}

/* Ensure all text elements inside value-display use the same gradient */
.value-display span,
.value-display .rupee-symbol {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Remove square focus ring on editable value spans while typing */
.value-display [contenteditable="true"]:focus,
.value-display [contenteditable="true"]:focus-visible {
    outline: none;
    box-shadow: none;
}

.value-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.value-display:hover::before {
    left: 100%;
}

/* Results Section */
.results-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.chart-container {
    position: relative;
    width: 200px;
    height: 200px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 5px;
    border: 3px solid rgba(102, 126, 234, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container-rect {
    width: 100%;
    max-width: 100%;
    min-height: 300px;
    border-radius: 16px;
    padding: 0;
    margin: 0;
    display: block;
    box-shadow: 0 12px 32px rgba(0,0,0,0.08);
    border: 1px solid rgba(102, 126, 234, 0.12);
    overflow: hidden;
}

.results-section .chart-container-rect {
    align-self: stretch;
    width: 100%;
}

.chart-container-rect canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

.results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

/* FD Interest type control - styled like a compact result card */
.fd-interest-control {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.75rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    width: 100%;
    position: relative;
}
.fd-interest-control label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.fd-interest-control select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 10px 38px 10px 12px; /* room for arrow */
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, #f7f8ff, #eef0ff);
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
    outline: none;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    cursor: pointer;
}
.fd-interest-control select:focus {
    box-shadow: 0 0 0 3px rgba(102,126,234,0.25);
}
.fd-interest-control select:hover {
    transform: translateY(-1px);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.result-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.result-item:hover::before {
    opacity: 1;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.result-item.total {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    font-weight: 700;
    border-left: 5px solid #ff6b6b;
    position: relative;
    overflow: hidden;
}

.result-item.total::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(180deg); }
}

.result-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    position: relative;
    z-index: 1;
}

.result-item.total .result-label {
    color: white;
}

.result-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    position: relative;
    z-index: 1;
}

.result-item.total .result-value {
    color: white;
    font-size: 1.3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.invest-button {
    background: linear-gradient(135deg, #ff6b6b, #ffa500);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.invest-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.invest-button:hover::before {
    left: 100%;
}

.invest-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 107, 0.4);
}

.invest-button:active {
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .header {
        /* Keep header in one row on mobile */
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        width: 100%;
        padding: 0 1rem; /* add left and right margin on mobile */
    }
    .logo { flex: 1; }
    .logo { margin-left: 8px; }
    
    .nav-menu { display: none; }
    .menu-toggle {
        display: inline-block;
        position: relative;
        width: 44px;
        height: 44px;
        padding: 0;
        margin-left: auto; /* push to right end */
        background: transparent;
        border: none;
        box-shadow: none;
        cursor: pointer;
        outline: none;
        font-size: 0; /* hide the hamburger character */
        line-height: 0;
    }
    .menu-toggle::before {
        content: '';
        position: absolute;
        left: 10px;
        right: 10px;
        top: 50%;
        height: 3px;
        background: #fff;
        border-radius: 3px;
        transform: translateY(-50%);
        box-shadow: 0 -8px 0 0 rgba(255,255,255,0.95), 0 8px 0 0 rgba(255,255,255,0.95);
    }
    .menu-toggle:hover { opacity: 0.9; }
    .menu-toggle:active { opacity: 0.8; }
    
    .calculator-title {
        display: none;
        font-size: 1.35rem;
        font-weight: 700;
        margin: 0.4rem 0 0.8rem;
        text-align: center;
        line-height: 1.3;
    }
    /* Ensure titles on pages using contact-style layout keep consistent spacing */
    .mode-contact .calculator-title {
        display: block;
        font-size: 1.25rem;
        margin: 0.4rem 0 0.6rem;
    }
    /* Use dedicated mobile header block so text stays visible on phones */
    .calculator-header {
        display: none;
    }
    
    .container {
        /* Remove side padding on mobile to avoid purple side bars */
        padding: 0;
    }
    
    .main-content {
        /* Make content full-bleed on mobile so background doesn't peek through */
        margin: 0;
        border-radius: 0;
    }

    /* Allow scrolling on mobile for all calculator modes (including PPF, FD) */
    .mode-sip .main-content,
    .mode-swp .main-content,
    .mode-emi .main-content,
    .mode-ls .main-content,
    .mode-mf .main-content,
    .mode-ppf .main-content,
    .mode-fd .main-content { overflow-y: auto; }

    /* Side drawer */
    .backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 100001; /* Above header (100000) */
        display: block;
        touch-action: none; /* Prevent touch events on backdrop from scrolling background */
    }
    .side-drawer {
        display: flex;
        background: linear-gradient(135deg, rgba(30,60,114,0.97) 0%, rgba(42,82,152,0.97) 100%); /* match site header */
        box-shadow: 8px 0 28px rgba(0,0,0,0.35);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 100002; /* Above backdrop and header */
        display: flex;
        flex-direction: column;
        color: #fff;
        font-family: inherit;
        overflow: hidden; /* Prevent drawer itself from scrolling */
        touch-action: pan-y; /* Allow vertical scrolling within drawer */
    }
    .side-drawer.open { transform: translateX(0); }
    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 14px 16px;
        color: #ffffff;
        flex-shrink: 0; /* Keep header fixed at top */
    }
    .drawer-close {
        background: transparent;
        border: none;
        color: #ffffff;
        font-size: 28px;
        line-height: 1;
        cursor: pointer;
    }
    .drawer-list { 
        list-style: none; 
        padding: 4px 0 16px 0; 
        margin: 0; 
        overflow-y: auto; /* Enable scrolling for menu items */
        flex: 1; /* Take remaining space */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    .drawer-item { padding: 0 0; }
    /* Top-level links (e.g., Home, ContactUs) styled like Calculators */
    .drawer-item > a {
        display: block;
        padding: 14px 20px;
        font-weight: 800;
        font-size: inherit;
        text-decoration: none;
        color: #ffffff;
        background: transparent;
    }
    .drawer-item > a:hover {
        background: linear-gradient(135deg, rgba(102,126,234,0.25), rgba(118,75,162,0.25));
        color: #ffffff;
    }
    .submenu-toggle {
        width: 100%;
        text-align: left;
        padding: 14px 20px;
        font-weight: 800;
        font-size: inherit; /* match other items */
        background: transparent;
        color: #ffffff;
        border: none;
        cursor: pointer;
    }
    .submenu-toggle::after {
        content: '\25B8';
        float: right;
        transform: none;
        transition: transform 0.2s ease;
        opacity: 0.85;
    }
    .submenu-toggle[aria-expanded="true"]::after { content: '\25BE'; }
    .submenu { 
        list-style: none; 
        margin: 0; 
        padding: 0; 
        max-height: 50vh; /* Limit submenu height */
        overflow-y: auto; /* Enable scrolling for submenu items */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    .submenu li { border-top: 1px solid rgba(255,255,255,0.12); }
    .submenu a { display: block; padding: 14px 24px; text-decoration: none; color: #ffffff; font-weight: 600; }
    .submenu a:hover { background: linear-gradient(135deg, rgba(102,126,234,0.25), rgba(118,75,162,0.25)); color: #ffffff; }
    .drawer-item { border-top: 1px solid rgba(255,255,255,0.12); }

    /* prevent background scroll when drawer open */
    body.drawer-open { 
        overflow: hidden; 
        height: 100vh; /* Prevent background scrolling */
        position: relative; /* Prevent scroll but maintain position */
    }

    /* Compact mobile sizing to reduce scroll */
    .calculator-container { 
        padding: 0.6rem 0.8rem; 
        max-width: 100%;
        margin: 0;
    }
    .calculator-header { margin-bottom: 0.5rem; padding: 0.5rem; }
    .calculator-header h2 { font-size: 1.1rem; }
    .calculator-header p { font-size: 0.75rem; line-height: 1.2; }
    .calculator-content { gap: 0.6rem; padding: 0.6rem; }
    .inputs-section { gap: 0.6rem; }
    .mode-emi .inputs-section {
        gap: 0.6rem;
        justify-content: flex-start;
        height: auto;
        margin-bottom: 0;
    }
    .mode-emi .calculator-content {
        gap: 0.6rem;
        padding: 0.6rem;
    }
    .input-group { padding: 0.5rem; gap: 0.5rem; }
    .input-group label { font-size: 0.75rem; margin-bottom: 0; }
    
    /* Rearrange input-group for mobile: label and value on same line */
    .input-group {
        position: relative;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .input-group > label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0;
        width: 100%;
        min-height: 1.8rem;
    }
    
    /* Fix spacing for labels with inline spans (like "Continue to SIP after 10 years?") */
    .input-group > label span:not(.value-display) {
        display: inline;
        margin: 0 0.2rem;
        white-space: normal;
    }
    
    /* Target labels that don't have value-display in slider-container - use flex-start */
    .input-group:not(:has(.slider-container .value-display)) > label {
        justify-content: flex-start;
    }
    
    /* Also target the specific label with fsWithdrawAfterYearsDisplay */
    .input-group > label:has(#fsWithdrawAfterYearsDisplay) {
        justify-content: flex-start;
    }
    
    .slider-container {
        display: flex;
        flex-direction: column;
        gap: 0.3rem;
        position: relative;
    }
    
    /* Move value-display from slider-container to be next to label */
    .input-group .slider-container .value-display {
        position: absolute;
        top: 0;
        right: 0;
        margin: 0;
        z-index: 1;
        transform: translateY(-100%);
    }
    
    /* Adjust label to accommodate value-display and ensure proper alignment */
    .input-group > label {
        padding-right: 0;
        position: relative;
        margin-bottom: 0;
    }
    
    /* SIP Continue group - vertical layout for mobile */
    .input-group.sip-continue-group {
        flex-direction: column !important;
        align-items: flex-start;
        gap: 0.8rem;
    }
    
    .input-group.sip-continue-group > label {
        margin-bottom: 0;
    }
    
    .input-group.sip-continue-group .slider-container.radio-options-container {
        flex-direction: row !important;
        padding: 0.5rem 0;
        margin: 0;
    }
    
    .slider-container input[type="range"] { height: 8px; }
    .slider-container input[type="range"]::-webkit-slider-thumb { width: 20px; height: 20px; }
    .slider-container input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; }
    .value-display { 
        padding: 0.3rem 0.5rem; 
        font-size: 0.85rem; 
        background-color: transparent;
        border: none;
        border-radius: 0;
        text-align: right;
    }
    .value-display span { font-size: 0.85rem; }
    .results-section { gap: 0.6rem; }
    .mode-emi .results-section {
        justify-content: flex-start;
        gap: 0.6rem;
        height: auto;
        margin-top: -2.2rem;
    }
    .result-item { padding: 0.5rem; }
    .result-label { font-size: 0.75rem; }
    .result-value { font-size: 0.9rem; }
    .result-item.total .result-value { font-size: 1rem; }
    .chart-container { width: 120px; height: 120px; }
    .chart-container-rect {
        min-height: 240px;
        border-radius: 14px;
    }
    .result-item.total { padding: 0.6rem 0.5rem; }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: 1rem;
        max-width: 100%;
        margin: 0;
    }
    
    .tab-button {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }
    
    .result-item {
        flex-direction: row;
        gap: 0.5rem;
        text-align: left;
    }
}

/* Compact layout for medium-short screens (~900px height) */
@media (max-height: 900px) {
    .calculator-container {
        padding: 1.1rem 1.4rem;
    }
    .calculator-header {
        margin-bottom: 0.9rem;
        padding: 0.8rem;
    }
    .calculator-header h2 { font-size: 1.5rem; }
    .calculator-header p { font-size: 0.95rem; }
    .calculator-content {
        gap: 1rem;
        padding: 1rem;
    }
    .inputs-section { gap: 1rem; }
    .input-group { padding: 0.9rem; }
    .slider-container input[type="range"] { height: 10px; }
    .value-display { padding: 0.65rem; font-size: 1.05rem; }
    .results-section { gap: 1rem; }
    .result-item { padding: 0.8rem; }
    .result-item.total .result-value { font-size: 1.2rem; }
    .invest-button { padding: 0.9rem 1.3rem; }
    .chart-container { width: 180px; height: 180px; }
}

/* Compact layout for shorter screens to avoid scrolling */
@media (max-height: 850px) {
    .header {
        min-height: 80px;
        padding: 1rem 0;
    }
    .main-content {
        height: calc(100vh - 80px);
    }
    .calculator-container {
        padding: 1rem 1.25rem;
    }
    .calculator-header {
        margin-bottom: 0.8rem;
        padding: 0.75rem;
    }
    .calculator-header h2 { font-size: 1.4rem; }
    .calculator-header p { font-size: 0.9rem; }
    .calculator-content {
        gap: 0.8rem;
        padding: 0.8rem;
    }
    .inputs-section { gap: 0.8rem; }
    .input-group { padding: 0.7rem; }
    .slider-container input[type="range"] { height: 10px; }
    .value-display { padding: 0.6rem; font-size: 1rem; }
    .results-section { gap: 0.8rem; }
    .result-item { padding: 0.7rem; }
    .result-item.total .result-value { font-size: 1.2rem; }
    .invest-button { padding: 0.85rem 1.25rem; }
    .chart-container { width: 180px; height: 180px; }
}

/* Ultra-compact for very short screens to eliminate scrolling */
@media (max-height: 820px) {
    .header { min-height: 64px; padding: 0.6rem 0; }
    .main-content { height: calc(100vh - 64px); }

    .calculator-container { padding: 0.75rem 1rem; transform-origin: top center; }
    .calculator-title { font-size: 1.4rem; margin-bottom: 0.25rem; }
    .calculator-header { margin-bottom: 0.4rem; padding: 0.55rem; }
    .calculator-header h2 { font-size: 1.15rem; }
    .calculator-header p { font-size: 0.8rem; }

    .calculator-content { gap: 0.5rem; padding: 0.5rem; }
    .inputs-section { gap: 0.55rem; }
    .input-group { padding: 0.55rem; }
    .value-display { padding: 0.45rem; font-size: 0.95rem; }
    .result-item { padding: 0.55rem; }
    .result-item.total .result-value { font-size: 1.05rem; }
    .slider-container input[type="range"] { height: 8px; }
    .invest-button { padding: 0.6rem 1rem; font-size: 0.9rem; }
    .chart-container { width: 160px; height: 160px; }
}

@media (max-height: 740px) {
    /* remove scaling to avoid cut off; rely on tighter spacing */
    .calculator-container { transform: none; }
    .calculator-header { padding: 0.45rem; }
    .calculator-header h2 { font-size: 1.05rem; }
    .calculator-header p { font-size: 0.75rem; }
    .input-group { padding: 0.5rem; }
    .result-item { padding: 0.5rem; }
    .value-display { padding: 0.4rem; font-size: 0.9rem; }
    .chart-container { width: 140px; height: 140px; }
}

@media (max-height: 700px) {}

@media (max-height: 660px) {}

/* Even more compact below 760px height */
@media (max-height: 760px) {
    .calculator-header { margin-bottom: 0.5rem; padding: 0.6rem; }
    .calculator-header h2 { font-size: 1.25rem; }
    .calculator-header p { font-size: 0.85rem; }
    .calculator-content { gap: 0.6rem; padding: 0.6rem; }
    .input-group { padding: 0.6rem; }
    .value-display { padding: 0.5rem; font-size: 0.95rem; }
    .result-item { padding: 0.6rem; }
}

/* Amortization Section Styles */
.amortization-toggle {
    margin-top: 1rem;
    text-align: center;
}

/* Add space below EMI amortization button when dropdown is not open */
#emiShowAmortizationBtn {
    margin-bottom: 1rem;
}

.show-amortization-btn {
    background: linear-gradient(135deg, #4c6ef5, #3b5bdb);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(76, 110, 245, 0.3);
}

.show-amortization-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 110, 245, 0.4);
    background: linear-gradient(135deg, #5c7cfa, #4c6ef5);
}

.amortization-section {
    margin-top: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    width: 100%;
}

.amortization-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    background: #4c6ef5;
    color: white;
    border-radius: 8px 8px 0 0;
    border-bottom: none;
}

.amortization-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.amortization-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: 300;
}

.amortization-close:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.05);
}

.amortization-content {
    max-height: 500px;
    overflow-y: auto;
    padding: 0;
}

.amortization-year {
    border-bottom: 1px solid #e9ecef;
}

.amortization-year:last-child {
    border-bottom: none;
}

.year-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1.2rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
}

.year-header:hover {
    background: #f9fafb;
}

.year-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.year-toggle {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem;
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.year-toggle:hover {
    background: #f3f4f6;
    color: #374151;
}

.year-toggle.expanded {
    transform: rotate(180deg);
}

.year-content {
    display: none;
    overflow: hidden;
}

.year-content.expanded {
    display: block;
}

.amortization-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
    border: none;
}

.amortization-table th {
    background: #f0f9ff;
    color: #374151;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid #d1d5db;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.amortization-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    font-weight: 400;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.amortization-table tr:nth-child(even) {
    background: #fafafa;
}

.amortization-table tr:hover {
    background: #f8fafc;
}

.amortization-table .month-cell {
    font-weight: 500;
    color: #374151;
    min-width: 60px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-align: center;
}

.amortization-table .amount-cell {
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-weight: 500;
    color: #374151;
}

.amortization-table .year-summary-row {
    background: #f8fafc !important;
    cursor: pointer;
    font-weight: 600;
    border-bottom: 2px solid #e5e7eb;
}

.amortization-table .year-summary-row:hover {
    background: #f1f5f9 !important;
}

.amortization-table .year-cell {
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.amortization-table .year-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    background: white;
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.amortization-table .year-toggle-icon:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.amortization-table .month-detail-row {
    background: white;
}

.amortization-table .month-detail-row:nth-child(even) {
    background: #fafafa;
}

.amortization-table .month-detail-row:hover {
    background: #f8fafc;
}

/* Color coding for columns - headers only */
.amortization-table th:nth-child(2) {
    color: #059669; /* Green for Principal */
}

.amortization-table th:nth-child(3) {
    color: #ea580c; /* Orange for Interest */
}

.amortization-table th:nth-child(5) {
    color: #991b1b; /* Dark red for Balance */
}

/* Color coding for data cells (not year summary rows) */
.amortization-table .month-detail-row td:nth-child(2),
.amortization-table .month-detail-row td:nth-child(3),
.amortization-table .month-detail-row td:nth-child(5) {
    color: inherit;
}

/* Mobile responsive for amortization */
@media (max-width: 768px) {
    .amortization-header {
        padding: 0.75rem 1rem;
    }
    
    .amortization-header h3 {
        font-size: 1rem;
    }
    
    .year-header {
        padding: 0.6rem 1rem;
    }
    
    .year-header h4 {
        font-size: 0.9rem;
    }
    
    .amortization-table {
        font-size: 0.75rem;
    }
    
    .amortization-table th,
    .amortization-table td {
        padding: 0.5rem 0.3rem;
    }
    
    .amortization-table th {
        font-size: 0.7rem;
    }

    /* EMI schedule: show Year, Principal, Interest, Balance; hide Total Payment (4) & Loan Paid (6) */
    #emiAmortizationSchedule .amortization-table th:nth-child(4),
    #emiAmortizationSchedule .amortization-table th:nth-child(6),
    #emiAmortizationSchedule .amortization-table td:nth-child(4),
    #emiAmortizationSchedule .amortization-table td:nth-child(6) {
        display: none;
    }

    /* Step-Up SIP breakdown: hide SIP Amount column (2); keep Year, Total Invested, Interest, Value */
    #stepSipBreakdownSection .amortization-table th:nth-child(2),
    #stepSipBreakdownSection .amortization-table td:nth-child(2) {
        display: none;
    }

    /* SWP breakdown: hide Total Withdrawn column (3); keep Year, Withdrawal, Interest, Value */
    #swpBreakdownSection .amortization-table th:nth-child(3),
    #swpBreakdownSection .amortization-table td:nth-child(3) {
        display: none;
    }

    /* Flexible breakdown: prevent currency symbol and amount from wrapping */
    #fsBreakdownSection .amortization-table .amount-cell {
        white-space: nowrap;
        font-size: 0.7rem;
        padding: 0.4rem 0.2rem;
    }
    
    #fsBreakdownSection .amortization-table th {
        font-size: 0.65rem;
        padding: 0.4rem 0.2rem;
    }
}

/* Amortization Calculator Section */
#amortizationCalculator .calculator-content {
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

#amortizationCalculator .amortization-section {
    margin-top: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(76, 110, 245, 0.1);
    overflow: hidden;
}

/* EMI Amortization Schedule - Full Width */
#emiAmortizationSchedule .calculator-content {
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
}

#emiAmortizationSchedule .amortization-section {
    margin-top: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(76, 110, 245, 0.1);
    overflow: hidden;
    width: 100%;
}

/* Step-Up SIP Monthly Breakdown - Full Width */
#stepSipBreakdownSection .calculator-content {
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
}

#stepSipBreakdownSection .amortization-section {
    margin-top: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(76, 110, 245, 0.1);
    overflow: hidden;
    width: 100%;
}

/* Flexible Step-Up SIP → SWP Monthly Breakdown - Full Width */
#fsBreakdownSection {
    width: 100%;
    margin: 0rem 0 1.5rem 0;
    padding: 0;
}

#fsBreakdownSection .calculator-content {
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
}

#fsBreakdownSection .amortization-section {
    margin-top: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(76, 110, 245, 0.1);
    overflow: hidden;
    width: 100%;
}

/* SWP Monthly Breakdown - Full Width */
#swpBreakdownSection .calculator-content {
    display: block;
    padding: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
}

#swpBreakdownSection .amortization-section {
    margin-top: 0;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(76, 110, 245, 0.1);
    overflow: hidden;
    width: 100%;
}

/* Compact mode adjustments for amortization */
.mode-emi .amortization-section {
    margin-top: 1rem;
}

.mode-emi .amortization-content {
    max-height: 400px;
}

.mode-emi .amortization-header {
    padding: 0.75rem 1rem;
}

.mode-emi .amortization-header h3 {
    font-size: 1rem;
}

.mode-emi .year-header {
    padding: 0.5rem 1rem;
}

.mode-emi .amortization-table {
    font-size: 0.8rem;
}

.mode-emi .amortization-table th,
.mode-emi .amortization-table td {
    padding: 0.5rem 0.4rem;
}

/* Amortization calculator mode */
.mode-amortization .main-content { overflow-y: auto; }
.mode-amortization .calculator-container { padding: 1rem 1.25rem; height: 100%; }
.mode-amortization .calculator-title { font-size: 2rem; margin-bottom: 0.5rem; margin-top: 0.5rem; }
.mode-amortization .calculator-header { margin-bottom: 0.6rem; padding: 0.65rem; }
.mode-amortization .calculator-header h2 { font-size: 1.7rem; }
.mode-amortization .calculator-header p { font-size: 0.9rem; }
.mode-amortization .calculator-content { gap: 0.8rem; padding: 0.8rem; height: 100%; align-items: stretch; }
.mode-amortization .amortization-content { max-height: 600px; }


/*
 * Hide Elfsight Instagram Feed branding badge
 * Targets the specific promo anchor generated by the free widget
 */
a[href*="elfsight.com"][href*="instagram-feed-instashow"],
a[href*="elfsight.com"][href*="instashow"] {
    display: none !important;
    visibility: hidden !important;
}

/* Also hide the small floating remove-branding control if present */
[title="Remove Elfsight logo"] {
    display: none !important;
    visibility: hidden !important;
}


/* removed twitter/linkedin widget styles */

/* Instagram section styles */
#instagram .section-title {
    color: #ffffff !important;
    background: none !important;
    -webkit-text-fill-color: #ffffff !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

/* ==========================================
   Contact Page - Form and Layout Enhancements
   ========================================== */
.narrow-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.contact-intro {
    margin-bottom: 1.5rem;
    color: #666;
    text-align: center;
}

/* Use existing calculator-section block but allow optional padding override */
.calculator-section.contact-card {
    padding: 1.5rem;
}

/* Form controls */
.contact-card .calculator-content {
    grid-template-columns: 1fr; /* make contact form full-width instead of 2 columns */
}

.input-control {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 2px solid rgba(102, 126, 234, 0.25);
    background: linear-gradient(135deg, #f7f8ff, #eef0ff);
    color: #333;
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: box-shadow 0.2s ease, transform 0.1s ease, border-color 0.2s ease;
}

.input-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.25);
    background: #fff;
}

.input-control:hover {
    transform: translateY(-1px);
}

textarea.input-control {
    resize: vertical;
    min-height: 140px;
}

/* Submit button */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    padding: 0.9rem 1.4rem;
    font-weight: 800;
	text-transform: none;
    letter-spacing: 0.6px;
    transition: transform 0.2s ease, box-shadow 0.3s ease, filter 0.2s ease;
}

.cta-button.primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(102,126,234,0.35);
}

.cta-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 35px rgba(102,126,234,0.45);
    filter: brightness(1.02);
}

.cta-button.primary:active {
    transform: translateY(-1px);
}

/* Align the final action area nicely */
.inputs-section .input-group:last-child {
    padding-top: 0.5rem;
}

@media (max-width: 768px) {
    .narrow-container { padding: 1.25rem 1rem; }
}

/* ==========================
   Contact compact mode
   - eliminate vertical scroll
   - tighten spacing to fit within viewport
   ========================== */
.mode-contact .main-content {
    /* Allow natural scrolling on Contact page */
    overflow-y: auto;
}

.mode-contact .narrow-container {
    padding: 1rem 1rem;
}

.mode-contact .calculator-section.contact-card {
    padding: 1rem;
}

.mode-contact .calculator-content {
    gap: 0.8rem;
    padding: 0.8rem;
}

/* Keep contact page submit button full width */
.mode-contact .cta-button {
    width: 100%;
}

.mode-contact .inputs-section {
    gap: 0.8rem;
}

.mode-contact .input-group {
    padding: 0.7rem;
}

.mode-contact .input-group label {
    font-size: 0.85rem;
}

.mode-contact .input-control {
    padding: 10px 12px;
    font-size: 0.9rem;
}

.mode-contact textarea.input-control {
    min-height: 110px;
}

/* Minor spacing tweaks to save vertical space on Contact page */
.mode-contact .contact-intro { margin-bottom: 0.8rem; }
.mode-contact .calculator-title { margin-top: 0.4rem; margin-bottom: 0.4rem; }

/* Hide non-essential intro on very short screens */
@media (max-height: 820px) {
    .mode-contact .contact-intro { display: none; }
}

/* Ensure full contact form fits within a single viewport on short screens */
/* On Contact page, avoid scaling the layout; let it scroll instead */
.mode-contact .narrow-container { transform: none !important; }

/* ============================================
   AI CHATBOT STYLES FOR SIP CALCULATOR
   ============================================ */

/* AI Chatbot Button */
.ai-chatbot-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
}

.ai-chatbot-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.ai-chatbot-btn:active {
    transform: translateY(0);
}

.robot-icon {
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* AI Chatbot Modal */
.ai-chatbot-modal {
    display: none;
    position: fixed;
    z-index: 1000000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ai-chatbot-popup {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.3s ease-out;
    overflow: hidden;
}

@keyframes slideInDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* AI Chatbot Header */
.ai-chatbot-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.ai-chatbot-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.robot-icon-large {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.ai-chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.ai-chatbot-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* AI Chatbot Body */
.ai-chatbot-body {
    padding: 2rem;
    min-height: 200px;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    scroll-behavior: smooth;
}

/* AI Loader */
.ai-loader {
    text-align: center;
}

.loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.ai-loader p {
    color: #667eea;
    font-weight: 600;
}

/* AI Response */
.ai-response {
    width: 100%;
}

.ai-message-text {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f1ff 100%);
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    border-left: 4px solid #667eea;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.typewriter-content {
    display: block;
}

.typewriter-content .typewriter-cursor {
    display: inline;
}

/* Formatting styles for AI response content */
.ai-message-text h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #667eea;
    margin: 1.5rem 0 1rem 0;
    line-height: 1.4;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.ai-message-text h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #764ba2;
    margin: 1.25rem 0 0.75rem 0;
    line-height: 1.4;
}

.ai-message-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #667eea;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.4;
}

.ai-message-text h3.bold-centered-heading {
    font-weight: 700;
    color: #333;
    margin: 1.5rem 0 1rem 0;
    font-size: 1.3rem;
}

.ai-message-text p {
    margin: 0.75rem 0;
    line-height: 1.8;
    color: #333;
}

.ai-message-text ul {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.ai-message-text li {
    margin: 0.5rem 0;
    line-height: 1.7;
    color: #444;
    padding-left: 0.25rem;
}

.ai-message-text ul ul {
    margin-top: 0.25rem;
    margin-bottom: 0.25rem;
    padding-left: 1.25rem;
    list-style-type: circle;
}

/* First paragraph after heading */
.ai-message-text h1 + p,
.ai-message-text h2 + p,
.ai-message-text h3 + p {
    margin-top: 0.5rem;
}

/* First heading */
.ai-message-text > h1:first-child,
.ai-message-text > h2:first-child,
.ai-message-text > h3:first-child {
    margin-top: 0;
}

.typewriter-cursor {
    display: inline;
    color: #667eea;
    font-weight: bold;
    animation: blink 1s infinite;
    margin-left: 2px;
}

.typewriter-content .typewriter-cursor {
    display: inline;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ai-chatbot-popup {
        width: 95%;
        margin: 10% auto;
    }
    
    .ai-chatbot-header {
        padding: 1rem 1.5rem;
    }
    
    .ai-chatbot-title {
        font-size: 1rem;
    }
    
    .ai-chatbot-body {
        padding: 1.5rem;
    }
    
    .ai-message-text {
        font-size: 0.95rem;
        padding: 1rem;
    }
    
    .ai-message-text h1 {
        font-size: 1.5rem;
        margin: 1.25rem 0 0.75rem 0;
    }
    
    .ai-message-text h2 {
        font-size: 1.3rem;
        margin: 1rem 0 0.5rem 0;
    }
    
    .ai-message-text h3 {
        font-size: 1.1rem;
        margin: 0.75rem 0 0.5rem 0;
    }
    
    .ai-message-text h3.bold-centered-heading {
        font-size: 1.15rem;
        margin: 1.25rem 0 0.75rem 0;
    }
    
    .ai-message-text ul {
        padding-left: 1.25rem;
    }
}

/* ============================================
   LANGUAGE SELECTION MODAL STYLES
   Same styling as AI Chatbot Modal but separate classes
   ============================================ */

/* Language Modal Popup - Same style as AI Chatbot but separate */
.language-modal-popup {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    height: fit-content;
    display: block;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.3s ease-out;
    overflow: hidden;
}

/* Language Modal Header - Same as AI Chatbot Header */
.language-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.language-modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.language-icon-large {
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.language-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.language-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Language Modal Body - Same padding as AI Chatbot but auto height */
.language-modal-body {
    padding: 2rem;
    width: 100%;
    box-sizing: border-box;
}

.language-select-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.language-select-dropdown {
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid rgba(102, 126, 234, 0.25);
    border-radius: 10px;
    background: linear-gradient(135deg, #f7f8ff, #eef0ff);
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    margin-bottom: 1.5rem;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 16px;
    box-sizing: border-box;
}

.language-select-dropdown:hover {
    transform: translateY(-1px);
}

.language-select-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.25);
    background: #fff;
}

.language-modal-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    display: block;
    box-sizing: border-box;
    margin: 0;
}

.language-modal-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.language-modal-button:active {
    transform: translateY(0);
}

/* Responsive Design for Language Modal - Same as AI Chatbot */
@media (max-width: 768px) {
    .language-modal-popup {
        width: 95%;
        margin: 10% auto;
    }
    
    .language-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .language-modal-title {
        font-size: 1rem;
    }
    
    .language-modal-body {
        padding: 1.5rem;
    }
}

#sipInlineResults {
    margin-top: 1rem;
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
}

#stepSipInlineResults {
    display: none;
    margin-top: 1rem;
    width: 100%;
    gap: 1rem;
}

#stepSipAreaChartContainer {
    min-height: 320px;
}

#swpInlineResults {
    display: none;
    margin-top: 1rem;
    width: 100%;
    gap: 1rem;
}

#lsInlineResults {
    display: none;
    margin-top: 1rem;
    width: 100%;
    gap: 1rem;
}

#fdInlineResults {
    display: none;
    margin-top: 1rem;
    width: 100%;
    gap: 1rem;
}

#ppfInlineResults {
    display: none;
    margin-top: 1rem;
    width: 100%;
    gap: 1rem;
}

@media (min-width: 992px) {
    #sipInlineResults {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }

    #sipInlineResults .result-item {
        flex: none;
    }

    #sipInlineResults .result-item.total {
        grid-column: 1 / -1;
    }

    #stepSipInlineResults.inline-active {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 1rem;
    }

    #stepSipInlineResults.inline-active .result-item {
        flex: none;
    }

    #swpInlineResults {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 1rem;
    }

    #swpInlineResults .result-item {
        flex: none;
    }

    #lsInlineResults {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 1rem;
    }

    #lsInlineResults .result-item {
        flex: none;
    }

    #fdInlineResults {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 1rem;
    }

    #fdInlineResults .result-item {
        flex: none;
    }

    #ppfInlineResults {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: stretch;
        gap: 1rem;
    }

    #ppfInlineResults .result-item {
        flex: none;
    }
}

@media (min-width: 1024px) {
    #sipAreaChartContainer,
    #stepSipAreaChartContainer {
        min-height: 360px;
    }
}
