        :root {
            --bg-primary: #f4f7f6;
            --bg-surface: #ffffff;
            --text-main: #0f172a;
            --text-muted: #475569;
            --accent: #059669;
            --accent-light: rgba(5, 150, 105, 0.08);
            --border-color: #cbd5e1;
            --radius: 12px;
            --card-transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease, box-shadow 0.2s ease;
            --global-transition: background-color 0.25s ease, color 0.25s ease;
            --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.02);
            --shadow-md: 0 10px 15px -3px rgba(5, 150, 105, 0.05);
            --logo-grad: linear-gradient(135deg, #059669, #0d9488);
            --max-width: 1440px;
        }

        body.dark-theme {
            --bg-primary: #090d16;
            --bg-surface: #111827;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            --border-color: #334155;
            --accent-light: rgba(13, 148, 136, 0.15);
            --accent: #0d9488;
            --shadow-sm: 0 2px 4px 0 rgba(0, 0, 0, 0.2);
            --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
            --logo-grad: linear-gradient(135deg, #0d9488, #14b8a6);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            -webkit-tap-highlight-color: transparent;
        }

        body {
            background-color: var(--bg-primary);
            color: var(--text-main);
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            transition: var(--global-transition);
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        header {
            background: var(--bg-surface);
            border-bottom: 2px solid var(--border-color);
            padding: 0.75rem 1.5rem;
            position: sticky;
            top: 0;
            z-index: 100;
            box-shadow: var(--shadow-sm);
            height: 60px;
            display: flex;
            align-items: center;
        }

        .header-container {
            width: 100%;
            max-width: var(--max-width);
            margin: 0 auto;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .logo-brand {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            text-decoration: none;
        }

        .logo-icon-box {
            width: 32px;
            height: 32px;
            background: var(--logo-grad);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #ffffff;
            font-size: 1rem;
        }

        .logo-text { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text-main); }
        .logo-text span { font-weight: 400; color: var(--text-muted); }

        .theme-toggle-btn {
            background: transparent;
            border: 1px solid var(--border-color);
            padding: 0.45rem;
            border-radius: 8px;
            cursor: pointer;
            color: var(--text-main);
            transition: var(--global-transition);
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .back-link {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-muted);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85rem;
            margin-bottom: 0.75rem;
            transition: color 0.15s ease;
        }
        .back-link:hover { color: var(--accent); }

        .layout { 
            max-width: var(--max-width); 
            width: 100%; 
            margin: 0 auto; 
            padding: 1.5rem;
            flex: 1;
            display: flex;
            flex-direction: column;
        }

        /* FIXED: Replaced aggressive min-height with a cleaner layout wrapper */
        .top-fold-wrapper {
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            padding-top: 1rem;
            padding-bottom: 5.5rem;
        }

        .calc-grid {
            display: grid; 
            grid-template-columns: 1fr 1fr; 
            gap: 2rem; 
            align-items: stretch;
        }

        .calc-panel {
            background: var(--bg-surface);
            border: 2px solid var(--border-color);
            border-radius: var(--radius);
            padding: 1.75rem;
            box-shadow: var(--shadow-sm);
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }

        .panel-title h1 {
            font-size: 1.6rem;
            font-weight: 800;
            letter-spacing: -0.03em;
            margin-bottom: 0.25rem;
        }
        .panel-title p {
            color: var(--text-muted);
            font-size: 0.9rem;
            line-height: 1.4;
        }

        .input-group {
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .input-group label {
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
        }

        .input-wrapper {
            position: relative;
            display: flex;
            align-items: center;
        }
        .input-wrapper i {
            position: absolute;
            left: 1.1rem;
            color: var(--text-muted);
            font-size: 1rem;
        }
        .input-control {
            width: 100%;
            padding: 0.75rem 1.1rem 0.75rem 2.5rem;
            font-size: 1rem;
            font-weight: 600;
            border: 2px solid var(--border-color);
            border-radius: var(--radius);
            outline: none;
            background: var(--bg-primary);
            color: var(--text-main);
            transition: border-color 0.15s ease, background-color 0.15s ease;
        }
        .input-control:focus {
            border-color: var(--accent);
            background: var(--bg-surface);
        }

        .tip-buttons-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 0.5rem;
            margin-top: 0.15rem;
        }
        .tip-btn {
            padding: 0.55rem;
            font-size: 0.9rem;
            font-weight: 700;
            background: var(--bg-primary);
            border: 2px solid var(--border-color);
            color: var(--text-main);
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .tip-btn:hover {
            border-color: var(--accent);
            color: var(--accent);
        }
        .tip-btn.active {
            background: var(--accent-light);
            border-color: var(--accent);
            color: var(--accent);
        }

        .submit-btn {
            width: 100%;
            padding: 0.9rem;
            font-size: 1rem;
            font-weight: 700;
            border: none;
            border-radius: var(--radius);
            background: var(--logo-grad);
            color: #ffffff;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.6rem;
            box-shadow: 0 4px 12px rgba(5, 150, 105, 0.15);
            transition: all 0.2s ease;
            margin-top: 0.5rem;
        }
        .submit-btn:hover {
            opacity: 0.95;
            transform: translateY(-1px);
            box-shadow: 0 6px 16px rgba(5, 150, 105, 0.25);
        }

        .results-panel {
            background: var(--bg-surface);
            border: 2px solid var(--border-color);
            border-radius: var(--radius);
            padding: 2rem;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            box-shadow: var(--shadow-md);
            overflow: hidden;
            scroll-margin-top: 20px;
        }
        .results-panel::before {
            content: '';
            position: absolute;
            top: 0; left: 0; right: 0; height: 6px;
            background: var(--logo-grad);
        }

        .results-list {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
            height: 100%;
            justify-content: center;
        }
        .result-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px dashed var(--border-color);
            padding-bottom: 1rem;
        }
        .result-row:last-child {
            border-bottom: none;
            padding-bottom: 0;
        }
        .result-label h3 {
            font-size: 1rem;
            font-weight: 700;
            letter-spacing: -0.01em;
        }
        .result-label p {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 0.1rem;
        }
        .result-value {
            font-size: 1.75rem;
            font-weight: 800;
            letter-spacing: -0.04em;
            color: var(--accent);
        }
        .result-value.total-large {
            font-size: 2.25rem;
        }

        .status-pill { 
            display: inline-flex; 
            align-items: center; 
            gap: 0.4rem; 
            font-size: 0.75rem; 
            font-weight: 600; 
            background: var(--bg-primary); 
            border: 1px solid var(--border-color); 
            padding: 4px 10px; 
            border-radius: 6px; 
            color: var(--text-muted); 
            width: fit-content; 
            margin-top: 1.25rem;
        }
        .pulse-dot { width: 6px; height: 6px; background-color: var(--accent); border-radius: 50%; }

        /* Guide & Discussion Content Section styling */
        .info-section {
            border-top: 2px solid var(--border-color);
            padding: 3rem 0;
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }
        .info-section h2 {
            font-size: 1.5rem;
            font-weight: 800;
            letter-spacing: -0.03em;
            color: var(--text-main);
        }
        .info-content {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 3rem;
            line-height: 1.6;
            font-size: 1rem;
            color: var(--text-main);
        }
        .text-block {
            display: flex;
            flex-direction: column;
            gap: 1.25rem;
        }
        .text-block h3 {
            font-size: 1.2rem;
            font-weight: 700;
            margin-top: 0.5rem;
            color: var(--text-main);
        }
        .text-block p {
            color: var(--text-muted);
        }
        .text-block ul {
            list-style: none;
            padding-left: 0;
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
            margin: 0.5rem 0;
        }
        .text-block li {
            position: relative;
            padding-left: 1.5rem;
            color: var(--text-muted);
        }
        .text-block li::before {
            content: "•";
            color: var(--accent);
            font-weight: bold;
            font-size: 1.2rem;
            position: absolute;
            left: 0;
            top: -2px;
        }
        blockquote {
            background: var(--bg-primary);
            border-left: 4px solid var(--accent);
            padding: 1.25rem;
            border-radius: 0 var(--radius) var(--radius) 0;
            color: var(--text-muted);
            font-style: italic;
        }
        
        /* Guide Sidebar/Table Structure */
        .info-sidebar {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }
        .info-card {
            background: var(--bg-surface);
            border: 2px solid var(--border-color);
            border-radius: var(--radius);
            padding: 1.5rem;
        }
        .info-card h4 {
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 1rem;
        }
        .standard-table {
            width: 100%;
            border-collapse: collapse;
            text-align: left;
            font-size: 0.9rem;
        }
        .standard-table th, .standard-table td {
            padding: 0.6rem 0.5rem;
            border-bottom: 1px solid var(--border-color);
        }
        .standard-table th {
            font-weight: 700;
            color: var(--text-main);
        }
        .standard-table td {
            color: var(--text-muted);
        }

        /* Similar Calculators Styling from main.html */
        .similar-section {
            border-top: 2px solid var(--border-color);
            padding-top: 3rem;
        }
        .similar-section h2 {
            font-size: 0.85rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 1.5rem;
        }
        .tools-container { 
            display: grid; 
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
            gap: 1.5rem; 
        }
        .tool-card {
            background: var(--bg-surface); border: 2px solid var(--border-color); border-radius: var(--radius); padding: 1.5rem; color: inherit; display: flex; flex-direction: column; position: relative; transition: var(--card-transition);
        }
        .tool-card:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: var(--shadow-md); }
        .tool-card-link { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 1rem; height: 100%; width: 100%; }
        .tool-icon { width: 46px; height: 46px; background: var(--accent-light); color: var(--accent); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; }
        .tool-info h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; }
        .tool-info p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

        @media (max-width: 900px) {
            .top-fold-wrapper { padding-bottom: 1rem; }
            .calc-grid { grid-template-columns: 1fr; gap: 1.5rem; }
            .layout { padding: 1rem; }
            .calc-panel, .results-panel { padding: 1.5rem; }
            .info-content { grid-template-columns: 1fr; gap: 2rem; }
            .tools-container { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
        }

        @media (max-width: 480px) {
            .tip-buttons-grid { grid-template-columns: repeat(2, 1fr); }
            .calc-panel, .results-panel { padding: 1.25rem; }
            .result-row { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
            .result-value { align-self: flex-end; }
            .tools-container { grid-template-columns: 1fr; }
        }

        @media (min-width: 1201px) {
            /* Ensures no strange stretching occurs on Ultra-wide / Cinema configurations */
            .calc-grid { max-height: 520px; }
        }


        /* Footer Section Styling */
        footer {
            background: var(--bg-surface);
            border-top: 2px solid var(--border-color);
            padding: 2.5rem 1.5rem;
            margin-top: auto;
        }

        .footer-container {
            max-width: var(--max-width);
            margin: 0 auto;
            color: var(--text-muted);
            font-size: 0.95rem;
            line-height: 1.6;
            text-align: center;
        }

        .footer-links {
            display: flex;
            justify-content: center;
            gap: 1.5rem;
            margin-bottom: 1rem;
            list-style: none;
            padding: 0;
        }

        .footer-links a {
            color: var(--text-muted);
            text-decoration: none;
            transition: color 0.15s ease;
        }

        .footer-links a:hover {
            color: var(--accent);
        }

        .copyright {
            font-size: 0.875rem;
        }

       @media (min-width: 1025px) and (max-width: 1600px) {
            body {
                zoom: 75%;
            }
        }

