        :root{
            --bg: #080c18;
            --card: #10152b;
            --text: #eaf0ff;
            --muted: #9aa6c8;
            --accent: #8a63ff;
            --accent-2: #64e7ff;
            --ring: #2d3b72;
            --radius: 18px;
            --shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.03);
            --success: #2ecc71;
            --panel-bg: #0c1022;
        }

        /* ── Light mode ──────────────────────────────────────────────────────── */
        body.light-mode {
            --bg:     #f0f2fc;
            --card:   #ffffff;
            --text:   #0d1135;
            --muted:  #5c6899;
            --ring:   #cdd3ef;
            --shadow: 0 4px 24px rgba(80,60,180,.1), inset 0 1px 0 rgba(255,255,255,.9);
            --panel-bg: #f5f7ff;
        }
        body.light-mode {
            background:
                radial-gradient(1000px 600px at 20% -10%, rgba(138,99,255,.07), transparent 60%),
                radial-gradient(900px 900px at 120% 20%, rgba(100,231,255,.05), transparent 40%),
                linear-gradient(180deg, #f0f2fc, #e9edf8 70%, #e5eaf6);
        }
        *{box-sizing:border-box}
        html,body{min-height:100%}
        body{
            margin:0;
            font-family: system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
            color:var(--text);
            background: radial-gradient(1000px 600px at 20% -10%, rgba(138,99,255,.18), transparent 60%),
            radial-gradient(900px 900px at 120% 20%, rgba(100,231,255,.12), transparent 40%),
            linear-gradient(180deg, #080c18, #060912 70%, #050811);
            background-attachment: fixed;
            display:flex; flex-direction:column; align-items:stretch; min-height:100vh;
        }
        .wrap{width:min(980px,100%); align-self:center; flex:1 0 auto; padding:28px;}

        header{
            text-align:center;
            margin-bottom:20px;
            position:relative;
        }
        header::after{
            content:'';
            display:block;
            width:100px; height:4px;
            margin:14px auto 0;
            background: linear-gradient(90deg,var(--accent),var(--accent-2));
            border-radius:999px;
        }
        h1{
            font-size:clamp(40px,6vw,64px);
            letter-spacing:4px;
            margin:0;
            background:linear-gradient(90deg,var(--accent),var(--accent-2));
            -webkit-background-clip:text;
            -webkit-text-fill-color:transparent;
            font-weight:900;
            text-transform:uppercase;
        }
        .tagline{
            color:var(--muted);
            font-size:1.05rem;
            margin-top:8px;
            letter-spacing:0.3px;
        }

        .card{
            background:var(--card);
            border:1px solid color-mix(in oklab,var(--ring) 60%,#000 40%);
            border-radius:var(--radius);
            padding:24px;
            box-shadow:var(--shadow);
            position:relative;
        }

        .drop{
            border:1.5px dashed color-mix(in oklab,var(--accent) 55%,#8aa0ff 20%);
            border-radius:calc(var(--radius) - 4px);
            padding:28px;
            display:flex;
            align-items:center;
            gap:18px;
            cursor:pointer;
            background:linear-gradient(180deg,rgba(138,99,255,.05),rgba(100,231,255,.03));
            transition:transform .15s ease,border-color .2s ease;
        }
        .drop:hover{transform:translateY(-1px);border-color:var(--accent)}
        .drop.is-drag-over{transform:translateY(-2px);border-color:var(--accent);border-style:solid;background:color-mix(in oklab,var(--accent) 8%,var(--card))}
        .drop .icon{flex:0 0 56px;height:56px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(145deg,rgba(138,99,255,.25),rgba(100,231,255,.18));border:1px solid rgba(138,99,255,.25)}
        .drop .icon svg{width:28px;height:28px;opacity:.9}
        .drop .txt{display:flex;flex-direction:column;gap:4px}
        .drop .big{font-weight:600}
        .drop .small{color:var(--muted);font-size:.95rem}
        input[type=file]{display:none}

        .drop.is-disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }


        .rows{display:grid;gap:14px;margin-top:20px}
        .row{display:grid;gap:0}
        .row-head .title, .row .title{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.95rem}
        .row .collapsible-body{padding-top:8px}
        .pill{font-size:.75rem;background:rgba(100,231,255,.1);border:1px solid rgba(100,231,255,.25);color:#c7f9ff;padding:4px 8px;border-radius:999px}
        .progress{position:relative;height:14px;background:#0a0f1f;border-radius:999px;overflow:hidden;border:1px solid #172140}
        .progress .bar{position:absolute;inset:0;width:0%;background:linear-gradient(90deg,var(--accent),var(--accent-2))}
        .progress.is-busy .bar{width:40%;animation:indet 1.6s infinite ease-in-out}
        .progress.is-complete .bar{width:100%;background:linear-gradient(90deg,var(--success),var(--accent-2));box-shadow:0 0 10px var(--success);}
        .progress.is-error .bar{width:100%;background:linear-gradient(90deg,#ff5e8a,#ff9966);box-shadow:0 0 10px #ff5e8a;}
        @keyframes indet{0%{left:-40%}50%{left:30%}100%{left:100%}}

        .hint{color:var(--muted);font-size:.9rem;margin-top:16px}

        @media(max-width:520px){
            body:not([data-page="landing"]) { padding: 16px 14px 88px; }
            .drop{align-items:flex-start}.drop .icon{display:none}
        }

        /* Results section */
        .section-title{margin:0 0 10px 0; font-size:1.15rem; letter-spacing:.5px}
        .results{margin-top:22px; position:relative; overflow:hidden;}
        .muted{color:var(--muted)}
        .smallprint{font-size:.9rem}

        /* Stems grid */
        .stems{display:grid; gap:14px}
        .stem{
            background: color-mix(in oklab, var(--card) 92%, black 8%);
            border:1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            border-radius: calc(var(--radius) - 4px);
            padding:14px; box-shadow: var(--shadow);
        }
        .stem.is-missing{ opacity:.5; filter:saturate(.6) }
        .stem-head{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px }
        .stem-title{ margin:0; font-size:1.05rem }
        .stem-wave-row{ display:flex; align-items:center; gap:12px; }
        .stem-wave-row .wave{ flex:1; min-width:0; }
        .stem-play-btn{
            flex-shrink:0;
            width:36px; height:36px; padding:0; border-radius:50%;
            border:1px solid var(--ring); background:rgba(138,99,255,.1);
            color:var(--text); cursor:pointer;
            display:flex; align-items:center; justify-content:center;
            transition:background .15s, border-color .15s;
        }
        .stem-play-btn:hover:not(:disabled){ background:rgba(138,99,255,.25); border-color:var(--accent); }
        .stem-play-btn:disabled{ opacity:.3; cursor:default; pointer-events:none; }

        /* Wave placeholder (no JS) */
        .wave{
            height:64px; border-radius:10px; position:relative; overflow:hidden;
            background:
                    repeating-linear-gradient(
                            90deg,
                            rgba(137,247,254,.15) 0 2px,
                            rgba(137,247,254,.06) 2px 8px
                    );
            outline:1px solid rgba(122,162,255,.22);
        }

        /* Buttons */
        .btn{ appearance:none; border:0; background: linear-gradient(90deg, var(--accent), var(--accent-2)); color:#050a12; font-weight:700; padding:8px 12px; border-radius:999px; cursor:pointer; box-shadow: var(--shadow); transition:opacity .3s ease, transform .2s ease; }
        .btn:hover{opacity:.85; transform:translateY(-1px)}
        .btn:focus-visible{ outline:3px solid rgba(122,162,255,.35) }
        .btn-mini{ text-decoration:none; font-size:.9rem; padding:6px 10px; display:inline-flex; align-items:center; gap:5px }

        /* Transcription box */
        #groupTranscript .collapsible-body {
            background: color-mix(in oklab, var(--card) 92%, black 8%);
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            border-radius: 0 0 calc(var(--radius) - 4px) calc(var(--radius) - 4px);
            box-shadow: var(--shadow);
        }
        #groupTranscript .section-group-head {
            border-radius: calc(var(--radius) - 4px) calc(var(--radius) - 4px) 0 0;
            border-bottom: 0;
        }
        #groupTranscript.is-collapsed .section-group-head {
            border-radius: calc(var(--radius) - 4px);
            border-bottom: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
        }
        .transcribe-head{ display:flex; align-items:center; justify-content:space-between; padding:14px 14px 0 14px }
        .transcribe-body{ padding:12px 14px 16px 14px; line-height:1.6 }
        .transcribe-body p{ margin:0 0 10px 0 }
        .bad{ background: linear-gradient(90deg, #ff5e8a33, #ffd16633); border-bottom:2px solid #ff5e8a99; border-radius:4px; padding:0 .15em }

        /* Results card — compact placeholder until results arrive */
        .results.is-pending {
            padding-bottom: 0;
        }
        .results.is-pending > h2,
        .results.is-pending > p,
        .results.is-pending > .section-group {
            display: none;
        }
        .results.is-pending .results-overlay {
            position: relative;
            inset: auto;
            background: none;
            backdrop-filter: none;
            border-radius: 0;
            padding: 28px 20px;
        }
        .results.is-pending .overlay-content {
            background: none;
            border: none;
            box-shadow: none;
            padding: 0;
        }
        .results.is-pending .overlay-content h2 {
            font-size: 1rem;
            margin: 0;
        }
        .results.is-pending .overlay-content p {
            display: none;
        }

        /* Overlay inside results only */
        .results-overlay {
            position: absolute;
            inset: 0;
            background: rgba(5, 10, 20, 0.85);
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text);
            text-align: center;
            backdrop-filter: blur(6px);
            z-index: 10;
            opacity: 1;
            transition: opacity 1s ease;
        }
        .results-overlay.fade-out {
            opacity: 0;
            pointer-events: none;
        }
        .overlay-content {
            background: rgba(15, 21, 43, 0.8);
            border: 1px solid rgba(122,162,255,0.3);
            border-radius: var(--radius);
            padding: 40px 60px;
            box-shadow: var(--shadow);
            transition: transform 1s ease, opacity 1s ease;
        }
        .results-overlay.fade-out .overlay-content {
            opacity: 0;
            transform: translateY(20px);
        }
        .overlay-content h2 {
            margin: 0 0 10px;
            font-size: 1.4rem;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .overlay-content p {
            color: var(--muted);
            font-size: 0.95rem;
        }

        /* Word hover + fancy overlay ------------------------------------------------- */
        .word {
            position: relative;
            cursor: pointer;
            transition: background 0.2s, color 0.15s ease, text-shadow 0.15s ease;
        }

        .word.is-hovered {
            color: var(--accent-2);
            text-shadow: 0 0 10px rgba(100,231,255,0.6);
        }

        /* Floating tooltip that follows the mouse */
        .word-tooltip {
            position: fixed;
            z-index: 999;
            pointer-events: none;
            padding: 10px 14px;
            border-radius: 12px;
            background:
                    radial-gradient(100% 120% at 0% 0%, rgba(138,99,255,0.35), transparent 70%),
                    radial-gradient(120% 120% at 110% 0%, rgba(100,231,255,0.35), transparent 70%),
                    rgba(5, 9, 20, 0.94);
            border: 1px solid rgba(122,162,255,0.5);
            box-shadow: 0 16px 40px rgba(0,0,0,0.55);
            color: var(--text);
            font-size: 0.84rem;
            backdrop-filter: blur(8px);
            opacity: 0;
            transform: translate3d(0, 4px, 0);
            transition: opacity 0.15s ease, transform 0.15s ease;
            max-width: 260px;
        }

        .word-tooltip.visible {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }

        .word-tooltip-main {
            font-weight: 600;
            margin-bottom: 4px;
            letter-spacing: 0.02em;
        }

        .word-tooltip-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 4px 10px;
            color: var(--muted);
        }

        .word-tooltip-meta span {
            white-space: nowrap;
            font-variant-numeric: tabular-nums;
        }

        .word-tooltip-label {
            opacity: 0.7;
        }

        /* Upload progress (matches existing design) ------------------------------- */
        .uploadProgressWrap{
            margin: 14px 0 10px;
            padding: 14px 14px 12px;
            border-radius: calc(var(--radius) - 4px);
            background: color-mix(in oklab, var(--card) 92%, black 8%);
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            box-shadow: var(--shadow);
            position: relative;
            overflow: hidden;
        }

        /* subtle glow streaks like your header + tooltip */
        .uploadProgressWrap::before{
            content:"";
            position:absolute;
            inset:-60% -40% auto -40%;
            height: 180px;
            background:
                    radial-gradient(60% 120% at 20% 40%, rgba(138,99,255,.22), transparent 70%),
                    radial-gradient(60% 120% at 80% 40%, rgba(100,231,255,.16), transparent 70%);
            pointer-events:none;
            filter: blur(2px);
        }

        .uploadProgressTop{
            position: relative;
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap: 12px;
            margin-bottom: 10px;
        }

        .uploadLabel{
            font-size: .95rem;
            color: var(--muted);
            overflow:hidden;
            white-space:nowrap;
            text-overflow:ellipsis;
            max-width: 78%;
        }

        #uploadFileName{
            color: var(--text);
            font-weight: 650;
        }

        .uploadPct{
            font-variant-numeric: tabular-nums;
            font-size: .9rem;
            color: var(--muted);
        }

        /* Reuse your existing progress styling language */
        .uploadBar{
            position: relative;
            height: 14px;
            border-radius: 999px;
            overflow:hidden;
            background:#0a0f1f;
            border:1px solid #172140;
            box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
        }

        .uploadBarFill{
            position:absolute;
            inset:0;
            width: 0%;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            box-shadow: 0 0 10px rgba(100,231,255,.22);
            transition: width 120ms linear;
        }

        /* Add a tiny "moving shimmer" while uploading */
        .uploadProgressWrap.is-busy .uploadBarFill::after{
            content:"";
            position:absolute;
            inset:0;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent);
            transform: translateX(-40%);
            animation: uploadShimmer 1.2s infinite ease-in-out;
        }

        @keyframes uploadShimmer{
            0%{ transform: translateX(-60%); }
            100%{ transform: translateX(60%); }
        }

        .uploadProgressWrap.is-complete .uploadBarFill{
            background: linear-gradient(90deg, var(--success), var(--accent-2));
            box-shadow: 0 0 10px var(--success);
        }

        .uploadProgressWrap.is-error .uploadBarFill{
            background: linear-gradient(90deg,#ff5e8a,#ff9966);
            box-shadow: 0 0 10px #ff5e8a;
        }

        .uploadMeta{
            position: relative;
            margin-top: 8px;
            font-size: .9rem;
            color: var(--muted);
            font-variant-numeric: tabular-nums;
        }

        .word.is-bad-word {
            background: rgba(255, 60, 60, 0.22);
            border-bottom: 2px solid rgba(255, 60, 60, 0.7);
            border-radius: 6px;
            padding: 0 2px;
            color: #ffb3b3;
        }

        /* Words below threshold — exist but not shooshed */
        .word.is-minor-bad-word {
            opacity: 0.45;
            text-decoration: underline wavy rgba(255,150,80,.5);
            text-underline-offset: 3px;
        }

        /* ── Section group (collapsible wrapper) ──────────────────────────── */
        .section-group {
            margin-top: 20px;
        }
        .section-group-head {
            border-radius: calc(var(--radius) - 4px);
            padding: 10px 14px;
            background: color-mix(in oklab, var(--card) 88%, black 12%);
            border: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
            margin-bottom: 0;
        }

        /* ── Row head (collapsible row toggle line) ───────────────────────── */
        .row-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .row .row-head .title { margin: 0; }
        .row .row-head { margin-bottom: 10px; }

        /* ── Collapsible body ─────────────────────────────────────────────── */
        .collapsible-body {
            overflow: hidden;
            max-height: 20000px;
            transition: max-height .4s ease, opacity .25s ease, margin .25s ease;
            opacity: 1;
        }
        /* Transcript can be very long — don't clip it when expanded */
        #groupTranscript .collapsible-body {
            overflow: visible;
        }
        #groupTranscript.is-collapsed .collapsible-body {
            overflow: hidden;
        }
        .collapsible-row.is-collapsed .collapsible-body {
            max-height: 0;
            opacity: 0;
            margin-top: 0;
        }
        .collapsible-row.is-collapsed .section-group-head,
        .collapsible-row.is-collapsed .row-head {
            border-radius: calc(var(--radius) - 4px);
        }

        /* ── Section toggle chevron button ────────────────────────────────── */
        .section-toggle {
            flex-shrink: 0;
            appearance: none;
            border: 0;
            background: rgba(138,99,255,.08);
            border: 1px solid rgba(138,99,255,.18);
            border-radius: 8px;
            width: 30px;
            height: 30px;
            display: grid;
            place-items: center;
            cursor: pointer;
            transition: background .2s ease, transform .2s ease;
            padding: 0;
        }
        .section-toggle:hover { background: rgba(138,99,255,.2); }
        .section-toggle svg { width: 16px; height: 16px; color: var(--muted); }
        .section-toggle .chevron { transition: transform .3s ease; }
        .collapsible-row.is-collapsed .section-toggle .chevron { transform: rotate(-90deg); }

        /* ── Transcribe head revised ──────────────────────────────────────── */
        .transcribe-head-actions {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        /* ── Shoosh progress bar (thin, top of transcript body) ───────────── */
        .shoosh-progress {
            height: 3px;
            background: #0a0f1f;
            border-radius: 0;
            overflow: hidden;
            position: relative;
        }
        .shoosh-progress-bar {
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            box-shadow: 0 0 8px var(--accent-2);
            width: 40%;
            animation: indet 1.4s infinite ease-in-out;
        }

        /* ── Shoosh slider ────────────────────────────────────────────────── */
        .shoosh-slider-wrap {
            padding: 14px 14px 10px;
            border-bottom: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
        }
        .shoosh-slider-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }
        .shoosh-slider-label {
            font-size: .82rem;
            color: var(--muted);
            letter-spacing: .02em;
        }
        .shoosh-threshold-value {
            font-size: .88rem;
            font-weight: 700;
            font-variant-numeric: tabular-nums;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .shoosh-slider-track {
            position: relative;
            height: 6px;
            border-radius: 999px;
            background: #0a0f1f;
            border: 1px solid #172140;
        }
        .shoosh-slider-track-fill {
            position: absolute;
            left: 0; top: 0; bottom: 0;
            border-radius: 999px;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            box-shadow: 0 0 8px rgba(100,231,255,.3);
            pointer-events: none;
            width: 50%; /* updated by JS */
        }
        .shoosh-slider {
            position: absolute;
            inset: -6px 0;
            width: 100%;
            opacity: 0;
            cursor: pointer;
            height: 18px;
        }
        /* Custom thumb via range-thumb overlay */
        .shoosh-slider-track::after {
            content: '';
            position: absolute;
            top: 50%;
            transform: translate(-50%, -50%);
            left: var(--thumb-pct, 50%);
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent), var(--accent-2));
            box-shadow: 0 0 12px rgba(138,99,255,.6), 0 2px 6px rgba(0,0,0,.5);
            border: 2px solid rgba(255,255,255,.15);
            pointer-events: none;
            transition: box-shadow .15s ease;
        }
        .shoosh-slider-hints {
            display: flex;
            justify-content: space-between;
            margin-top: 6px;
            font-size: .72rem;
            color: var(--muted);
            opacity: .6;
        }

        /* ── Shoosh method selector ───────────────────────────────────────────── */
        .shoosh-method-wrap {
            padding: 16px 14px 14px;
            border-bottom: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
        }
        .shoosh-method-label {
            font-size: .78rem;
            color: var(--muted);
            letter-spacing: .04em;
            margin: 0 0 12px;
            text-transform: uppercase;
        }
        .shoosh-method-options {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
            gap: 7px;
            margin-bottom: 14px;
        }

        .shoosh-method-option {
            appearance: none;
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            border-radius: calc(var(--radius) - 6px);
            background: color-mix(in oklab, var(--card) 90%, black 10%);
            color: var(--muted);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 14px 8px 12px;
            cursor: pointer;
            transition: border-color .18s ease, background .18s ease, color .18s ease, transform .15s ease, box-shadow .18s ease;
            position: relative;
            overflow: hidden;
            font-family: inherit;
            font-size: .8rem;
            font-weight: 600;
            letter-spacing: .02em;
        }
        .shoosh-method-option::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(138,99,255,.12), rgba(100,231,255,.08));
            opacity: 0;
            transition: opacity .18s ease;
        }
        .shoosh-method-option:hover {
            border-color: rgba(138,99,255,.5);
            color: var(--text);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(138,99,255,.15);
        }
        .shoosh-method-option:hover::before { opacity: 1; }
        .shoosh-method-option.is-selected {
            border-color: var(--accent);
            color: var(--text);
            background: color-mix(in oklab, var(--card) 80%, black 20%);
            box-shadow: 0 0 0 1px var(--accent), 0 6px 24px rgba(138,99,255,.25);
        }
        .shoosh-method-option.is-selected::before { opacity: 1; }
        .shoosh-method-option.is-selected .shoosh-method-icon { color: var(--accent-2); }

        .shoosh-method-icon {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: grid;
            place-items: center;
            background: rgba(138,99,255,.1);
            border: 1px solid rgba(138,99,255,.15);
            transition: background .18s ease, border-color .18s ease;
            position: relative;
            z-index: 1;
        }
        .shoosh-method-option:hover .shoosh-method-icon,
        .shoosh-method-option.is-selected .shoosh-method-icon {
            background: rgba(138,99,255,.2);
            border-color: rgba(138,99,255,.35);
        }
        .shoosh-method-icon svg { width: 22px; height: 22px; }
        .shoosh-method-option span { position: relative; z-index: 1; }

        /* ── Method hover tooltip card ───────────────────────────────────────── */
        .method-tip {
            position: fixed;
            z-index: 9999;
            pointer-events: none;
            width: 240px;
            background: color-mix(in oklab, var(--card) 85%, black 15%);
            backdrop-filter: blur(18px) saturate(1.4);
            -webkit-backdrop-filter: blur(18px) saturate(1.4);
            border: 1px solid rgba(138,99,255,.4);
            border-radius: 14px;
            padding: 12px 14px 13px;
            box-shadow: 0 12px 40px rgba(0,0,0,.55), 0 0 0 1px rgba(138,99,255,.12);
            opacity: 0;
            transform: translateY(4px) scale(.97);
            transition: opacity .14s ease, transform .14s ease;
            will-change: opacity, transform;
        }
        .method-tip.is-visible {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        .method-tip-arrow {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            bottom: -7px;
            width: 13px;
            height: 7px;
            overflow: hidden;
        }
        .method-tip-arrow::before {
            content: '';
            position: absolute;
            width: 10px; height: 10px;
            background: color-mix(in oklab, var(--card) 85%, black 15%);
            border: 1px solid rgba(138,99,255,.4);
            border-radius: 2px;
            transform: rotate(45deg) translate(-1px, 4px);
            left: 1.5px;
        }
        .method-tip.tip-below .method-tip-arrow {
            bottom: auto;
            top: -7px;
            transform: translateX(-50%) scaleY(-1);
        }
        .method-tip-visual {
            border-radius: 8px;
            background: rgba(138,99,255,.06);
            border: 1px solid rgba(138,99,255,.14);
            margin-bottom: 10px;
            overflow: hidden;
            line-height: 0;
        }
        .method-tip-title {
            font-size: .82rem;
            font-weight: 700;
            color: var(--text);
            margin: 0 0 4px;
            letter-spacing: .01em;
        }
        .method-tip-desc {
            font-size: .73rem;
            color: var(--muted);
            line-height: 1.45;
            margin: 0;
        }

        /* ── Method options: expand grid for 7 items ─────────────────────────── */

        /* Finalize button */
        .finalize-shoosh-btn {
            width: 100%;
            padding: 13px;
            font-size: .95rem;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            border-radius: calc(var(--radius) - 6px);
            position: relative;
            overflow: hidden;
        }
        .finalize-shoosh-btn::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.07) 50%, transparent 100%);
            transform: translateX(-100%);
            transition: transform .55s ease;
        }
        .finalize-shoosh-btn:hover::after { transform: translateX(100%); }
        .finalize-shoosh-btn:disabled { opacity: .5; cursor: not-allowed; }

        /* ── Shoosh result player ─────────────────────────────────────────── */
        .shoosh-result-wrap { margin-top: 14px; }
        .shoosh-result-wrap audio { display: none; }

        .shoosh-player {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 14px 16px;
            background: linear-gradient(135deg, rgba(138,99,255,0.1) 0%, rgba(100,231,255,0.06) 100%);
            border: 1px solid rgba(138,99,255,0.22);
            border-radius: 14px;
            backdrop-filter: blur(10px);
        }

        /* Play / pause button */
        .sp-play {
            flex-shrink: 0;
            width: 40px; height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--accent, #8a63ff), var(--accent-2, #64e7ff));
            border: none;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center;
            color: #fff;
            transition: transform .15s, box-shadow .15s;
            box-shadow: 0 0 0 rgba(138,99,255,0);
        }
        .sp-play:hover {
            transform: scale(1.1);
            box-shadow: 0 0 18px rgba(138,99,255,0.55);
        }
        .sp-icon-pause { display: none; }
        .sp-play.is-playing .sp-icon-play  { display: none; }
        .sp-play.is-playing .sp-icon-pause { display: block; }

        /* Track + times */
        .sp-body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 5px;
        }
        /* Waveform canvas (replaces old sp-progress bar) */
        .sp-waveform {
            display: block;
            width: 100%;
            height: 72px;
            border-radius: 8px;
            cursor: col-resize;
            background: rgba(138,99,255,.06);
            border: 1px solid rgba(138,99,255,.15);
            transition: border-color .2s;
        }
        .sp-waveform:hover { border-color: rgba(138,99,255,.32); }
        .sp-times {
            display: flex;
            justify-content: space-between;
            font-size: .7rem;
            color: rgba(255,255,255,0.38);
            font-variant-numeric: tabular-nums;
            letter-spacing: .02em;
        }

        /* Download icon button */
        .sp-dl {
            flex-shrink: 0;
            width: 36px; height: 36px;
            border-radius: 9px;
            display: flex; align-items: center; justify-content: center;
            background: rgba(138,99,255,0.12);
            border: 1px solid rgba(138,99,255,0.25);
            color: var(--accent, #8a63ff);
            text-decoration: none;
            transition: background .15s, border-color .15s, transform .15s;
        }
        .sp-dl:hover {
            background: rgba(138,99,255,0.28);
            border-color: rgba(138,99,255,0.5);
            transform: translateY(1px);
        }

        /* ── History button (fixed left) ──────────────────────────────────── */
        .sidebar-btns {
            position: fixed;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 200;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
        }
        .history-btn, .sidebar-new-btn {
            appearance: none;
            border: 0;
            border-radius: 12px;
            background: color-mix(in oklab, var(--card) 90%, transparent 10%);
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            color: var(--muted);
            display: grid;
            place-items: center;
            cursor: pointer;
            box-shadow: var(--shadow);
            transition: color .2s ease, background .2s ease, transform .2s ease;
        }
        .sidebar-new-btn {
            color: var(--accent-2, #64e7ff);
            border-color: rgba(100,231,255,0.25);
        }
        .sidebar-new-btn:hover {
            background: rgba(100,231,255,.12) !important;
            border-color: rgba(100,231,255,.5) !important;
            color: #fff !important;
        }
        .sidebar-help-btn {
            color: rgba(255,255,255,0.45);
        }
        .sidebar-help-btn:hover {
            color: var(--text) !important;
            background: rgba(138,99,255,.15) !important;
        }
        .history-btn {
            width: 40px;
            height: 40px;
        }
        .history-btn:hover { color: var(--text); background: rgba(138,99,255,.15); transform: scale(1.08); }
        .history-btn svg { width: 18px; height: 18px; }

        /* ── History panel (slide from left) ──────────────────────────────── */
        .history-backdrop {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,.5);
            backdrop-filter: blur(4px);
            z-index: 299;
            opacity: 0;
            pointer-events: none;
            transition: opacity .3s ease;
        }
        .history-backdrop.is-open { opacity: 1; pointer-events: all; }

        .history-panel {
            position: fixed;
            left: -320px;
            top: 0;
            height: 100%;
            width: 300px;
            z-index: 300;
            background:
                radial-gradient(600px 400px at -10% 20%, rgba(138,99,255,.12), transparent 60%),
                var(--panel-bg);
            border-right: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            box-shadow: 8px 0 40px rgba(0,0,0,.5);
            display: flex;
            flex-direction: column;
            transition: left .32s cubic-bezier(.4,0,.2,1);
            overflow: hidden;
        }
        .history-panel.is-open { left: 0; }

        .history-panel-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 20px 16px 16px;
            border-bottom: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
        }
        .history-panel-title {
            font-size: 1rem;
            font-weight: 700;
            letter-spacing: .04em;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .history-close {
            appearance: none;
            border: 0;
            background: rgba(138,99,255,.1);
            color: var(--muted);
            width: 28px;
            height: 28px;
            border-radius: 8px;
            display: grid;
            place-items: center;
            cursor: pointer;
            transition: background .2s ease, color .2s ease;
        }
        .history-close:hover { background: rgba(255,94,138,.15); color: #ff5e8a; }
        .history-close svg { width: 14px; height: 14px; }

        .history-list {
            flex: 1;
            overflow-y: auto;
            padding: 10px 8px;
        }
        .history-list::-webkit-scrollbar { width: 4px; }
        .history-list::-webkit-scrollbar-track { background: transparent; }
        .history-list::-webkit-scrollbar-thumb { background: var(--ring); border-radius: 4px; }

        .history-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 12px;
            border-radius: 10px;
            cursor: pointer;
            transition: background .18s ease;
            border: 1px solid transparent;
        }
        .history-item:hover {
            background: rgba(138,99,255,.1);
            border-color: rgba(138,99,255,.2);
        }
        .history-item-icon {
            flex-shrink: 0;
            width: 34px;
            height: 34px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(138,99,255,.25), rgba(100,231,255,.15));
            border: 1px solid rgba(138,99,255,.25);
            display: grid;
            place-items: center;
            color: var(--accent-2);
        }
        .history-item-icon svg { width: 16px; height: 16px; }
        .history-item-info { min-width: 0; }
        .history-item-name {
            font-size: .88rem;
            font-weight: 600;
            color: var(--text);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .history-item-date {
            font-size: .75rem;
            color: var(--muted);
            margin-top: 2px;
        }
        .history-item-stage {
            font-size: .7rem;
            margin-top: 3px;
            display: inline-flex;
            align-items: center;
            gap: 4px;
        }
        .history-item-stage-dot {
            width: 6px; height: 6px; border-radius: 50%;
            background: var(--success);
        }
        .history-item-stage-dot.is-working { background: var(--accent-2); }
        .history-empty {
            text-align: center;
            color: var(--muted);
            font-size: .9rem;
            padding: 40px 20px;
        }

        /* History delete button */
        .history-delete-btn {
            flex-shrink: 0;
            margin-left: auto;
            appearance: none;
            border: 0;
            background: transparent;
            color: var(--muted);
            width: 30px;
            height: 30px;
            border-radius: 8px;
            display: grid;
            place-items: center;
            cursor: pointer;
            opacity: 0;
            transition: opacity .15s ease, background .15s ease, color .15s ease;
        }
        .history-delete-btn svg { width: 14px; height: 14px; }
        .history-item:hover .history-delete-btn { opacity: 1; }
        .history-delete-btn:hover { background: rgba(255,94,138,.15); color: #ff5e8a; }

        /* Error state */
        .history-item-stage-dot.is-error { background: #ff5e8a; }
        .history-item-icon.is-error {
            background: linear-gradient(135deg, rgba(255,94,138,.2), rgba(255,150,80,.1));
            border-color: rgba(255,94,138,.3);
            color: #ff5e8a;
        }

        /* Remove animation */
        .history-item-removing {
            opacity: 0;
            transform: translateX(-12px);
            transition: opacity .2s ease, transform .2s ease;
        }

        /* ── Help panel ───────────────────────────────────────────────────── */
        .help-panel { width: 720px; left: -720px; }
        .help-panel.is-open { left: 0; }

        .help-body {
            padding: 0 20px 32px;
            overflow-y: auto;
            height: calc(100% - 56px);
            scrollbar-width: thin;
            scrollbar-color: rgba(138,99,255,.45) transparent;
        }
        .help-body::-webkit-scrollbar { width: 5px; }
        .help-body::-webkit-scrollbar-track {
            background: rgba(255,255,255,.03);
            border-radius: 99px;
            margin: 6px 0;
        }
        .help-body::-webkit-scrollbar-thumb {
            background: linear-gradient(180deg, rgba(138,99,255,.6), rgba(100,231,255,.35));
            border-radius: 99px;
        }
        .help-body::-webkit-scrollbar-thumb:hover {
            background: linear-gradient(180deg, rgba(138,99,255,.85), rgba(100,231,255,.55));
        }
        .help-intro {
            font-size: .82rem;
            color: var(--muted);
            line-height: 1.6;
            margin: 0 0 24px;
            padding-bottom: 20px;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        .help-steps {
            list-style: none;
            padding: 0; margin: 0;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        .help-step {
            display: flex;
            gap: 14px;
            align-items: flex-start;
            padding: 14px;
            border-radius: 12px;
            background: rgba(255,255,255,0.03);
            border: 1px solid rgba(255,255,255,0.06);
            transition: background .15s, border-color .15s;
            counter-increment: none;
        }
        .help-step:hover {
            background: rgba(138,99,255,0.07);
            border-color: rgba(138,99,255,0.18);
        }
        .help-step-icon {
            flex-shrink: 0;
            width: 38px; height: 38px;
            border-radius: 10px;
            background: linear-gradient(135deg, rgba(138,99,255,0.2), rgba(100,231,255,0.1));
            border: 1px solid rgba(138,99,255,0.25);
            display: grid;
            place-items: center;
            color: var(--accent, #8a63ff);
        }
        .help-step-icon svg { width: 18px; height: 18px; }
        .help-step-body {
            display: flex;
            flex-direction: column;
            gap: 4px;
            min-width: 0;
        }
        .help-step-body strong {
            font-size: .84rem;
            font-weight: 600;
            color: var(--text);
        }
        .help-step-body span {
            font-size: .76rem;
            color: var(--muted);
            line-height: 1.55;
        }
        .help-step-body b { color: var(--accent-2, #64e7ff); font-weight: 600; }
        .help-step-body em { color: var(--accent, #8a63ff); font-style: normal; font-weight: 600; }
        .help-chip {
            display: inline-block;
            padding: 1px 6px;
            border-radius: 4px;
            font-size: .72rem;
            font-weight: 600;
            line-height: 1.5;
        }
        .help-chip-red   { background: rgba(255,60,60,.18); color: rgba(255,100,100,.95); border: 1px solid rgba(255,60,60,.3); }
        .help-chip-amber { background: rgba(255,165,50,.18); color: rgba(255,195,90,.95); border: 1px solid rgba(255,165,50,.3); }

        @media(max-width:520px) {
            .sidebar-btns {
                position: fixed;
                left: 50%;
                top: auto;
                bottom: 16px;
                transform: translateX(-50%);
                flex-direction: row;
                background: color-mix(in oklab, var(--card) 94%, transparent);
                border: 1px solid rgba(138,99,255,.22);
                border-radius: 999px;
                padding: 6px 10px;
                gap: 4px;
                box-shadow: 0 4px 24px rgba(0,0,0,.45);
            }
            .history-panel { width: 85vw; left: -85vw; }
            .help-panel { width: 92vw; left: -92vw; }
        }

        /* ── Login screen ─────────────────────────────────────────────────── */
        .login-screen {
            position: fixed;
            inset: 0;
            background:
                radial-gradient(900px 600px at 15% -5%,  rgba(138,99,255,.22), transparent 60%),
                radial-gradient(800px 800px at 110% 20%, rgba(100,231,255,.14), transparent 45%),
                linear-gradient(180deg, #080c18, #060912 70%, #050811);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
            padding: 28px;
            transition: opacity .4s ease;
        }
        .login-screen-out { opacity: 0; pointer-events: none; }

        .login-card {
            background: var(--card);
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            border-radius: var(--radius);
            padding: 44px 48px 40px;
            box-shadow: var(--shadow),
                        0 0 60px rgba(138,99,255,.08),
                        0 0 80px rgba(100,231,255,.06);
            width: min(420px, 100%);
            text-align: center;
        }

        .login-logo {
            margin-bottom: 28px;
        }
        .login-logo::after {
            content: '';
            display: block;
            width: 60px;
            height: 3px;
            margin: 16px auto 0;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            border-radius: 999px;
        }

        .login-sub {
            color: var(--muted);
            font-size: .95rem;
            margin: 0 0 20px;
            line-height: 1.5;
        }
        .login-sub strong { color: var(--text); }

        .login-input {
            display: block;
            width: 100%;
            background: #0a0f1f;
            border: 1px solid var(--ring);
            border-radius: calc(var(--radius) - 6px);
            color: var(--text);
            font-size: 1rem;
            font-family: inherit;
            padding: 12px 16px;
            outline: none;
            transition: border-color .2s ease, box-shadow .2s ease;
            margin-bottom: 12px;
        }
        .login-input::placeholder { color: var(--muted); opacity: .7; }
        .login-input:focus {
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(138,99,255,.15);
        }

        .login-code-input {
            text-align: center;
            font-size: 2rem;
            letter-spacing: .35em;
            font-weight: 700;
            padding-left: 20px; /* offset letter-spacing */
        }

        .login-btn {
            width: 100%;
            padding: 13px;
            font-size: 1rem;
            border-radius: calc(var(--radius) - 6px);
        }
        .login-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

        .login-back {
            background: none;
            border: none;
            color: var(--muted);
            font-size: .88rem;
            font-family: inherit;
            cursor: pointer;
            margin-top: 14px;
            padding: 4px 8px;
            transition: color .2s ease;
        }
        .login-back:hover { color: var(--text); }

        .login-error {
            color: #ff5e8a;
            font-size: .88rem;
            margin: 14px 0 0;
            background: rgba(255,94,138,.08);
            border: 1px solid rgba(255,94,138,.25);
            border-radius: 10px;
            padding: 9px 14px;
            text-align: left;
        }

        /* ── User badge (header, shown after sign-in) ─────────────────────── */
        .user-badge {
            position: absolute;
            top: 0;
            right: 0;
            align-items: center;
            gap: 10px;
            background: color-mix(in oklab, var(--card) 90%, transparent 10%);
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            border-radius: 999px;
            padding: 6px 6px 6px 14px;
            box-shadow: var(--shadow);
        }
        .user-email {
            font-size: .82rem;
            color: var(--muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 200px;
        }
        .sign-out-btn, .new-session-btn {
            appearance: none;
            border: 0;
            background: rgba(138,99,255,.15);
            color: var(--muted);
            font-size: .78rem;
            font-family: inherit;
            padding: 5px 12px;
            border-radius: 999px;
            cursor: pointer;
            transition: background .2s ease, color .2s ease;
            white-space: nowrap;
        }
        .sign-out-btn:hover { background: rgba(138,99,255,.3); color: var(--text); }

        /* Credits badge */
        .credits-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 5px 12px 5px 9px;
            border-radius: 20px;
            border: 1px solid transparent;
            background: linear-gradient(var(--card), var(--card)) padding-box,
                        linear-gradient(90deg, var(--accent), var(--accent-2)) border-box;
            color: #c4b5fd;
            font-size: 13px;
            font-weight: 600;
            cursor: default;
            white-space: nowrap;
        }
        .credits-badge.is-low {
            animation: credits-pulse 2s ease-in-out infinite;
        }
        @keyframes credits-pulse {
            0%, 100% { box-shadow: 0 0 0 0 rgba(138, 99, 255, 0); }
            50% { box-shadow: 0 0 8px 2px rgba(138, 99, 255, 0.35); }
        }
        .credit-icon {
            flex-shrink: 0;
            color: #a78bfa;
            filter: drop-shadow(0 0 4px rgba(167,139,250,.6));
        }

        /* Buy credits button */
        .buy-credits-btn {
            appearance: none;
            border: 1px solid rgba(138,99,255,.44);
            background: transparent;
            color: var(--accent);
            font-size: 11px;
            font-family: inherit;
            font-weight: 600;
            padding: 3px 10px;
            border-radius: 20px;
            cursor: pointer;
            transition: background .2s ease, border-color .2s ease, color .2s ease;
            white-space: nowrap;
        }
        .buy-credits-btn:hover { background: rgba(138,99,255,.12); border-color: var(--accent); color: var(--text); }

        /* ── TURBO shortcut button in header ─────────────────────────────────── */
        .header-turbo-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            text-decoration: none;
            font-size: 11px;
            font-weight: 800;
            letter-spacing: .08em;
            padding: 3px 10px 3px 8px;
            border-radius: 20px;
            color: #050715;
            background: linear-gradient(135deg, #ffd60a, #64e7ff);
            border: 1px solid transparent;
            box-shadow: 0 0 0 1px rgba(255,214,10,.0), 0 2px 10px rgba(255,214,10,.25);
            transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
            white-space: nowrap;
        }
        .header-turbo-btn svg {
            filter: drop-shadow(0 0 3px rgba(255,255,255,.5));
            animation: turbo-pulse 1.8s ease-in-out infinite;
        }
        .header-turbo-btn:hover {
            transform: translateY(-1px);
            filter: brightness(1.08);
            box-shadow: 0 4px 16px rgba(255,214,10,.4);
        }

        /* Credit cost tag (inline on buttons/rows) */
        .credit-cost-tag {
            display: inline-flex;
            align-items: center;
            gap: 3px;
            font-size: .7rem;
            font-weight: 700;
            color: rgba(167,139,250,.75);
            background: rgba(138,99,255,.12);
            border: 1px solid rgba(138,99,255,.25);
            border-radius: 999px;
            padding: 1px 7px 1px 5px;
            margin-left: 6px;
            vertical-align: middle;
            letter-spacing: .02em;
        }
        .credit-cost-tag svg { opacity: .85; }
        .finalize-shoosh-btn .credit-cost-tag {
            position: relative;
            z-index: 1;
            background: rgba(255,255,255,.12);
            border-color: rgba(255,255,255,.25);
            color: rgba(255,255,255,.8);
        }

        @media(max-width:520px) {
            .login-card { padding: 36px 24px 32px; }
            .user-badge {
                position: static;
                display: flex;
                justify-content: center;
                margin: 10px auto 0;
                padding: 5px 5px 5px 10px;
                gap: 8px;
                width: fit-content;
            }
            .user-email { display: none; }
            .buy-credits-btn { display: none; }
        }

        /* ── Step indicator ───────────────────────────────────────────────────── */
        .step-indicator {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4px 16px 24px;
            max-width: 560px;
            margin: 0 auto;
        }
        .step-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            min-width: 56px;
        }
        .step-dot {
            width: 30px; height: 30px;
            border-radius: 50%;
            border: 2px solid rgba(138,99,255,.25);
            display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,.2);
            font-size: .7rem; font-weight: 700;
            position: relative;
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .step-icon-check { display: none; position: absolute; }
        .step-num { font-size: .68rem; font-weight: 700; }
        .step-item.is-done .step-dot {
            background: var(--accent);
            border-color: var(--accent);
            color: #fff;
            box-shadow: 0 2px 10px rgba(138,99,255,.45);
        }
        .step-item.is-done .step-icon-check { display: block; }
        .step-item.is-done .step-num       { display: none; }
        .step-item.is-active .step-dot {
            border-color: var(--accent);
            color: var(--accent);
            box-shadow: 0 0 0 4px rgba(138,99,255,.14);
            animation: step-pulse 2s ease-in-out infinite;
        }
        @keyframes step-pulse {
            0%, 100% { box-shadow: 0 0 0 3px rgba(138,99,255,.14); }
            50%       { box-shadow: 0 0 0 7px rgba(138,99,255,.06); }
        }
        .step-label {
            font-size: .6rem; font-weight: 600;
            letter-spacing: .05em; text-transform: uppercase;
            color: rgba(255,255,255,.2);
            transition: color .3s;
        }
        .step-item.is-done .step-label   { color: var(--accent-2); }
        .step-item.is-active .step-label { color: var(--text); }
        .step-connector {
            flex: 1; height: 2px;
            background: rgba(138,99,255,.15);
            margin: 0 4px; margin-bottom: 22px;
            border-radius: 1px;
            position: relative;
            overflow: hidden;
        }
        .step-connector::after {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            width: 0%;
            transition: width 0.5s ease;
            border-radius: 1px;
        }
        .step-connector.is-done::after { width: 100%; }

        /* ── Elapsed time ─────────────────────────────────────────────────────── */
        .progress-row { display: flex; align-items: center; gap: 10px; }
        .progress-row .progress { flex: 1; }
        .elapsed-time {
            font-size: .7rem; color: rgba(255,255,255,.3);
            font-family: monospace; font-variant-numeric: tabular-nums;
            white-space: nowrap;
        }

        /* ── Word timeline ────────────────────────────────────────────────────── */
        .word-timeline {
            padding: 12px 14px 10px;
            border-bottom: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
        }
        .wt-header {
            display: flex; justify-content: space-between; align-items: center;
            margin-bottom: 8px;
        }
        .wt-label {
            font-size: .68rem; font-weight: 700;
            text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
        }
        .wt-hint { font-size: .62rem; color: rgba(255,255,255,.2); }
        .wt-bar  { position: relative; height: 30px; }
        .wt-track {
            position: absolute; left: 0; right: 0; top: 50%;
            height: 3px; background: rgba(138,99,255,.15);
            border-radius: 2px; transform: translateY(-50%);
        }
        .wt-marker {
            position: absolute; top: 50%;
            height: 14px; min-width: 4px;
            background: rgba(255,80,100,.75);
            border-radius: 3px;
            transform: translateY(-50%);
            cursor: pointer;
            transition: background .15s, transform .12s;
        }
        .wt-marker:hover { background: rgb(255,80,100); transform: translateY(-50%) scaleY(1.35); }
        .wt-marker.is-excluded { background: rgba(255,255,255,.15); }
        .wt-labels {
            display: flex; justify-content: space-between; margin-top: 4px;
            font-size: .6rem; color: rgba(255,255,255,.18);
            font-family: monospace; letter-spacing: .03em;
        }
        @keyframes wt-flash {
            0%,100% { background-color: transparent; }
            25%     { background-color: rgba(100,231,255,.4); border-radius: 3px; }
        }
        .word.wt-flash { animation: wt-flash .85s ease; }

        /* ── Bad word exclude toggle ──────────────────────────────────────────── */
        .transcribe-body .word { cursor: pointer; }
        .transcribe-body .word.is-excluded {
            text-decoration: line-through; opacity: .28; cursor: pointer;
        }

        /* ── Manually added words (amber, dashed underline) ──────────────────── */
        .transcribe-body .word.is-bad-word.is-manual {
            background: rgba(255, 165, 50, 0.2);
            border-bottom: 2px dashed rgba(255, 165, 50, 0.7);
            color: rgba(255, 195, 90, 0.95);
        }
        .wt-marker.is-manual { background: rgba(255, 165, 50, 0.75); }
        .wt-marker.is-manual:hover { background: rgb(255, 165, 50); }

        /* ── Word count badge ─────────────────────────────────────────────────── */
        .word-count-wrap {
            display: flex; align-items: center; justify-content: space-between;
            padding: 10px 14px 12px; gap: 8px;
            border-bottom: 1px solid color-mix(in oklab, var(--ring) 50%, #000 50%);
        }
        .word-count-badge { font-size: .78rem; color: var(--muted); }
        .wcb-count { font-size: .92rem; font-weight: 800; color: var(--text); }
        .word-count-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
        .wc-action-btn {
            appearance: none;
            border: 1px solid rgba(138,99,255,.3);
            background: rgba(138,99,255,.08);
            color: var(--muted); font-family: inherit;
            font-size: .7rem; font-weight: 600;
            padding: 3px 8px; border-radius: 6px; cursor: pointer;
            transition: border-color .15s, color .15s, background .15s;
            display: flex; align-items: center; gap: 4px;
        }
        .wc-action-btn:hover { border-color: var(--accent); color: var(--text); background: rgba(138,99,255,.16); }

        /* ── Re-shoosh prompt ─────────────────────────────────────────────────── */
        .reshoosh-prompt {
            display: flex; align-items: center; justify-content: space-between;
            padding: 10px 14px; gap: 10px;
            background: rgba(138,99,255,.06);
            border-top: 1px solid rgba(138,99,255,.14);
        }
        .reshoosh-label { font-size: .78rem; color: var(--muted); }
        .reshoosh-label strong { color: var(--text); text-transform: capitalize; }
        .reshoosh-btn {
            appearance: none;
            border: 1px solid rgba(138,99,255,.35);
            background: rgba(138,99,255,.1);
            color: var(--text); font-family: inherit;
            font-size: .74rem; font-weight: 600;
            padding: 5px 12px; border-radius: 8px; cursor: pointer;
            display: flex; align-items: center; gap: 5px; white-space: nowrap;
            transition: background .15s, border-color .15s;
        }
        .reshoosh-btn:hover { background: rgba(138,99,255,.2); border-color: var(--accent); }

        /* ── Toast notifications ──────────────────────────────────────────────── */
        .toast-container {
            position: fixed; bottom: 24px; right: 24px;
            z-index: 99999; display: flex; flex-direction: column;
            gap: 8px; pointer-events: none; align-items: flex-end;
        }
        .toast {
            background: color-mix(in oklab, var(--card) 88%, black 12%);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(138,99,255,.35);
            border-left: 3px solid rgba(138,99,255,.7);
            border-radius: 10px; padding: 10px 15px;
            font-size: .82rem; color: var(--text);
            box-shadow: 0 8px 24px rgba(0,0,0,.5);
            max-width: 300px; pointer-events: auto;
            opacity: 0; transform: translateX(14px);
            transition: opacity .2s ease, transform .2s ease;
        }
        .toast.is-visible { opacity: 1; transform: translateX(0); }
        .toast.toast-success { border-left-color: rgba(80,220,120,.85); }
        .toast.toast-error   { border-left-color: rgba(255,80,100,.85); }
        .toast.toast-warning { border-left-color: rgba(255,190,50,.85); }
        .toast.toast-info    { border-left-color: rgba(100,231,255,.75); }

        /* ── Theme toggle button ──────────────────────────────────────────────── */
        .theme-btn { color: rgba(255,255,255,.4); }
        .theme-btn:hover { color: #ffe066 !important; background: rgba(255,220,50,.12) !important; }
        .theme-bulb-on  { display: none; }
        .theme-bulb-off { display: block; }
        body.light-mode .theme-bulb-off { display: none; }
        body.light-mode .theme-bulb-on  { display: block; }
        body.light-mode .theme-btn { color: #d4a000; }
        body.light-mode .theme-btn:hover { color: #b88800 !important; background: rgba(220,170,0,.12) !important; }

        @keyframes bulb-pop {
            0%   { transform: scale(1); }
            40%  { transform: scale(1.28) rotate(-8deg); }
            70%  { transform: scale(.92) rotate(4deg); }
            100% { transform: scale(1) rotate(0); }
        }
        .theme-btn.is-popping svg { animation: bulb-pop .38s cubic-bezier(.4,0,.2,1) both; }

        /* ── Light mode overrides ─────────────────────────────────────────────── */

        /* Sidebar buttons */
        body.light-mode .history-btn { color: rgba(0,0,40,.45); background: rgba(255,255,255,.7); border-color: var(--ring); }
        body.light-mode .history-btn:hover { color: var(--accent) !important; background: rgba(138,99,255,.1) !important; }
        body.light-mode .sidebar-help-btn { color: rgba(0,0,40,.4); }

        /* Panel borders + backdrop */
        body.light-mode .history-panel { border-right-color: var(--ring); box-shadow: 8px 0 40px rgba(80,60,180,.12); }
        body.light-mode .history-backdrop { background: rgba(10,20,80,.18); }

        /* History items */
        body.light-mode .history-item { background: rgba(138,99,255,.04); border-color: var(--ring); }
        body.light-mode .history-item:hover { background: rgba(138,99,255,.09); border-color: rgba(138,99,255,.3); }
        body.light-mode .history-panel-head { border-bottom-color: var(--ring); background: rgba(255,255,255,.6); }

        /* Word tooltip */
        body.light-mode .word-tooltip {
            background:
                radial-gradient(100% 120% at 0% 0%, rgba(138,99,255,.12), transparent 70%),
                radial-gradient(120% 120% at 110% 0%, rgba(100,231,255,.1), transparent 70%),
                rgba(255,255,255,.97);
            border-color: rgba(138,99,255,.25);
            box-shadow: 0 8px 30px rgba(80,60,180,.15);
        }

        /* Method tooltip card */
        body.light-mode .method-tip {
            background: rgba(255,255,255,.97);
            border-color: rgba(138,99,255,.3);
            box-shadow: 0 8px 30px rgba(80,60,180,.15);
        }
        body.light-mode .method-tip-arrow::before { background: rgba(255,255,255,.97); border-color: rgba(138,99,255,.3); }

        /* Step indicator */
        body.light-mode .step-connector { background: var(--ring); }
        body.light-mode .step-dot { border-color: var(--ring); color: var(--muted); }
        body.light-mode .step-item.is-done .step-dot,
        body.light-mode .step-item.is-active .step-dot { border-color: var(--accent); }
        body.light-mode .step-label { color: rgba(0,0,40,.35); }
        body.light-mode .step-item.is-done .step-label   { color: var(--accent); }
        body.light-mode .step-item.is-active .step-label { color: var(--text); }

        /* Status/label pills */
        body.light-mode .pill {
            background: rgba(100,231,255,.15);
            border-color: rgba(0,160,200,.3);
            color: #006e99;
        }

        /* Method option pills */
        body.light-mode .shoosh-method-option {
            background: #fff;
            border-color: var(--ring);
            color: var(--muted);
        }
        body.light-mode .shoosh-method-option:hover,
        body.light-mode .shoosh-method-option.is-selected {
            color: var(--text);
        }

        /* Bad words — stronger contrast on light backgrounds */
        body.light-mode .word.is-bad-word {
            background: rgba(220, 40, 40, 0.12);
            border-bottom-color: rgba(200, 30, 30, 0.6);
            color: #b01010;
        }
        body.light-mode .word.is-bad-word.is-manual {
            background: rgba(200, 120, 0, 0.12);
            border-bottom-color: rgba(180, 100, 0, 0.6);
            color: #8a5200;
        }

        /* Player */
        body.light-mode .shoosh-player {
            background: linear-gradient(135deg, rgba(138,99,255,.08), rgba(100,231,255,.05));
            border-color: rgba(138,99,255,.2);
        }
        body.light-mode .sp-times { color: var(--muted); }
        body.light-mode .sp-dl { background: rgba(138,99,255,.08); }
        body.light-mode .sp-waveform {
            background: rgba(138,99,255,.05);
            border-color: rgba(138,99,255,.2);
        }

        /* Word timeline track */
        body.light-mode .wt-bar { background: rgba(0,0,40,.06); }
        body.light-mode .wt-track { background: rgba(0,0,40,.08); }

        /* Toast */
        body.light-mode .toast { background: rgba(255,255,255,.97); color: var(--text); box-shadow: 0 4px 20px rgba(80,60,180,.15); }

        /* Credits badge + buy button in light mode */
        body.light-mode .credits-badge {
            background: linear-gradient(var(--card), var(--card)) padding-box,
                        linear-gradient(90deg, var(--accent), var(--accent-2)) border-box;
            color: #6d28d9;
        }
        body.light-mode .credit-icon { color: #7c3aed; filter: none; }
        body.light-mode .buy-credits-btn {
            background: transparent;
            border-color: rgba(109,40,217,.35);
            color: #6d28d9;
        }
        body.light-mode .buy-credits-btn:hover { background: rgba(138,99,255,.1); border-color: var(--accent); color: #4c1d95; }
        body.light-mode .credit-cost-tag { color: rgba(109,40,217,.75); background: rgba(138,99,255,.08); border-color: rgba(138,99,255,.2); }

        footer {
            position: relative;
            width: 100%;
            padding-bottom: 48px; /* room for the absolute waveform-footer bar */
            flex-shrink: 0;
            z-index: 500;
        }

        /* ── Footer content & nav ─────────────────────────────────────────────── */
        .footer-content {
            position: relative;
            z-index: 1;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 12px 24px;
            padding: 20px 32px;
            max-width: min(980px, 100%);
            margin: 0 auto;
            font-size: .78rem;
            color: var(--muted);
            border-top: 1px solid rgba(255,255,255,.06);
        }
        .footer-content > span { opacity: .8; }
        .footer-nav {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px 18px;
        }
        .footer-nav a {
            color: var(--muted);
            text-decoration: none;
            letter-spacing: .02em;
            padding: 2px 0;
            border-bottom: 1px solid transparent;
            transition: color .18s ease, border-color .18s ease;
        }
        .footer-nav a:hover { color: var(--text); border-bottom-color: rgba(255,255,255,.25); }
        body.light-mode .footer-content { border-top-color: rgba(0,0,40,.08); }
        body.light-mode .footer-nav a:hover { border-bottom-color: rgba(0,0,40,.25); }
        @media (max-width: 520px) {
            .footer-content { padding: 16px 18px; justify-content: center; text-align: center; }
            .footer-nav { justify-content: center; gap: 4px 14px; }
        }

        /* ── Waveform footer ──────────────────────────────────────────────────── */
        .waveform-footer {
            position: absolute;
            width: 100%;
            height: 40px;

            bottom: 0;
            left: 0;

            z-index: 500;
            display: flex;
            align-items: flex-end;
            gap: 1.5px;
            padding: 0 0 3px;
            overflow: hidden;
            pointer-events: none;
            background: linear-gradient(180deg, transparent, rgba(8,12,24,.96) 35%);
            border-top: 1px solid rgba(45,59,114,.6);
        }
        /* fade bars at the left and right edges */
        .waveform-footer::before {
            content: '';
            position: absolute; inset: 0; z-index: 2; pointer-events: none;
            background: linear-gradient(90deg,
                var(--bg) 0%,
                transparent 6%,
                transparent 94%,
                var(--bg) 100%);
        }
        .wf-bar {
            flex: 1;
            border-radius: 2px 2px 0 0;
            background: linear-gradient(180deg, var(--accent), var(--accent-2));
            position: relative; z-index: 1;
            will-change: height;
            align-self: flex-end;
            opacity: .7;
        }
        /* padding-bottom removed — footer is in normal flow, sticky via flex layout */

        /* light mode footer */
        body.light-mode .waveform-footer {
            background: linear-gradient(180deg, transparent, rgba(240,242,252,.97) 35%);
            border-top-color: rgba(205,211,239,.8);
        }
        body.light-mode .waveform-footer::before {
            background: linear-gradient(90deg,
                var(--bg) 0%, transparent 6%, transparent 94%, var(--bg) 100%);
        }

        /* Section headers / cards already use --card, --ring vars — inherit automatically */

        /* ── Processing inline steps ──────────────────────────────────────────── */
        .processing-steps {
            margin-top: 16px;
            border-radius: calc(var(--radius) - 4px);
            border: 1px solid color-mix(in oklab, var(--ring) 60%, #000 40%);
            background: color-mix(in oklab, var(--card) 92%, black 8%);
            overflow: hidden;
        }
        .processing-header {
            font-size: .68rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: .08em;
            color: var(--muted);
            padding: 10px 14px 6px;
            opacity: .75;
        }
        .processing-step {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 14px;
            border-top: 1px solid var(--ring);
            transition: opacity .3s ease;
        }
        .processing-step:first-of-type { border-top: none; }
        .step-emoji { font-size: 1rem; flex-shrink: 0; }
        .processing-step .step-body {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 4px;
        }
        .processing-step .step-label {
            font-size: .88rem;
            color: var(--muted);
            transition: color .2s ease;
        }
        .processing-step.is-done .step-label {
            color: var(--muted);
            text-decoration: line-through;
            opacity: .55;
        }
        .processing-step.is-active .step-label { color: var(--text); }
        .processing-step.is-pending { opacity: .35; }
        .step-bar {
            height: 2px;
            background: var(--ring);
            border-radius: 2px;
            overflow: hidden;
        }
        .step-bar-fill {
            height: 100%;
            width: 0%;
            background: linear-gradient(90deg, var(--accent), var(--accent-2));
            border-radius: 2px;
            transition: width 1.1s ease-out;
        }
        .processing-step.is-done .step-bar,
        .processing-step.is-pending .step-bar { display: none; }
        .step-timer {
            font-size: .72rem;
            color: rgba(255,255,255,.3);
            font-family: monospace;
            font-variant-numeric: tabular-nums;
        }
        .processing-step.is-done .step-timer,
        .processing-step.is-pending .step-timer { display: none; }

        /* ── Processing step error state ─────────────────────────────────────── */
        .processing-step.is-error .step-label { color: #f87171; }
        .processing-step.is-error .step-bar   { display: none; }
        .processing-step.is-error .step-timer { display: none; }
        .step-error-msg {
            font-size: .7rem; color: #f87171; margin-top: 4px; opacity: .85;
            max-width: 340px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .step-retry-btn {
            margin-top: 6px; padding: 3px 12px; font-size: .72rem; font-weight: 600;
            border-radius: 20px; border: 1px solid rgba(248,113,113,.4);
            background: transparent; color: #f87171; cursor: pointer;
            transition: background .15s, border-color .15s;
        }
        .step-retry-btn:hover { background: rgba(248,113,113,.12); border-color: #f87171; }

        /* ── Bad-words error banner ───────────────────────────────────────────── */
        .bad-words-error {
            display: flex; align-items: center; gap: 10px;
            padding: 10px 14px; border-radius: 10px; margin-bottom: 12px;
            background: rgba(248,113,113,.08); border: 1px solid rgba(248,113,113,.25);
            color: #f87171; font-size: .85rem;
        }
        .bad-words-error-msg { flex: 1; }
        .bad-words-retry-btn {
            padding: 4px 14px; font-size: .78rem; font-weight: 600;
            border-radius: 20px; border: 1px solid rgba(248,113,113,.4);
            background: transparent; color: #f87171; cursor: pointer;
            transition: background .15s;
        }
        .bad-words-retry-btn:hover { background: rgba(248,113,113,.15); }

        /* ── Drop zone first-visit pulse ─────────────────────────────────────── */
        .drop.is-first-visit {
            animation: drop-pulse 2s ease-in-out 2;
        }
        @keyframes drop-pulse {
            0%, 100% { border-color: color-mix(in oklab, var(--accent) 55%, #8aa0ff 20%); }
            50% { border-color: var(--accent); box-shadow: 0 0 16px rgba(138,99,255,0.2); }
        }

        /* ── No bad words empty state ────────────────────────────────────────── */
        .no-bad-words {
            margin: 12px 14px;
            padding: 10px 14px;
            border-radius: 10px;
            background: rgba(46,204,113,.08);
            border: 1px solid rgba(46,204,113,.25);
            color: var(--success);
            font-size: .88rem;
            font-weight: 500;
        }

/* ── TURBO MODE ─────────────────────────────────────────────────────────── */
body.turbo-mode {
    --turbo-accent:    #ffd60a;
    --turbo-accent-2:  #64e7ff;
    --turbo-glow:      rgba(255, 214, 10, .55);
}

body.turbo-mode header .tagline {
    background: linear-gradient(90deg, var(--turbo-accent) 0%, var(--turbo-accent-2) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    letter-spacing: .02em;
}

.turbo-logo-row {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    position: relative;
}

.turbo-bolt {
    width: 36px;
    height: 54px;
    color: var(--turbo-accent);
    filter: drop-shadow(0 0 8px var(--turbo-glow));
    animation: turbo-pulse 1.8s ease-in-out infinite;
    flex-shrink: 0;
}

.turbo-badge {
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .15em;
    padding: 4px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--turbo-accent), var(--turbo-accent-2));
    color: #050715;
    align-self: flex-start;
    margin-top: 4px;
    box-shadow: 0 2px 8px var(--turbo-glow);
}
.turbo-badge-header {
    position: absolute;
    top: 0;
    left: 0;
    margin-top: 0;
    z-index: 2;
}
@media (max-width: 720px) {
    .turbo-badge-header {
        position: static;
        display: inline-block;
        margin: 0 auto 8px;
    }
}

@keyframes turbo-pulse {
    0%, 100% { opacity: 1; transform: scale(1); filter: drop-shadow(0 0 8px var(--turbo-glow)); }
    50%      { opacity: .85; transform: scale(1.06); filter: drop-shadow(0 0 14px var(--turbo-glow)); }
}

/* ── Experimental Modal Demucs toggle (turbo finalize area) ─────────────── */
.modal-toggle-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 10px 0 14px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px dashed rgba(255, 214, 10, .35);
    background: rgba(255, 214, 10, .04);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.modal-toggle-row:hover { background: rgba(255, 214, 10, .08); border-color: rgba(255, 214, 10, .55); }
.modal-toggle-row input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--turbo-accent, #ffd60a);
    cursor: pointer;
}
.modal-toggle-text { display: flex; flex-direction: column; gap: 2px; }
.modal-toggle-title {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.modal-toggle-hint { font-size: .75rem; color: var(--muted); line-height: 1.35; }
.experimental-badge {
    font-size: .58rem;
    font-weight: 800;
    letter-spacing: .1em;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 214, 10, .18);
    color: var(--turbo-accent, #ffd60a);
    text-transform: uppercase;
}
body.light-mode .modal-toggle-row { background: rgba(212, 154, 0, .05); border-color: rgba(212, 154, 0, .35); }
body.light-mode .experimental-badge { background: rgba(212, 154, 0, .15); color: #b88500; }

.mode-switch-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 12px 0 0;
    font-size: .8rem;
    font-weight: 500;
    color: var(--muted, #9aa6c8);
    text-decoration: none;
    padding: 6px 14px 6px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.1);
    transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}
.mode-switch-link svg { transition: transform .18s ease; }
.mode-switch-link:hover {
    color: var(--text);
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.18);
}
.mode-switch-link:hover svg { transform: translateX(-2px); }
body.light-mode .mode-switch-link {
    background: rgba(0,0,40,.04);
    border-color: rgba(0,0,40,.1);
    color: rgba(0,0,40,.55);
}
body.light-mode .mode-switch-link:hover {
    background: rgba(0,0,40,.07);
    border-color: rgba(0,0,40,.2);
    color: rgba(0,0,40,.85);
}

/* TURBO progress bar */
.turbo-progress {
    margin: 24px auto 16px;
    max-width: 720px;
    padding: 14px 18px;
    background: rgba(8, 12, 24, .6);
    border: 1px solid rgba(255, 214, 10, .18);
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(255, 214, 10, .04);
}

.turbo-progress-track {
    position: relative;
    height: 10px;
    background: rgba(255,255,255,.06);
    border-radius: 999px;
    overflow: hidden;
}

.turbo-progress-fill {
    position: absolute; inset: 0;
    width: 0%;
    background: linear-gradient(90deg, var(--turbo-accent) 0%, var(--turbo-accent-2) 100%);
    border-radius: 999px;
    transition: width .4s ease;
    box-shadow: 0 0 12px var(--turbo-glow);
}

.turbo-progress-shimmer {
    position: absolute; top: 0; bottom: 0;
    width: 30%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
    animation: turbo-shimmer 1.6s linear infinite;
    pointer-events: none;
}
@keyframes turbo-shimmer {
    0%   { left: -30%; }
    100% { left: 100%; }
}

.turbo-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: .78rem;
    color: var(--muted, #9aa6c8);
    letter-spacing: .04em;
    text-transform: uppercase;
}
.turbo-phase.is-active { color: var(--turbo-accent); font-weight: 700; }
.turbo-phase.is-done   { color: var(--turbo-accent-2); }

.turbo-progress-eta {
    display: inline-block;
    margin-top: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 214, 10, .08);
    border: 1px solid rgba(255, 214, 10, .25);
    color: var(--turbo-accent);
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .03em;
}

.turbo-pill {
    background: linear-gradient(135deg, rgba(255,214,10,.18), rgba(100,231,255,.18)) !important;
    border-color: rgba(255,214,10,.4) !important;
    color: var(--turbo-accent) !important;
}

.turbo-finalize-btn {
    background: linear-gradient(135deg, var(--turbo-accent), var(--turbo-accent-2)) !important;
    color: #050715 !important;
    box-shadow: 0 4px 20px var(--turbo-glow);
    font-weight: 800;
}
.turbo-finalize-btn:hover { filter: brightness(1.08); }

/* Cross-mode resume banner (used on standard index.html) */
.turbo-resume-banner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 10px 0 0;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255,214,10,.12), rgba(100,231,255,.12));
    border: 1px solid rgba(255,214,10,.4);
    color: var(--turbo-accent, #ffd60a);
    font-size: .82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .15s ease;
}
.turbo-resume-banner:hover {
    filter: brightness(1.1);
    box-shadow: 0 2px 14px rgba(255,214,10,.25);
}
.turbo-resume-banner svg {
    width: 14px;
    height: 14px;
    color: var(--turbo-accent, #ffd60a);
    filter: drop-shadow(0 0 4px rgba(255,214,10,.5));
}

/* Light mode overrides for TURBO */
body.light-mode.turbo-mode {
    --turbo-accent:    #d49a00;
    --turbo-accent-2:  #2bbcd6;
    --turbo-glow:      rgba(212, 154, 0, .35);
}
body.light-mode .turbo-progress {
    background: rgba(255,255,255,.7);
    border-color: rgba(212,154,0,.25);
}
body.light-mode .turbo-finalize-btn { color: #fff !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   v1: Landing page, admin page, stems toggle, fun caption, admin badge
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Landing page ─────────────────────────────────────────────────────────── */
body[data-page="landing"] {
    display: block;
    overflow-x: hidden;
}
body[data-page="landing"] .toast-container { z-index: 9999; }

.landing-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px clamp(20px, 4vw, 48px);
    backdrop-filter: blur(12px);
    background: rgba(8, 12, 24, .65);
    border-bottom: 1px solid rgba(255, 255, 255, .04);
}
body.light-mode .landing-nav { background: rgba(255, 255, 255, .75); border-bottom-color: var(--ring); }
.landing-nav-brand { display: inline-flex; align-items: center; height: 56px; }
.landing-nav-brand img { display: block; opacity: .95; height: 44px; width: auto; }
@media (max-width: 600px) {
    .landing-nav-brand img { height: 36px; }
}
.landing-nav-actions { display: flex; align-items: center; gap: 8px; }
.landing-nav-link {
    padding: 8px 14px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.landing-nav-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
body.light-mode .landing-nav-link:hover { background: rgba(80, 60, 180, .05); }
.landing-nav-login {
    padding: 8px 18px;
    font-size: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
}
.landing-nav-login:hover { filter: brightness(1.1); }

.landing-hero {
    position: relative;
    text-align: center;
    padding: clamp(80px, 12vw, 140px) clamp(20px, 4vw, 48px) clamp(80px, 10vw, 120px);
    overflow: hidden;
}
.landing-hero-inner { position: relative; z-index: 1; max-width: 920px; margin: 0 auto; }
.landing-hero-glow {
    position: absolute; inset: 0;
    background:
        radial-gradient(420px 320px at 50% 0%, rgba(138, 99, 255, .35), transparent 70%),
        radial-gradient(380px 280px at 80% 60%, rgba(100, 231, 255, .18), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.landing-eyebrow {
    display: inline-block;
    padding: 6px 14px;
    margin-bottom: 24px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent-2);
    background: rgba(100, 231, 255, .08);
    border: 1px solid rgba(100, 231, 255, .2);
    border-radius: 999px;
}
.landing-h1 {
    font-size: clamp(38px, 6vw, 68px);
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.05;
    margin: 0 0 22px;
}
.landing-h1 .grad {
    background: linear-gradient(120deg, var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.landing-sub {
    font-size: clamp(16px, 1.5vw, 19px);
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto 36px;
    line-height: 1.55;
}
.landing-cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 36px; }
.landing-cta-primary {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 24px rgba(138, 99, 255, .35);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.landing-cta-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
    box-shadow: 0 10px 32px rgba(138, 99, 255, .45);
}
.landing-cta-secondary {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, .04);
    color: var(--text);
    border: 1px solid var(--ring);
    border-radius: 12px;
    cursor: pointer;
}
.landing-cta-secondary:hover { background: rgba(255, 255, 255, .08); }
body.light-mode .landing-cta-secondary { background: rgba(80, 60, 180, .05); }
body.light-mode .landing-cta-secondary:hover { background: rgba(80, 60, 180, .1); }

.landing-trust-row { display: flex; flex-wrap: wrap; gap: 18px; justify-content: center; color: var(--muted); font-size: 14px; }
.landing-trust-item { white-space: nowrap; }

.landing-h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 700; text-align: center; margin: 0 0 18px; }

.landing-how { padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px); max-width: 1100px; margin: 0 auto; }
.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
    margin-top: 36px;
}
.landing-feature {
    padding: 28px 26px;
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform .2s, border-color .2s;
}
.landing-feature:hover { transform: translateY(-3px); border-color: rgba(138, 99, 255, .4); }
.landing-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(138, 99, 255, .15), rgba(100, 231, 255, .1));
    color: var(--accent-2);
}
.landing-feature h3 { margin: 0 0 8px; font-size: 18px; }
.landing-feature p  { margin: 0; color: var(--muted); line-height: 1.55; font-size: 14px; }

.landing-demo { padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px); max-width: 920px; margin: 0 auto; text-align: center; }
.landing-demo-caption { color: var(--muted); margin: 0 0 28px; }
.landing-demo-slot {
    position: relative;
    aspect-ratio: 16 / 7;
    width: 100%;
    border-radius: var(--radius);
    background: var(--card);
    border: 1px dashed var(--ring);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    overflow: hidden;
}
.landing-demo-glow {
    position: absolute; inset: 0;
    background: radial-gradient(450px 220px at 50% 50%, rgba(138, 99, 255, .15), transparent 70%);
    pointer-events: none;
}
.landing-demo-icon { font-size: 56px; }
.landing-demo-text { color: var(--muted); font-size: 14px; letter-spacing: .08em; text-transform: uppercase; }

.landing-waitlist { padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px); max-width: 720px; margin: 0 auto; }
.landing-waitlist-card {
    padding: clamp(28px, 4vw, 48px);
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.landing-waitlist-card .landing-sub { margin-bottom: 28px; }
.waitlist-form { display: flex; flex-direction: column; gap: 14px; text-align: left; }
.waitlist-field { display: flex; flex-direction: column; gap: 6px; }
.waitlist-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.waitlist-optional { font-weight: 400; opacity: .7; }
.waitlist-textarea { resize: vertical; min-height: 70px; font-family: inherit; }
.waitlist-submit { margin-top: 6px; }
.waitlist-message { margin: 12px 0 0; padding: 10px 14px; border-radius: 10px; font-size: 14px; }
.waitlist-message.is-success { background: rgba(46, 204, 113, .12); color: #6edc9b; border: 1px solid rgba(46, 204, 113, .25); }
.waitlist-message.is-error   { background: rgba(255, 80, 80, .12); color: #ff8a8a; border: 1px solid rgba(255, 80, 80, .25); }
.waitlist-message.is-warning { background: rgba(255, 180, 80, .12); color: #ffce8a; border: 1px solid rgba(255, 180, 80, .25); }
.waitlist-message.is-info    { background: rgba(100, 231, 255, .08); color: var(--accent-2); border: 1px solid rgba(100, 231, 255, .2); }

.landing-footer { padding: 32px clamp(20px, 4vw, 48px); border-top: 1px solid rgba(255, 255, 255, .04); color: var(--muted); font-size: 13px; }
.landing-footer .footer-content { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1100px; margin: 0 auto; }
.landing-footer .footer-nav { display: flex; gap: 18px; }
.landing-footer .footer-nav a { color: var(--muted); text-decoration: none; }
.landing-footer .footer-nav a:hover { color: var(--text); }

/* ── Login modal close button (landing page) ───────────────────────────── */
.login-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 36px; height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .06);
    border: 1px solid var(--ring);
    border-radius: 50%;
    color: var(--muted);
    cursor: pointer;
    z-index: 1001;
    transition: color .15s, background .15s;
}
.login-close:hover { color: var(--text); background: rgba(255, 255, 255, .12); }
.login-footnote { margin: 22px 0 0; text-align: center; color: var(--muted); font-size: 13px; }
.login-footnote a { color: var(--accent-2); text-decoration: none; }
.login-footnote a:hover { text-decoration: underline; }

/* ── Cycling fun caption (under turbo progress bar) ─────────────────────── */
.turbo-progress-caption {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    color: var(--muted);
    opacity: 0;
    transform: translateY(2px);
    transition: opacity .25s ease, transform .25s ease;
    min-height: 18px;
    font-feature-settings: "ss01" on;
}
.turbo-progress-caption.is-visible { opacity: 1; transform: translateY(0); }

/* ── Stems opt-in toggle row ─────────────────────────────────────────────── */
.stems-optin-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 14px;
    background: rgba(138, 99, 255, .05);
    border: 1px solid rgba(138, 99, 255, .15);
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
.stems-optin-row:hover { background: rgba(138, 99, 255, .08); border-color: rgba(138, 99, 255, .3); }
.stems-optin-row input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--accent);
    margin-top: 1px;
    flex: 0 0 auto;
    cursor: pointer;
}
.stems-optin-text { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.stems-optin-title { font-weight: 600; font-size: 14px; color: var(--text); }
.stems-optin-hint  { font-size: 13px; color: var(--muted); line-height: 1.45; }
.stems-optin-cost {
    display: inline-block;
    padding: 2px 7px;
    margin-left: 4px;
    background: rgba(100, 231, 255, .12);
    border: 1px solid rgba(100, 231, 255, .25);
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--accent-2);
    white-space: nowrap;
}

/* Background stems status pill */
.bg-stems-status {
    display: inline-block;
    margin-left: 10px;
    padding: 2px 9px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 999px;
    background: rgba(255, 255, 255, .05);
    color: var(--muted);
    border: 1px solid var(--ring);
}
.bg-stems-status.is-running { background: rgba(100, 231, 255, .1);  color: var(--accent-2); border-color: rgba(100, 231, 255, .25); }
.bg-stems-status.is-done    { background: rgba(46, 204, 113, .12);  color: #6edc9b;        border-color: rgba(46, 204, 113, .25); }
.bg-stems-status.is-error   { background: rgba(255, 80, 80, .12);   color: #ff8a8a;        border-color: rgba(255, 80, 80, .25); }

/* ── Admin link in app header ────────────────────────────────────────────── */
.header-admin-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    background: linear-gradient(135deg, rgba(138, 99, 255, .15), rgba(100, 231, 255, .1));
    border: 1px solid rgba(138, 99, 255, .25);
    border-radius: 999px;
    color: var(--accent-2);
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    transition: filter .15s;
}
.header-admin-link:hover { filter: brightness(1.15); }

/* ── Admin page ──────────────────────────────────────────────────────────── */
.admin-wrap { max-width: 1100px; }
.admin-header { position: relative; }
.admin-back-link {
    position: absolute;
    top: 6px;
    left: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    color: var(--muted);
    text-decoration: none;
    font-size: 13px;
    border-radius: 8px;
    transition: color .15s, background .15s;
}
.admin-back-link:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.admin-badge {
    display: inline-block;
    padding: 3px 10px;
    margin: 0 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .12em;
    border-radius: 999px;
}
.admin-denied { text-align: center; padding: 48px; }
.admin-main { display: flex; flex-direction: column; gap: 22px; }
.admin-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.admin-card-head .section-title { margin: 0; }
.invite-form { display: flex; flex-direction: column; gap: 14px; }
.invite-row { display: flex; gap: 14px; flex-wrap: wrap; }
.invite-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; }
.invite-field-credits { flex: 0 1 140px; }
.invite-label { font-size: 13px; font-weight: 600; color: var(--muted); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--ring);
    vertical-align: top;
}
.admin-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: rgba(255, 255, 255, .02); }
body.light-mode .admin-table tr:hover td { background: rgba(80, 60, 180, .04); }
.admin-cell-num  { font-variant-numeric: tabular-nums; }
.admin-cell-date { color: var(--muted); white-space: nowrap; }
.admin-cell-by   { color: var(--muted); font-size: 12px; }
.admin-cell-usecase {
    max-width: 320px;
    color: var(--muted);
    font-size: 13px;
    white-space: pre-wrap;
    word-break: break-word;
}
.admin-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.admin-pill-yes   { background: rgba(46, 204, 113, .12); color: #6edc9b; border: 1px solid rgba(46, 204, 113, .25); }
.admin-pill-no    { background: rgba(255, 180, 80, .12); color: #ffce8a; border: 1px solid rgba(255, 180, 80, .25); }
.admin-pill-admin { background: linear-gradient(135deg, rgba(138, 99, 255, .25), rgba(100, 231, 255, .2)); color: var(--accent-2); border: 1px solid rgba(138, 99, 255, .35); }

@media (max-width: 600px) {
    .landing-nav-link { display: none; }
    .landing-trust-row { flex-direction: column; gap: 8px; }
    .invite-row { flex-direction: column; }
    .invite-field-credits { flex: 1; }
    .landing-footer .footer-content { flex-direction: column; }
}
/* ── Stems opt-in switch (v1.1 — replaces basic checkbox) ───────────────── */
/* Override the earlier .stems-optin-row block. */
.stems-optin-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, rgba(138, 99, 255, .06), rgba(100, 231, 255, .04));
    border: 1px solid rgba(138, 99, 255, .18);
    border-radius: 14px;
    cursor: pointer;
    transition: background .2s, border-color .2s, box-shadow .2s, transform .15s;
    position: relative;
    overflow: hidden;
}
.stems-optin-row::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(360px 100px at 0% 50%, rgba(138, 99, 255, .12), transparent 70%);
    opacity: 0;
    transition: opacity .25s;
    pointer-events: none;
}
.stems-optin-row:hover { border-color: rgba(138, 99, 255, .42); box-shadow: 0 8px 22px -10px rgba(138, 99, 255, .35); transform: translateY(-1px); }
.stems-optin-row:hover::before { opacity: 1; }
.stems-optin-row:has(input:checked) {
    background: linear-gradient(135deg, rgba(138, 99, 255, .12), rgba(100, 231, 255, .08));
    border-color: rgba(100, 231, 255, .45);
    box-shadow: 0 6px 18px -8px rgba(100, 231, 255, .3), inset 0 0 0 1px rgba(100, 231, 255, .12);
}

.stems-optin-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(138, 99, 255, .2), rgba(100, 231, 255, .15));
    color: var(--accent-2);
    flex: 0 0 auto;
    transition: transform .3s ease, filter .2s;
}
.stems-optin-row:has(input:checked) .stems-optin-icon {
    transform: rotate(15deg) scale(1.05);
    filter: brightness(1.2);
}

.stems-optin-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.stems-optin-title {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-weight: 600; font-size: 14.5px; color: var(--text);
    letter-spacing: -.005em;
}
.stems-optin-hint  { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.stems-optin-cost {
    display: inline-block;
    padding: 3px 9px;
    background: linear-gradient(135deg, rgba(100, 231, 255, .18), rgba(138, 99, 255, .12));
    border: 1px solid rgba(100, 231, 255, .35);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: .04em;
    color: var(--accent-2);
    text-transform: uppercase;
    white-space: nowrap;
}

/* The actual switch */
.stems-optin-switch {
    position: relative;
    flex: 0 0 auto;
    width: 52px; height: 30px;
}
.stems-optin-switch input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 100%; height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 2;
}
.stems-optin-track {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, .08);
    border: 1px solid var(--ring);
    border-radius: 999px;
    transition: background .25s, border-color .25s, box-shadow .25s;
}
.stems-optin-thumb {
    position: absolute;
    top: 3px; left: 3px;
    width: 22px; height: 22px;
    background: #f0f4ff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .35);
    transition: transform .28s cubic-bezier(.34, 1.56, .64, 1), background .25s;
}
.stems-optin-switch input[type="checkbox"]:checked ~ .stems-optin-track {
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
    box-shadow: 0 4px 14px -2px rgba(138, 99, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .12);
}
.stems-optin-switch input[type="checkbox"]:checked ~ .stems-optin-track .stems-optin-thumb {
    transform: translateX(22px);
    background: #fff;
}
.stems-optin-switch input[type="checkbox"]:focus-visible ~ .stems-optin-track {
    outline: 2px solid var(--accent-2);
    outline-offset: 2px;
}

body.light-mode .stems-optin-row {
    background: linear-gradient(135deg, rgba(138, 99, 255, .04), rgba(100, 231, 255, .03));
    border-color: rgba(138, 99, 255, .22);
}
body.light-mode .stems-optin-row:has(input:checked) {
    background: linear-gradient(135deg, rgba(138, 99, 255, .1), rgba(100, 231, 255, .07));
    border-color: rgba(100, 231, 255, .55);
}
body.light-mode .stems-optin-track { background: rgba(80, 60, 180, .1); }
body.light-mode .stems-optin-thumb { background: #fff; }

@media (max-width: 520px) {
    .stems-optin-row { padding: 12px 14px; gap: 12px; }
    .stems-optin-icon { width: 38px; height: 38px; }
    .stems-optin-icon svg { width: 18px; height: 18px; }
    .stems-optin-title { font-size: 13.5px; }
}
/* ── MPAA-style rating picker (controls the shoosh threshold) ──────────── */
.rating-picker {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin: 18px 0 22px;
}
.rating-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px 4px 10px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    color: var(--text);
    text-align: center;
    font-family: inherit;
}
.rating-card:hover { transform: translateY(-2px); }
.rating-card:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.rating-card.is-selected {
    background: linear-gradient(180deg, rgba(138, 99, 255, .12), rgba(100, 231, 255, .04));
    border-color: rgba(138, 99, 255, .45);
    box-shadow: 0 12px 28px -14px rgba(138, 99, 255, .55), inset 0 0 0 1px rgba(100, 231, 255, .08);
}

.rating-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 56px;
    background: linear-gradient(180deg, #f8f5ec, #d8d1bc);
    color: #0a0d18;
    border: 2px solid #0a0d18;
    border-radius: 4px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .35) inset,
        0 2px 6px rgba(0, 0, 0, .35),
        0 0 0 1px rgba(255, 255, 255, .08);
    transition: transform .2s ease, filter .2s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}
.rating-box-wide { width: 84px; }
.rating-box::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .35) 0%, transparent 35%),
        repeating-linear-gradient(180deg, rgba(0, 0, 0, .02) 0 2px, transparent 2px 4px);
    pointer-events: none;
    mix-blend-mode: multiply;
    opacity: .9;
}
.rating-card:hover .rating-box { transform: scale(1.04); filter: brightness(1.05); }
.rating-card.is-selected .rating-box {
    box-shadow:
        0 1px 0 rgba(255, 255, 255, .4) inset,
        0 6px 18px rgba(138, 99, 255, .35),
        0 0 0 2px rgba(138, 99, 255, .35);
    transform: scale(1.06);
}

.rating-letter {
    position: relative;
    z-index: 1;
    font-family: "Georgia", "Times New Roman", "Bookman", serif;
    font-weight: 800;
    font-size: 28px;
    letter-spacing: .01em;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .25);
}
.rating-box-wide .rating-letter { font-size: 22px; letter-spacing: .04em; }

.rating-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    line-height: 1.25;
    transition: color .2s ease;
}
.rating-card:hover .rating-label,
.rating-card.is-selected .rating-label { color: var(--text); }

/* Per-rating tint on the MPAA box — adds personality, keeps recognisability */
.rating-card[data-rating="G"]     .rating-box { background: linear-gradient(180deg, #d8f5d8, #9fd7a3); }
.rating-card[data-rating="PG"]    .rating-box { background: linear-gradient(180deg, #e6f6ff, #b9deef); }
.rating-card[data-rating="PG-13"] .rating-box { background: linear-gradient(180deg, #fff1c8, #f3c46a); }
.rating-card[data-rating="R"]     .rating-box { background: linear-gradient(180deg, #ffd9d2, #f08e7c); }
.rating-card[data-rating="NC-17"] .rating-box { background: linear-gradient(180deg, #ffc9c9, #d9484a); color: #0a0d18; }

body.light-mode .rating-card.is-selected {
    background: linear-gradient(180deg, rgba(138, 99, 255, .08), rgba(100, 231, 255, .04));
    border-color: rgba(138, 99, 255, .35);
}

@media (max-width: 560px) {
    .rating-picker { gap: 6px; }
    .rating-box { width: 48px; height: 44px; }
    .rating-box-wide { width: 64px; }
    .rating-letter { font-size: 20px; }
    .rating-box-wide .rating-letter { font-size: 15px; }
    .rating-label { font-size: 9px; letter-spacing: .08em; }
}
/* ── Landing nav brand — large logo ───────────────────────────────────── */
.landing-nav { padding-top: 8px; padding-bottom: 8px; }
.landing-nav-brand {
    height: 108px;
    text-decoration: none;
    transition: opacity .2s ease;
}
.landing-nav-brand:hover { opacity: .85; }
.landing-nav-brand img {
    height: 100px;
    width: auto;
    display: block;
}
@media (max-width: 600px) {
    .landing-nav-brand { height: 76px; }
    .landing-nav-brand img { height: 68px; }
}

/* ── Landing footer — host the animated waveform ──────────────────────── */
.landing-footer {
    position: relative;
    padding-bottom: 56px; /* room for the absolute waveform bar */
}
.landing-footer .waveform-footer {
    /* inherits .waveform-footer base styles (absolute, bottom:0, 40px) */
    background: linear-gradient(180deg, transparent, rgba(8, 12, 24, .8) 35%);
}
/* ═══════════════════════════════════════════════════════════════════════════
   Intro overlay — drag-to-silence eye-catcher (landing, first visit only)
   ═══════════════════════════════════════════════════════════════════════════ */
.intro-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    background:
        radial-gradient(900px 600px at 50% 35%, rgba(138, 99, 255, .22), transparent 60%),
        radial-gradient(800px 500px at 50% 90%, rgba(100, 231, 255, .15), transparent 60%),
        radial-gradient(circle at 50% 50%, #0c1024 0%, #050811 70%, #03050b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .6s ease;
    cursor: grab;
}
.intro-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}
.intro-overlay.is-visible:active { cursor: grabbing; }
.intro-overlay.is-leaving {
    opacity: 0;
    transition: opacity .65s ease;
}

.intro-stage {
    position: relative;
    width: min(1100px, 92vw);
    text-align: center;
    padding: 0 24px;
}

.intro-eyebrow {
    font-family: "Georgia", "Times New Roman", serif;
    font-weight: 800;
    letter-spacing: .65em;
    font-size: 13px;
    color: var(--accent-2);
    opacity: .8;
    margin-bottom: 12px;
    padding-left: .65em;
    animation: intro-eyebrow-in .9s ease both;
}
.intro-headline {
    font-size: clamp(22px, 3.4vw, 38px);
    font-weight: 800;
    color: var(--text);
    letter-spacing: -.01em;
    margin: 0 0 38px;
    animation: intro-eyebrow-in 1s ease .15s both;
}
.intro-red {
    background: linear-gradient(120deg, #ff5d6c, #ff8e9b);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 12px rgba(255, 93, 108, .35);
    font-style: italic;
}

.intro-waveform {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin: 0 auto;
    padding: 0 12px;
    animation: intro-eyebrow-in 1.1s ease .35s both;
}
.intro-bar {
    flex: 1;
    max-width: 6px;
    min-width: 1px;
    height: 12px;
    border-radius: 3px 3px 0 0;
    background: linear-gradient(180deg, rgba(138, 99, 255, .8), rgba(100, 231, 255, .6));
    box-shadow: 0 0 10px rgba(138, 99, 255, .2);
    transition: height .35s ease, background .35s ease, box-shadow .35s ease, opacity .35s ease;
    align-self: center;
    pointer-events: none;
}
.intro-bar.intro-bar-bad {
    background: linear-gradient(180deg, #ff4d5e, #ff8a98);
    box-shadow: 0 0 14px rgba(255, 77, 94, .55), 0 0 26px rgba(255, 77, 94, .25);
    animation: intro-bar-pulse 1.6s ease-in-out infinite;
}
@keyframes intro-bar-pulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255, 77, 94, .45); transform: scaleY(1); }
    50%      { box-shadow: 0 0 22px rgba(255, 77, 94, .85), 0 0 36px rgba(255, 77, 94, .35); transform: scaleY(1.06); }
}
.intro-bar.intro-bar-silenced {
    background: linear-gradient(180deg, #2ecc71, #64e7ff);
    box-shadow: 0 0 18px rgba(46, 204, 113, .45);
    opacity: .8;
    animation: none;
}

.intro-hint {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 28px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 999px;
    font-size: 14px;
    color: var(--muted);
    animation: intro-hint-pulse 2s ease-in-out infinite;
}
.intro-counter {
    display: inline-block;
    min-width: 12px;
    font-weight: 800;
    color: #ff8a98;
}

.intro-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: visible;
}
.intro-particle {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--accent-2) 35%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: intro-particle-fly .8s ease-out forwards;
    box-shadow: 0 0 14px rgba(100, 231, 255, .9);
}
@keyframes intro-particle-fly {
    0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(.3); opacity: 0; }
}

.intro-skip {
    position: absolute;
    top: 22px;
    right: 26px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 999px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color .15s, background .15s, border-color .15s;
    z-index: 2;
}
.intro-skip:hover { color: var(--text); background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); }

@keyframes intro-eyebrow-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes intro-hint-pulse {
    0%, 100% { opacity: .7; }
    50%      { opacity: 1; }
}

@media (max-width: 600px) {
    .intro-headline { font-size: 20px; margin-bottom: 26px; }
    .intro-waveform { height: 160px; padding: 0 6px; }
    .intro-bar { max-width: 4px; }
    .intro-skip { top: 14px; right: 14px; padding: 6px 12px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .intro-overlay, .intro-eyebrow, .intro-headline, .intro-waveform { animation: none !important; }
    .intro-bar { transition: none !important; animation: none !important; }
}
/* ── Intro v2: multi-act headline, takeover button, scanner sweep ─────── */

/* Multi-line headline — each line is animated in for its act */
.intro-headline {
    position: relative;
    display: block;
    min-height: 3.4em;
}
.intro-headline .intro-line {
    display: block;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .45s ease, transform .45s ease;
    position: absolute;
    inset: 0;
    line-height: 1.2;
}
.intro-headline.is-act1 .intro-line-1,
.intro-headline.is-act2 .intro-line-2,
.intro-headline.is-act3 .intro-line-3,
.intro-headline.is-act4 .intro-line-4 {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

/* Extended stage — wider waveform after act 1 */
.intro-stage {
    transition: max-width .55s ease;
    max-width: min(900px, 92vw);
    margin: 0 auto;
}
.intro-stage.is-extended {
    max-width: min(1500px, 98vw);
}
.intro-waveform {
    transition: padding .4s ease, gap .4s ease;
}

/* Bars that are being added during ACT 2 animate in from zero */
.intro-bar.intro-bar-incoming {
    height: 0 !important;
    opacity: 0;
    transition: height .5s ease, opacity .5s ease, background .35s ease, box-shadow .35s ease;
}

/* AI thinking dots (shown during act 3) */
.intro-ai-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    opacity: 0;
    transition: opacity .25s ease;
}
.intro-ai-dots span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent-2);
    animation: intro-dot-bounce 1s ease-in-out infinite;
}
.intro-ai-dots span:nth-child(2) { animation-delay: .15s; }
.intro-ai-dots span:nth-child(3) { animation-delay: .3s; }
.intro-ai-dots.is-thinking { opacity: 1; }
@keyframes intro-dot-bounce {
    0%, 80%, 100% { transform: translateY(0); opacity: .35; }
    40%           { transform: translateY(-4px); opacity: 1; }
}

/* Takeover button */
.intro-takeover {
    margin: 28px auto 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px 14px 22px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .01em;
    cursor: pointer;
    box-shadow:
        0 8px 26px -8px rgba(138, 99, 255, .65),
        0 0 0 1px rgba(255, 255, 255, .12) inset;
    opacity: 0;
    transform: translateY(8px) scale(.96);
    transition: opacity .45s ease, transform .45s cubic-bezier(.34, 1.56, .64, 1), filter .15s ease, box-shadow .25s ease;
    animation: intro-takeover-pulse 1.6s ease-in-out 1s infinite;
    position: relative;
    z-index: 3;
}
.intro-takeover.is-revealed { opacity: 1; transform: translateY(0) scale(1); }
.intro-takeover.is-leaving  { opacity: 0; transform: translateY(-4px) scale(.96); animation: none; }
.intro-takeover:hover {
    filter: brightness(1.08);
    box-shadow:
        0 12px 36px -8px rgba(138, 99, 255, .85),
        0 0 0 1px rgba(255, 255, 255, .2) inset;
}
.intro-takeover svg { display: inline-block; }
.intro-takeover svg:first-child { filter: drop-shadow(0 0 6px rgba(255, 230, 255, .8)); }
@keyframes intro-takeover-pulse {
    0%, 100% { box-shadow: 0 8px 26px -8px rgba(138, 99, 255, .65), 0 0 0 1px rgba(255, 255, 255, .12) inset, 0 0 0 0 rgba(100, 231, 255, 0); }
    50%      { box-shadow: 0 14px 36px -8px rgba(138, 99, 255, .85), 0 0 0 1px rgba(255, 255, 255, .15) inset, 0 0 0 14px rgba(100, 231, 255, 0); }
}

/* Scanner sweep that moves across the waveform during ACT 3 */
.intro-scanner {
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, transparent, var(--accent-2) 30%, #fff 50%, var(--accent-2) 70%, transparent);
    box-shadow: 0 0 18px rgba(100, 231, 255, .85), 0 0 36px rgba(100, 231, 255, .55);
    opacity: 0;
    pointer-events: none;
    transform: translateX(0);
    z-index: 2;
}
.intro-scanner.is-scanning {
    opacity: 1;
    animation: intro-scan-sweep 2.6s cubic-bezier(.6, .2, .4, .9) forwards;
}
@keyframes intro-scan-sweep {
    from { transform: translateX(0); opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    to   { transform: translateX(calc(100% + var(--scanner-pad, 0px))); opacity: 0; }
}
.intro-waveform { position: relative; }

/* Brief highlight on bars right before SHOOSH silences them (act 3) */
.intro-bar.intro-bar-highlight {
    box-shadow: 0 0 26px rgba(255, 255, 255, .95), 0 0 40px rgba(255, 77, 94, .85) !important;
    transform: scaleY(1.18);
}

/* The eyebrow shrinks slightly during ACT 3+ to give the action room */
.intro-headline.is-act3 ~ * .intro-eyebrow,
.intro-headline.is-act4 ~ * .intro-eyebrow { opacity: .5; }

@media (max-width: 600px) {
    .intro-takeover { font-size: 13px; padding: 12px 20px 12px 18px; }
}
/* ═══════════════════════════════════════════════════════════════════════════
   Landing v2 — methods grid, use-cases carousel, FAQ, team
   ═══════════════════════════════════════════════════════════════════════════ */

.landing-section-sub {
    text-align: center;
    color: var(--muted);
    margin: 0 auto 36px;
    max-width: 640px;
    font-size: 15px;
    line-height: 1.55;
}

/* Reveal-on-hover for "How it works" feature cards */
.landing-feature.reveal-on-hover { position: relative; overflow: hidden; cursor: default; }
.landing-feature.reveal-on-hover .reveal-extra {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--ring);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height .4s ease, opacity .35s ease, margin-top .35s ease, padding-top .35s ease;
}
.landing-feature.reveal-on-hover .reveal-extra p {
    font-size: 13px;
    line-height: 1.55;
    color: var(--muted);
    margin: 0 0 10px;
}
.landing-feature.reveal-on-hover .reveal-extra p:last-child { margin-bottom: 0; }
.landing-feature.reveal-on-hover .reveal-extra code {
    background: rgba(255, 255, 255, .06);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: .9em;
    color: var(--accent-2);
}
.landing-feature.reveal-on-hover:hover .reveal-extra,
.landing-feature.reveal-on-hover:focus-within .reveal-extra {
    max-height: 320px;
    opacity: 1;
}

/* ── Methods showcase ──────────────────────────────────────────────────── */
.landing-methods {
    padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px);
    max-width: 1200px;
    margin: 0 auto;
}
.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}
.method-card {
    position: relative;
    padding: 24px 22px 22px;
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform .25s ease, border-color .25s ease, box-shadow .3s ease, background .25s ease;
    overflow: hidden;
}
.method-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(280px 200px at 50% -10%, rgba(138, 99, 255, .2), transparent 70%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.method-card:hover, .method-card:focus-visible {
    transform: translateY(-3px);
    border-color: rgba(138, 99, 255, .45);
    box-shadow: 0 12px 32px -16px rgba(138, 99, 255, .55);
    outline: none;
}
.method-card:hover::before, .method-card:focus-visible::before { opacity: 1; }
.method-card-icon {
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(138, 99, 255, .18), rgba(100, 231, 255, .1));
    color: var(--accent-2);
    margin-bottom: 14px;
    transition: transform .25s ease;
}
.method-card:hover .method-card-icon { transform: scale(1.08) rotate(-2deg); }
.method-card-title { margin: 0 0 4px; font-size: 17px; }
.method-card-tag {
    display: inline-block;
    margin: 0 0 12px;
    padding: 2px 9px;
    background: rgba(100, 231, 255, .1);
    color: var(--accent-2);
    border: 1px solid rgba(100, 231, 255, .25);
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.method-card-desc { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.method-card-custom { background: linear-gradient(180deg, rgba(138, 99, 255, .08), rgba(100, 231, 255, .04)); }

/* ── Use-cases carousel ──────────────────────────────────────────────── */
.landing-use-cases {
    padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px);
    max-width: 1200px;
    margin: 0 auto;
}
.use-cases-frame {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}
.use-cases-viewport {
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius);
}
.use-cases-track {
    display: flex;
    gap: 20px;
    transition: transform .45s cubic-bezier(.4, .2, .2, 1);
}
.use-case-card {
    flex: 0 0 calc((100% - 40px) / 3);
    padding: 28px 26px;
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: var(--radius);
    transition: border-color .2s, transform .2s, box-shadow .25s;
}
.use-case-card:hover {
    transform: translateY(-2px);
    border-color: rgba(100, 231, 255, .35);
    box-shadow: 0 10px 28px -14px rgba(100, 231, 255, .35);
}
.use-case-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px; height: 48px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(138, 99, 255, .15), rgba(100, 231, 255, .1));
    font-size: 26px;
}
.use-case-card h3 { margin: 0 0 8px; font-size: 18px; }
.use-case-card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.carousel-arrow {
    flex-shrink: 0;
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--ring);
    color: var(--text);
    border-radius: 50%;
    cursor: pointer;
    transition: border-color .2s, color .2s, background .2s;
}
.carousel-arrow:hover:not(:disabled) {
    border-color: rgba(138, 99, 255, .55);
    background: rgba(138, 99, 255, .08);
}
.carousel-arrow:disabled { opacity: .35; cursor: not-allowed; }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.carousel-dot {
    width: 8px; height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--ring);
    cursor: pointer;
    transition: background .2s, transform .2s;
}
.carousel-dot.is-active { background: linear-gradient(135deg, var(--accent), var(--accent-2)); transform: scale(1.25); }
.carousel-dot:hover { background: var(--accent); }

@media (max-width: 880px) {
    .use-case-card { flex: 0 0 calc((100% - 20px) / 2); }
}
@media (max-width: 560px) {
    .use-case-card { flex: 0 0 100%; }
    .use-cases-frame { gap: 6px; }
    .carousel-arrow { width: 36px; height: 36px; }
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */
.landing-faq {
    padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px);
    max-width: 820px;
    margin: 0 auto;
}
.faq-list { display: flex; flex-direction: column; gap: 12px; margin-top: 30px; }
.faq-item {
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color .2s;
}
.faq-item[open] { border-color: rgba(138, 99, 255, .45); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 18px 50px 18px 22px;
    font-weight: 600;
    font-size: 15px;
    position: relative;
    color: var(--text);
    transition: background .15s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { background: rgba(255, 255, 255, .02); }
.faq-item summary::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 50%;
    width: 10px; height: 10px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: translateY(-65%) rotate(45deg);
    transition: transform .25s ease, border-color .25s;
}
.faq-item[open] summary::after {
    transform: translateY(-30%) rotate(-135deg);
    border-color: var(--accent-2);
}
.faq-item p {
    margin: 0;
    padding: 0 22px 20px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}
.faq-item p strong { color: var(--text); }

/* ── Team ─────────────────────────────────────────────────────────────── */
.landing-team {
    padding: clamp(60px, 8vw, 100px) clamp(20px, 4vw, 48px);
    max-width: 1100px;
    margin: 0 auto;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    margin-top: 30px;
}
.team-card {
    padding: 28px 22px 26px;
    background: var(--card);
    border: 1px solid var(--ring);
    border-radius: var(--radius);
    text-align: center;
    transition: border-color .2s, transform .2s, box-shadow .25s;
}
.team-card:hover {
    transform: translateY(-3px);
    border-color: rgba(138, 99, 255, .4);
    box-shadow: 0 14px 32px -18px rgba(138, 99, 255, .45);
}
.team-photo {
    width: 96px; height: 96px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Georgia", serif;
    font-weight: 800;
    font-size: 32px;
    color: #fff;
    letter-spacing: .04em;
    box-shadow:
        inset 0 0 0 3px rgba(255, 255, 255, .15),
        0 10px 32px -10px rgba(138, 99, 255, .5);
}
.team-name { margin: 0 0 4px; font-size: 18px; }
.team-role { margin: 0 0 12px; font-size: 13px; color: var(--accent-2); letter-spacing: .04em; font-weight: 600; }
.team-bio { margin: 0; font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.team-footnote {
    text-align: center;
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
    font-style: italic;
}

@media (max-width: 600px) {
    .landing-nav-actions .landing-nav-link { display: none; }
}
/* Intro eyebrow as logo */
.intro-eyebrow-logo {
    padding-left: 0;
    margin-bottom: 22px;
    line-height: 1;
}
.intro-eyebrow-logo img {
    height: 100px;
    width: auto;
    display: inline-block;
    filter: drop-shadow(0 0 24px rgba(138, 99, 255, .45)) drop-shadow(0 0 8px rgba(100, 231, 255, .3));
}
@media (max-width: 600px) {
    .intro-eyebrow-logo img { height: 68px; }
}
/* Intro v2.1 — inline AI dots + done check, centered hint */
.intro-hint {
    justify-content: center;
}
.intro-hint .intro-ai-dots {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 0 4px;
    vertical-align: middle;
    opacity: 1; /* visible whenever rendered inline */
}
.intro-hint-check {
    display: inline-block;
    margin-right: 6px;
    color: var(--success, #2ecc71);
    font-weight: 700;
}
/* ── Team photos: actual images, B&W ──────────────────────────────────── */
.team-photo {
    overflow: hidden;
}
.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.05);
    transition: filter .3s ease, transform .3s ease;
}
.team-card:hover .team-photo img {
    filter: grayscale(1) contrast(1.1) brightness(1.05);
    transform: scale(1.04);
}

/* ── Mobile padding tightening ────────────────────────────────────────── */
@media (max-width: 600px) {
    .landing-nav { padding-left: 14px; padding-right: 14px; }
    .landing-hero { padding-left: 16px; padding-right: 16px; }
    .landing-how,
    .landing-methods,
    .landing-use-cases,
    .landing-faq,
    .landing-team,
    .landing-waitlist {
        padding-left: 16px;
        padding-right: 16px;
    }
    .landing-waitlist-card { padding: 22px 18px; }
    .landing-footer .footer-content { padding-left: 4px; padding-right: 4px; }
    .landing-h1 { line-height: 1.08; }
}
/* ── Mobile burger menu ───────────────────────────────────────────────── */
.landing-nav-burger {
    display: none;
    position: relative;
    width: 42px;
    height: 42px;
    padding: 0;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 12px;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}
.landing-nav-burger:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
.landing-nav-burger span {
    position: absolute;
    left: 50%;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s ease, opacity .2s ease, top .3s ease;
    transform: translateX(-50%);
}
.landing-nav-burger span:nth-child(1) { top: 13px; }
.landing-nav-burger span:nth-child(2) { top: 20px; }
.landing-nav-burger span:nth-child(3) { top: 27px; }
.landing-nav-burger.is-open span:nth-child(1) { top: 20px; transform: translateX(-50%) rotate(45deg); }
.landing-nav-burger.is-open span:nth-child(2) { opacity: 0; }
.landing-nav-burger.is-open span:nth-child(3) { top: 20px; transform: translateX(-50%) rotate(-45deg); }

.landing-nav-mobile {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    padding: 80px 28px 40px;
    background:
        radial-gradient(700px 500px at 50% 0%, rgba(138, 99, 255, .25), transparent 70%),
        radial-gradient(700px 500px at 50% 100%, rgba(100, 231, 255, .18), transparent 70%),
        radial-gradient(circle at 50% 50%, #0c1024 0%, #050811 90%);
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s ease;
    overflow-y: auto;
}
.landing-nav-mobile.is-open {
    opacity: 1;
    visibility: visible;
}
.landing-nav-mobile-close {
    position: absolute;
    top: 22px;
    right: 22px;
    width: 42px; height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .04);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 50%;
    color: var(--text);
    cursor: pointer;
    transition: background .2s;
}
.landing-nav-mobile-close:hover { background: rgba(255, 255, 255, .12); }

.landing-nav-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 32px;
}
.landing-nav-mobile-link {
    display: block;
    padding: 18px 8px;
    color: var(--text);
    text-decoration: none;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-align: center;
    border-radius: 14px;
    transition: background .2s, color .2s, transform .15s;
    opacity: 0;
    transform: translateY(8px);
}
.landing-nav-mobile.is-open .landing-nav-mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .35s ease, transform .35s ease, background .2s;
}
.landing-nav-mobile.is-open .landing-nav-mobile-link:nth-child(1) { transition-delay: .05s; }
.landing-nav-mobile.is-open .landing-nav-mobile-link:nth-child(2) { transition-delay: .1s; }
.landing-nav-mobile.is-open .landing-nav-mobile-link:nth-child(3) { transition-delay: .15s; }
.landing-nav-mobile.is-open .landing-nav-mobile-link:nth-child(4) { transition-delay: .2s; }
.landing-nav-mobile.is-open .landing-nav-mobile-link:nth-child(5) { transition-delay: .25s; }
.landing-nav-mobile.is-open .landing-nav-mobile-link:nth-child(6) { transition-delay: .3s; }
.landing-nav-mobile-link:hover, .landing-nav-mobile-link:focus-visible {
    background: rgba(138, 99, 255, .12);
    color: var(--accent-2);
    outline: none;
}

.landing-nav-mobile-login {
    margin: 0 auto;
    padding: 14px 36px;
    font-size: 16px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    align-self: center;
    box-shadow: 0 10px 28px -10px rgba(138, 99, 255, .5);
    transition: filter .15s, transform .15s;
    opacity: 0;
    transform: translateY(8px);
}
.landing-nav-mobile.is-open .landing-nav-mobile-login {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .35s ease .35s, transform .35s ease .35s, filter .15s;
}
.landing-nav-mobile-login:hover { filter: brightness(1.08); }

@media (max-width: 720px) {
    .landing-nav-actions .landing-nav-link,
    .landing-nav-actions #navLoginBtn { display: none; }
    .landing-nav-burger { display: inline-flex; align-items: center; justify-content: center; }
}
@media (min-width: 721px) {
    .landing-nav-mobile { display: none !important; }
}
/* Intro v2.2 — stack hint pill and takeover button vertically, both centered */
.intro-hint {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.intro-takeover {
    display: flex;
    width: fit-content;
    max-width: 100%;
    margin: 18px auto 0;
}
/* ── Hard-blocked section backgrounds (alternating, full-bleed) ────────── */
.landing-how,
.landing-methods,
.landing-use-cases,
.landing-faq,
.landing-team,
.landing-waitlist {
    position: relative;
    isolation: isolate;
}
.landing-how::before,
.landing-methods::before,
.landing-use-cases::before,
.landing-faq::before,
.landing-team::before,
.landing-waitlist::before {
    content: "";
    position: absolute;
    inset: 0;
    width: 100vw;
    left: calc(-1 * (100vw - 100%) / 2);
    z-index: -1;
    pointer-events: none;
}
body.light-mode .landing-how::before,
body.light-mode .landing-methods::before,
body.light-mode .landing-use-cases::before,
body.light-mode .landing-faq::before,
body.light-mode .landing-team::before,
body.light-mode .landing-waitlist::before {
    /* Light-mode blocks (subtle variations of card/bg) */
}

/* Dark mode (default) — block colors with hard boundaries */
.landing-how::before {
    background:
        radial-gradient(900px 360px at 50% 0%, rgba(138, 99, 255, .12), transparent 70%),
        #0a0f24;
}
.landing-methods::before {
    background:
        radial-gradient(900px 360px at 10% 50%, rgba(100, 231, 255, .08), transparent 60%),
        #06091a;
}
.landing-use-cases::before {
    background:
        radial-gradient(900px 400px at 90% 50%, rgba(138, 99, 255, .1), transparent 60%),
        #0a0f24;
}
.landing-faq::before {
    background:
        radial-gradient(700px 320px at 50% 0%, rgba(100, 231, 255, .07), transparent 70%),
        #06091a;
}
.landing-team::before {
    background:
        radial-gradient(800px 320px at 50% 100%, rgba(138, 99, 255, .12), transparent 70%),
        #0a0f24;
}
.landing-waitlist::before {
    background:
        radial-gradient(1000px 500px at 50% 50%, rgba(138, 99, 255, .18), transparent 60%),
        radial-gradient(900px 500px at 50% 0%, rgba(100, 231, 255, .12), transparent 60%),
        #060d22;
}

/* Hard accent line at the TOP of each section as a clean divider */
.landing-methods::after,
.landing-use-cases::after,
.landing-faq::after,
.landing-team::after,
.landing-waitlist::after {
    content: "";
    position: absolute;
    top: 0;
    left: calc(-1 * (100vw - 100%) / 2);
    width: 100vw;
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(138, 99, 255, .35) 35%, rgba(100, 231, 255, .35) 65%, transparent 95%);
    z-index: -1;
    pointer-events: none;
}

/* Light mode block colors (override) */
body.light-mode .landing-how::before     { background: radial-gradient(900px 360px at 50% 0%, rgba(138, 99, 255, .08), transparent 70%), #eef0fa; }
body.light-mode .landing-methods::before { background: radial-gradient(900px 360px at 10% 50%, rgba(100, 231, 255, .08), transparent 60%), #f6f7fc; }
body.light-mode .landing-use-cases::before { background: radial-gradient(900px 400px at 90% 50%, rgba(138, 99, 255, .07), transparent 60%), #eef0fa; }
body.light-mode .landing-faq::before     { background: radial-gradient(700px 320px at 50% 0%, rgba(100, 231, 255, .06), transparent 70%), #f6f7fc; }
body.light-mode .landing-team::before    { background: radial-gradient(800px 320px at 50% 100%, rgba(138, 99, 255, .08), transparent 70%), #eef0fa; }
body.light-mode .landing-waitlist::before { background: radial-gradient(1000px 500px at 50% 50%, rgba(138, 99, 255, .1), transparent 60%), #f3f4fb; }

/* Hero remains the dark radial-glow open canvas (no block) */