.traffic-light-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.traffic-light-container h1 {
    margin: 0.5rem 0 0.75rem;
    color: #2d3e38;
    font-size: 1.75rem;
    font-weight: 700;
}

.traffic-light-intro {
    color: #5a6b64;
    line-height: 1.55;
    margin: 0 0 1.25rem;
    font-size: 1rem;
}

.traffic-light-legend {
    font-weight: 700;
    padding: 0 0.15em;
    border-radius: 4px;
}

.traffic-light-legend--red {
    background: rgba(248, 113, 113, 0.35);
    color: #7f1d1d;
}

.traffic-light-legend--yellow {
    background: rgba(250, 204, 21, 0.45);
    color: #713f12;
}

.traffic-light-legend--green {
    background: rgba(74, 222, 128, 0.4);
    color: #14532d;
}

.traffic-light-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
}

.traffic-light-swatch {
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.traffic-light-swatch:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.traffic-light-swatch--red {
    background: #fecaca;
    color: #7f1d1d;
    border-color: rgba(185, 28, 28, 0.35);
}

.traffic-light-swatch--yellow {
    background: #fef08a;
    color: #713f12;
    border-color: rgba(161, 98, 7, 0.35);
}

.traffic-light-swatch--green {
    background: #bbf7d0;
    color: #14532d;
    border-color: rgba(21, 128, 61, 0.35);
}

.traffic-light-swatch--clear {
    background: #f1f5f4;
    color: #475569;
    border-color: rgba(94, 133, 120, 0.35);
}

.traffic-light-editor {
    min-height: 280px;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(127, 168, 154, 0.35);
    background: #fafbfa;
    color: #1e293b;
    line-height: 1.55;
    font-size: 1rem;
    outline: none;
    box-sizing: border-box;
}

.traffic-light-editor:focus {
    border-color: rgba(94, 133, 120, 0.65);
    box-shadow: 0 0 0 3px rgba(127, 168, 154, 0.15);
}
