        :root {
            --primary-color: #004d40;
            /* Deep Emerald */
            --primary-light: #00796b;
            --accent-color: #26a69a;
            --bg-color: #f8f9fa;
            --card-bg: #ffffff;
            --text-main: #2c3e50;
            --text-muted: #6c757d;
            --border-color: #e9ecef;
            --success-color: #2e7d32;
            --danger-color: #c62828;
            --font-heading: 'Playfair Display', serif;
            --font-body: 'Inter', sans-serif;
        }

        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
            padding: 0;
            font-family: var(--font-body);
            background-color: var(--bg-color);
            color: var(--text-main);
            line-height: 1.6;
        }

        h1,
        h2,
        h3,
        h4,
        h5,
        h6 {
            font-family: var(--font-heading);
            color: var(--primary-color);
            margin-top: 0;
        }

        .container {
            max-width: 1200px;
            margin: 40px auto;
            padding: 0 20px;
        }

        .header {
            text-align: center;
            margin-bottom: 40px;
        }

        .header h2 {
            font-size: 2.5rem;
            margin-bottom: 10px;
        }

        .card {
            background: var(--card-bg);
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
            padding: 30px;
            margin-bottom: 30px;
            border: 1px solid rgba(0, 0, 0, 0.02);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .card:hover {
            box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
        }

        .section-title {
            font-size: 1.5rem;
            border-bottom: 2px solid var(--border-color);
            padding-bottom: 10px;
            margin-bottom: 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        /* Buttons */
        button {
            font-family: var(--font-body);
            font-weight: 500;
            cursor: pointer;
            border: none;
            border-radius: 6px;
            transition: all 0.2s;
        }

        .btn-primary {
            background-color: var(--primary-color);
            color: white;
            padding: 12px 24px;
            font-size: 1rem;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        }

        .btn-primary:hover {
            background-color: var(--primary-light);
            transform: translateY(-1px);
        }

        .ticker-btn {
            background-color: white;
            border: 1px solid var(--border-color);
            color: var(--text-main);
            padding: 10px 15px;
            font-size: 0.9rem;
        }

        .ticker-btn:hover,
        .ticker-btn.active {
            background-color: var(--primary-color);
            color: white;
            border-color: var(--primary-color);
        }

        /* Forms */
        label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            font-size: 0.9rem;
            color: var(--text-main);
        }

        input[type="number"],
        input[type="text"] {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-family: var(--font-body);
            font-size: 1rem;
            transition: border-color 0.2s;
        }

        input[type="number"]:focus,
        input[type="text"]:focus {
            outline: none;
            border-color: var(--primary-color);
            box-shadow: 0 0 0 3px rgba(0, 77, 64, 0.1);
        }

        /* Hide Spinners */
        input[type=number]::-webkit-inner-spin-button,
        input[type=number]::-webkit-outer-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        input[type=number] {
            -moz-appearance: textfield;
            /* Firefox */
            appearance: textfield;
        }

        /* Grid Layouts */
        .grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .grid-3 {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
        }

        .grid-4 {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
            gap: 10px;
        }

        /* Tables */
        table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.9rem;
        }

        th {
            text-align: right;
            padding: 12px;
            background-color: #f8f9fa;
            color: var(--text-muted);
            font-weight: 600;
            border-bottom: 2px solid var(--border-color);
        }

        th:first-child {
            text-align: left;
        }

        td {
            padding: 12px;
            border-bottom: 1px solid var(--border-color);
            text-align: right;
        }

        td:first-child {
            text-align: left;
            font-weight: 500;
        }

        tr:hover td {
            background-color: #f1f3f5;
        }

        /* Info Icon */
        .info-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background-color: var(--border-color);
            color: var(--text-muted);
            font-size: 11px;
            font-weight: bold;
            cursor: pointer;
            margin-left: 6px;
            vertical-align: middle;
        }

        .info-icon:hover {
            background-color: var(--primary-color);
            color: white;
        }

        /* Guides */
        .guides-container {
            margin-top: 8px;
            font-size: 0.8rem;
            background: #f8f9fa;
            padding: 10px;
            border-radius: 6px;
            border: 1px solid var(--border-color);
            display: none;
        }

        .guide-item {
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 4px;
            transition: background 0.1s;
            display: flex;
            justify-content: space-between;
        }

        .guide-item:hover {
            background-color: #e9ecef;
            color: var(--primary-color);
        }

        /* Modal */
        .modal {
            display: none;
            position: fixed;
            z-index: 1000;
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(4px);
        }

        .modal-content {
            background-color: white;
            margin: 10% auto;
            padding: 30px;
            border-radius: 12px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
            position: relative;
        }

        .close-btn {
            position: absolute;
            right: 20px;
            top: 20px;
            font-size: 24px;
            color: var(--text-muted);
            cursor: pointer;
            line-height: 1;
        }

        .close-btn:hover {
            color: var(--text-main);
        }

        /* Utility */
        .text-muted {
            color: var(--text-muted);
        }

        .mt-20 {
            margin-top: 20px;
        }

        .mb-20 {
            margin-bottom: 20px;
        }

        .d-none {
            display: none;
        }

        /* Charts */
        .chart-wrapper {
            position: relative;
            height: 300px;
            width: 100%;
            margin-top: 20px;
        }

        /* --- SLIDER & GHOST BARS --- */
        .slider-container {
            position: relative;
            margin-top: 10px;
            margin-bottom: 30px;
            /* Space for ghost bars */
        }

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

        input[type=range] {
            -webkit-appearance: none;
            appearance: none;
            width: 100%;
            background: transparent;
        }

        input[type=range]::-webkit-slider-thumb {
            -webkit-appearance: none;
            height: 20px;
            width: 20px;
            border-radius: 50%;
            background: var(--primary-color);
            cursor: pointer;
            margin-top: -8px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
            border: 2px solid white;
        }

        input[type=range]::-webkit-slider-runnable-track {
            width: 100%;
            height: 4px;
            cursor: pointer;
            background: #e0e0e0;
            border-radius: 2px;
        }

        input[type=range]:focus {
            outline: none;
        }

        .guide-chart-container {
            width: 100%;
            margin-top: 10px;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .guide-row {
            display: flex;
            align-items: center;
            font-size: 0.75rem;
            color: var(--text-muted);
            cursor: pointer;
            padding: 2px 0;
        }

        /* Special styling for the ERP Slider to show non-linear scale */
        #erpSlider::-webkit-slider-runnable-track {
            background: linear-gradient(to right, #e0e0e0 0%, #e0e0e0 75%, #ffccbc 75%, #ffccbc 100%);
        }

        .guide-row:hover {
            background-color: #f1f3f5;
            border-radius: 4px;
        }

        .guide-label {
            width: 140px;
            flex-shrink: 0;
            text-align: right;
            padding-right: 10px;
        }

        .guide-bar-track {
            flex-grow: 1;
            position: relative;
            height: 12px;
            background: rgba(0, 0, 0, 0.03);
            border-radius: 2px;
            overflow: hidden;
            /* Prevent bars from sticking out */
        }

        /* Zero line marker - position set dynamically via JS */
        .guide-zero-line {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 1px;
            background: #ccc;
            z-index: 1;
        }

        .guide-bar {
            position: absolute;
            top: 2px;
            bottom: 2px;
            background-color: #90a4ae;
            /* Default neutral */
            border-radius: 2px;
            transition: width 0.3s;
        }

        .guide-row:hover .guide-bar {
            background-color: var(--primary-color);
        }

        .guide-value-text {
            width: 50px;
            flex-shrink: 0;
            padding-left: 10px;
            font-weight: 600;
        }

        /* --- FINE TUNE & CHART LAYOUT --- */
        .growth-section-grid {
            display: grid;
            /* Equal width columns, stack when < 320px available per column */
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 30px;
            align-items: start;
        }

        .fine-tune-toggle {
            color: var(--primary-color);
            font-size: 0.9rem;
            cursor: pointer;
            text-decoration: underline;
            margin-top: 10px;
            display: inline-block;
        }

        .fine-tune-content {
            display: none;
            margin-top: 15px;
            padding: 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border: 1px solid var(--border-color);
        }

        .fine-tune-content.show {
            display: block;
            animation: fadeIn 0.3s;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* --- COST OF CAPITAL REVAMP --- */
        .hurdle-rate-card {
            background: white;
            border-radius: 12px;
            padding: 25px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
            margin-top: 30px;
            border: 1px solid var(--border-color);
        }

        .hurdle-header {
            text-align: center;
            margin-bottom: 20px;
        }

        .hurdle-equation {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            font-family: var(--font-heading);
            font-size: 1.1rem;
            color: var(--text-muted);
            margin-bottom: 30px;
            flex-wrap: wrap;
        }

        .hurdle-equation span.highlight {
            color: var(--primary-color);
            font-weight: 700;
            background: #e0f2f1;
            padding: 4px 8px;
            border-radius: 6px;
        }

        .hurdle-visual-container {
            display: flex;
            gap: 40px;
            align-items: flex-end;
            height: 350px;
            padding: 20px;
            background: #f8f9fa;
            /* Light grey bg for contrast */
            border-radius: 12px;
            position: relative;
        }

        /* The Stacked Bar */
        .stacked-bar-wrapper {
            width: 120px;
            height: 100%;
            display: flex;
            flex-direction: column-reverse;
            /* Build from bottom */
            position: relative;
            margin: 0 auto;
            /* Center it */
        }

        .bar-segment {
            width: 100%;
            transition: height 0.3s ease, background-color 0.3s;
            position: relative;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.9rem;
            border-radius: 4px;
            margin-bottom: 2px;
            /* Tiny gap */
            cursor: default;
        }

        .bar-segment:hover::after {
            content: attr(data-tooltip);
            position: absolute;
            left: 130px;
            background: rgba(0, 0, 0, 0.8);
            color: white;
            padding: 5px 10px;
            border-radius: 4px;
            font-size: 0.8rem;
            white-space: nowrap;
            z-index: 10;
        }

        .bar-safe {
            background-color: #b0bec5;
            /* Blue Grey */
        }

        .bar-market {
            background-color: var(--accent-color);
            /* Teal */
        }

        .bar-levered {
            background-color: var(--primary-color);
            /* Deep Emerald */
        }

        .bar-levered-negative {
            /* Special handling for Beta < 1 */
            position: absolute;
            right: -100%;
            /* Flush against the side */
            width: 100%;
            background-color: var(--danger-color);
            /* Red indicating reduction */
            opacity: 0.9;
            border-left: 1px solid white;
            /* Visual separation */
        }

        /* Controls Section (Right Side) */
        .hurdle-controls {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            gap: 25px;
        }

        .control-group {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid var(--border-color);
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.03);
        }

        .control-header {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-weight: 600;
            color: var(--text-main);
        }

        .control-value {
            font-family: monospace;
            font-size: 1.1rem;
            color: var(--primary-color);
        }

        /* --- TOGGLE SWITCH --- */
        .switch {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 20px;
            vertical-align: middle;
        }

        .switch input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider {
            position: absolute;
            cursor: pointer;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background-color: #ccc;
            transition: .4s;
            border-radius: 20px;
        }

        .slider:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 2px;
            bottom: 2px;
            background-color: white;
            transition: .4s;
            border-radius: 50%;
        }

        input:checked+.slider {
            background-color: var(--primary-color);
        }

        input:focus+.slider {
            box-shadow: 0 0 1px var(--primary-color);
        }

        input:checked+.slider:before {
            transform: translateX(20px);
        }

        /* --- UTILITIES --- */
        .table-responsive {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
            border: 1px solid var(--border-color);
            /* Optional: explicit boundary */
            border-radius: 6px;
        }

        /* --- MOBILE RESPONSIVENESS --- */
        @media (max-width: 768px) {
            .container {
                margin: 20px auto;
                padding: 0 15px;
            }

            .header h2 {
                font-size: 2rem;
            }

            /* Stack Grids */
            .grid-2,
            .grid-3,
            .growth-section-grid {
                grid-template-columns: 1fr;
                gap: 20px;
            }

            /* Adjust Ticker Grid */
            .grid-4 {
                grid-template-columns: repeat(3, 1fr);
                /* 3 columns on mobile looks decent */
            }

            /* Stack Hurdle Rate Controls & Visuals */
            .hurdle-visual-container {
                flex-direction: column;
                height: auto;
                padding: 15px;
            }

            .stacked-bar-wrapper {
                width: 80px;
                height: 250px;
                /* Fixed height for bar in stacked mode */
                margin-top: 20px;
            }

            /* Reduce padding on cards for small screens */
            .card {
                padding: 20px;
            }

            .section-title {
                flex-direction: column;
                align-items: flex-start;
                gap: 5px;
            }

            #infoPrice {
                font-size: 1.1rem;
            }

            /* Inputs full width in sliders */
            .slider-wrapper {
                flex-direction: column;
                align-items: stretch;
            }

            .slider-wrapper>div:last-child {
                width: 100% !important;
                margin-top: 10px;
            }

            input[type="number"] {
                text-align: left;
            }

            /* Chart wrappers need to be responsive */
            .chart-wrapper {
                height: 200px;
            }
        }