/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: #f8f9fa;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

/* Header */
header {
    text-align: center;
    padding: 3rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
}

.citation {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-top: 1rem;
    font-style: italic;
}

/* Section Styles */
.section {
    display: none;
    background: white;
    border-radius: 12px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.section.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #667eea;
}

.content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Map Container */
.map-container {
    margin: 3rem 0;
}

.map-container h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

#us-map {
    width: 100%;
    height: 500px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.legend-color {
    width: 30px;
    height: 20px;
    border-radius: 4px;
}

.legend-color.high-friction {
    background: #e74c3c;
}

.legend-color.low-friction {
    background: #3498db;
}

/* Step Navigation */
.step {
    animation: fadeIn 0.5s ease-in;
}

.step-header {
    margin-bottom: 2rem;
}

.step-number {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.step-header h3 {
    font-size: 1.8rem;
    color: #2c3e50;
}

.step-content {
    margin-bottom: 2rem;
}

.visual-container {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

/* T-Account Balance Sheet */
.balance-sheet-t {
    max-width: 700px;
    margin: 2rem auto;
}

.balance-sheet-t h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.t-account {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    border: 2px solid #2c3e50;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.t-side {
    padding: 1.5rem;
}

.t-side.assets {
    border-right: 2px solid #2c3e50;
}

.t-side h5 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: center;
    color: #667eea;
    font-weight: 700;
}

.t-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid #ecf0f1;
}

.t-item.highlighted {
    background: #fff3cd;
    padding: 0.75rem 0.5rem;
    margin: 0 -0.5rem;
    font-weight: 600;
}

.t-total {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    border-top: 2px solid #2c3e50;
    font-weight: 700;
}

.impact-note {
    margin-top: 1rem;
    font-style: italic;
    color: #e74c3c;
    font-weight: 600;
    text-align: center;
}

/* Filing Form */
.filing-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filing-form h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #2c3e50;
}

.filing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.filing-label {
    font-weight: 600;
    color: #555;
}

.filing-value {
    font-size: 1.5rem;
    font-weight: 700;
}

.filing-value.target {
    color: #e74c3c;
}

.filing-value.approved {
    color: #27ae60;
}

.filing-row.pending .filing-value {
    color: #95a5a6;
    font-style: italic;
}

/* Wedge Visualization */
.wedge-visualization {
    margin-top: 2rem;
}

.wedge-label {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e74c3c;
}

.wedge-bar {
    position: relative;
    height: 60px;
}

.wedge-target, .wedge-approved {
    position: absolute;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: white;
    font-weight: 600;
}

.wedge-target {
    background: rgba(231, 76, 60, 0.3);
    border: 2px solid #e74c3c;
}

.wedge-approved {
    background: #27ae60;
    z-index: 2;
}

/* Multi-State Map for Step 4 */
.multi-state-map {
    max-width: 700px;
    margin: 0 auto;
}

.multi-state-map h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

#step4-map {
    width: 100%;
    height: 400px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.map-caption {
    text-align: center;
    font-style: italic;
    color: #555;
    margin-top: 1rem;
}

.insurer-icon {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    margin: 1rem 0;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    border: 2px dashed #667eea;
}

/* Comparison Container */
.comparison-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.state-box {
    flex: 1;
    min-width: 250px;
    padding: 2rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.state-box.california {
    border: 3px solid #e74c3c;
}

.state-box.newyork {
    border: 3px solid #3498db;
}

.state-box h4 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.state-stat {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.stat-label {
    font-weight: 600;
    color: #555;
}

.stat-value {
    font-weight: 700;
}

.stat-value.high {
    color: #e74c3c;
}

.stat-value.low {
    color: #27ae60;
}

.state-stat-vertical {
    text-align: center;
    padding: 1rem 0.75rem;
    margin: 1rem 0 0 0;
    background: #f8f9fa;
    border-radius: 4px;
}

.state-stat-vertical .stat-label {
    display: block;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.75rem;
}

.rate-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.rate-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
}

.rate-value.high {
    color: #e74c3c;
}

.arrow-up {
    font-size: 3rem;
    color: #2c3e50;
    line-height: 1;
}

.arrow-up.high {
    color: #e74c3c;
}

.arrow {
    font-size: 3rem;
    color: #667eea;
    font-weight: bold;
}

.key-insight {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 1.5rem;
    margin-top: 2rem;
    border-radius: 4px;
}

/* Evidence Section - Vertical Column */
.evidence-column {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 2rem 0;
}

.evidence-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.evidence-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.evidence-note {
    margin-top: 1rem;
    font-style: italic;
    color: #555;
    font-size: 0.85rem;
}

/* Spillover Chart */
.spillover-chart {
    background: white;
    padding: 1rem;
    border-radius: 8px;
}

.chart-title {
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 0.9rem;
}

.chart-row {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    gap: 0.5rem;
}

.chart-label {
    flex: 0 0 50%;
    font-size: 0.75rem;
    text-align: right;
}

.bar-positive, .bar-neutral {
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.5rem;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.bar-positive {
    background: #e74c3c;
}

.bar-neutral {
    background: #95a5a6;
}

/* Border Illustration */
.border-illustration {
    display: flex;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    margin: 1rem 0;
}

.border-side {
    flex: 1;
    padding: 1.5rem;
    text-align: center;
}

.border-side.high {
    background: #ffe6e6;
}

.border-side.low {
    background: #e6f2ff;
}

.border-line {
    width: 4px;
    background: #2c3e50;
}

.side-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #555;
    font-size: 0.9rem;
}

.price-change {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0.75rem;
}

.price-change.small {
    color: #e74c3c;
}

.price-change.large {
    color: #3498db;
}

/* Consequences */
.consequences-list {
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

.consequence-item {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.consequence-icon {
    font-size: 1.5rem;
}

.consequence-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #667eea;
    font-size: 0.95rem;
}

.consequence-item p {
    margin: 0;
    font-size: 0.8rem;
}

/* Paper Link */
.paper-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-top: 3rem;
}

.paper-link h3 {
    color: white;
    margin-bottom: 1rem;
}

.paper-link p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.paper-button {
    background: white;
    color: #667eea;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.2s;
    text-decoration: none;
    display: inline-block;
}

.paper-button:hover {
    transform: translateY(-2px);
}

/* Buttons */
.nav-button {
    background: #667eea;
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0.5rem;
}

.nav-button:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.nav-button.prev {
    background: #95a5a6;
}

.nav-button.prev:hover {
    background: #7f8c8d;
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
}

/* Section Navigation Dots */
.section-nav {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    z-index: 1000;
}

.nav-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #bdc3c7;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    padding: 0;
}

.nav-dot:hover {
    transform: scale(1.5);
}

.nav-dot.active {
    background: #667eea;
    transform: scale(1.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .section {
        padding: 1.5rem;
    }

    .comparison-container {
        flex-direction: column;
    }

    .arrow {
        transform: rotate(90deg);
    }

    .evidence-column {
        gap: 1.5rem;
    }

    .section-nav {
        bottom: 1rem;
        top: auto;
        right: 50%;
        transform: translateX(50%);
        flex-direction: row;
    }

    .chart-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .chart-label {
        text-align: left;
    }

    .t-account {
        grid-template-columns: 1fr;
    }

    .t-side.assets {
        border-right: none;
        border-bottom: 2px solid #2c3e50;
    }
}
