/* ============================================================================
   OnGig User Manual & Training Hub (/docs & /docs/{slug})
   Consumes tokens exclusively from design-tokens.css; zero external frameworks.
   ============================================================================ */

.docs-toc-filter-bar {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid var(--stage-border-hairline);
}

@media (min-width: 780px) {
    .docs-toc-filter-bar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.docs-toc-search-wrap {
    position: relative;
    flex: 1 1 320px;
    max-width: 460px;
}

.docs-toc-search-input {
    width: 100%;
    min-height: 40px;
    padding: 0.45rem 0.9rem 0.45rem 2.3rem;
    border-radius: 10px;
    border: 1px solid var(--stage-border-subtle);
    background-color: var(--stage-bg-canvas);
    color: var(--stage-text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.docs-toc-search-input::placeholder {
    color: var(--stage-text-muted);
}

.docs-toc-search-input:focus {
    border-color: var(--stage-accent-chord);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.docs-toc-search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--stage-text-muted);
    pointer-events: none;
}

.docs-toc-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.docs-toc-empty {
    margin: 1.75rem 0;
    padding: 1.5rem;
    text-align: center;
    border-radius: var(--token-radius-card);
    border: 1px dashed var(--stage-border-subtle);
    background-color: var(--stage-bg-subtle);
    color: var(--stage-text-secondary);
}

/* Table of Contents Grouped Parts */
.docs-part-section {
    padding: 1.75rem 0;
    border-top: 1px solid var(--stage-border-hairline);
}

.docs-part-section:first-of-type {
    border-top: none;
    padding-top: 0.5rem;
}

.docs-part-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
}

.docs-part-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.docs-part-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stage-accent-cue);
}

.docs-part-header h2 {
    margin: 0;
    font-size: clamp(1.3rem, 2.3vw, 1.65rem);
    letter-spacing: -0.02em;
}

.docs-part-desc {
    margin: 0;
    color: var(--stage-text-muted);
    font-size: 0.92rem;
    max-width: 68ch;
}

.docs-part-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 680px) {
    .docs-part-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1020px) {
    .docs-part-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.docs-topic-card {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.15rem 1.2rem;
    border-radius: var(--token-radius-card);
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.94) 0%, rgba(12, 19, 34, 0.94) 100%);
    border: 1px solid var(--stage-border-hairline);
    box-shadow: var(--stage-shadow-card), inset 0 1px 0 var(--stage-surface-card-top);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.16s ease, transform 0.16s ease;
}

.docs-topic-card:hover {
    text-decoration: none;
    border-color: var(--stage-border-glow-sky);
    transform: translateY(-2px);
}

.docs-topic-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.docs-chapter-num {
    font-family: var(--token-font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.16rem 0.52rem;
    border-radius: var(--token-radius-round);
    background-color: var(--stage-tint-sky);
    border: 1px solid var(--stage-border-glow-sky);
    color: var(--stage-accent-chord);
}

.docs-topic-media-pills {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.docs-media-chip {
    font-size: 0.71rem;
    font-weight: 700;
    padding: 0.14rem 0.48rem;
    border-radius: var(--token-radius-round);
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-hairline);
    color: var(--stage-text-secondary);
}

.docs-media-chip-video {
    background-color: var(--stage-tint-cue);
    border-color: var(--stage-border-glow-cue);
    color: var(--stage-accent-cue);
}

.docs-topic-card h3 {
    margin: 0.1rem 0 0 0;
    font-size: 1.04rem;
    line-height: 1.3;
    color: var(--stage-text-primary);
}

.docs-topic-card p {
    margin: 0;
    font-size: 0.87rem;
    line-height: 1.5;
    color: var(--stage-text-muted);
    flex: 1 1 auto;
}

.docs-topic-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.55rem;
    margin-top: 0.25rem;
    border-top: 1px solid var(--stage-border-hairline);
    font-size: 0.78rem;
    color: var(--stage-text-secondary);
}

.docs-topic-arrow {
    color: var(--stage-accent-chord);
    font-weight: 700;
}

/* Reader Layout (2 Columns Desktop, Native <details> TOC on Mobile) */
.docs-reader-shell {
    width: 100%;
    max-width: var(--token-max-width);
    margin: 0 auto;
    padding: 1.25rem 0.85rem 3.5rem;
}

@media (min-width: 740px) {
    .docs-reader-shell {
        padding: 1.75rem 1.75rem 4.5rem;
    }
}

.docs-reader-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1040px) {
    .docs-reader-layout {
        grid-template-columns: 280px minmax(0, 1fr);
        gap: 2.25rem;
    }
}

.docs-mobile-toc {
    display: block;
    border-radius: 12px;
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-hairline);
    overflow: hidden;
}

.docs-mobile-toc summary {
    padding: 0.8rem 1rem;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--stage-text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.docs-mobile-toc-body {
    padding: 0 1rem 1rem;
    border-top: 1px solid var(--stage-border-hairline);
}

.docs-sidebar-desktop {
    display: none;
}

@media (min-width: 1040px) {
    .docs-mobile-toc {
        display: none;
    }

    .docs-sidebar-desktop {
        display: block;
        position: sticky;
        top: 82px;
        max-height: calc(100vh - 104px);
        overflow-y: auto;
        padding: 1rem;
        border-radius: 14px;
        background-color: var(--stage-bg-card);
        border: 1px solid var(--stage-border-hairline);
        box-shadow: var(--stage-shadow-card);
    }
}

.docs-sidebar-all-link {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.75rem;
    border-radius: 8px;
    background-color: var(--stage-tint-sky);
    border: 1px solid var(--stage-border-glow-sky);
    color: var(--stage-accent-chord);
    font-size: 0.84rem;
    font-weight: 700;
    text-decoration: none;
}

.docs-sidebar-part {
    margin-bottom: 0.85rem;
}

.docs-sidebar-part-title {
    font-size: 0.71rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--stage-text-muted);
    padding: 0.25rem 0.45rem;
}

.docs-sidebar-links {
    list-style: none;
    margin: 0.2rem 0 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.14rem;
}

.docs-sidebar-link {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    padding: 0.34rem 0.52rem;
    border-radius: 7px;
    font-size: 0.83rem;
    line-height: 1.35;
    color: var(--stage-text-secondary);
    text-decoration: none;
    border-left: 2px solid transparent;
}

.docs-sidebar-link:hover {
    background-color: var(--stage-surface-hover);
    color: var(--stage-text-primary);
    text-decoration: none;
}

.docs-sidebar-link.is-active {
    background-color: var(--stage-tint-sky);
    border-left-color: var(--stage-accent-chord);
    color: var(--stage-accent-chord);
    font-weight: 700;
}

/* Article Column */
.docs-article {
    min-width: 0;
    max-width: 880px;
}

.docs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: var(--stage-text-muted);
    margin-bottom: 0.75rem;
}

.docs-breadcrumb a {
    color: var(--stage-accent-chord);
    text-decoration: none;
}

.docs-breadcrumb a:hover {
    text-decoration: underline;
}

.docs-article-hero {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--stage-border-hairline);
    margin-bottom: 1.5rem;
}

.docs-article-hero h1 {
    font-size: clamp(1.75rem, 3.4vw, 2.45rem);
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 0.35rem 0 0.75rem 0;
}

.docs-article-lead {
    font-size: 1.04rem;
    line-height: 1.65;
    color: var(--stage-text-secondary);
    margin: 0 0 1rem 0;
}

.docs-meta-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.docs-lang-notice {
    margin: 1rem 0 1.25rem 0;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background-color: rgba(56, 189, 248, 0.08);
    border: 1px solid var(--stage-border-glow-sky);
    color: var(--stage-text-secondary);
    font-size: 0.88rem;
    line-height: 1.5;
}

.docs-onpage-nav {
    margin-bottom: 1.5rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-hairline);
}

.docs-onpage-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--stage-text-muted);
    margin-bottom: 0.45rem;
}

.docs-onpage-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
}

.docs-onpage-list a {
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--stage-accent-chord);
}

/* Sections, Steps & Callouts */
.docs-section {
    padding: 1.45rem 0;
    border-top: 1px solid var(--stage-border-hairline);
}

.docs-section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.docs-section h2 {
    margin: 0 0 0.7rem 0;
    font-size: clamp(1.25rem, 2.2vw, 1.58rem);
    letter-spacing: -0.02em;
    color: var(--stage-text-primary);
}

.docs-section p {
    margin: 0 0 0.85rem 0;
    line-height: 1.68;
    color: var(--stage-text-secondary);
}

.docs-steps-list {
    list-style: none;
    margin: 0.65rem 0 1rem 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.docs-steps-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.72rem 0.9rem;
    border-radius: 10px;
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-hairline);
    color: var(--stage-text-secondary);
    line-height: 1.55;
    font-size: 0.94rem;
}

.docs-step-num {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.76rem;
    font-weight: 800;
    background-color: var(--stage-tint-sky);
    border: 1px solid var(--stage-border-glow-sky);
    color: var(--stage-accent-chord);
    margin-top: 1px;
}

.docs-bullets-list {
    margin: 0.5rem 0 1rem 0;
    padding-left: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    color: var(--stage-text-secondary);
    line-height: 1.6;
}

.docs-callout {
    margin: 0.95rem 0 1rem 0;
    padding: 0.9rem 1.05rem;
    border-radius: 12px;
    border-left: 3px solid var(--stage-accent-chord);
    background-color: rgba(15, 23, 42, 0.78);
    border-top: 1px solid var(--stage-border-hairline);
    border-right: 1px solid var(--stage-border-hairline);
    border-bottom: 1px solid var(--stage-border-hairline);
}

.docs-callout-stage {
    border-left-color: var(--stage-sync-green);
}

.docs-callout-pro {
    border-left-color: var(--stage-accent-cue);
}

.docs-callout-reorg {
    border-left-color: #C084FC;
}

.docs-callout-title {
    font-size: 0.84rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--stage-text-primary);
    margin-bottom: 0.3rem;
}

.docs-callout p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--stage-text-secondary);
}

/* Menu Reference Group Cards (Global Menu & Overlay/Layout Menu) */
.docs-menu-groups {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
    margin-top: 0.75rem;
}

.docs-menu-group-card {
    border-radius: var(--token-radius-card);
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-hairline);
    box-shadow: var(--stage-shadow-card);
    overflow: hidden;
}

.docs-menu-group-head {
    padding: 0.95rem 1.15rem;
    background-color: rgba(30, 41, 59, 0.5);
    border-bottom: 1px solid var(--stage-border-hairline);
}

.docs-menu-group-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.docs-menu-group-head h3 {
    margin: 0;
    font-size: 1.08rem;
    color: var(--stage-text-primary);
}

.docs-menu-group-summary {
    margin: 0.35rem 0 0 0 !important;
    font-size: 0.87rem;
    color: var(--stage-text-muted) !important;
}

.docs-menu-item-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-menu-item-row {
    padding: 0.82rem 1.15rem;
    border-top: 1px solid var(--stage-border-hairline);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.docs-menu-item-row:first-child {
    border-top: none;
}

.docs-menu-item-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.docs-menu-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--stage-text-primary);
}

.docs-menu-item-opt {
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.14rem 0.5rem;
    border-radius: var(--token-radius-round);
    background-color: var(--stage-bg-elevated);
    border: 1px solid var(--stage-border-subtle);
    color: var(--stage-accent-chord);
}

.docs-menu-item-desc {
    margin: 0;
    font-size: 0.89rem;
    line-height: 1.55;
    color: var(--stage-text-secondary);
}

/* Video Walkthrough Player & Placeholder Extensions */
.docs-media-wrap,
.docs-media-frame {
    margin: 1rem 0 0.35rem 0 !important;
}

.docs-video-player {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #05080F;
    object-fit: contain;
}

.docs-video-placeholder-icon {
    background-color: var(--stage-tint-cue);
    border-color: var(--stage-border-glow-cue);
    color: var(--stage-accent-cue);
}

.docs-video-slot-pill {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.18rem 0.62rem;
    border-radius: var(--token-radius-round);
    background-color: var(--stage-tint-cue);
    border: 1px solid var(--stage-border-glow-cue);
    color: var(--stage-accent-cue);
}

.docs-shot-guide {
    max-width: 56ch;
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    background-color: rgba(15, 23, 42, 0.82);
    border: 1px solid var(--stage-border-hairline);
    font-size: 0.82rem;
    line-height: 1.48;
    color: var(--stage-text-secondary);
    text-align: left;
}

.docs-shot-guide strong {
    color: var(--stage-accent-chord);
}

/* Related Links & Prev/Next Chapter Pager */
.docs-related-strip {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--stage-border-hairline);
}

.docs-pager {
    margin-top: 1.75rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--stage-border-hairline);
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 680px) {
    .docs-pager {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: stretch;
    }
}

.docs-pager-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background-color: var(--stage-bg-card);
    border: 1px solid var(--stage-border-hairline);
    text-decoration: none;
    transition: border-color 0.15s ease;
}

.docs-pager-card:hover {
    text-decoration: none;
    border-color: var(--stage-border-glow-sky);
}

.docs-pager-next {
    text-align: right;
}

.docs-pager-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--stage-text-muted);
}

.docs-pager-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: var(--stage-accent-chord);
    margin-top: 0.15rem;
}

