        /* --- Calculator Specific Styles --- */
        /* Note: Global site colors are inherited where possible, but specific tool styles are preserved here */
        :root {
            --main-color: #1A48EE;
            --secondary-color: #008AFF;
            --tertiary-color: #2c20E6;
            --secondary-background: #f9f9f9;
            --main-background: #e5f3ff;
            --tertiary-background: #e6e5ea;
            --color-white: #ffffff;
            --color-error-dark: #c53030;
            --color-green: #16a34a;
            --color-green-dark: #047857;
            --color-light-green: #D1FAE5;
            --color-contrast-green: #065F46;
            --border-color: #e2e8f0;
            --color-gray: #4a5568;
            --color-light-gray: #ccc;
            --color-very-light-gray: #e0e0e0;
            
            --text-dark: #1a202c;
            --text-muted: #4b5563; 
            --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
            --radius-md: 0.375rem;
            --radius-xl: 0.75rem;
        }

        /* Accessibility Utilities */
        .sr-only {
            position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
            overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0;
        }
        
        /* Robust Focus States */
        button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, span[role="button"]:focus-visible {
            outline: 2px solid var(--main-color);
            outline-offset: 2px;
        }

        /* Tool Container (Renamed from .container to avoid global conflict, but keeps tool layout) */
        .tool-container { max-width: 64rem; margin: 0 auto; padding: 1rem 0; }
        
        .grid-layout { display: grid; gap: 1.5rem; }
        .grid-2-col { display: grid; gap: 1rem; }
        .grid-mini { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 1rem; display: grid; }
        
        @media (min-width: 640px) { .grid-2-col { grid-template-columns: repeat(2, 1fr); } }
        @media (min-width: 1024px) { 
            .grid-layout { grid-template-columns: repeat(3, 1fr); } 
            .col-span-2 { grid-column: span 2; }
        }

        .spacer-bottom { margin-bottom: 3rem; }

        /* --- Header Section --- */
        .page-header { text-align: center; margin-bottom: 2rem; }
        .print-btn-container { display: flex; justify-content: flex-end; margin-bottom: 1rem; }
        .subtitle-text { color: var(--text-muted); max-width: 42rem; margin: 0 auto 1.5rem auto; }
        .controls-container { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
        .controls-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
        .footer-note { font-size: 0.875rem; color: var(--text-muted); }

        /* --- Cards & Styling --- */
        .card {
            background-color: var(--color-white);
            border-radius: 0.75rem;
            box-shadow: var(--shadow-sm);
            border: 1px solid var(--border-color);
            padding: 1.5rem;
            margin-bottom: 1.5rem;
            break-inside: avoid;
        }
        .card-condensed { padding: 1rem; margin-bottom: 0; }
        
        .border-l-purple { border-left: 4px solid var(--tertiary-color); }
        .border-l-blue { border-left: 4px solid var(--main-color); }
        
        .sticky-sidebar { position: sticky; top: 1.5rem; }

        /* --- Headers & Typography --- */
        .tool-container h1 { font-size: 1.875rem; font-weight: 700; color: #111827; margin-bottom: 0.5rem; margin-top: 0; }
        .tool-container h2 { font-size: 1.25rem; font-weight: 700; color: #111827; }
        .tool-container h3 { font-size: 1.125rem; font-weight: 700; color: #111827; margin: 0 0 0.5rem 0; }
        .tool-container h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.5rem; margin-top: 0; }
        
        .section-header { display: flex; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 0.5rem; margin-bottom: 1rem; }
        
        .text-purple { color: var(--tertiary-color); }
        .text-blue { color: var(--main-color); }
        .text-amber { color: #b45309; }
        .text-subtle { font-size: 0.875rem; color: var(--text-muted); }
        .text-label { font-size: 0.875rem; font-weight: 500; color: #374151; display: block; margin-bottom: 0.25rem; }
        .text-label-inline { margin-bottom: 0; margin-right: 0.5rem; }
        .text-xs { font-size: 0.75rem; }
        
        .link-styled { text-decoration: underline; color: var(--main-color); }

        /* --- Inputs & Forms --- */
        .form-group { margin-bottom: 1rem; }
        .form-label-row { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
        .input-wrapper { position: relative; }
        
        /* Standard Inputs */
        input[type="number"], select {
            width: 100%; border: 1px solid var(--border-color); border-radius: var(--radius-md);
            padding: 0.5rem 0.75rem 0.5rem 2rem; font-size: 0.95rem; transition: all 0.2s;
            background-color: #fff; font-family: inherit;
        }
        input[type="number"]:focus, select:focus {
            outline: none; border-color: var(--main-color); box-shadow: 0 0 0 3px rgba(26, 72, 238, 0.15);
        }
        
        /* Header Selects */
        .control-box {
            background-color: var(--color-white); padding: 0.25rem 0.75rem; border-radius: 0.5rem;
            box-shadow: var(--shadow-md); border: 1px solid var(--border-color); display: flex; align-items: center;
        }
        .control-box select {
            padding-left: 0.25rem; border: none; box-shadow: none; background: transparent;
            font-weight: 700; color: var(--main-color); cursor: pointer; width: auto;
        }

        /* Carryover specific inputs */
        .input-carryover { padding-left: 1.5rem; padding-top: 0.25rem; padding-bottom: 0.25rem; font-size: 0.875rem; }
        .label-carryover-row { margin-bottom: 0.25rem; display: flex; justify-content: space-between; font-size: 0.75rem; }
        .label-year { font-weight: 500; }
        .carryover-expiring-label { color: var(--color-error-dark); font-weight: 700; }
        .carryover-expiring-input { background-color: #fef2f2; border-color: #fecaca; }

        .currency-symbol { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; font-weight: 500; }
        .currency-symbol-sm { left: 0.5rem; font-size: 0.75rem; }

        /* --- Buttons --- */
        .btn { padding: 0.5rem 1rem; border-radius: 0.375rem; font-size: 0.875rem; transition: all 0.2s; cursor: pointer; display: inline-flex; align-items: center; }
        .btn-outline { background: white; border: 1px solid var(--border-color); color: var(--color-gray); box-shadow: var(--shadow-sm); }
        .btn-outline:hover { color: var(--main-color); border-color: var(--main-color); }
        .btn-primary { background-color: var(--main-color); color: white; border: 1px solid var(--main-color); }
        .btn-primary:hover { background-color: var(--secondary-color); }
        .btn-text { background: none; border: none; padding: 0; color: var(--main-color); font-size: 0.75rem; cursor: pointer; display: inline-flex; align-items: center; }
        .btn-text:hover { text-decoration: underline; }

        /* Toggle Group */
        .toggle-group { display: inline-flex; background: white; padding: 0.25rem; border-radius: 0.5rem; box-shadow: var(--shadow-md); border: 1px solid var(--border-color); }
        .toggle-btn { padding: 0.5rem 1.5rem; border-radius: 0.375rem; font-size: 0.875rem; font-weight: 500; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--text-muted); }
        .toggle-btn[aria-pressed="true"], .toggle-btn.active { background-color: var(--main-color); color: white; }

        /* --- Results & Charts --- */
        .result-group { margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
        .result-row { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: 0.25rem; }
        .result-val { font-weight: 500; }
        
        .total-box { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border-color); text-align: center; }
        .total-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
        .total-val { font-size: 2rem; font-weight: 700; color: var(--color-green-dark); margin-top: 0.25rem; }
        
        .chart-container { margin-top: 0.75rem; margin-bottom: 1rem; }
        .chart-label { font-size: 0.65rem; text-transform: uppercase; margin-bottom: 0.5rem; color: var(--text-muted); }
        .bar-row { display: flex; align-items: center; margin-bottom: 0.25rem; }
        .bar-label { width: 4rem; text-align: right; font-size: 0.65rem; color: var(--color-gray); margin-right: 0.5rem; }
        .bar-track { flex: 1; height: 0.5rem; background-color: var(--border-color); border-radius: 9999px; overflow: hidden; }
        .bar-fill { height: 100%; border-radius: 9999px; }
        .bar-val { width: 3rem; font-size: 0.65rem; margin-left: 0.5rem; color: #111827; }
        .bg-blue { background-color: var(--secondary-color); }
        .bg-green { background-color: var(--color-green); }

        /* --- Badges & Alerts --- */
        .badge-purple { background: #ede9fe; color: #5b21b6; padding: 0.25rem 0.5rem; border-radius: 0.25rem; font-size: 0.75rem; font-weight: 600; display: inline-block; }
        
        .alert-box { padding: 0.75rem; border-radius: 0.5rem; display: flex; align-items: start; margin-top: 1rem; font-size: 0.875rem; }
        .alert-warning { background-color: #fefce8; border: 1px solid #fef08a; color: #854d0e; }
        .alert-success { background-color: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; margin-top: 0; }
        .alert-error { background-color: #fef2f2; border: 1px solid #fecaca; color: #991b1b; margin-top: 0; }
        .alert-info { background-color: #eff6ff; border-left: 4px solid var(--secondary-color); color: #1e40af; margin-top: 0; }
        .alert-title { display: block; margin-bottom: 0.25rem; font-weight: 700; }
        
        .deminimis-header { display: flex; margin-bottom: 0.5rem; }
        .deminimis-total-row { border-top: 1px solid #bbf7d0; padding-top: 0.75rem; display: flex; justify-content: space-between; }
        .deminimis-total-val { font-size: 1.125rem; font-weight: 700; }

        /* --- Footer & FAQ --- */
        .tool-footer { margin-top: 3rem; border-top: 1px solid var(--border-color); padding-top: 1.5rem; text-align: center; font-size: 0.75rem; color: var(--text-muted); }
        .faq-container { margin-top: 3rem; max-width: 48rem; margin-left: auto; margin-right: auto; }
        .faq-header { text-align: center; margin-bottom: 1.5rem; color: #1f2937; }
        .faq-list { display: flex; flex-direction: column; gap: 1rem; }
        
        /* --- Misc Components --- */
        .icon-wrapper { background-color: #dbeafe; padding: 0.5rem; border-radius: 0.5rem; color: var(--main-color); margin-right: 0.75rem; display: flex; align-items: center; justify-content: center; }
        .icon-sm { width: 16px; height: 16px; display: inline-block; fill: currentColor; vertical-align: middle; margin-right: 0.25rem; }
        .icon-lg { width: 24px; height: 24px; display: inline-block; fill: currentColor; vertical-align: middle; }
        .mr-2 { margin-right: 0.5rem; }

        /* Tooltips */
        .has-tooltip { position: relative; display: inline-block; margin-left: 0.25rem; color: var(--main-color); cursor: help; vertical-align: middle; }
        .tooltip-content { visibility: hidden; position: absolute; z-index: 50; bottom: 140%; left: 50%; transform: translateX(-50%); width: 240px; background-color: #1f2937; color: #fff; text-align: center; padding: 0.75rem; border-radius: 0.375rem; font-size: 0.75rem; opacity: 0; transition: opacity 0.2s; pointer-events: none; }
        .tooltip-content::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px; border-width: 5px; border-style: solid; border-color: #1f2937 transparent transparent transparent; }
        .has-tooltip:focus-within .tooltip-content, .has-tooltip:hover .tooltip-content { visibility: visible; opacity: 1; }
        
        /* Modal */
        .modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
        .modal-content { background: white; padding: 1.5rem; border-radius: 0.5rem; width: 100%; max-width: 28rem; box-shadow: var(--shadow-lg); }
        .modal-actions { display: flex; justify-content: flex-end; gap: 0.75rem; }
        
        /* Tabs */
        .tab-container { display: flex; gap: 0.5rem; border-bottom: 1px solid var(--border-color); margin-bottom: 1rem; }
        .tab-btn { padding: 0.5rem 1rem; background: none; border: none; border-bottom: 2px solid transparent; color: var(--text-muted); font-weight: 500; cursor: pointer; }
        .tab-btn[aria-selected="true"], .tab-btn.active-pass { color: var(--tertiary-color); border-color: var(--tertiary-color); }
        .tab-btn.active-gen { color: var(--main-color); border-color: var(--main-color); }

        /* Utilities */
        .hidden { display: none !important; }
        .print-only { display: none; }
        
        @media print {
            body { background: white; }
            .no-print { display: none !important; }
            .print-only { display: block !important; }
            .grid-layout { display: block; }
            .card { border: 1px solid #ccc; box-shadow: none; margin-bottom: 20px; break-inside: avoid; }
            input { border: none; padding: 0; }
            input[type="number"] { width: auto; text-align: right; }
            .print-center { text-align: center; margin-bottom: 2rem; }
        }