* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f5f7fa;
    color: #1e4b69;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 880px;
    margin: 0 auto;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e4b69;
    margin-bottom: 4px;
    text-align: center;
}

.subtitle {
    text-align: center;
    color: #5a7a8a;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.journey-section {
    margin-bottom: 24px;
}

.journey-section h3 {
    font-size: 0.95rem;
    color: #1e4b69;
    margin-bottom: 10px;
}

.journey-timeline {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1px solid #d1dde5;
    border-radius: 10px;
    padding: 14px 18px;
    overflow-x: auto;
}

.journey-step {
    display: flex;
    align-items: center;
    gap: 0;
    flex-shrink: 0;
}

.step-dot {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    line-height: 1.1;
    flex-shrink: 0;
}

.step-connector {
    width: 40px;
    height: 2px;
    background: #c0d0da;
    flex-shrink: 0;
    position: relative;
}

.step-connector::after {
    content: '\25B6';
    position: absolute;
    right: -4px;
    top: -7px;
    font-size: 0.6rem;
    color: #c0d0da;
}

.step-label {
    font-size: 0.72rem;
    color: #5a7a8a;
    text-align: center;
    margin-top: 4px;
    position: absolute;
    bottom: -18px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.step-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.chart-section {
    margin-bottom: 16px;
}

.chart-section h3 {
    font-size: 0.95rem;
    color: #1e4b69;
    margin-bottom: 10px;
}

.model-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.model-btn {
    padding: 6px 14px;
    border: 2px solid #d1dde5;
    border-radius: 20px;
    background: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1e4b69;
    cursor: pointer;
    transition: all 0.2s;
}

.model-btn:hover {
    border-color: #1e4b69;
    background: #edf2f7;
}

.model-btn.active {
    background: #1e4b69;
    color: #fff;
    border-color: #1e4b69;
}

.chart-area {
    background: #fff;
    border: 1px solid #d1dde5;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(30,75,105,0.06);
}

.bar-group {
    margin-bottom: 14px;
}

.bar-group-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #1e4b69;
    margin-bottom: 4px;
}

.bar-track {
    height: 28px;
    background: #edf2f7;
    border-radius: 4px;
    display: flex;
    overflow: hidden;
    position: relative;
}

.bar-segment {
    height: 100%;
    transition: all 0.4s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.bar-segment-text {
    font-size: 0.68rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    pointer-events: none;
}

.bar-group.dimmed .bar-track {
    opacity: 0.3;
}

.bar-group.highlighted .bar-track {
    box-shadow: 0 0 0 2px #1e4b69;
    border-radius: 4px;
}

.legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    justify-content: center;
    margin-top: 14px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    color: #3a6a82;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
}

.tooltip {
    position: fixed;
    background: #1e4b69;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.78rem;
    max-width: 250px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    line-height: 1.4;
}

.tooltip.visible {
    opacity: 1;
}

@media (max-width: 600px) {
    .model-selector {
        gap: 4px;
    }

    .model-btn {
        padding: 4px 10px;
        font-size: 0.72rem;
    }

    .step-dot {
        width: 34px;
        height: 34px;
        font-size: 0.6rem;
    }

    .step-connector {
        width: 24px;
    }
}
