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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: #f5f7fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 20px;
}

.container {
    max-width: 840px;
    width: 100%;
}

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

.subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.toggle-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.toggle-btn {
    padding: 8px 20px;
    border: 2px solid #1e4b69;
    background: #fff;
    color: #1e4b69;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Segoe UI', system-ui, sans-serif;
}

.toggle-btn:hover {
    background: #e8f0f5;
}

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

.methodologies {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.methodology {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: opacity 0.3s, transform 0.3s;
}

.methodology.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    max-height: 0;
    padding: 0;
    overflow: hidden;
}

.methodology h2 {
    color: #1e4b69;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.cascade {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.cascade-step {
    width: 100%;
    display: flex;
    justify-content: center;
}

.step-box {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #fff;
    width: calc(80% - var(--step) * 0px);
    text-align: center;
}

.waterfall-color {
    background: linear-gradient(135deg, #2471a3, #2e86c1);
}

.cascade-arrow {
    color: #2e86c1;
    font-size: 1.2rem;
    line-height: 1;
}

.method-label {
    margin-top: 12px;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sprint-cycles {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.sprint-ring {
    position: relative;
    width: 180px;
    height: 180px;
}

.ring-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: 700;
    color: #1e8449;
    font-size: 0.9rem;
    text-align: center;
    line-height: 1.3;
}

.ring-item {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 52px;
    height: 28px;
    margin: -14px 0 0 -26px;
    background: #27ae60;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(var(--angle)) translateY(-68px) rotate(calc(-1 * var(--angle)));
}

.ring-arrows {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.iteration-labels {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.iter-badge {
    background: #e8f5e9;
    color: #1e8449;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.iter-arrow {
    color: #27ae60;
    font-size: 0.9rem;
}

.iter-dots {
    background: none;
    color: #999;
    font-size: 1rem;
}

.comparison-grid {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    margin-bottom: 20px;
}

.comparison-header {
    background: #1e4b69;
    color: #fff;
    padding: 10px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

.dimension {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.dimension:hover {
    background: #f8fafc;
}

.dimension:last-child {
    border-bottom: none;
}

.dimension.active {
    background: #eef5fa;
}

.dim-label {
    width: 130px;
    padding: 12px 16px;
    font-weight: 600;
    color: #1e4b69;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    border-right: 2px solid #f0f0f0;
    flex-shrink: 0;
}

.dim-values {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.dim-waterfall, .dim-agile {
    padding: 12px 16px;
    font-size: 0.85rem;
    color: #555;
}

.dim-waterfall {
    border-right: 1px solid #f0f0f0;
}

.detail-panel {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    display: none;
    animation: fadeIn 0.3s ease;
}

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

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

.detail-panel h3 {
    color: #1e4b69;
    font-size: 1.1rem;
    margin-bottom: 16px;
    text-align: center;
}

.detail-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.detail-col {
    padding: 16px;
    border-radius: 8px;
}

.waterfall-detail {
    background: #ebf5fb;
    border-left: 3px solid #2e86c1;
}

.agile-detail {
    background: #e8f8f0;
    border-left: 3px solid #27ae60;
}

.detail-col h4 {
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #1e4b69;
}

.detail-col p {
    color: #555;
    font-size: 0.88rem;
    line-height: 1.6;
}

@media (max-width: 600px) {
    .methodologies {
        grid-template-columns: 1fr;
    }

    .detail-columns {
        grid-template-columns: 1fr;
    }

    .dim-label {
        width: 90px;
        font-size: 0.75rem;
        padding: 8px;
    }

    .dim-waterfall, .dim-agile {
        padding: 8px;
        font-size: 0.75rem;
    }

    h1 { font-size: 1.3rem; }
}
