
        :root {
            --bg-color: #f8fafc;
            --text-color: #0f172a;
            --text-muted: #64748b;
            --primary-color: #6366f1;
            --primary-hover: #4f46e5;
            --card-bg: #ffffff;
            --border-color: #e2e8f0;
            --border-radius: 20px;
            --box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
            --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', -apple-system, sans-serif; scroll-behavior: smooth; }
        
        body { 
            background: radial-gradient(#cbd5e1 1px, transparent 1px) var(--bg-color); 
            background-size: 24px 24px;
            color: var(--text-color); 
            line-height: 1.6; 
            position: relative;
            z-index: 0;
            overflow-x: hidden;
        }

        /* Ambient Background Mesh Gradients */
        body::before, body::after {
            content: '';
            position: fixed;
            border-radius: 50%;
            z-index: -1;
            filter: blur(140px);
            opacity: 0.35;
            pointer-events: none;
        }

        body::before {
            top: -10%; left: -10%;
            width: 50vw; height: 50vw;
            background: #818cf8; /* Soft Indigo */
            animation: pulse-blob 10s infinite alternate;
        }

        body::after {
            bottom: -10%; right: -10%;
            width: 60vw; height: 60vw;
            background: #f472b6; /* Soft Pink */
            animation: pulse-blob 12s infinite alternate-reverse;
        }

        @keyframes pulse-blob {
            0% { transform: scale(1) translate(0, 0); opacity: 0.35; }
            100% { transform: scale(1.1) translate(30px, 30px); opacity: 0.5; }
        }

        /* Page Load Animation */
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        main, section, footer {
            animation: fadeIn 0.6s ease-out forwards;
        }
        a { text-decoration: none; color: inherit; }
        ul { list-style: none; }

        /* Typography & Layout */
        h1, h2, h3 { font-weight: 700; tracking: tight; }
        .section-title { 
            text-align: center; font-size: 2.5rem; margin-bottom: 3rem; 
            background: linear-gradient(135deg, #0f172a, #64748b);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        
        /* Header */
        header { position: fixed; top: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); z-index: 1000; border-bottom: 1px solid var(--border-color); }
        .nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; }
        .logo { 
            font-size: 1.5rem; font-weight: 900; 
            background: linear-gradient(to right, var(--primary-color), #a855f7);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
        }
        .nav-links { display: flex; gap: 2rem; }
        .nav-links a { position: relative; font-weight: 500; transition: color 0.3s; padding-bottom: 4px; }
        .nav-links a:hover { color: var(--primary-color); }
        .nav-links a::after {
            content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
            background: linear-gradient(to right, var(--primary-color), #a855f7); transition: width 0.3s ease;
        }
        .nav-links a:hover::after { width: 100%; }

        /* Hero */
        .hero { padding: 10rem 2rem 6rem; text-align: center; max-width: 800px; margin: 0 auto; }
        .hero h1 { font-size: 4.5rem; line-height: 1.1; margin-bottom: 1.5rem; letter-spacing: -0.02em; }
        .hero h1 span { 
            background: linear-gradient(135deg, var(--primary-color) 0%, #ec4899 50%, #f59e0b 100%);
            -webkit-background-clip: text; -webkit-text-fill-color: transparent;
            background-size: 200% auto; animation: textShine 4s linear infinite;
        }
        @keyframes textShine { to { background-position: 200% center; } }
        .hero p { font-size: 1.25rem; color: var(--text-muted); margin-bottom: 2.5rem; }

        /* Bento Grid Calculators */
        .calculators-section { padding: 5rem 2rem; background: white; }
        .bento-grid {
            max-width: 1200px; margin: 0 auto; display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); 
            grid-auto-flow: dense; gap: 1.5rem;
        }

        .bento-card {
            background: linear-gradient(145deg, #ffffff, #f8fafc); border-radius: 24px; padding: 1.5rem;
            border: 1px solid var(--border-color); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); transition: var(--transition);
            display: flex; flex-direction: column; align-items: flex-start; height: 100%; overflow: hidden;
            --c-theme: var(--card-theme, var(--primary-color));
            --c-bg: var(--card-bg, #eff6ff);
        }
        .bento-card:hover { transform: translateY(-4px); border-color: var(--c-theme); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05); }
        
        .card-icon { 
            margin-bottom: 1rem; background: var(--c-bg); color: var(--c-theme);
            width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; 
            border-radius: 14px; flex-shrink: 0;
        }
        .card-icon svg { width: 24px; height: 24px; stroke-width: 2; }
        .card-content { flex: 1; display: flex; flex-direction: column; width: 100%; }
        .bento-card h3 { margin-bottom: 0.25rem; font-size: 1.15rem; color: #0f172a; }
        .bento-card p { color: var(--text-muted); margin-bottom: 1rem; flex: 1; font-size: 0.85rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
        
        .btn-use { 
            width: 100%; padding: 0.75rem; background: transparent; color: var(--c-theme); 
            border: 1px solid var(--border-color); border-radius: 10px; font-weight: 600; cursor: pointer; transition: var(--transition); 
            margin-top: auto; font-size: 0.9rem;
        }
        .bento-card:hover .btn-use { background: var(--c-theme); color: white; border-color: var(--c-theme); }

        @media (min-width: 1024px) {
            .bento-grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 250px; }
            
            .bento-card.wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 1.5rem; padding: 2rem; }
            .bento-card.wide .card-icon { width: 70px; height: 70px; margin-bottom: 0; }
            .bento-card.wide .card-icon svg { width: 32px; height: 32px; }
            .bento-card.wide h3 { font-size: 1.4rem; }
            .bento-card.wide p { font-size: 1rem; }
            
            .bento-card.tall { grid-row: span 2; padding: 2rem; }
            .bento-card.tall .card-icon { width: 80px; height: 80px; margin-bottom: 1.5rem; }
            .bento-card.tall .card-icon svg { width: 36px; height: 36px; }
            .bento-card.tall h3 { font-size: 1.4rem; }
            .bento-card.tall p { font-size: 1rem; -webkit-line-clamp: 4; }
            
            .bento-card.large { grid-column: span 2; grid-row: span 2; align-items: center; justify-content: center; text-align: center; padding: 3rem; background: linear-gradient(135deg, var(--c-bg), #ffffff); border: none; }
            .bento-card.large .card-icon { width: 100px; height: 100px; margin-bottom: 1.5rem; background: white; box-shadow: 0 10px 25px rgba(0,0,0,0.05); }
            .bento-card.large .card-icon svg { width: 48px; height: 48px; }
            .bento-card.large h3 { font-size: 2.2rem; margin-bottom: 0.5rem; }
            .bento-card.large p { font-size: 1.1rem; -webkit-line-clamp: 3; margin-bottom: 1.5rem; }
            .bento-card.large .btn-use { background: var(--c-theme); color: white; padding: 1rem; font-size: 1.05rem; border-radius: 12px; border: none; }
            .bento-card.large:hover .btn-use { transform: scale(1.02); opacity: 0.9; }
        }

        /* SPA Page Transition (formerly Modals) */
        .modal-overlay {
            position: fixed; top: 0; left: 0; right: 0; bottom: 0;
            background: #f8fafc; /* Solid page background */
            z-index: 1001; display: none; opacity: 0; transition: opacity 0.3s;
        }
        .modal {
            position: fixed; top: 50%; left: 50%; transform: translate(-50%, -45%) scale(0.95);
            background: white; border-radius: 24px; padding: 2.5rem;
            width: 95%; max-width: 450px; z-index: 1002; display: none; opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1); max-height: 90vh; overflow-y: auto;
            border: 1px solid var(--border-color);
        }
        .modal.show { display: block; opacity: 1; transform: translate(-50%, -50%) scale(1); }
        .modal-overlay.show { display: block; opacity: 1; }
        .modal-header { display: flex; justify-content: center; align-items: center; margin-bottom: 2rem; }
        .modal-header h3 { font-size: 1.5rem; margin: 0; display:flex; align-items:center; gap:0.5rem; color: var(--primary-color); }
        .close-btn { display: none; } /* Hidden in favor of back button */

        /* Form elements inside modals */
        .form-group { margin-bottom: 1rem; }
        .form-group label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.5rem; color: var(--text-muted); }
        .form-group input, .form-group select {
            width: 100%; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 8px; outline: none; font-size: 1rem;
        }
        .form-group input:focus, .form-group select:focus { border-color: var(--primary-color); }
        .calc-result { margin-top: 1.5rem; padding: 1rem; background: #f8fafc; border-radius: 8px; font-size: 1.5rem; font-weight: 700; color: var(--primary-color); text-align: center; border: 1px dashed var(--border-color); word-break: break-all;}
        .calc-sub-result { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-top: 0.5rem; }

        /* Standard Calculator Grid specific */
        .std-calc-display { background: #f8fafc; padding: 1rem; text-align: right; font-size: 2rem; border-radius: 12px; margin-bottom: 1rem; min-height: 80px; word-break: break-all; font-family: monospace; border: 1px solid var(--border-color); }
        .std-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
        .std-calc-btn { padding: 1rem 0; font-size: 1.25rem; border: none; border-radius: 12px; background: #f1f5f9; cursor: pointer; font-weight: 600; transition: var(--transition); }
        .std-calc-btn:hover { background: #e2e8f0; }
        .std-calc-btn.op { background: #eff6ff; color: var(--primary-color); }
        .std-calc-btn.eq { background: var(--primary-color); color: white; grid-column: span 2; }
        .std-calc-btn.clear { color: #ef4444; }

        /* Footer */
        footer { background: #0f172a; color: white; padding: 4rem 2rem 2rem; text-align: center; }
        .footer-content { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; text-align: left; margin-bottom: 3rem; }
        .footer-bottom { padding-top: 2rem; border-top: 1px solid #334155; color: #64748b; font-size: 0.9rem; }

        @media (max-width: 768px) {
            .hero h1 { font-size: 2.5rem; }
            .nav-links { display: none; }
        }

        /* Floating Hero Symbols */
        @keyframes float {
            0% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-20px) rotate(10deg); }
            100% { transform: translateY(0) rotate(0deg); }
        }
        .floating-symbol {
            position: absolute; color: var(--primary-color); opacity: 0.08;
            font-size: 3rem; font-weight: bold; user-select: none; z-index: 0;
            animation: float 6s ease-in-out infinite; pointer-events: none;
        }
        .sym-1 { top: 15%; left: 10%; font-size: 6rem; animation-delay: 0s; }
        .sym-2 { top: 25%; right: 15%; font-size: 5rem; animation-delay: 1s; }
        .sym-3 { bottom: 20%; left: 18%; font-size: 7rem; animation-delay: 2s; }
        .sym-4 { bottom: 25%; right: 22%; font-size: 5.5rem; animation-delay: 1.5s; }
        .sym-5 { top: 50%; left: 5%; font-size: 4.5rem; animation-delay: 3s; }
        .sym-6 { top: 60%; right: 8%; font-size: 6rem; animation-delay: 0.5s; }
        .sym-7 { top: 10%; left: 50%; opacity: 0.05; transform: translateX(-50%); animation-delay: 2.5s; }
        .sym-7 svg { width: 100px; height: 100px; }
    
    /* Standalone Calculator Page Styles */
    .calc-page-body { background: #f8fafc; min-height: 100vh; display: flex; flex-direction: column; margin: 0; }
    .calc-main-container { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding: 10rem 2rem 4rem 2rem; gap: 4rem; }
    .calculator-box {
        background: white; border-radius: 24px; padding: 2.5rem;
        width: 100%; max-width: 450px;
        box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
        border: 1px solid var(--border-color);
    }
    .calculator-box .btn-use {
        background: linear-gradient(135deg, var(--primary-color), #8b5cf6);
        color: white;
        border-radius: 12px;
        padding: 1.25rem;
        font-weight: 700;
        letter-spacing: 0.5px;
        box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
        transition: transform 0.2s, box-shadow 0.2s;
    }
    .calculator-box .btn-use:hover {
        transform: translateY(-2px);
        box-shadow: 0 15px 20px -3px rgba(99, 102, 241, 0.4);
    }
    .calculator-box .btn-use:active {
        transform: translateY(1px);
    }
    .back-link { display: flex; align-items: center; gap: 0.5rem; color: var(--text-color); text-decoration: none; font-weight: 600; }
    .back-link:hover { color: var(--primary-color); }
    \n.btn-use { display: block; text-align: center; text-decoration: none; box-sizing: border-box; }\n
.calc-info { box-sizing: border-box; width: 100%; max-width: 800px; background: white; border-radius: 24px; padding: 3.5rem; box-shadow: 0 10px 25px rgba(0,0,0,0.02); border: 1px solid var(--border-color); color: var(--text-color); margin-bottom: 2rem; margin-left: auto; margin-right: auto; }
.calc-info h2 { 
    margin-bottom: 2rem; font-size: 2.2rem; 
    background: linear-gradient(to right, var(--primary-color), #ec4899);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    padding-bottom: 1rem; border-bottom: 2px solid #f1f5f9;
}
.calc-info h3 { 
    color: #0f172a; margin-top: 2.5rem; margin-bottom: 1.25rem; font-size: 1.4rem; 
    display: inline-block; border-bottom: 2px dashed #cbd5e1; padding-bottom: 0.25rem;
}
.calc-info p { 
    color: var(--text-muted); line-height: 1.8; margin-bottom: 1.5rem; font-size: 1.05rem;
    border-left: 3px solid #e2e8f0; padding-left: 1rem; padding-right: 1.25rem; margin-left: 0.25rem; transition: border-color 0.3s;
}
.calc-info p:hover { border-left-color: var(--primary-color); }
.calc-info li { color: var(--text-muted); line-height: 1.7; margin-bottom: 0.75rem; font-size: 1.05rem; }
.calc-info ul { margin-left: 2rem; margin-bottom: 2rem; list-style-type: square; color: var(--primary-color); }
.calc-info ul li span { color: var(--text-muted); }
.calc-info code { background: #f1f5f9; padding: 0.2rem 0.5rem; border-radius: 4px; color: #ec4899; font-family: 'SFMono-Regular', monospace; font-size: 0.95rem; border: 1px solid #e2e8f0; }

@media (max-width: 768px) {
    .calc-main-container { padding: 7rem 1rem 2rem 1rem !important; gap: 2rem !important; }
    .calculator-box { padding: 1.5rem !important; border-radius: 16px !important; }
    .calc-info { padding: 1.5rem !important; border-radius: 16px !important; }
    .calc-info h2 { font-size: 1.7rem !important; }
    .calc-info h3 { font-size: 1.25rem !important; }
    .calc-info p, .calc-info li { font-size: 1rem !important; }
    .related-section { padding: 0 !important; }
    .related-section h3 { font-size: 1.25rem !important; }
}
