/* 
   Money Impact by Deepak - Variant 3
   Production-Ready Design System
*/

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    margin-bottom: 2rem;
    animation: pulse-logo 2s infinite ease-in-out;
}

.loader-bar {
    width: 120px;
    height: 2px;
    color: #ffffff;
    /* Changed to white for visibility on dark background */
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

.loader-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--emerald);
    animation: load-bar 1.5s infinite ease-in-out;
}

@keyframes pulse-logo {

    0%,
    100% {
        opacity: 0.5;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes load-bar {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

.page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

:root {
    /* Color Palette - Midnight Emerald & Slate */
    --graphite: #0a0a0a;
    --graphite-light: #1e1b4b;
    /* Subtle indigo tint for depth */
    --slate: #1e293b;
    --emerald: #10b981;
    --emerald-dark: #059669;
    --emerald-soft: rgba(16, 185, 129, 0.1);
    --alabaster: #fafafa;
    --champagne: #c5a059;
    --champagne-dark: #b68d40;
    --text-dark: #111827;
    --white: #ffffff;
    --border: #e2e8f0;

    /* Semantic Mappings */
    --primary: var(--graphite);
    --primary-light: var(--slate);
    --accent: var(--emerald);
    --accent-dark: var(--emerald-dark);
    --bg-main: var(--alabaster);
    --bg-surface: var(--white);
    --bg-soft: #f8fafc;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-muted: #64748b;
    --text-light: #f1f5f9;

    /* Layout & Effects */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Glassmorphism Tokens */
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: 12px;
}

/* Safari Form Reset */
input,
button,
select,
textarea {
    -webkit-appearance: none;
    appearance: none;
}

/* --- Base Styles --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    max-width: 100vw;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.page-loader {
    display: flex;
    /* Changed from inline-flex for fuller control */
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    /* Increased padding */
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    /* Bolder */
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1.25rem;
    /* Increased size */
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 800px;
}

.centered {
    text-align: center;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 3rem;
    line-height: 1.1;
}

h1 em {
    font-style: italic;
    color: var(--accent);
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    color: var(--primary);
}

h3 {
    font-size: 1.5rem;
}

.lead {
    font-size: 1.25rem;
    opacity: 0.9;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn.btn-large {
    padding: 1.25rem 3rem;
    font-size: 1.25rem;
    font-weight: 800;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.btn-large:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-gold {
    background: var(--champagne);
    color: var(--white);
}

.btn-gold:hover {
    background: var(--champagne-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(197, 160, 89, 0.3);
}

.btn-teal {
    background: var(--accent);
    color: var(--white);
}

.btn-teal:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 44px 12px rgba(16, 185, 129, 0.3);
}

.btn-block {
    width: 100%;
}

.btn-outline-teal {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline-teal:hover {
    background: var(--accent);
    color: white;
}

/* --- Accessibility: Focus States --- */
.btn:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: var(--white);
    padding: 1rem;
    z-index: 2000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}


/* --- Header --- */
.site-header {
    height: 5rem;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.site-header.scrolled .brand-logo,
.site-header.scrolled .line-2,
.site-header.scrolled .nav-links a {
    color: var(--white) !important;
}

.site-header.scrolled .hamburger span {
    background-color: #ffffff !important;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    color: #ffffff;
    font-weight: 800;
    font-size: 1.25rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.line-1 {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--emerald);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.line-2 {
    font-size: 0.8rem;
    font-weight: 500;
    color: #ffffff;
    opacity: 0.8;
}

.logo-img {
    height: 64px;
    width: auto;
    object-fit: contain;
}



.nav-links {
    display: none;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.8;
    transition: var(--transition);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover {
    opacity: 1;
    color: var(--emerald);
}

/* Hamburger Menu Logic */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1100;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #ffffff;
    transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* --- Hero Section --- */
/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    padding: 0;
    /* White frame */
    background: #ffffff;
    /* White background request */
    align-items: center;
}

.hero-video-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    box-shadow: none;
    background: #000;
}

.hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.video-bg {
    display: none;
}

.hero-overlay {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    background: transparent;

}

/* Ensure container inside overlay is centered/layout properly */
.hero-overlay .container {
    padding-top: 4rem;
    /* Space for fixed header */
}

.hero-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    margin: 0 auto;
}

/* Removed media query for 2 columns since we want centered single column now */


.hero-content h1 {
    margin-bottom: 2.5rem;
    color: #ffffff;
    font-size: 4rem;
    /* Base size + ~10pt equivalent boost */
    line-height: 1.1;
}

.hero-text-prefix {
    font-size: 0.9em;
    /* Reduce by ~10% (approx 5pt relative to 4rem) */
    font-weight: 600;
    /* Slightly lighter than the main clear text if desired, or keep inherit */
}

.hero-content h1 em {
    font-size: 1.2em;
    /* ~15pt larger relative to h1 */
    display: inline-block;
    /* Ensure transform applies nicely if needed */
}

.hero-content p {
    margin-bottom: 3rem;
    color: #f1f5f9;
    font-size: 1.5rem;
    /* Base size + ~10pt equivalent boost from standard */
    max-width: 800px;
    /* Readability constraint */
    margin-left: auto;
    margin-right: auto;
}

/* Responsiveness for Hero Typography */
@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.25rem;
    }

    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .btn {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        width: 100%;
        /* Full width CTA on mobile for better UX */
        max-width: 300px;
    }
}

/* Clean up old .hero styles if needed, mapping vars */

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
}

/* --- Hero Graph Container --- */
.hero-graph-container {
    perspective: 1000px;
}

.graph-card {
    background: #1e293b;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: var(--transition);
}

.graph-card:hover {
    transform: translateY(-5px) rotateX(2deg);
    border-color: rgba(20, 184, 166, 0.3);
}

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.graph-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ffffff;
    font-weight: 700;
}

.graph-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #10b981;
}

.graph-pill {
    background: #ffffff;
    color: var(--teal);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
}

.graph-pill span {
    font-size: 0.7rem;
    opacity: 0.8;
}

.canvas-wrapper {
    height: 250px;
    width: 100%;
    margin-bottom: 1.5rem;
}

.graph-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    font-size: 0.8rem;
}

.live-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    font-weight: 700;
}

.live-indicator .dot {
    width: 8px;
    height: 8px;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--teal);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }

    50% {
        transform: scale(1.2);
        opacity: 0.5;
    }

    100% {
        transform: scale(0.9);
        opacity: 1;
    }
}



/* --- About Section --- */
.about {
    padding: 6rem 0;
    background: #ffffff;
}

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    /* Ratio to give text more space */
    gap: 4rem;
    align-items: center;
    /* Vertically align image with text */
}

/* Updated Image Container Styles */
.about-image {
    position: relative;
    width: 100%;
    margin: 0 auto;
    /* max-width controlled by grid column, but we can limit it further if needed */
}

.portrait-frame {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 10px solid #ffffff;
    /* Frame effect */
    max-width: 400px;
    /* Limit max width as requested */
    margin: 0 auto;
    /* Center in its column */
}

.portrait-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none;
}


.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.credentials {
    list-style: none;
    margin: 2rem 0;
}

.credentials li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.credentials li::before {
    content: '→';
    color: var(--accent);
    font-weight: 800;
}

/* --- Impact Section --- */
.impact {
    padding: 6rem 0;
    background: var(--graphite);
    color: var(--white);
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2.5rem 1.5rem;
    border-radius: 40px;
    text-align: center;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    will-change: transform;
}

.stat-card.visible:hover {
    transform: translateY(-15px) scale(1.03);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.8),
        0 25px 50px -20px rgba(0, 0, 0, 0.9),
        0 0 25px rgba(16, 185, 129, 0.3);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    z-index: 5;
    transition: all 0.2s ease-out;
}

.stat-num {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    opacity: 0.8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.75rem;
}

/* --- Tools Section --- */
/* --- Tools Section (V2 Redesign) --- */
.tools {
    padding: 6rem 0;
    background: var(--bg-soft);
}

.tools-stack {
    max-width: 1200px;
    margin: 4rem auto 0;
}

/* --- Two-Tier Navigation System --- */
.tools-nav-system {
    margin-bottom: 2rem;
}

/* Level 1: Category Tabs */
.category-tabs {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: center;
}

.cat-tab {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    color: var(--text-muted);
}

.cat-tab:hover {
    background: rgba(16, 185, 129, 0.05);
    transform: translateY(-3px);
    border-color: #10b981;
    color: #059669;
    /* Dark Emerald for visibility */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.cat-tab.active {
    background: linear-gradient(135deg, #10b981, #059669);
    /* Stronger Green */
    border-color: #059669;
    color: var(--white);
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.4);
    transform: translateY(-3px);
}

.cat-tab.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent);
}

.cat-icon {
    display: block;
    margin-bottom: 0.75rem;
    transition: transform 0.3s;
    line-height: 0;
}

.cat-icon svg {
    width: 32px;
    height: 32px;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.cat-tab:hover .cat-icon svg {
    opacity: 1;
}

.cat-tab.active .cat-icon {
    transform: scale(1.1);
}

.cat-name {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cat-desc {
    font-size: 0.8rem;
    opacity: 0.7;
    font-weight: 500;
}

/* Level 2: Sub-Tabs */
.sub-tabs-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem;
    display: flex;
    justify-content: center;
}

.sub-tab-group {
    display: none;
    /* Hidden by default */
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    animation: slideInDown 0.4s ease;
}

.sub-tab-group.active {
    display: flex;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sub-tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    /* Pill shape */
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.sub-tab:hover {
    color: #059669;
    background: rgba(16, 185, 129, 0.05);
    border-color: rgba(16, 185, 129, 0.3);
}

.sub-tab.active {
    background: var(--white);
    color: var(--graphite);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
    font-weight: 700;
}

.sub-tab .t-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Content Container - No more folder look at top, but independent card below */
.folder-content {
    background: transparent;
    border-radius: 12px;
    position: relative;
    z-index: 5;
    margin-top: 20px;
}

/* Update Tool Cards to act as standalone content */
/* Update Tool Cards to act as standalone content */
/* Pro Card Style */
/* Pro Card Style */
.tool-card {
    display: none;
    background: rgba(18, 18, 18, 0.6);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    /* For Pseudo-border */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    overflow: hidden;
}

/* Impressive Gradient Border Top */
.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0.8;
}

.tool-card.active-tool {
    display: block;
    opacity: 1;
    transform: translateY(0);
    animation: fadeInTool 0.5s ease forwards;
}

@keyframes fadeInTool {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}



/* Mobile Responsive */
@media (max-width: 768px) {
    .category-tabs {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .cat-tab {
        flex-direction: row;
        text-align: left;
        align-items: center;
        width: 100%;
        min-width: 0;
        padding: 1.25rem;
    }

    .cat-icon {
        margin-bottom: 0;
        margin-right: 1rem;
    }

    .sub-tabs-container {
        border: none;
        background: transparent;
        padding: 0;
    }

    .sub-tab-group {
        display: none;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        /* Force display block for scroll on mobile logic if active?
           Active class sets display flex. Flex + overflow auto works. */
    }

    .sub-tab-group.active {
        display: flex;
        flex-wrap: nowrap;
        /* Horizontal scroll */
    }

    .sub-tab {
        white-space: nowrap;
        background: rgba(255, 255, 255, 0.05);
        /* Slightly visible on mobile by default */
    }
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-2px);
}

.tool-btn.active {
    background: rgba(16, 185, 129, 0.1);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tool-btn .t-icon {
    font-size: 1.2rem;
}

/* 3. Calculator Display Container */
/* 3. Calculator Display Container */
.calculator-display {
    /* Removed redundant background/border here since .tool-card handles it now?
       Actually user might have logic inside display. Let's keep transparent but reduce padding */
    background: transparent;
    padding: 1.5rem;
    min-height: auto;
    position: relative;
    /* overflow: hidden; Removed to show tooltips if needed */
}

/* SPLIT LAYOUT Grid */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    height: auto;
    /* Allow hugging content */
}

/* LEFT: Inputs */
.calc-inputs {
    padding-right: 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.input-title {
    color: var(--white);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    border-bottom: 2px solid var(--accent);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.input-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    padding-top: 0;
}

.input-wrapper:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.input-wrapper:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
    background: rgba(16, 185, 129, 0.02);
}

.input-wrapper input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--white);
    padding: 0.85rem 1rem;
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    letter-spacing: 0.02em;
}

/* Premium Range Slider Styling */
.control-slider {
    width: 100%;
    margin-top: 1rem;
    -webkit-appearance: none;
    background: transparent;
    height: 6px;
    cursor: pointer;
    display: block;
}

.control-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0.1));
    border-radius: 4px;
}

.control-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--white);
    border: 2px solid var(--accent);
    margin-top: -8px;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.control-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
    cursor: grab;
}

.control-slider:active::-webkit-slider-thumb {
    cursor: grabbing;
    transform: scale(1.1);
}



.btn-block {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
}

/* RIGHT: Results */
.calc-results {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
}

.result-header h5 {
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.result-header h2 {
    color: var(--accent);
    font-size: 2.5rem;
    margin: 0;
    text-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.result-breakdown {
    margin-bottom: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.rb-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.rb-row:last-child {
    border-bottom: none;
}

.rb-row span {
    color: var(--text-light);
    font-size: 0.9rem;
}

.rb-row .rb-val {
    color: var(--white);
    font-weight: 600;
}

.chart-area-small {
    flex-grow: 1;
    position: relative;
    min-height: 200px;
    max-height: 250px;
}

/* Updated Insight Panel for Simplistic Look */
.insight-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.insight-tile {
    text-align: center;
    padding: 1rem 0.5rem;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.insight-tile:last-child {
    border-right: none;
}

.tile-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.tile-value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.insight-tile.primary .tile-value {
    color: var(--accent);
    font-size: 1.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .calc-inputs {
        padding-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 2rem;
    }

    .calculator-display {
        padding: 1.5rem;
    }

    .tool-categories {
        gap: 0.5rem;
    }

    .cat-tab {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

/* --- CTA Section --- */
.section-cta {
    padding: 10rem 0;
    background: var(--graphite);
    color: var(--white);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.section-cta h2 {
    color: #ffffff !important;
    font-size: 3rem;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

.section-cta p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 4rem;
    line-height: 1.6;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.section-cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: var(--accent);
    filter: blur(150px);
    opacity: 0.1;
}

/* --- Close Section --- */
.section-close {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--graphite);
}

.close-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.close-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.close-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 10, 10, 0.8), rgba(10, 10, 10, 0.4));
}

.close-content {
    position: relative;
    z-index: 10;
    color: var(--white);
    max-width: 800px;
    margin: 0 auto;
}

.close-content blockquote {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2.5rem;
}

/* --- Footer --- */
.site-footer {
    padding: 6rem 0 3rem;
    background: var(--graphite);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--white);
}

.footer-brand p {
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 4rem;
    padding-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.btn-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    /* Glass edge */
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    /* Glow + Depth */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    /* Readable text */
}

.btn-emerald:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    /* Lighter on hover */
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* --- Animations --- */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
}

/* Ensure stat-cards don't get stuck with slow transitions */
.stat-card.fade-in {
    transition: opacity 1.2s ease-out, transform 1.2s ease-out, background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.stat-card.fade-in.visible:hover {
    transition: var(--transition);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
/* --- Responsive --- */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--graphite);
        flex-direction: column;
        justify-content: center;
        transition: var(--transition);
        display: flex;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }

    .nav-links a {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }

    .nav-links {
        display: flex;
    }

    .hero-grid {
        grid-template-columns: 2fr 3fr;
    }

    .about-grid {
        grid-template-columns: 35% 65%;
    }

    .impact-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .tools-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .tools-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* Hide hamburger menu completely on desktop/PC */
    .hamburger {
        display: none !important;
    }

    .mobile-only-item {
        display: none !important;
    }
}

/* --- Smart WhatsApp CTA --- */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    transform: scale(0.5) translateY(20px);
}

.whatsapp-float.visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #25d366;
    border-radius: 50%;
    z-index: -1;
    animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 50px;
        height: 50px;
    }
}


/* --- Footer Restructure --- */
.site-footer {
    background: #050505;
    padding: 2rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ... existing styles ... */

.footer-bottom {
    background: #000;
    padding: 1.5rem 0;
    text-align: center;
}

.footer-heading {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--emerald);
    font-weight: 700;
}

.site-footer .line-2 {
    color: var(--white);
}

.brand-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.footer-disclosure {
    color: var(--emerald);
    font-size: 0.85rem;
    line-height: 1.5;
    max-width: 350px;
}

.footer-nav {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.footer-nav a,
.link-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.footer-nav a:hover,
.link-btn:hover {
    color: var(--emerald);
}

.footer-compliance p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-compliance strong {
    color: var(--white);
    font-size: 1.1rem;
}

.footer-bottom {
    background: #000;
    padding: 2rem 0;
    text-align: center;
}

.risk-warning {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: rgba(16, 185, 129, 0.8);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.risk-warning strong {
    display: block;
    color: var(--emerald);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.copyright {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.footer-legal-links {
    margin-top: 0.75rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-legal-links a:hover {
    color: var(--emerald);
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }
}

@media (min-width: 1440px) {
    .container {
        max-width: 1320px;
    }
}

/* Base Accessibility & Touch */
button,
a {
    min-height: 44px;
    /* Apple/Google accessibility standard */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float {
    min-height: auto;
    /* reset for circular btn */
}

/* --- Responsive Overrides & Mobile Menu --- */

/* Desktop Navigation Visibility */
@media (min-width: 1024px) {
    .nav-links {
        display: flex !important;
        /* Force visible on desktop */
    }

    .hamburger {
        display: none !important;
        /* Force hidden on desktop */
    }
}

/* Mobile Menu Styles */
.nav-links.mobile-active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: 70%;
    max-width: 300px;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    padding: 6rem 2rem;
    z-index: 1001;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

/* --- Sleek Mobile Drawer Styles --- */
.mobile-only-item {
    display: none;
}

.nav-links.mobile-active li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-links.mobile-active a,
.nav-links.mobile-active button {
    display: flex;
    width: 100%;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    justify-content: flex-start;
    color: var(--white);
    transition: color 0.3s ease;
}

/* Green Hover for all clickable links in drawer */
.nav-links.mobile-active a:hover,
.nav-links.mobile-active button:hover {
    color: var(--emerald) !important;
}

/* Close Button Styling - Prominent and Inside */
.mobile-menu-close {
    position: absolute;
    top: 1.5rem;
    /* Inside the menu padding */
    right: 1.5rem;
    left: auto !important;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem !important;
    /* Increased size */
    cursor: pointer;
    padding: 0;
    display: block;
    width: auto;
    height: auto;
    z-index: 10001;
    line-height: .8;
    /* Tighter line height for X */
    font-weight: 300;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.mobile-menu-close:hover {
    color: var(--emerald);
    opacity: 1;
    transform: none;
}

/* --- Mobile & Tablet Shared Override (< 1024px) --- */
@media (max-width: 1023px) {

    /* Show duplicates social icons in brand col */
    .brand-social-mobile {
        display: flex !important;
        margin-top: 1rem;
        gap: 1rem;
    }

    /* Hide original social icons in contact col */
    .footer-compliance .social-icons-container {
        display: none !important;
    }

    /* Reduce vertical padding (gap) in footer brand section */
    .footer-brand {
        gap: 0.25rem;
    }

    .footer-brand .brand-desc,
    .footer-brand .footer-disclosure {
        margin-bottom: 0.25rem;
    }
}


/* Tablet Override (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 0 30px;
    }

    .hero-grid {
        grid-template-columns: 45fr 55fr;
        gap: 2rem;
    }

    .about-grid {
        grid-template-columns: 40fr 60fr;
        gap: 2rem;
    }

    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
        /* 2x2 wrapping */
    }

    .tools-stack {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .tool-card.expanded {
        grid-column: 1 / -1;
    }
}

/* Mobile Override (< 768px) */
@media (max-width: 767px) {
    .container {
        padding: 0 20px;
    }

    button.hamburger {
        display: flex;
        /* Ensure visible */
        z-index: 1002;
    }

    /* Fixed Header for Mobile Overlay */
    /* Fixed Header for Mobile Overlay */
    .site-header {
        background: transparent;
        position: fixed;
        width: 100%;
        top: 0;
        transition: background 0.3s ease;
    }

    .site-header.scrolled {
        background: rgba(10, 10, 10, 0.95) !important;
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* Section 1: Hero Stacking */
    .hero {
        padding-top: 0;
        min-height: 100vh;
        padding-bottom: 0;
        background: #000 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content .lead {
        font-size: 1rem;
    }

    .hero-grid {
        display: flex;
        flex-direction: column;
        gap: 3rem;
    }

    .hero-content {
        order: 1;
        text-align: center;
        padding: 0 10px;
    }

    .hero-graph-container {
        order: 2;
        width: 100%;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    /* Section 2: About Stacking */
    .about {
        padding: 4rem 0;
    }

    .about-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .about-image {
        order: 1;
        max-width: 250px;
        margin: 0 auto;
    }

    .about-text {
        order: 2;
        padding: 0 10px;
    }

    /* Section 3: Stats Reflow */
    .impact-grid {
        grid-template-columns: 1fr;
        /* Single column for <768px */
        gap: 1.5rem;
    }

    .stat-card {
        padding: 2rem;
    }

    .stat-num {
        font-size: 3rem;
        /* Adjusted for mobile */
    }

    /* Section 4: Calculators (Single Col) */
    .tools-stack {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .tool-header {
        padding: 1.5rem;
        grid-template-columns: 40px 1fr auto;
        /* Tighter layout */
        gap: 1rem;
    }

    .tool-title-group h3 {
        font-size: 1rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
        /* Force stack inside tools */
        padding: 1.5rem;
    }

    /* --- Mobile Menu Drawer (60% Width) --- */
    /* --- Mobile Menu Drawer (60% Width) --- */
    /* --- Mobile Menu Drawer (60% Width) --- */
    /* --- Mobile Menu Drawer (60% Width) --- */
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 60% !important;
        /* Strict 60% width */
        height: auto !important;
        max-height: 60vh;
        /* Limit height to 60% of viewport */
        background: #000;
        padding: 4rem 1.5rem 2rem 1.5rem !important;
        /* Top padding allows space for absolute Close Button */
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 2000;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        align-items: stretch;
        justify-content: flex-start;
        /* Align from top */
        gap: 10px;
        overflow-y: auto;
        /* Handle overflow on small screens */
        border-bottom-left-radius: 20px;
        /* Polish */
    }

    .nav-links li {
        width: 100%;
        margin: 0;
    }

    .nav-links a {
        display: block;
        padding: 0.5rem 0;
    }

    /* Target the button inside nav-links specifically */
    .nav-links .btn {
        width: 100%;
        max-width: 40vw;
        /* Limit button width */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center;
        margin: 0.5rem auto 0 auto;
        /* Center horizontally */
    }

    .nav-links.mobile-active {
        right: 0;
    }

    /* Hide Hamburger when Menu is Open */
    .nav-links.mobile-active+.hamburger {
        display: none !important;
    }

    /* Fallback for Body Class method */
    body.menu-open .hamburger {
        display: none !important;
    }

    /* Container for Close Button (Reset to simple block) */
    .mobile-only-item {
        width: 100%;
        position: static;
        display: block !important;
        margin: 0;
        padding: 0;
    }

    /* Close Button Styling - Absolute for Precise Alignment */
    .mobile-menu-close {
        position: absolute !important;
        top: 15px !important;
        /* Calculated to center align with header */
        right: 1.25rem !important;
        /* Matches hamburger right margin (~20px) */
        left: auto !important;
        background: none;
        border: none;
        color: var(--white);
        font-size: 3.5rem !important;
        cursor: pointer;
        padding: 0;
        display: flex !important;
        /* Flex to center the X */
        align-items: center;
        justify-content: center;
        width: 50px !important;
        /* Fixed width prevents stretching */
        height: 50px !important;
        /* Fixed height */
        line-height: 1;
        font-weight: 300;
        opacity: 0.9;
        transition: opacity 0.3s ease;
        z-index: 2001;
        /* Ensure it's above everything */
    }

    .mobile-menu-close:hover {
        color: var(--emerald);
        opacity: 1;
        transform: none;
    }

    /* Sticky Calculate Button on Mobile */
    .tool-body .btn {
        position: sticky;
        bottom: 1rem;
        z-index: 10;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    }

    /* Section 5: CTA */
    .section-close h2 {
        font-size: 1.8rem;
    }

    .section-close .lead {
        font-size: 1rem;
    }

    .section-cta {
        width: 100%;
        max-width: 100%;
        padding: 4rem 0;
    }

    /* Typography Scaling */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    body {
        font-size: 15px;
    }

    /* Footer Stacking */
    .footer-grid {
        display: flex;
        flex-direction: column;
        gap: 2.5rem;
        text-align: center;
    }

    .footer-brand,
    .footer-disclosure {
        margin: 0 auto;
    }

    .footer-nav {
        align-items: center;
    }
}

/* Extreme Small Devices (< 360px) */
@media (max-width: 360px) {
    h1 {
        font-size: 1.75rem;
    }

    .stat-num {
        font-size: 2.5rem;
    }

    .tool-header {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .tool-icon-viz {
        margin: 0 auto;
    }

    .tool-preview-metric {
        display: none;
    }

    /* Hide non-essential */
}

/* Large Screens (> 1440px) */
@media (min-width: 1441px) {
    .container {
        max-width: 1400px;
    }
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP-FIRST RESPONSIVE SYSTEM
   ═══════════════════════════════════════════════════════════════════ */

/* --- MOBILE ONLY (<768px) --- */
@media (max-width: 767px) {

    /* Typography Scaling */
    h1 {
        font-size: 28px;
        line-height: 1.3;
    }

    h2 {
        font-size: 24px;
        line-height: 1.4;
    }

    h3 {
        font-size: 18px;
        line-height: 1.4;
    }

    body {
        font-size: 16px;
    }

    /* Text Wrapping for Mobile Only */
    p,
    h1,
    h2,
    h3,
    span,
    div {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    /* Container Padding */
    .container {
        padding: 0 20px;
    }

    /* Hero: Stack Vertically */
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-content {
        text-align: center;
    }

    /* About: Stack Vertically */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        max-width: 250px;
        margin: 0 auto;
    }

    /* Stats: Single Column -> Double Column for better fit */
    .impact-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat-card {
        padding: 1.5rem 1rem;
    }

    /* Tools: Single Column */
    .tools-stack {
        display: flex;
        flex-direction: column;
    }

    .tool-card.expanded {
        grid-column: auto;
    }

    /* Calculator Dashboard */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    /* Footer: Stack */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: left;
        gap: 2.5rem;
    }

    .footer-brand,
    .footer-disclosure {
        margin: 0;
        align-items: flex-start;
    }

    .footer-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem 1rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
        text-align: left;
    }

    .footer-nav li {
        display: flex;
        justify-content: flex-start;
    }

    .footer-nav a,
    .footer-nav button {
        justify-content: flex-start;
        min-height: 30px;
        padding: 0.25rem 0;
    }

    /* Input Zoom Prevention */
    input,
    select,
    textarea {
        font-size: 16px;
    }
}

/* --- LIGHT THEME TOOL CARD (Reference Match) --- */

/* 1. Main Card Container */
.tool-card-light {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden;
    border: none !important;
    max-width: 100%;
    /* Filled width (was 900px) */
    margin: 0 auto;
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.tool-card-light::before {
    display: none !important;
}

.tool-card-light.active-tool {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* 2. Header (White) */
/* 2. Header (White) */
.tool-header-light {
    background: #ffffff;
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: row;
    /* Stack Vertically */
    align-items: center;
    justify-content: center;
    /* Center Horizontally */
    text-align: left;
    /* Center Text */
    gap: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.th-icon {
    width: 40px;
    height: 40px;
    background: #d1fae5;
    /* Light Emerald */
    color: #059669;
    /* Emerald 600 */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.th-text h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #111827;
    /* Gray 900 */
    font-weight: 700;
}

.th-text p {
    margin: 0.25rem 0 0;
    color: #6b7280;
    /* Gray 500 */
    font-size: 0.9rem;
}

/* 3. Body (Light Grey) */
.tool-body-light {
    background: #f9fafb;
    /* Gray 50 */
    padding: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Split Layout: 1/3 Inputs, 2/3 Results */
    gap: 2rem;
    align-items: start;
}

/* 4. Left: Inputs */
.light-inputs {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.input-set-light {
    margin-bottom: 0.5rem;
}

.input-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.input-top label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    /* Gray 500 */
    font-weight: 700;
}

.input-top input {
    background: #e5e7eb;
    /* Gray 200 badge look */
    border: none;
    border-radius: 4px;
    padding: 2px 8px;
    width: 80px;
    text-align: right;
    font-weight: 700;
    color: #111827;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Slider (Green) */
.slider-light {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    cursor: pointer;
    display: block;
}

.slider-light::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #10b981;
    /* Emerald 500 */
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
    margin-top: -7px;
}

/* Action Button */
.btn-light-action {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1rem;
    width: 100%;
    text-align: center;
}

.btn-light-action:hover {
    background: linear-gradient(135deg, #34d399 0%, #059669 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* 5. Right: Grid Results */
.light-results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* Tiles | Chart */
    gap: 1.5rem;
}

.tiles-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.res-tile-light {
    padding: 1.5rem;
    border-radius: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    min-height: 100px;
}

.white-tile {
    background: #ffffff;
}

.white-tile .rt-label {
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.white-tile .rt-value {
    color: #111827;
    font-size: 1.25rem;
    font-weight: 800;
}

.black-tile {
    background: #111827;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.black-tile .rt-label {
    color: #9ca3af;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.black-tile .rt-value {
    color: #10b981;
    font-size: 1.5rem;
    font-weight: 800;
}

/* Chart Column */
.chart-column-light {
    background: #ffffff;
    border-radius: 20px;
    padding: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-box {
    width: 100%;
    height: 100%;
    min-height: 300px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Dynamic Chart Legend --- */
.custom-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
    width: 100%;
    padding: 0 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    flex: 1 1 auto;
    /* Allow flexible sizing */
    min-width: 120px;
    /* Prevent being crushed */
    justify-content: center;
    /* Center content in pill */
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.l-name {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.l-val {
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
    /* Keep value on one line */
}

/* --- Mobile Stack for New Calculator Layout --- */
@media (max-width: 767px) {
    .tool-card-light {
        width: 100%;
        border-radius: 16px;
        margin: 0;
    }

    .tool-header-light {
        padding: 1.25rem 1rem;
        flex-direction: column;
        text-align: center;
    }

    .tool-body-light {
        grid-template-columns: 1fr;
        padding: 1.25rem;
        gap: 2rem;
    }

    .light-inputs {
        gap: 1.25rem;
    }

    .light-results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .chart-box {
        min-height: 250px;
    }

    .res-tile-light {
        padding: 1.25rem;
    }

    .custom-legend {
        flex-direction: column;
        align-items: center;
    }

    .legend-item {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 767px) {
    .footer-col {
        align-items: flex-start !important;
        text-align: left !important;
    }
}

/* --- Cookie Banner --- */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.95);
    /* Slate 900 */
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
    padding: 1.5rem;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    justify-content: center;
}

#cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    color: #cbd5e1;
    flex: 1;
    min-width: 300px;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
}

.btn-text {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-text:hover {
    background: rgba(255, 255, 255, 0.1);
}


/* --- Scroll Progress Ring --- */
.progress-wrap {
    position: fixed;
    left: 30px;
    bottom: 30px;
    height: 46px;
    width: 46px;
    cursor: pointer;
    display: block;
    border-radius: 50px;
    box-shadow: inset 0 0 0 2px rgba(16, 185, 129, 0.2);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 200ms linear;
    background: #ffffff;
}

.progress-wrap.active-progress {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.progress-wrap svg.progress-circle path {
    fill: none;
    stroke: var(--emerald);
    stroke-width: 4;
    transition: stroke-dashoffset 10ms linear;
}

.progress-wrap .arrow-up {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--emerald);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-wrap:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

/* --- Linear Scroll Progress --- */
.scroll-progress-container {
    position: fixed;
    top: 5rem;
    /* Under header (5rem height) */
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    z-index: 999;
    /* Below cookie banner (10001) and mobile menu (1001) but above content */
    pointer-events: none;
}

.scroll-progress-bar {
    height: 100%;
    background: var(--emerald);
    width: 0%;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    transition: width 0.1s ease-out;
}

/* Footer Logo Alignment */
.footer-brand .brand-logo {
    justify-content: flex-start;
}

/* Footer Contact & Socials */
.footer-contact-email {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 1.1rem;
    /* Slightly larger email text */
    display: inline-block;
    margin-top: 0.25rem;
}

.footer-contact-email:hover {
    color: #10b981;
    /* Green on hover */
}

.social-icons-container {
    margin-top: 1.25rem;
    /* Balanced spacing */
    display: flex;
    gap: 1.25rem;
    /* Comfortable gap between icons */
    align-items: center;
}

.social-icon-link {
    color: white;
    font-size: 2rem;
    /* Professional large size (32px) */
    text-decoration: none;
    /* Remove underline */
    transition: all 0.3s ease;
    line-height: 1;
}

.social-icon-link:hover {
    color: #10b981;
    /* Green on hover */
    transform: translateY(-2px);
}