/* ═══════════════════════════════════════════════════════════════════════════
   Progression — Phase 3: Locked rows, context bar, why page, welcome/processing
   All classes prefixed with pgr- to avoid collisions.
   Active only when _isProgressionActive() returns true (new-users mode + not grandfathered).
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Utility ──────────────────────────────────────────────────────────────── */
.pgr-hidden { display: none !important; }

/* ── Context bar (desktop) ────────────────────────────────────────────────── */
.pgr-ctx-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 18px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    font-family: inherit;
    min-height: 34px;
}
.pgr-ctx-bar:hover { background: #f9fafb; }

.pgr-ctx-label {
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pgr-ctx-pulse {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0d9488;
    animation: pgr-breath 3s ease-in-out infinite;
    flex-shrink: 0;
}
@keyframes pgr-breath { 0%,100%{opacity:.45} 50%{opacity:1} }

.pgr-ctx-track {
    display: flex;
    align-items: center;
    width: 170px;
    flex-shrink: 0;
}
.pgr-ctx-node {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    background: #fff;
    flex-shrink: 0;
    transition: background .3s, border-color .3s;
}
.pgr-ctx-seg {
    flex: 1;
    height: 3px;
    background: #e5e7eb;
    transition: background .3s;
}
.pgr-ctx-seg-done { background: #9ca3af; }

.pgr-ctx-next {
    flex: 1;
    min-width: 0;
    font-size: 11.5px;
    color: #6b7280;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pgr-ctx-next em { font-style: normal; font-weight: 700; }

.pgr-ctx-tick {
    font-size: 10.5px;
    font-weight: 700;
    color: #0d9488;
    background: #f0fdfa;
    border: 1px solid rgba(13,148,136,.25);
    padding: 2px 9px;
    border-radius: 999px;
    white-space: nowrap;
    animation: pgr-tick-in .5s ease both;
}
@keyframes pgr-tick-in { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:none; } }

.pgr-ctx-info {
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}
.pgr-ctx-info:hover { color: #6b7280; }

/* ── Locked section row (replaces full section when tier is locked) ─────── */
.pgr-locked-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px 7px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-top: 6px;
    border-top: 1px solid #f3f4f6;
    border-left: 3px solid transparent;
    cursor: pointer;
}
.pgr-locked-row:hover { filter: brightness(.97); }
.pgr-locked-row:first-child { margin-top: 0; border-top: none; }

/* Per-tier locked row colors */
.pgr-locked-amber { border-left-color: rgba(217,119,6,.35); background: rgba(217,119,6,.05); }
.pgr-locked-rose   { border-left-color: rgba(219,39,119,.35); background: rgba(219,39,119,.04); }
.pgr-locked-purple { border-left-color: rgba(147,51,234,.35); background: rgba(147,51,234,.04); }
.pgr-locked-indigo { border-left-color: rgba(99,102,241,.35);  background: rgba(99,102,241,.04); }

.pgr-locked-name {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: .55;
    color: #374151;
}
.pgr-lock-glyph { font-size: 10px; opacity: .5; }

/* ── Progress ring ────────────────────────────────────────────────────────── */
.pgr-ring {
    width: 19px;
    height: 19px;
    border-radius: 50%;
    padding: 2.5px;
    flex-shrink: 0;
    position: relative;
}
.pgr-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 6.5px;
    font-weight: 800;
}
/* Conic fill per color */
.pgr-ring-amber  { background: conic-gradient(#d97706 calc(var(--pgr-p,0) * 1%), #e5e7eb 0); }
.pgr-ring-rose   { background: conic-gradient(#db2777 calc(var(--pgr-p,0) * 1%), #e5e7eb 0); }
.pgr-ring-purple { background: conic-gradient(#9333ea calc(var(--pgr-p,0) * 1%), #e5e7eb 0); }
.pgr-ring-indigo { background: conic-gradient(#6366f1 calc(var(--pgr-p,0) * 1%), #e5e7eb 0); }

.pgr-ring-amber  .pgr-ring-inner { color: #92400e; }
.pgr-ring-rose   .pgr-ring-inner { color: #9d174d; }
.pgr-ring-purple .pgr-ring-inner { color: #6b21a8; }
.pgr-ring-indigo .pgr-ring-inner { color: #4338ca; }

/* Near-completion pulse */
.pgr-ring-near::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    animation: pgr-near-ring 1.6s ease-out infinite;
}
.pgr-ring-amber.pgr-ring-near::after  { border: 2px solid rgba(217,119,6,.4); }
.pgr-ring-rose.pgr-ring-near::after   { border: 2px solid rgba(219,39,119,.4); }
.pgr-ring-purple.pgr-ring-near::after { border: 2px solid rgba(147,51,234,.4); }
.pgr-ring-indigo.pgr-ring-near::after { border: 2px solid rgba(99,102,241,.4); }
@keyframes pgr-near-ring { 0% { transform:scale(.7); opacity:1; } 100% { transform:scale(1.2); opacity:0; } }

/* Chain-locked ring (dashed circle, no fill) */
.pgr-ring-chain {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px dashed #d1d5db;
    flex-shrink: 0;
}

/* ── Journey chip (identity footer) ─────────────────────────────────────── */
.pgr-chip {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 600;
    color: #0d9488;
    background: #f0fdfa;
    border: 1px solid rgba(13,148,136,.2);
    padding: 3px 8px;
    border-radius: 999px;
    margin-left: auto;
    cursor: pointer;
    flex-shrink: 0;
}
.pgr-chip:hover { background: #ccfbf1; }
.pgr-chip-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #d1d5db;
}
.pgr-chip-dot-on { background: #0d9488; }
.pgr-chip-num { margin-left: 2px; }
/* Settled / complete chip — no counter, colored tier dots only */
.pgr-chip-complete {
    gap: 3px;
    padding: 4px 8px;
    border-color: rgba(217,119,6,.25);
    background: rgba(217,119,6,.07);
    color: #d97706;
}
.pgr-chip-complete:hover { background: rgba(217,119,6,.14); }

/* ── Welcome / Processing home state ─────────────────────────────────────── */
.pgr-welcome {
    max-width: 580px;
    margin: 0 auto;
    padding: 36px 24px 44px;
}
.pgr-welcome-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #0d9488;
    text-align: center;
    margin-bottom: 9px;
}
.pgr-welcome-h1 {
    font-size: 24px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -.01em;
    margin-bottom: 11px;
    color: #111827;
}
.pgr-welcome-pitch {
    font-size: 13.5px;
    line-height: 1.65;
    color: #4b5563;
    text-align: center;
    max-width: 440px;
    margin: 0 auto 22px;
}
.pgr-welcome-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 8px;
    padding: 13px 20px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #0d9488, #0891b2);
    color: #fff;
    font-size: 14.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(13,148,136,.28);
}
.pgr-welcome-cta:hover { opacity: .93; }
.pgr-welcome-cta.pgr-processing {
    background: #fff;
    color: #0d9488;
    border: 1.5px solid rgba(13,148,136,.35);
    box-shadow: none;
    cursor: default;
}
.pgr-welcome-note {
    text-align: center;
    font-size: 11.5px;
    color: #9ca3af;
    margin-bottom: 4px;
}
.pgr-link {
    color: #0d9488;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}
.pgr-link:hover { text-decoration: underline; }
.pgr-spin {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 2px solid rgba(13,148,136,.25);
    border-top-color: #0d9488;
    animation: pgr-spin 1s linear infinite;
    flex-shrink: 0;
    display: inline-block;
}
@keyframes pgr-spin { to { transform: rotate(360deg); } }

/* Stepper */
.pgr-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 26px;
}
.pgr-step {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.pgr-step-dim .pgr-step-ring { opacity: .5; }
.pgr-step-dim .pgr-step-dot { filter: grayscale(.7); }
.pgr-step-seg {
    width: 26px;
    height: 3px;
    background: #e5e7eb;
    margin-bottom: 17px;
}
.pgr-step-ring {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    padding: 3px;
    background: #e5e7eb;
}
.pgr-step-dot {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}
.pgr-step-cap {
    font-size: 8.5px;
    font-weight: 700;
    color: #6b7280;
    margin-top: 5px;
    max-width: 56px;
    text-align: center;
    line-height: 1.2;
}
.pgr-step-dim .pgr-step-cap { color: #9ca3af; font-weight: 600; }

/* ── Why page ─────────────────────────────────────────────────────────────── */
.pgr-why {
    max-width: 600px;
    margin: 0 auto;
    padding: 24px 24px 56px;
}
.pgr-why-back {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: 14px;
}
.pgr-why-back:hover { color: #0d9488; }
.pgr-why-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #0d9488;
    text-align: center;
    margin-bottom: 8px;
}
.pgr-why-h1 {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    letter-spacing: -.01em;
    margin-bottom: 10px;
    color: #111827;
}
.pgr-why-body {
    font-size: 13px;
    line-height: 1.65;
    color: #4b5563;
    text-align: center;
    max-width: 480px;
    margin: 0 auto 20px;
}
.pgr-why-body b { color: #1f2937; }

/* Stage-5 trophy banner inside why page */
.pgr-trophy-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: linear-gradient(135deg, rgba(217,119,6,.1), rgba(217,119,6,.03));
    border: 1px solid rgba(217,119,6,.3);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 20px;
    animation: finaleGlow 2.8s ease-in-out infinite;
}
.pgr-trophy-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
    color: #d97706;
    margin-top: 1px;
}
.pgr-trophy-label {
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}
.pgr-trophy-sub {
    font-size: 12px;
    color: #b45309;
    margin-top: 3px;
    line-height: 1.45;
}

/* Context sources grid */
.pgr-ctx-sources {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 24px;
}
.pgr-ctx-src-title {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 10px;
}
.pgr-ctx-src-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.pgr-ctx-src-num {
    font-size: 19px;
    font-weight: 800;
    text-align: center;
    color: #0d9488;
}
.pgr-ctx-src-lbl {
    font-size: 10.5px;
    color: #6b7280;
    text-align: center;
    margin-top: 1px;
    line-height: 1.3;
}

/* Journey nodes */
.pgr-jnode {
    display: flex;
    gap: 14px;
    margin-bottom: 0;
}
.pgr-jnode-rail {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}
.pgr-jnode-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 2px solid #e5e7eb;
    background: #fff;
    z-index: 1;
    flex-shrink: 0;
}
.pgr-jnode-locked .pgr-jnode-dot {
    opacity: .5;
    filter: grayscale(.6);
}
.pgr-jnode-line {
    width: 2px;
    flex: 1;
    background: #e5e7eb;
    min-height: 14px;
    margin: 2px 0;
}
.pgr-jnode-card {
    flex: 1;
    padding: 3px 0 20px;
}
.pgr-jnode:last-child .pgr-jnode-card { padding-bottom: 4px; }
.pgr-jnode-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}
.pgr-jnode-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
}
.pgr-jnode-locked .pgr-jnode-name { color: #9ca3af; }
.pgr-jnode-why {
    font-size: 12px;
    line-height: 1.55;
    color: #4b5563;
    padding: 8px 11px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e5e7eb;
}
.pgr-jnode-why b { font-weight: 700; }

/* Status badges */
.pgr-jstatus {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
}
.pgr-jstatus-prog { color: #4b5563; background: #f3f4f6; }
.pgr-jstatus-locked { color: #9ca3af; background: #f3f4f6; }

/* ── Thoughts finale glow (Phase 4) — applied to New Thoughts section header on unlock ─ */
@keyframes pgr-finale-glow {
    0%   { opacity:0; transform:scale(.97); box-shadow:0 0 0 0 rgba(245,158,11,.0); }
    25%  { opacity:1; transform:scale(1.01); box-shadow:0 0 18px 4px rgba(245,158,11,.35); }
    60%  { transform:scale(1); box-shadow:0 0 10px 2px rgba(245,158,11,.18); }
    100% { opacity:1; transform:none; box-shadow:none; }
}
.pgr-finale-glow {
    animation: pgr-finale-glow .9s ease both;
    border-radius: 6px;
}

/* ── NEW pill (Phase 4 — defined here so it's ready) ─────────────────────── */
.pgr-new-pill {
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .06em;
    padding: 1px 6px;
    border-radius: 999px;
    color: #fff;
    position: relative;
    overflow: hidden;
}
.pgr-new-pill::after {
    content: '';
    position: absolute;
    top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.55), transparent);
    animation: pgr-shimmer 2.2s ease-in-out infinite;
}
@keyframes pgr-shimmer { 0% { left:-60%; } 55%,100% { left:120%; } }

/* ── Section unlock animation (Phase 4 — defined here so it's ready) ─────── */
@keyframes pgr-section-unlock {
    0%  { opacity:0; transform:translateX(-10px); }
    40% { opacity:1; transform:none; }
    100%{ opacity:1; }
}
.pgr-just-unlocked {
    animation: pgr-section-unlock .6s ease both;
    border-radius: 6px;
}

/* ── Unlock banner (Phase 4) ─────────────────────────────────────────────── */
#v4-pgr-banner {
    flex-shrink: 0;
}
.pgr-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 18px 14px 16px;
    background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
    border-bottom: 2px solid #10b981;
    position: relative;
    animation: pgr-banner-in .4s cubic-bezier(.22,1,.36,1) both;
}
@keyframes pgr-banner-in {
    from { opacity: 0; transform: translateY(-14px); }
    to   { opacity: 1; transform: none; }
}
.pgr-banner-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 1px;
}
.pgr-banner-body {
    flex: 1;
    min-width: 0;
}
.pgr-banner-eyebrow {
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #10b981;
    margin-bottom: 2px;
}
.pgr-banner-heading {
    font-size: 15px;
    font-weight: 800;
    color: #111827;
    margin-bottom: 5px;
    letter-spacing: -.01em;
}
.pgr-banner-desc {
    font-size: 12.5px;
    line-height: 1.55;
    color: #4b5563;
    margin-bottom: 8px;
}
.pgr-banner-findings {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 10px;
}
.pgr-banner-finding {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 12px;
    color: #1f2937;
    line-height: 1.4;
}
.pgr-banner-finding::before {
    content: '•';
    color: #10b981;
    font-weight: 900;
    flex-shrink: 0;
}
.pgr-banner-cta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: #10b981;
    color: #fff;
    transition: background .15s;
}
.pgr-banner-cta:hover { background: #059669; }
.pgr-banner-dismiss {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: #9ca3af;
    line-height: 1;
    padding: 2px;
}
.pgr-banner-dismiss:hover { color: #374151; }

/* Thoughts finale banner — amber accent */
.pgr-banner-thoughts {
    background: linear-gradient(135deg, #fff 0%, #fffbeb 100%);
    border-bottom-color: #f59e0b;
}
.pgr-banner-thoughts .pgr-banner-eyebrow { color: #d97706; }
.pgr-banner-thoughts .pgr-banner-cta { background: #f59e0b; }
.pgr-banner-thoughts .pgr-banner-cta:hover { background: #d97706; }
.pgr-banner-thoughts .pgr-banner-finding::before { color: #f59e0b; }

/* Finale five-check row */
.pgr-finale-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    margin-bottom: 10px;
}
.pgr-finale-check {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: #4b5563;
}
.pgr-finale-check-tick {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #f59e0b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    flex-shrink: 0;
}

/* ── Mobile context bar strip ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .pgr-ctx-bar {
        padding: 5px 12px;
        gap: 8px;
    }
    .pgr-ctx-label { display: none; }
    .pgr-ctx-track { width: 90px; }
    .pgr-ctx-next {
        font-size: 10.5px;
    }
    .pgr-ctx-src-grid {
        grid-template-columns: 1fr 1fr;
    }
    .pgr-why { padding: 16px 16px 32px; }
    .pgr-welcome { padding: 26px 18px 28px; }
}
