* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
}

body {
    font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
    line-height: 1.6;
    color: #b3e0ff;
    background: #313FA0;
    /* Subtle grid background */
    background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
    overflow: hidden;
}

.container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    position: relative;
    background: transparent;
}

.visualization-container {
    flex: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 2px solid transparent !important;
    border-radius: 18px;
    height: 100vh;
    overflow: visible;
    position: relative;
    padding: 0 60px;
    position: sticky;
    top: 0;
    box-shadow: none !important;
    margin-top: 0;
    box-sizing: border-box;
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.data-table-container {
    flex: 1;
    padding: 200px 20px 20px 20px;
    background: transparent !important;
    border-radius: 18px;
    box-shadow: none !important;
    min-width: 300px;
    max-height: 80vh;
    overflow-y: auto;
    position: sticky;
    top: 0;
    border: 2px solid transparent !important;
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: #b3e0ff !important;
    opacity: 1 !important;
    position: relative;
    padding-top: 200px;
}

.data-table-header {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 8px;
    margin-top: -20px;
    text-align: center;
}

.data-table-header h2 {
    margin: 0;
    flex: 1;
    text-align: center;
    background: radial-gradient(circle at 60% 40%, #3a8dde 0%, #223080 100%);
    color: #fff !important;
    border-radius: 50px;
    padding: 12px 32px;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    text-shadow: 0 0 8px #223080, 0 0 2px #b3e0ff;
    border: 3px solid #7ecbff;
    box-shadow: 0 0 24px #7ecbffcc, 0 0 32px #22308088;
    display: inline-block;
    margin-left: auto;
    margin-right: auto;
}

.data-table-container h2 {
    position: sticky;
    top: 0;
    background: transparent;
    z-index: 2;
    padding: 12px 0 8px 0;
    margin: 0;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    font-weight: bold;
    color: #fff !important;
    letter-spacing: 1px;
    text-shadow: 0 0 8px #223080, 0 0 2px #b3e0ff;
    border-bottom: 2px solid #b3e0ff44;
}

#visualization {
    width: 100%;
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

#visualization svg {
    width: 100%;
    height: 100vh;
    display: block;
    filter: drop-shadow(0 0 8px #b3e0ff55);
}

#comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
    background: #223080 !important;
    color: #fff !important;
    opacity: 1 !important;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 16px #0d1335cc;
}

#comparison-table th {
    background-color: #3146b3 !important;
    color: #fff !important;
    font-weight: bold;
    font-size: 1.1rem;
    position: sticky;
    top: 0;
    z-index: 1;
    border-bottom: 2px solid #b3e0ff44;
}

#comparison-table td {
    background: transparent !important;
    color: #b3e0ff !important;
    font-size: 1rem;
    border: none !important;
    padding: 14px 10px;
}

#comparison-table tr:nth-child(even) td {
    background: #263a8a !important;
}

#comparison-table tr:hover td {
    background: #3756d6 !important;
    color: #fff !important;
    box-shadow: 0 0 8px #b3e0ff88;
}

.node {
    cursor: pointer;
    fill: #fff;
    stroke-width: 3px;
    transition: all 0.15s ease;
    stroke: #b3e0ff !important;
    r: 24px;
    filter: drop-shadow(0 0 8px #b3e0ff88);
    will-change: transform, filter;
}

.node:hover {
    filter: drop-shadow(0 0 12px #b3e0ffcc);
    transform: scale(1.05);
    transition-duration: 0.15s;
}

.node text {
    font-size: 15px;
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: text-after-edge;
    transform: translateY(1.2em);
}

.link {
    fill: none;
    stroke: #fff;
    stroke-opacity: 0.7;
    stroke-width: 1.5px;
    transition: all 0.15s ease;
    stroke: #b3e0ff !important;
    stroke-opacity: 0.6 !important;
    filter: drop-shadow(0 0 6px #b3e0ff88);
    will-change: stroke-opacity, stroke-width, filter;
}

.link:hover {
    stroke-opacity: 0.9 !important;
    stroke-width: 2px !important;
    filter: drop-shadow(0 0 8px #b3e0ffcc);
    transition-duration: 0.15s;
}

.link.active {
    stroke: #fff;
    stroke-opacity: 1;
    stroke-width: 2.5px;
    filter: drop-shadow(0 0 12px #b3e0ffcc);
}

.link.hovered {
    stroke: #fff !important;
    stroke-opacity: 1 !important;
    stroke-width: 2px !important;
}

.link.active.hovered {
    stroke: #fff !important;
    stroke-opacity: 1 !important;
    stroke-width: 2.5px !important;
}

.tooltip {
    position: absolute;
    padding: 12px 16px;
    background: rgba(26, 47, 128, 0.95);
    border: 2px solid #b3e0ff;
    border-radius: 8px;
    pointer-events: none;
    font-size: 14px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: all 0.15s ease;
    will-change: transform, opacity;
}

.tooltip:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.active {
    opacity: 1 !important;
    filter: drop-shadow(0 0 12px #b3e0ffcc) !important;
    stroke-width: 3 !important;
    z-index: 2;
}

.faded {
    opacity: 0.2 !important;
    filter: blur(1px);
    transition: all 0.3s ease;
}

.node.active {
    transform: scale(1.1);
    filter: drop-shadow(0 0 16px #b3e0ffcc) !important;
    transition-duration: 0.15s;
}

.node.hovered {
    filter: drop-shadow(0 0 12px #fff) brightness(1.2);
    stroke-width: 5px !important;
    z-index: 10;
    transform: scale(1.1);
    transition-duration: 0.15s;
}

/* Add icon hover glow for source node icons */
.icon.hovered {
    filter: drop-shadow(0 0 8px #fff) brightness(1.2);
    z-index: 10;
}

.logo-container {
    position: absolute;
    top: -20px;
    left: 20px;
    z-index: 2000;
}

.logo-container img {
    height: 200px;
    width: auto;
    display: block;
}

/* Toggle Switch Styles */
.visualization-toggle {
    position: fixed;
    top: 60px;
    right: 40px;
    margin: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #223080 !important;
    padding: 4px 8px;
    border-radius: 14px;
    box-shadow: 0 0 16px #0d1335cc;
    border: 2px solid #fff !important;
}

.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3146b3;
    transition: .4s;
    border-radius: 14px;
    border: 2px solid #b3e0ff;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 2px;
    background-color: #b3e0ff;
    transition: .4s;
    border-radius: 50%;
    box-shadow: 0 0 8px #b3e0ff88;
}

input:checked + .slider {
    background-color: #b3e0ff;
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #3146b3;
}

.toggle-label {
    font-size: 20px;
    font-weight: bold;
    color: #b3e0ff !important;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
}

.metric-node.enlarged {
    r: 38px !important; /* Increased from 32px to maintain proportion */
    stroke-width: 5px !important;
    filter: drop-shadow(0 0 6px rgba(0,0,0,0.10));
}
.metric-label.enlarged {
    font-size: 16px !important;
    font-weight: bold !important;
    transform: translateY(1.4em);
}

.node.hovered text {
    font-size: 16px;
    font-weight: bold;
    transform: translateY(1.4em);
}

/* Configurator Panel Styles */
.configurator-panel {
    min-width: 180px;
    max-width: 220px;
    margin: 0;
    box-shadow: 0 2px 8px #b3e0ff22;
    border-radius: 12px;
    background: #192a56;
    padding: 10px 10px 6px 10px;
    font-size: 0.95em;
}

.configurator-panel.active {
    display: block;
}

.configurator-header {
    margin-bottom: 20px;
}

.configurator-header h3 {
    color: #fff !important;
    text-shadow: 0 0 8px #223080, 0 0 2px #b3e0ff;
    border-bottom: 2px solid #b3e0ff44;
    padding-bottom: 8px;
    margin-bottom: 15px;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    font-weight: bold;
    letter-spacing: 1px;
}

.preset-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.preset-btn {
    padding: 8px 16px;
    border: 1px solid #b3e0ff !important;
    border-radius: 4px;
    background: rgba(179,224,255,0.08) !important;
    cursor: pointer;
    transition: background 0.2s;
    color: #b3e0ff !important;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
}

.preset-btn:hover {
    background: #b3e0ff22 !important;
}

.slider-container {
    gap: 10px;
    padding: 10px;
}

.slider-group {
    gap: 8px;
    padding: 4px 0;
}

.slider-group label {
    width: 80px;
    font-weight: 500;
    color: #b3e0ff !important;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
}

.slider-group input[type="range"] {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    background: #3146b3;
    border-radius: 3px;
    outline: none;
    box-shadow: 0 0 6px #b3e0ff44;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #b3e0ff !important;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 0 8px #b3e0ff88;
    margin-top: -5px;
}

.slider-group input[type="range"]::-webkit-slider-thumb:hover {
    background: #fff !important;
}

.slider-group input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #b3e0ff !important;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 0 8px #b3e0ff88;
    margin-top: -5px;
}

.slider-group input[type="range"]::-ms-thumb {
    width: 18px;
    height: 18px;
    background: #b3e0ff !important;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    transition: background 0.2s;
    box-shadow: 0 0 8px #b3e0ff88;
    margin-top: -5px;
}

.slider-group input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #3146b3;
    border-radius: 3px;
}

.slider-group input[type="range"]::-ms-fill-lower {
    background: #3146b3;
    border-radius: 3px;
}

.slider-group input[type="range"]::-ms-fill-upper {
    background: #3146b3;
    border-radius: 3px;
}

.slider-value {
    width: 50px;
    text-align: right;
    font-weight: 500;
    color: #b3e0ff !important;
    font-family: 'Fira Mono', 'Consolas', 'Menlo', 'Monaco', monospace;
    background: transparent;
    border: none;
    font-size: 1rem;
    text-shadow: 0 0 4px #223080, 0 0 1px #b3e0ff;
}

.total-display {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-weight: 500;
    text-align: right;
}

/* Configurator Toggle Button */
.configurator-toggle {
    position: static;
    margin-left: 18px;
    top: auto;
    right: auto;
    padding: 8px 16px;
    background: #223080 !important;
    color: #b3e0ff !important;
    border: 2px solid #b3e0ff44 !important;
    border-radius: 14px;
    font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    box-shadow: 0 0 16px #0d1335cc;
}

.configurator-toggle:hover {
    background: #3756d6 !important;
    color: #fff !important;
    box-shadow: 0 0 8px #b3e0ff88;
}

/* Animation for value changes */
@keyframes valueChange {
    0% { color: inherit; }
    50% { color: #f44336; }
    100% { color: inherit; }
}

.value-changed {
    animation: valueChange 1s ease-in-out;
}

.data-table-container {
    position: relative;
}

.nuclear-warning {
    display: none;
    color: #d32f2f;
    font-weight: bold;
    margin-left: 10px;
    font-size: 18px;
    vertical-align: middle;
}
.nuclear-warning.active {
    display: inline;
}

.nuclear-node-warning {
    display: none;
    color: #d32f2f;
    font-weight: bold;
    margin: 10px 0;
    font-size: 18px;
    text-align: center;
}
.nuclear-node-warning.active {
    display: block;
}

.nuclear-tag-warning {
    display: none;
    background: #ffeaea;
    color: #d32f2f;
    border: 1px solid #d32f2f;
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 16px;
    font-weight: bold;
    margin: 18px auto 8px auto;
    text-align: center;
    width: fit-content;
    font-family: Helvetica, Arial, sans-serif;
}
.nuclear-tag-warning.active {
    display: block;
}

.theme-toggle {
    display: none !important;
}

body.dark-mode {
    display: none;
}
body.light-mode {
    display: none;
}

::-webkit-scrollbar-thumb {
    background: #b3e0ff44 !important;
}

::-webkit-scrollbar {
    background: #313FA0 !important;
}

.data-table-container h2, .configurator-header h3, #comparison-table th, #comparison-table td, .toggle-label, .preset-btn, .slider-group label, .slider-value {
    font-family: 'Product Sans', Arial, Helvetica, sans-serif !important;
}

.pros-cons-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #313FA0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Blueprint grid background */
    background-image: linear-gradient(rgba(255,255,255,0.07) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(255,255,255,0.07) 1px, transparent 1px);
    background-size: 40px 40px;
}
.pros-cons-content {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    width: 90%;
    max-width: 1100px;
    background: transparent;
    border: 2px solid #b3e0ff;
    border-radius: 24px;
    box-shadow: 0 0 32px #0d1335cc;
    padding: 40px 0;
    min-height: 400px;
}
.pros-column, .cons-column {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    padding: 0 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pros-column ul, .cons-column ul {
    width: 100%;
    margin-top: 18px;
}
.icon-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-width: 200px;
    max-width: 240px;
    gap: 18px;
    margin-top: 0;
}
#pros-cons-icon img {
    width: 90px;
    height: 90px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px #b3e0ffcc);
    margin-bottom: 10px;
}
#pros-cons-title {
    color: #fff;
    font-size: 1.5rem;
    font-family: 'Product Sans', Arial, Helvetica, sans-serif;
    margin-top: 10px;
    text-align: center;
    margin-bottom: 18px;
}
.close-pros-cons {
    margin-top: 24px;
    padding: 10px 28px;
    background: #b3e0ff;
    color: #142850;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Product Sans', Arial, Helvetica, sans-serif;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 8px #0d133544;
    transition: background 0.2s, color 0.2s;
    display: block;
}
.close-pros-cons:hover {
    background: #fff;
    color: #142850;
}
#pros-list li, #cons-list li {
    margin-bottom: 10px;
    font-size: 1.1rem;
    color: #fff;
    text-align: left;
    width: 100%;
}

.mini-metric-circle {
    display: inline-block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    margin-right: 12px;
    vertical-align: middle;
    background: #b3e0ff !important;
    box-shadow: 0 0 12px #b3e0ff, 0 0 0 4px #142850;
    border: 3px solid #fff;
    outline: 2px solid #b3e0ff;
}

.category-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    box-shadow: 0 0 6px #b3e0ff88;
}

.metric-node {
    fill: #223080 !important;
}

/* Icon styles for both source and metric nodes */
.icon {
    pointer-events: none;
    transition: all 0.15s ease;
    filter: drop-shadow(0 0 4px #b3e0ff88);
    opacity: 1 !important;
    z-index: 2;
    will-change: transform, filter;
}

.icon:hover {
    filter: drop-shadow(0 0 12px #fff) brightness(1.2);
    transform: scale(1.1);
}

.metric-group .icon {
    filter: drop-shadow(0 0 4px #b3e0ff88) brightness(1.2);
    opacity: 1 !important;
}

.metric-group:hover .icon {
    filter: drop-shadow(0 0 8px #fff) brightness(1.4);
}

.metric-group.active .icon {
    filter: drop-shadow(0 0 8px #fff) brightness(1.4);
}

.metric-group.faded,
.source-group.faded {
    opacity: 1 !important;
}

.metric-node.faded,
.source-node.faded {
    fill: #223080 !important;
    opacity: 0.15 !important;
}
.icon.faded {
    opacity: 0.15 !important;
}

.metric-group.active,
.source-group.active {
    opacity: 1 !important;
}

.metric-group.faded .metric-node,
.source-group.faded .source-node {
    fill: #223080 !important;      /* faded fill */
    stroke: #b3e0ff !important;    /* keep ring color strong */
    stroke-opacity: 1 !important;  /* keep ring fully visible */
}

.visualization-container.simulator-mode {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 32px;
}
#simulator-chart {
    flex: 1 1 0%;
    min-width: 0;
}
.configurator-panel {
    min-width: 260px;
    max-width: 340px;
    margin: 0;
    box-shadow: 0 2px 8px #b3e0ff22;
    border-radius: 12px;
    background: #192a56;
    padding: 18px 18px 12px 18px;
}

/* iPad and Tablet Responsive Design */
@media screen and (max-width: 1024px) {
    .container {
        flex-direction: column;
        padding: 20px;
    }

    .visualization-container {
        min-height: 70vh;
        height: 70vh;
        padding: 20px;
        margin-top: 20px;
    }

    .data-table-container {
        width: 100%;
        max-height: none;
        margin-top: 20px;
    }

    #visualization {
        height: 600px;
    }

    .node {
        r: 32px; /* Larger touch targets for iPad */
    }

    .node text {
        font-size: 18px; /* Larger font for better readability */
    }

    #comparison-table td,
    #comparison-table th {
        padding: 16px 12px; /* Larger touch targets for table cells */
        font-size: 1.1rem;
    }

    .tooltip {
        font-size: 14px;
        padding: 12px;
    }

    /* Improve touch interaction */
    .node,
    .metric-group,
    .preset-btn,
    .slider-group input[type="range"] {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    /* Adjust pros/cons overlay for iPad */
    .pros-cons-overlay {
        padding: 20px;
    }

    .pros-cons-content {
        width: 90%;
        max-width: 800px;
    }
}

/* iPad Pro and larger tablets */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .visualization-container {
        min-height: 80vh;
        height: 80vh;
    }

    #visualization {
        height: 800px;
    }
}

/* Landscape orientation specific adjustments */
@media screen and (max-width: 1024px) and (orientation: landscape) {
    .container {
        flex-direction: row;
    }

    .visualization-container {
        min-height: 90vh;
        height: 90vh;
    }

    .data-table-container {
        max-height: 90vh;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Increase touch target sizes */
    .node {
        r: 36px !important; /* Even larger touch targets for touch devices */
    }

    .node text {
        font-size: 20px !important;
        transform: translateY(1.4em);
    }

    /* Improve touch feedback */
    .node:active,
    .metric-group:active,
    .preset-btn:active,
    .close-pros-cons:active {
        transform: scale(0.95);
        transition: transform 0.1s ease-out;
    }

    /* Prevent text selection during touch */
    .visualization-container,
    .data-table-container,
    .configurator-panel,
    .pros-cons-overlay {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    /* Improve slider touch interaction */
    .slider-group input[type="range"] {
        height: 24px !important; /* Taller touch target for slider */
        margin: 8px 0;
    }

    .slider-group input[type="range"]::-webkit-slider-thumb {
        width: 28px !important;
        height: 28px !important;
    }

    /* Improve button touch targets */
    .preset-btn {
        padding: 12px 24px !important;
        min-height: 48px;
    }

    .close-pros-cons {
        padding: 14px 32px !important;
        min-height: 52px;
    }

    /* Improve table touch interaction */
    #comparison-table td,
    #comparison-table th {
        padding: 20px 16px !important;
        min-height: 60px;
    }

    /* Add touch feedback for interactive elements */
    .node,
    .metric-group,
    .preset-btn,
    .close-pros-cons,
    .slider-group input[type="range"] {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(179, 224, 255, 0.3);
    }

    /* Improve tooltip positioning for touch */
    .tooltip {
        font-size: 16px !important;
        padding: 16px !important;
        max-width: 200px;
        pointer-events: none;
    }
}

/* Prevent double-tap zoom on touch devices */
* {
    touch-action: manipulation;
}

/* Large Display Optimizations (85-inch and similar large screens) */
@media screen and (min-width: 3840px) {
    body {
        font-size: 18px;
    }
    .container {
        max-width: 3840px;
        margin: 0 auto;
        padding: 40px;
        aspect-ratio: 16/9;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .visualization-container {
        max-width: 1200px;
        max-height: 1200px;
        width: 100%;
        height: 100%;
        margin: 0 auto;
        padding: 40px;
        aspect-ratio: 1/1;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
    }
    #visualization, #visualization svg {
        max-width: 100%;
        max-height: 100%;
        width: 100%;
        height: 100%;
        object-fit: contain;
        margin: 0 auto;
        display: block;
        overflow: visible;
    }
    /* Data table and other elements remain readable */
    .data-table-container {
        padding: 30px;
        min-width: 350px;
        max-width: 400px;
        margin-left: 40px;
    }
    .data-table-container h2 {
        font-size: 28px !important;
        padding: 20px 0;
    }
    #comparison-table th {
        font-size: 24px !important;
        padding: 24px 20px;
    }
    #comparison-table td {
        font-size: 20px !important;
        padding: 20px;
    }
    .visualization-toggle {
        left: 640px;
        bottom: 8px;
        padding: 16px 32px;
    }
    .logo-container img {
        height: 80px;
    }
    .logo-container {
        position: fixed;
        top: 32px;
        left: 32px;
        z-index: 3000;
        background: rgba(49,63,160,0.85);
        padding: 16px 32px;
        border-radius: 18px;
        box-shadow: 0 4px 24px #22308044;
    }
    .container {
        padding: 0;
        margin-top: 80px;
    }
    .visualization-container {
        padding: 0;
        margin-top: 0;
        min-height: 75vh;
        height: 75vh;
    }
    .metric-label {
        font-size: 28px !important;
    }
    .data-table-container h2, #comparison-table th {
        font-size: 32px !important;
    }
}

/* Ultra-wide display optimization */
@media screen and (min-width: 5120px) {
    .container {
        max-width: 5120px;
    }

    .visualization-container {
        padding: 100px;
    }

    .node {
        r: 56px !important;
    }

    .node text {
        font-size: 28px !important;
    }

    .metric-label {
        font-size: 24px !important;
    }
}

.back-button {
    position: absolute;
    top: 16px;
    left: 16px;
    padding: 8px 20px;
    background: #223080;
    color: #b3e0ff;
    border: 2px solid #b3e0ff44;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Product Sans', Arial, Helvetica, sans-serif;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 8px #0d133544;
    z-index: 100;
    transition: background 0.2s, color 0.2s;
}
.back-button:hover {
    background: #3756d6;
    color: #fff;
}

.metric-info-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    margin: 10px 0 10px 0;
    padding: 8px 0 0 0;
    background: none;
    border-radius: 0;
    min-height: unset;
}
.metric-info-main {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}
.metric-info-icon {
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.metric-info-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px #b3e0ffcc);
}
.metric-info-name {
    flex: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1px;
}
.metric-info-desc {
    width: 100%;
    text-align: left;
    font-size: 0.98rem;
    color: #b3e0ff;
    padding: 0 8px;
    margin-top: 2px;
}

.metric-node.pro-highlight {
    filter: drop-shadow(0 0 12px #00ff7f) brightness(1.3);
    stroke: #00ff7f !important;
    stroke-width: 5px !important;
}
.metric-node.con-highlight {
    filter: drop-shadow(0 0 12px #ff3c3c) brightness(1.3);
    stroke: #ff3c3c !important;
    stroke-width: 5px !important;
}

.metric-node.neutral-highlight {
    filter: drop-shadow(0 0 12px #ffe066) brightness(1.2);
    stroke: #ffe066 !important;
    stroke-width: 5px !important;
}

.metric-label {
    font-size: 15px;
    fill: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.15s ease;
    will-change: transform, font-size;
}

.metric-label:hover {
    font-size: 16px;
    font-weight: bold;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.source-label {
    font-size: 13px;
    font-weight: bold;
    fill: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.15s ease;
    will-change: transform, font-size;
}

.source-label:hover {
    font-size: 14px;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.data-table-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    max-height: 100vh;
}

.intro-text {
    position: sticky;
    top: 64px; /* Adjust if your header is a different height */
    z-index: 5;
    background: rgba(34,48,128,0.95);
}

#simulator-container {
    transform: translateY(-50px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.sim-title-pill, .header > p {
    transform: none;
}

/* Add at the end of the file */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    margin-bottom: 24px;
    margin-top: 18px;
    padding-left: 0;
}
.sim-title-pill {
    display: inline-block;
    background: #223080;
    color: #b3e0ff;
    border-radius: 999px;
    padding: 12px 38px;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 12px #22308044, 0 0 0 2px #b3e0ff;
    border: 2px solid #b3e0ff;
}
@media (max-width: 700px) {
    .header-bar {
        flex-direction: column;
        gap: 12px;
        align-items: center;
        justify-content: center;
        margin-bottom: 12px;
        padding-left: 0;
    }
    .sim-title-pill {
        font-size: 20px;
        padding: 8px 18px;
    }
}