/* ================================================================
   YSP Scenario_3 — tabbed sections
   Progressive enhancement: without the JS, nothing here applies
   (sections only get .ysp-s3t-section/.ysp-s3t-active via JS).
   Accent via custom property — override --ysp-s3t-accent per theme.
   ================================================================ */

:root {
    --ysp-s3t-accent: #1f6f78;       /* page teal */
    --ysp-s3t-accent-ink: #ffffff;
    --ysp-s3t-muted: #64748b;
    --ysp-s3t-border: #d7dee4;
    --ysp-s3t-done: #2d6a38;
}

/* ── Sections: hidden unless active (JS adds the classes) ──────── */
.ysp-s3t-section { display: none; }
.ysp-s3t-section.ysp-s3t-active { display: block; animation: ysp-s3t-in .18s ease-out; }
@keyframes ysp-s3t-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ── Pill bar ──────────────────────────────────────────────────── */
.ysp-s3t-nav {
    display: flex; gap: .5rem; flex-wrap: nowrap; overflow-x: auto;
    padding: .6rem .2rem; margin: 0 0 1rem;
    border-bottom: 2px solid var(--ysp-s3t-border);
    scrollbar-width: thin;
    position: sticky; top: 0; z-index: 30; background: #fff;
}
.ysp-s3t-pill {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center;
    gap: .15rem; min-width: 74px; max-width: 150px;
    padding: .45rem .6rem; cursor: pointer;
    border: 1px solid var(--ysp-s3t-border); border-radius: 10px;
    background: #f8fafc; color: var(--ysp-s3t-muted);
    font: inherit; line-height: 1.15; position: relative;
    transition: background .15s, color .15s, border-color .15s;
}
.ysp-s3t-pill:hover { border-color: var(--ysp-s3t-accent); color: var(--ysp-s3t-accent); }
.ysp-s3t-pill-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 1.7em; height: 1.7em; border-radius: 50%;
    background: #e2e8f0; font-weight: 700; font-size: .95rem;
}
.ysp-s3t-pill-title {
    font-size: .72rem; text-align: center;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; max-width: 140px;
}
.ysp-s3t-pill.is-active {
    background: var(--ysp-s3t-accent); border-color: var(--ysp-s3t-accent);
    color: var(--ysp-s3t-accent-ink);
}
.ysp-s3t-pill.is-active .ysp-s3t-pill-num { background: rgba(255, 255, 255, .22); color: var(--ysp-s3t-accent-ink); }
.ysp-s3t-pill-tick {
    position: absolute; top: -6px; right: -4px; display: none;
    width: 1.15em; height: 1.15em; border-radius: 50%;
    background: var(--ysp-s3t-done); color: #fff;
    font-size: .7rem; line-height: 1.15em; text-align: center;
}
.ysp-s3t-pill.is-visited .ysp-s3t-pill-tick { display: block; }
.ysp-s3t-pill.is-visited { color: #334155; }

/* ── Stepper controls ──────────────────────────────────────────── */
.ysp-s3t-controls {
    display: flex; align-items: center; gap: .8rem;
    margin-top: 1.4rem; padding-top: .9rem;
    border-top: 1px dashed var(--ysp-s3t-border);
}
.ysp-s3t-btn {
    font: inherit; cursor: pointer; border-radius: 10px;
    padding: .5rem 1.1rem; border: 1px solid var(--ysp-s3t-border);
    background: #fff; color: #334155;
}
.ysp-s3t-next {
    margin-left: auto; background: var(--ysp-s3t-accent);
    border-color: var(--ysp-s3t-accent); color: var(--ysp-s3t-accent-ink);
    font-weight: 600;
}
.ysp-s3t-next:hover { filter: brightness(1.08); }
.ysp-s3t-pos { color: var(--ysp-s3t-muted); font-size: .85rem; }

/* ── Mobile ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .ysp-s3t-pill { min-width: 56px; padding: .35rem .45rem; }
    .ysp-s3t-pill-title { display: none; }          /* numbers only on phones */
    .ysp-s3t-btn { padding: .55rem 1rem; }
}

/* ── Print: the whole page, untabbed ───────────────────────────── */
@media print {
    .ysp-s3t-nav, .ysp-s3t-controls { display: none !important; }
    .ysp-s3t-section { display: block !important; }
}