/* ============================================================
   scope.css — styles ONLY for the /scope/ page additions.
   Loaded AFTER style.css and programs.css (the comparison
   component lives in programs.css and is reused here).
   Currently contains: the interactive scope checker.
   ============================================================ */

.scope-section {
    padding: 4rem 0;
    background: #fff;
}

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

.scope-section h2 {
    text-align: center;
    margin-bottom: 0.75rem;
}

.scope-section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: #5a6a7a;
}

/* ---------- Status colors (single source of truth) ---------- */
.scope-status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.scope-status-dot.in     { background: #2e9e5b; }
.scope-status-dot.varies { background: #e6a817; }
.scope-status-dot.out    { background: #d64545; }

/* ---------- Filter chips ---------- */
.scope-filters {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.scope-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.55rem 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 999px;
    background: #fff;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
}

.scope-filter:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.scope-filter.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.scope-filter.active .scope-status-dot {
    outline: 2px solid rgba(255, 255, 255, 0.7);
}

/* ---------- Task rows ---------- */
.scope-task {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.scope-task:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.scope-task-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.95rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: 'Sora', sans-serif;
    text-align: left;
}

.scope-task-label {
    flex: 1;
    font-size: 1.02rem;
    font-weight: 600;
    color: #2c3e50;
}

/* Status badge */
.scope-badge {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.scope-badge.in     { background: #e2f4e9; color: #1f7a43; }
.scope-badge.varies { background: #fcf1d7; color: #9a6f0a; }
.scope-badge.out    { background: #fbe4e4; color: #a83232; }

.scope-chevron {
    color: #8a97a5;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.scope-task.open .scope-chevron {
    transform: rotate(180deg);
}

/* Expandable explanation */
.scope-task-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
    border-top: 1px solid transparent;
}

.scope-task.open .scope-task-detail {
    max-height: 220px;
    border-top-color: var(--border-color);
}

.scope-task-detail p {
    margin: 0;
    padding: 0.9rem 1.25rem;
    font-size: 0.95rem;
    color: #4a5a6a;
}

/* Caveat note under the whole component */
.scope-note {
    margin-top: 1.75rem;
    text-align: center;
    font-size: 0.95rem;
    color: #5a6a7a;
}

.scope-note:empty {
    display: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 768px) {
    .scope-task-header {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .scope-badge {
        font-size: 0.72rem;
    }

    .scope-filter {
        font-size: 0.85rem;
        padding: 0.5rem 0.9rem;
    }
}
