/* how-it-works.css — shared page stylesheet for the How it works pipeline.
 * Used by BOTH /how-it-works.html (webmaster, in-shell) and /onboarding
 * (label, in-shell). Loaded AFTER dashboard.css + sidebar-dynamic.css —
 * relies on their CSS custom properties (--accent, --bg-card, --text-*, ...).
 * Extracted 2026-05-21 from the how-it-works.html inline <style> block. */

        [v-cloak] { display: none; }

        .doc-container {
            max-width: 980px;
            margin: 0 auto;
            padding: 2rem 2.5rem 4rem;
        }

        /* Hero with FR/EN toggle */
        .doc-hero {
            margin-bottom: 2.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid var(--border);
        }
        .hero-row {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 1rem;
        }
        .doc-hero h1 {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 2.25rem;
            font-weight: 700;
            margin: 0 0 0.5rem;
            letter-spacing: -0.01em;
        }
        /* Audience badge after the mutualized "Onboarding" title (Label / Webmaster). */
        .doc-hero h1 .hero-aud {
            font-size: 1rem;
            font-weight: 500;
            letter-spacing: 0.04em;
            text-transform: uppercase;
            color: var(--accent-emphasis);
            opacity: 0.85;
            vertical-align: middle;
            margin-left: 0.35rem;
        }
        .doc-hero p {
            color: var(--text-secondary);
            font-size: 1rem;
            max-width: 720px;
            line-height: 1.6;
        }
        .hub-skip-note {
            font-size: 0.85rem !important;
            color: var(--text-muted) !important;
            margin-top: 0.6rem !important;
            font-style: italic;
        }
        .lang-toggle {
            display: inline-flex;
            gap: 4px;
            flex-shrink: 0;
        }
        .lang-toggle button {
            border: 1px solid var(--border);
            background: var(--bg-card);
            color: var(--text-secondary);
            padding: 0.4rem 0.85rem;
            border-radius: 999px;
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.78rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
        }
        .lang-toggle button:hover {
            color: var(--text-primary);
            border-color: var(--accent-emphasis);
        }
        .lang-toggle button.active {
            background: var(--accent);
            color: #ffffff;
            border-color: var(--accent-emphasis);
        }

        /* Step quick-nav (ported from label-onboarding) */
        .step-nav {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-bottom: 2rem;
        }
        .step-nav a {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 600;
            padding: 6px 12px;
            border-radius: 999px;
            border: 1px solid var(--border);
            color: var(--text-secondary);
            text-decoration: none;
            background: var(--bg-card);
            transition: all 0.15s;
        }
        .step-nav a:hover {
            border-color: var(--accent-emphasis);
            color: var(--accent-emphasis);
        }

        /* Timelines clarification callout */
        .timelines-note {
            border: 1px solid var(--accent-glow);
            background: var(--accent-subtle);
            border-radius: 12px;
            padding: 16px 20px;
            margin-bottom: 2rem;
            font-size: 0.92rem;
            line-height: 1.6;
            color: var(--text-secondary);
        }
        .timelines-note p { margin: 0 0 8px; }
        .timelines-note strong { color: var(--text-primary); }
        .timelines-note a {
            display: inline-block;
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--accent-emphasis);
            text-decoration: none;
        }
        .timelines-note a:hover { text-decoration: underline; }

        /* Phase header between step groups */
        .phase-header {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.12em;
            color: var(--text-muted);
            margin: 0.5rem 0 0;
            padding-bottom: 6px;
            border-bottom: 1px solid var(--border);
        }

        /* Per-step note — for automatic / no-action steps */
        .step-note {
            margin: 14px 0 0;
            padding: 10px 14px;
            background: var(--bg-tint-soft);
            border-left: 2px solid var(--text-muted);
            border-radius: 4px;
            font-size: 0.85rem;
            font-style: italic;
            color: var(--text-muted);
        }

        /* Webmaster-only internal control annotation (rendered v-if="isAdmin") */
        .step-internal {
            margin: 14px 0 0;
            padding: 12px 16px;
            background: var(--accent-subtle);
            border: 1px solid var(--accent-glow);
            border-radius: 8px;
        }
        .step-internal-label {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--accent-emphasis);
        }
        .step-internal-tool {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.78rem;
            font-weight: 700;
            color: var(--accent-emphasis);
            text-decoration: none;
            margin-left: 8px;
        }
        a.step-internal-tool:hover { text-decoration: underline; }
        .step-internal-note {
            margin: 6px 0 0;
            font-size: 0.85rem;
            line-height: 1.6;
            color: var(--text-secondary);
        }

        /* Steps — rich detail cards */
        .steps {
            display: flex;
            flex-direction: column;
            gap: 18px;
            margin-bottom: 3.5rem;
        }
        .step-card {
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 28px;
            background: var(--bg-card);
            transition: border-color 0.2s, box-shadow 0.2s;
        }
        .step-card:hover { border-color: var(--border-hover, var(--border)); }
        .step-card:target {
            border-color: var(--accent-emphasis);
            box-shadow: 0 0 0 2px var(--accent-glow);
        }
        .step-header {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-bottom: 18px;
        }
        .step-num {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            color: var(--accent-emphasis);
            background: var(--accent-subtle);
            border: 1px solid var(--accent-glow);
            border-radius: 6px;
            padding: 4px 10px;
            min-width: 28px;
            text-align: center;
        }
        .step-title {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 1.05rem;
            font-weight: 700;
        }
        .step-meta {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            color: var(--text-muted);
            margin-top: 2px;
        }
        .step-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 28px;
        }
        @media (max-width: 720px) {
            .step-grid { grid-template-columns: 1fr; gap: 20px; }
        }
        .step-col-label {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            margin-bottom: 10px;
        }
        .step-col ul {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        .step-col li {
            position: relative;
            padding-left: 18px;
            font-size: 0.92rem;
            color: var(--text-secondary);
            line-height: 1.7;
            margin-bottom: 4px;
        }
        .step-col li::before {
            content: '·';
            position: absolute;
            left: 4px;
            top: 0;
            color: var(--accent-emphasis);
            font-weight: 700;
        }
        .step-specs {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 18px;
            padding-top: 14px;
            border-top: 1px solid var(--border);
            align-items: center;
        }
        .specs-label {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            color: var(--text-muted);
            margin-right: 4px;
        }
        .spec-link {
            font-size: 0.78rem;
            color: var(--accent-emphasis);
            text-decoration: none;
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid var(--accent-glow);
            transition: all 0.15s;
        }
        .spec-link:hover {
            background: var(--accent-subtle);
            border-color: var(--accent-emphasis);
        }
        .specs-tags {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-style: italic;
            color: var(--text-muted);
            margin-left: auto;
        }
        @media (max-width: 720px) {
            .specs-tags { margin-left: 0; margin-top: 6px; }
        }
        .step-cta {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-top: 16px;
            padding: 10px 22px;
            background: var(--text-primary);
            color: var(--bg-dark);
            border-radius: 8px;
            text-decoration: none;
            font-weight: 700;
            font-size: 0.85rem;
            font-family: 'IBM Plex Mono', monospace;
            transition: opacity 0.15s, transform 0.15s;
        }
        .step-cta:hover { opacity: 0.92; transform: translateY(-1px); }

        /* Video Generator — compact card (full guide on /video-generator-guide.html) */
        .vg-card {
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 24px 28px;
            background: var(--bg-card);
            margin-bottom: 3.5rem;
        }
        .vg-card-head {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 10px;
        }
        .vg-card-icon {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            font-weight: 700;
            color: #ffffff;
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            border-radius: 6px;
            padding: 4px 10px;
            min-width: 28px;
            text-align: center;
            flex-shrink: 0;
        }
        .vg-card h2 {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 1.2rem;
            font-weight: 700;
            margin: 0;
        }
        .vg-card p {
            color: var(--text-secondary);
            line-height: 1.6;
            margin: 0 0 16px;
            font-size: 0.95rem;
        }
        .vg-card-actions {
            display: flex;
            gap: 12px;
            flex-wrap: wrap;
            align-items: center;
        }
        .vg-cta {
            display: inline-block;
            background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
            color: #ffffff !important;
            padding: 0.6rem 1.1rem;
            border-radius: 8px;
            text-decoration: none;
            font-weight: 600;
            font-size: 0.9rem;
            transition: opacity 0.15s, transform 0.15s;
        }
        .vg-cta:hover { opacity: 0.92; transform: translateY(-1px); }
        .vg-guide-link {
            font-size: 0.88rem;
            font-weight: 600;
            color: var(--accent-emphasis);
            text-decoration: none;
        }
        .vg-guide-link:hover { text-decoration: underline; }

        /* Track-release form (anonymous) */
        .track-section {
            border-top: 1px solid var(--border);
            padding: 2.5rem 0 0;
            margin: 3rem 0 1.5rem;
            text-align: center;
        }
        .track-inner { max-width: 460px; margin: 0 auto; }
        .track-inner h2 {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 1.15rem;
            margin-bottom: 0.5rem;
        }
        .track-inner > p {
            font-size: 0.92rem;
            color: var(--text-secondary);
            margin-bottom: 1.25rem;
        }
        .track-form {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            justify-content: center;
        }
        .track-input {
            flex: 1;
            min-width: 180px;
            padding: 11px 14px;
            background: var(--bg-input, var(--bg-card));
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.92rem;
        }
        .track-input::placeholder { color: var(--text-muted); }
        .track-submit {
            padding: 11px 22px;
            background: var(--text-primary);
            color: var(--bg-dark);
            border: none;
            border-radius: 8px;
            font-weight: 700;
            font-size: 0.92rem;
            cursor: pointer;
        }
        .track-submit:disabled { opacity: 0.4; cursor: not-allowed; }
        .track-msg { margin-top: 0.85rem; font-size: 0.85rem; }
        .track-msg.ok { color: var(--success); }
        .track-msg.err { color: var(--error); }

        /* My releases at a glance widget (authenticated) */
        .my-releases-snapshot {
            border-top: 1px solid var(--border);
            padding-top: 2rem;
            margin: 3rem 0 1.5rem;
        }
        .my-releases-snapshot h2 {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 1.15rem;
            margin-bottom: 0.85rem;
        }
        .snapshot-list {
            list-style: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-direction: column;
            gap: 0.4rem;
        }
        .snapshot-list li {
            display: grid;
            grid-template-columns: 140px 1fr auto auto;
            gap: 1rem;
            align-items: center;
            padding: 0.7rem 1rem;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 0.9rem;
        }
        @media (max-width: 720px) {
            .snapshot-list li { grid-template-columns: 1fr; gap: 0.3rem; }
        }
        .snapshot-list .sku-code {
            font-family: 'IBM Plex Mono', monospace;
            font-weight: 700;
            color: var(--accent-emphasis);
        }
        .snapshot-list .sku-title { color: var(--text-primary); }
        .snapshot-list .sku-stage {
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.06em;
            padding: 0.18rem 0.55rem;
            border-radius: 4px;
            background: var(--accent-subtle);
            color: var(--accent-emphasis);
            border: 1px solid var(--accent-glow);
        }
        .snapshot-list .sku-link {
            color: var(--accent-emphasis);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.85rem;
        }
        .snapshot-list .sku-link:hover { text-decoration: underline; }
        .loading {
            color: var(--text-muted);
            font-style: italic;
            padding: 1rem 0;
        }

        /* Need help section */
        .doc-section { margin-bottom: 2rem; }
        .doc-section h2 {
            font-size: 1.25rem;
            font-weight: 700;
            display: flex;
            align-items: center;
            gap: 0.6rem;
            margin-bottom: 0.6rem;
        }
        .doc-section h2 .step-num {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: var(--accent-subtle);
            color: var(--accent-emphasis);
            font-family: 'IBM Plex Mono', monospace;
            font-size: 0.85rem;
            font-weight: 700;
        }
        .doc-section p {
            color: var(--text-secondary);
            line-height: 1.65;
        }
        .doc-section a { color: var(--accent-emphasis); text-decoration: none; }
        .doc-section a:hover { text-decoration: underline; }

/* Sign-in prompt banner — /onboarding only (redirect from a gated page) */
.signin-prompt {
    max-width: 980px;
    margin: 0 auto 1.5rem;
    padding: 14px 20px;
    border-radius: 10px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-glow);
    color: var(--text-primary);
    font-size: 0.92rem;
    line-height: 1.55;
}
.signin-prompt strong { color: var(--accent-emphasis); font-family: 'IBM Plex Mono', monospace; }
.signin-prompt.err { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.40); }

/* Mobile (≤768px) — the canonical shell switches .sidebar to position:relative,
 * but #app stays a flex ROW: the 100%-width sidebar gets shrunk by the sibling
 * .main-content (flex:1) and the content overflows to the right (measured
 * scrollWidth 539px on a 375px viewport — label-onboarding.html was at 696px).
 * Stack the shell on the doc pages. Scoped here (this stylesheet is loaded only
 * by how-it-works.html / label-onboarding.html / artist-onboarding.html) rather
 * than in dashboard.css, whose 84 app pages are a separate, desktop-first story. */
@media (max-width: 768px) {
    #app {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
    }
    .main-content {
        margin-left: 0;
    }
    /* The hero row (title + FR/EN pill) never wraps: on label-onboarding.html the
     * pill pushed 10px past a 375px viewport. Let it fall under the title. */
    .hero-row {
        flex-wrap: wrap;
    }
}

/* ── Structured guide sections (2026-09-21 — plan super-onboarding-trois-hubs §B1/B2)
 * Hero summary, pillar cards, phase bar, FAQ, glossary, checklist, cross-links.
 * Tokens only — light/dark parity comes from dashboard.css + label-light.css. */

.summary-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 1.5rem;
}
.summary-list li {
    position: relative;
    padding-left: 1.1rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-secondary);
}
.summary-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.9rem;
}
.pillar-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pillar-card {
    display: block;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    text-decoration: none;
}
.pillar-card:hover { border-color: var(--accent-emphasis); }
.pillar-title {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent-emphasis);
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.pillar-body {
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.phase-bar {
    max-width: 980px;
    margin: 0 auto 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}
.phase-counter {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-right: 0.35rem;
    white-space: nowrap;
}
.phase-chip {
    font-size: 0.78rem;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-glow);
    color: var(--accent-emphasis);
    text-decoration: none;
    white-space: nowrap;
}
.phase-chip:hover { border-color: var(--accent-emphasis); }

.faq-list { display: grid; gap: 0.5rem; }
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 1rem;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.92rem;
    list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
    content: '+';
    display: inline-block;
    width: 1.1rem;
    color: var(--accent-emphasis);
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 700;
}
.faq-item[open] summary::before { content: '−'; }
.faq-item p {
    margin: 0.5rem 0 0.15rem 1.1rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.glossary-grid {
    display: grid;
    grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
    gap: 0.35rem 1.25rem;
    margin: 0;
}
.glossary-term {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    padding-top: 0.15rem;
}
.glossary-def {
    margin: 0 0 0.6rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

.checklist-list {
    list-style: none;
    margin: 0;
    padding: 0.9rem 1.1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.checklist-list li {
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.88rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0.45rem;
}
.checklist-list li:last-child { margin-bottom: 0; }
.checklist-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 12px;
    height: 7px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}

.crosslinks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}
.crosslink-card {
    display: block;
    padding: 0.8rem 1rem;
    border-radius: 10px;
    background: var(--accent-subtle);
    border: 1px solid var(--accent-glow);
    text-decoration: none;
}
.crosslink-card:hover { border-color: var(--accent-emphasis); }
.crosslink-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-emphasis);
    margin-bottom: 0.15rem;
}
.crosslink-note {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.crosslink-admin-note {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.crosslink-admin-note a { color: var(--accent-emphasis); text-decoration: none; }

.doc-section[id], .step-card[id] { scroll-margin-top: 1rem; }

@media (max-width: 768px) {
    .summary-list,
    .pillar-grid,
    .pillar-grid-4,
    .glossary-grid {
        grid-template-columns: 1fr;
    }
}

/* Webmaster-only internal notes carry long unbreakable tokens (plan paths,
 * doc anchors). At 375px one of them forced its step card to 389px inside a
 * 245px slot → /how-it-works.html scrolled to 454px. Let them wrap. */
.step-internal,
.step-internal * {
    overflow-wrap: anywhere;
    word-break: break-word;
}
