/* ============================================================
   Guide - Storm Developments documentation pages.
   Shares the Dispatch design tokens, but the visual rhythm is
   tighter and quieter - docs, not editorial.
   ============================================================ */

/* Push the body to the dispatch dark so the area outside the 1200px
   container blends in instead of showing the storm.css body gray. */
body:has(.guide-layout) {
    background: #0A0A0A;
}

.guide-layout {
    --dispatch-bg: #0A0A0A;
    --dispatch-surface: #141414;
    --dispatch-sunken: #050505;
    --dispatch-border: #222;
    --dispatch-border-strong: #333;
    --dispatch-text: #C8D1CD;
    --dispatch-text-strong: #ECEFED;
    --dispatch-text-muted: #6B7772;
    --dispatch-text-faint: #4B5550;
    --dispatch-teal: #1D9E75;
    --dispatch-teal-bright: #5DCAA5;
    --dispatch-gold: #D4A437;
    --dispatch-blue: #7B8FDB;
    --dispatch-red: #E5484D;
    --dispatch-mono: 'JetBrains Mono', 'Berkeley Mono', 'Consolas', monospace;
    --dispatch-editorial: 'Georgia', 'Times New Roman', serif;
    --dispatch-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    /* The site navbar is a sticky 4rem bar. Offset anchored-scroll targets and
       the sticky TOC by it (+1rem gap) so neither lands under the bar. */
    --guide-header-offset: 5rem;

    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 220px;
    gap: 0;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 64px);
    background: var(--dispatch-bg);
    color: var(--dispatch-text);
    font-feature-settings: 'tnum' 1, 'zero' 1;
}
/* No headings on a page (rare): collapse the empty TOC rail, no dead gutter.
   guide-toc.js adds this class when it finds fewer than two h2/h3. */
.guide-layout.is-tocless {
    grid-template-columns: 240px minmax(0, 1fr);
}

/* ---------- Sidebar ---------- */
.guide-sidebar {
    border-right: 1px solid var(--dispatch-border);
    padding: 1.75rem 0 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--dispatch-border-strong) transparent;
}
.guide-sidebar::-webkit-scrollbar { width: 6px; }
.guide-sidebar::-webkit-scrollbar-thumb {
    background: var(--dispatch-border-strong);
    border-radius: 3px;
}
.guide-sidebar::-webkit-scrollbar-thumb:hover { background: var(--dispatch-text-faint); }

.guide-sidebar-header {
    padding: 0 1.5rem 1.25rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--dispatch-border);
}
.guide-sidebar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--dispatch-mono);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--dispatch-text-strong);
    text-decoration: none;
    transition: color 0.12s;
}
.guide-sidebar-brand::before {
    content: '/ ';
    color: var(--dispatch-teal);
    font-weight: 400;
}
.guide-sidebar-brand:hover { color: var(--dispatch-teal-bright); }

.guide-nav-section {
    margin-bottom: 1.25rem;
    padding: 0 0.75rem;
}
.guide-nav-section-title {
    display: block;
    font-family: var(--dispatch-mono);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--dispatch-text-muted);
    margin: 0 0 0.5rem;
    padding: 0 0.75rem;
}

.guide-nav-pages {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    counter-reset: guide-nav;
}
.guide-nav-pages li {
    counter-increment: guide-nav;
    border-left: 2px solid transparent;
}
.guide-nav-pages li:has(a.guide-nav-link--active) {
    border-left-color: var(--dispatch-teal);
}

.guide-nav-link {
    display: flex;
    gap: 0.5rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.83rem;
    color: var(--dispatch-text-muted);
    text-decoration: none;
    transition: color 0.12s, background 0.12s;
}
.guide-nav-link::before {
    content: counter(guide-nav, decimal-leading-zero);
    font-family: var(--dispatch-mono);
    font-size: 0.65rem;
    color: var(--dispatch-text-faint);
    flex-shrink: 0;
    padding-top: 0.15em;
    transition: color 0.12s;
}
.guide-nav-link:hover {
    color: var(--dispatch-text);
    background: rgba(45, 184, 137, 0.04);
}
.guide-nav-link:hover::before { color: var(--dispatch-text-muted); }
.guide-nav-link--active {
    color: var(--dispatch-teal-bright);
    background: rgba(45, 184, 137, 0.06);
    font-weight: 500;
}
.guide-nav-link--active::before { color: var(--dispatch-teal); }

/* Nested subsections - collapsible via native <details>; expand state
   persisted by static/js/guide-sidebar.js (D7). */
.guide-nav-subsection {
    margin-top: 0.4rem;
}
.guide-nav-subsection-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    font-family: var(--dispatch-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--dispatch-text-muted);
    cursor: pointer;
    list-style: none;
    transition: color 0.12s;
    user-select: none;
}
.guide-nav-subsection-title::-webkit-details-marker { display: none; }
.guide-nav-subsection-title:hover { color: var(--dispatch-text); }
.guide-nav-subsection-caret {
    display: inline-block;
    font-size: 0.65rem;
    color: var(--dispatch-text-faint);
    transition: transform 0.15s;
}
.guide-nav-subsection[open] .guide-nav-subsection-caret {
    transform: rotate(90deg);
}
.guide-nav-pages--nested {
    margin-left: 0.6rem;
    padding-left: 0.5rem;
    border-left: 1px solid var(--dispatch-border);
    counter-reset: guide-nav;
}

.guide-sidebar-cross {
    margin: 1.5rem 0.75rem 0;
    padding: 0.85rem;
    border-top: 1px dashed var(--dispatch-border);
    font-family: var(--dispatch-mono);
    font-size: 0.72rem;
    color: var(--dispatch-text-muted);
}
.guide-sidebar-cross-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--dispatch-teal);
    text-decoration: none;
    transition: color 0.12s;
}
.guide-sidebar-cross-link:hover { color: var(--dispatch-teal-bright); }

/* ---------- Main ---------- */
.guide-main {
    padding: 2rem 3rem 4rem;
    max-width: 800px;
    min-width: 0;
}

/* Bordered crumb bar - matches reading-page chrome. */
.guide-breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    padding: 0.55rem 0.85rem;
    margin-bottom: 1.75rem;
    font-family: var(--dispatch-mono);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: var(--dispatch-text-muted);
    border: 1px solid var(--dispatch-border);
    border-left: 3px solid var(--dispatch-teal);
    border-radius: 2px;
    background: var(--dispatch-surface);
    text-transform: uppercase;
}
.guide-breadcrumbs a {
    color: var(--dispatch-teal);
    text-decoration: none;
    transition: color 0.12s;
}
.guide-breadcrumbs a:hover { color: var(--dispatch-teal-bright); }
.guide-breadcrumb-sep { margin: 0 0.5em; color: var(--dispatch-text-faint); }
.guide-breadcrumb-current { color: var(--dispatch-text-strong); font-weight: 500; }

/* ---------- Markdown content ---------- */
/* Body is sans-serif to match the GitLab/AWS docs convention (not a
   readability fix - serif tested fine - but the expected look for dev docs).
   Headings stay editorial serif below for Storm character. */
.guide-content {
    font-family: var(--dispatch-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--dispatch-text);
    text-wrap: pretty;
}

/* Optional header video (frontmatter `video:`). Responsive 16:9, sits above
   the prose. The iframe host is allowlisted to NorthTube server-side. */
.guide-video {
    margin: 0 0 1.8rem;
}
.guide-video-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 6px;
    background: #000;
}

/* Per-page masthead eyebrow: the parent section as a mono, teal-left-rail
   meta-bar above the serif H1. The Dispatch blog masthead device, on docs. */
.guide-content .guide-eyebrow {
    display: inline-block;
    font-family: var(--dispatch-mono);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--dispatch-teal-bright);
    background: var(--dispatch-surface);
    border: 1px solid var(--dispatch-border);
    border-left: 3px solid var(--dispatch-teal);
    border-radius: 2px;
    padding: 0.35rem 0.7rem;
    margin: 0 0 1rem;
}

.guide-content h1 {
    font-family: var(--dispatch-editorial);
    font-size: 2.4rem;
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--dispatch-text-strong);
    margin: 0 0 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dispatch-teal);
    text-wrap: balance;
}

.guide-content h2 {
    font-family: var(--dispatch-editorial);
    font-size: 1.45rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--dispatch-text-strong);
    margin: 2.25rem 0 0.75rem;
    text-wrap: balance;
}

.guide-content h3 {
    font-family: var(--dispatch-editorial);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--dispatch-text-strong);
    margin: 1.5rem 0 0.5rem;
}

.guide-content h2, .guide-content h3 { scroll-margin-top: var(--guide-header-offset); }

.guide-content p {
    margin: 0 0 1rem;
}

.guide-content a {
    color: var(--dispatch-teal);
    text-decoration: none;
    border-bottom: 1px solid rgba(45, 184, 137, 0.4);
    transition: color 0.12s, border-color 0.12s;
}
.guide-content a:hover {
    color: var(--dispatch-teal-bright);
    border-bottom-color: var(--dispatch-teal-bright);
}

/* Heading self-link: clicking copies a deep-link to the section. The link
   itself is invisible chrome (inherits the heading), and a faint trailing
   "#" fades in on heading hover to advertise the affordance. */
.guide-content h2 .guide-h-anchor,
.guide-content h3 .guide-h-anchor {
    color: inherit;
    text-decoration: none;
    border-bottom: 0;
    background: none;
    cursor: pointer;
    transition: color 0.12s;
}
.guide-content h2 .guide-h-anchor::after,
.guide-content h3 .guide-h-anchor::after {
    content: '#';
    margin-left: 0.4em;
    color: var(--dispatch-text-faint);
    font-family: var(--dispatch-mono);
    font-size: 0.55em;
    font-weight: 400;
    opacity: 0;
    vertical-align: 0.25em;
    transition: opacity 0.12s, color 0.12s;
}
.guide-content h2:hover .guide-h-anchor::after,
.guide-content h3:hover .guide-h-anchor::after { opacity: 1; color: var(--dispatch-teal); }
.guide-content h2 .guide-h-anchor:hover,
.guide-content h3 .guide-h-anchor:hover { color: var(--dispatch-teal-bright); }

/* Transient confirmation toast for a copied section link. */
.guide-anchor-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(0.5rem);
    z-index: 1000;
    padding: 0.5rem 0.9rem;
    background: var(--dispatch-bg-raised, #141414);
    border: 1px solid var(--dispatch-teal);
    border-radius: 4px;
    color: var(--dispatch-text-strong);
    font-family: var(--dispatch-mono);
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.16s, transform 0.16s;
}
.guide-anchor-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.guide-content strong { color: var(--dispatch-text-strong); font-weight: 600; }
.guide-content em { color: var(--dispatch-text); font-style: italic; }

/* Inline + block code */
.guide-content code {
    font-family: var(--dispatch-mono);
    font-size: 0.86em;
    color: var(--dispatch-teal-bright);
    background: rgba(45, 184, 137, 0.07);
    padding: 0.1rem 0.35rem;
    border: 1px solid rgba(45, 184, 137, 0.18);
    border-radius: 2px;
}
.guide-content pre {
    position: relative;
    background: var(--dispatch-surface);
    border: 1px solid var(--dispatch-border);
    border-radius: 2px;
    padding: 2rem 1.25rem 1rem;
    overflow-x: auto;
    font-family: var(--dispatch-mono);
    font-size: 0.82rem;
    line-height: 1.55;
    margin: 1.5rem 0;
}
.guide-content pre::before {
    content: '- code';
    position: absolute;
    top: 0; left: 0; right: 0;
    padding: 0.3rem 0.85rem;
    background: var(--dispatch-bg);
    color: var(--dispatch-text-muted);
    font-family: var(--dispatch-mono);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--dispatch-border);
}
.guide-content pre code {
    background: none;
    padding: 0;
    border: 0;
    color: var(--dispatch-text);
}

/* Copy button - appended by static/js/code-copy.js. */
.guide-content pre { position: relative; }
.guide-content .cb-copy-btn {
    position: absolute;
    top: 0.3rem;
    right: 0.45rem;
    padding: 0.18rem 0.55rem;
    font-family: var(--dispatch-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dispatch-text-muted);
    background: transparent;
    border: 1px solid var(--dispatch-border-strong);
    border-radius: 2px;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.12s, color 0.12s, border-color 0.12s, background 0.12s;
}
.guide-content pre:hover .cb-copy-btn,
.guide-content .cb-copy-btn:focus-visible { opacity: 1; }
.guide-content .cb-copy-btn:hover {
    color: var(--dispatch-teal-bright);
    border-color: var(--dispatch-teal);
    background: rgba(45, 184, 137, 0.06);
}
.guide-content .cb-copy-btn--ok {
    opacity: 1 !important;
    color: var(--dispatch-teal-bright);
    border-color: var(--dispatch-teal);
}
.guide-content .cb-copy-btn--err {
    opacity: 1 !important;
    color: var(--dispatch-red);
    border-color: var(--dispatch-red);
}

/* Lists */
.guide-content ul, .guide-content ol {
    margin: 0 0 1rem 1.5rem;
    padding: 0;
}
.guide-content li { margin: 0 0 0.4rem; }
.guide-content li::marker { color: var(--dispatch-teal); }

/* Callout-style blockquote */
.guide-content blockquote {
    position: relative;
    border-left: 3px solid var(--dispatch-gold);
    background: rgba(212, 164, 55, 0.04);
    padding: 0.85rem 1rem 0.85rem 1.25rem;
    margin: 1.5rem 0;
    color: var(--dispatch-text);
    border-radius: 0 2px 2px 0;
    font-family: var(--dispatch-editorial);
    font-style: italic;
}
.guide-content blockquote p:last-child { margin-bottom: 0; }

.guide-content hr {
    border: 0;
    border-top: 1px solid var(--dispatch-border);
    margin: 2rem 0;
}

/* Screenshots */
.guide-content img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
    border: 1px solid var(--dispatch-border);
    border-radius: 6px;
}

/* Tables */
.guide-content table {
    width: 100%;
    border-collapse: collapse;
    font-family: var(--dispatch-mono);
    font-size: 0.83rem;
    margin: 1.25rem 0;
    border: 1px solid var(--dispatch-border);
    border-radius: 2px;
    overflow: hidden;
}
.guide-content thead th {
    background: var(--dispatch-sunken);
    color: var(--dispatch-text-muted);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.55rem 0.85rem;
    text-align: left;
    border-bottom: 1px solid var(--dispatch-border);
}
.guide-content td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--dispatch-border);
    color: var(--dispatch-text);
    line-height: 1.5;
    vertical-align: top;
}
.guide-content tbody tr:last-child td { border-bottom: 0; }
.guide-content tbody tr:hover { background: rgba(45, 184, 137, 0.03); }

/* ---------- Spellbook block overrides ---------- */
/* {~ card ~} and {~ alert ~} blocks render with sb-* utility classes
   that ship a light/shadowed default. Re-skin them to match dispatch. */
.guide-content .sb-card,
.guide-content .sb-alert {
    background: var(--dispatch-surface);
    border: 1px solid var(--dispatch-border);
    border-left: 3px solid var(--dispatch-teal);
    border-radius: 2px;
    box-shadow: none;
    margin: 1.5rem 0;
    overflow: hidden;
}
.guide-content .sb-card-header {
    padding: 0.75rem 1rem;
    background: var(--dispatch-sunken);
    border-bottom: 1px solid var(--dispatch-border);
}
.guide-content .sb-card-title {
    margin: 0;
    font-family: var(--dispatch-editorial);
    font-size: 1.1rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--dispatch-text-strong);
    letter-spacing: 0;
    text-transform: none;
}
.guide-content .sb-card-body {
    padding: 1rem 1.25rem;
    color: var(--dispatch-text);
}
.guide-content .sb-card-body > p:last-child { margin-bottom: 0; }

/* Alert variants - color the left bar + a faint tint by type. */
.guide-content .sb-alert {
    padding: 0.85rem 1rem;
    font-family: var(--dispatch-editorial);
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--dispatch-text);
}
.guide-content .sb-alert > p:last-child { margin-bottom: 0; }
.guide-content .sb-alert code {
    /* Inline code already styled, but ensure it stays readable on tinted bg */
    background: rgba(0, 0, 0, 0.25);
}

.guide-content .sb-alert-info {
    border-left-color: var(--dispatch-blue);
    background: linear-gradient(
        to right,
        rgba(123, 143, 219, 0.06) 0,
        var(--dispatch-surface) 16rem
    );
}
.guide-content .sb-alert-success,
.guide-content .sb-alert-primary {
    border-left-color: var(--dispatch-teal);
    background: linear-gradient(
        to right,
        rgba(45, 184, 137, 0.06) 0,
        var(--dispatch-surface) 16rem
    );
}
.guide-content .sb-alert-warning {
    border-left-color: var(--dispatch-gold);
    background: linear-gradient(
        to right,
        rgba(212, 164, 55, 0.06) 0,
        var(--dispatch-surface) 16rem
    );
}
.guide-content .sb-alert-danger,
.guide-content .sb-alert-error {
    border-left-color: var(--dispatch-red, #E5484D);
    background: linear-gradient(
        to right,
        rgba(229, 72, 77, 0.06) 0,
        var(--dispatch-surface) 16rem
    );
}

/* Gotcha callout ({~ gotcha ~}) - a Storm "this will bite you" box. No emoji;
   a mono label strip (same treatment as the code-block ::before) over an
   editorial body, gold caution accent. Defined here, not via sb-* classes. */
.guide-content .guide-gotcha {
    margin: 1.5rem 0;
    border: 1px solid var(--dispatch-border);
    border-left: 3px solid var(--dispatch-gold);
    border-radius: 2px;
    background: linear-gradient(
        to right,
        rgba(212, 164, 55, 0.06) 0,
        var(--dispatch-surface) 16rem
    );
    overflow: hidden;
}
.guide-content .guide-gotcha-label {
    padding: 0.4rem 1rem;
    background: var(--dispatch-sunken);
    border-bottom: 1px solid var(--dispatch-border);
    font-family: var(--dispatch-mono);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--dispatch-gold);
}
.guide-content .guide-gotcha-label::before {
    content: '! ';
    color: var(--dispatch-gold);
}
.guide-content .guide-gotcha-body {
    padding: 0.9rem 1.25rem;
    color: var(--dispatch-text);
    font-family: var(--dispatch-sans);
    font-size: 0.95rem;
    line-height: 1.6;
}
.guide-content .guide-gotcha-body > p:last-child { margin-bottom: 0; }
.guide-content .guide-gotcha-body ul,
.guide-content .guide-gotcha-body ol { margin-bottom: 0; }
.guide-content .guide-gotcha-body code { background: rgba(0, 0, 0, 0.25); }

/* ---------- Prev / Next pagination ---------- */
.guide-pagination {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    margin-top: 3rem;
    background: var(--dispatch-border);
    border: 1px solid var(--dispatch-border);
    border-radius: 2px;
    overflow: hidden;
}
.guide-pagination-link {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
    background: var(--dispatch-surface);
    text-decoration: none;
    transition: background 0.12s;
}
.guide-pagination-link:hover {
    background: rgba(45, 184, 137, 0.04);
}
.guide-pagination-link--next { text-align: right; }

.guide-pagination-dir {
    font-family: var(--dispatch-mono);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--dispatch-gold);
    text-transform: uppercase;
}
.guide-pagination-title {
    font-family: var(--dispatch-editorial);
    font-weight: 500;
    font-size: 1rem;
    color: var(--dispatch-text-strong);
    line-height: 1.25;
}

/* ---------- Cross-link to blog (footer of main column) ---------- */
.guide-cross-blog {
    margin-top: 2.5rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--dispatch-border);
    border-left: 3px solid var(--dispatch-gold);
    border-radius: 2px;
    background: var(--dispatch-surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-family: var(--dispatch-mono);
    font-size: 0.78rem;
    color: var(--dispatch-text-muted);
}
.guide-cross-blog-link {
    color: var(--dispatch-gold);
    text-decoration: none;
    transition: color 0.12s;
}
.guide-cross-blog-link:hover { color: var(--dispatch-text-strong); }

/* ---------- Right-rail "On this page" TOC (guide-toc.js) ---------- */
.guide-toc {
    align-self: start;
    position: sticky;
    top: var(--guide-header-offset);
    padding: 1rem 1.5rem 2rem 1rem;
    max-height: calc(100vh - var(--guide-header-offset) - 1rem);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--dispatch-border-strong) transparent;
}
.guide-toc::-webkit-scrollbar { width: 6px; }
.guide-toc::-webkit-scrollbar-thumb {
    background: var(--dispatch-border-strong);
    border-radius: 3px;
}
.guide-toc-title {
    font-family: var(--dispatch-mono);
    font-size: 0.62rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--dispatch-text-muted);
    margin-bottom: 0.75rem;
}
.guide-toc-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-left: 1px solid var(--dispatch-border);
}
.guide-toc-item { margin: 0; }
/* Session map: mono "route" entries. Inactive carry a faint "/" prefix; the
   active section swaps it for a teal block cursor that jumps the spine as you
   scroll. The slash + cursor + left-rail are the three core Storm marks fused. */
.guide-toc-link {
    display: flex;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    margin-left: -1px;
    border-left: 2px solid transparent;
    font-family: var(--dispatch-mono);
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--dispatch-text-muted);
    text-decoration: none;
    transition: color 0.12s, border-color 0.12s;
}
.guide-toc-link::before {
    content: '/';
    flex-shrink: 0;
    color: var(--dispatch-text-faint);
    transition: color 0.12s;
}
.guide-toc-item--h3 .guide-toc-link { padding-left: 1.5rem; }
.guide-toc-item--h3 .guide-toc-link::before { opacity: 0.55; }
.guide-toc-link:hover { color: var(--dispatch-text); }
.guide-toc-link:hover::before { color: var(--dispatch-text-muted); }
.guide-toc-link.is-active {
    color: var(--dispatch-teal-bright);
    border-left-color: var(--dispatch-teal);
}
.guide-toc-link.is-active::before {
    content: '\25AE';
    color: var(--dispatch-teal);
}

/* ---------- Mobile ---------- */
@media (max-width: 900px) {
    .guide-layout,
    .guide-layout.is-tocless {
        grid-template-columns: 1fr;
    }
    .guide-toc { display: none; }
    .guide-sidebar {
        position: static;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--dispatch-border);
        padding: 1.5rem 1rem;
    }
    .guide-main {
        padding: 1.5rem 1rem 3rem;
    }
}
