* {
    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;
}

.workflow-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.stage-card {
    flex: 1;
    background: #fff;
    border: 2px solid #e0e8ee;
    border-radius: 10px;
    padding: 16px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    position: relative;
}

.stage-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(30,75,105,0.12);
}

.stage-card.active {
    border-width: 3px;
}

.stage-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
}

.stage-name {
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.stage-artifacts-preview {
    font-size: 0.7rem;
    color: #6a8a9a;
    line-height: 1.3;
}

.arrow-connector {
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #9ab;
    z-index: 2;
    pointer-events: none;
}

.feedback-loop {
    position: relative;
    height: 50px;
    margin-bottom: 20px;
}

.feedback-svg {
    width: 100%;
    height: 50px;
}

.feedback-label {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: #7c3aed;
    font-weight: 600;
    font-style: italic;
    white-space: nowrap;
}

.panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

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

.panel h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e4b69;
    margin-bottom: 8px;
}

.panel div {
    font-size: 0.85rem;
    color: #3a6a82;
    line-height: 1.6;
}

.panel ul {
    margin-top: 6px;
    padding-left: 16px;
}

.panel li {
    margin-bottom: 4px;
}

.tooltip {
    position: fixed;
    background: #1e4b69;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    max-width: 280px;
    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.5;
}

.tooltip.visible {
    opacity: 1;
}

@media (max-width: 700px) {
    .workflow-row {
        flex-wrap: wrap;
    }

    .stage-card {
        flex: 1 1 30%;
    }

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