:root {
    --background: hsl(210, 33%, 1%);
    --foreground: hsl(0, 0%, 98%);
    --card: hsl(225, 11%, 7%);
    --card-foreground: hsl(0, 0%, 98%);
    --primary: hsl(0, 72%, 51%);
    --primary-hover: hsl(0, 72%, 46%);
    --primary-glow: hsla(0, 72%, 51%, 0.4);
    --muted: hsl(220, 10%, 65%);
    --muted-foreground: hsl(220, 10%, 65%);
    --accent: hsl(0, 72%, 15%);
    --accent-foreground: hsl(0, 72%, 70%);
    --border: hsl(220, 20%, 18%);
    --glass-bg: #5f000024;
    --glass-border: hsla(0, 0%, 100%, 0.08);
    --section-gradient: linear-gradient(180deg, transparent, hsla(0, 72%, 51%, 0.05), transparent);
    --sidebar-w: 268px;
    --toc-w: 220px;
    --nav-h: 64px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

:root.light {
    --background: hsl(0, 0%, 97%);
    --foreground: hsl(220, 30%, 10%);
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(220, 30%, 10%);
    --muted: hsl(220, 10%, 46%);
    --muted-foreground: hsl(220, 10%, 46%);
    --accent: hsl(0, 72%, 95%);
    --accent-foreground: hsl(0, 72%, 40%);
    --border: hsl(220, 13%, 88%);
    --glass-bg: hsla(0, 0%, 100%, 0.7);
    --glass-border: hsla(0, 0%, 0%, 0.08);
    --section-gradient: linear-gradient(180deg, transparent, hsla(0, 72%, 51%, 0.03), transparent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: hsla(0, 72%, 51%, 0.3);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsla(0, 72%, 51%, 0.5);
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
    border: 1px solid var(--glass-border);
}

.ios-spring {
    transition: all 0.4s var(--ease);
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scale-in {
    from {
        opacity: 0;
        transform: scale(0.96);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-up {
    animation: fade-up 0.55s var(--ease) both;
}

.icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

nav.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

#sidebarNav,
#tocNav {
    display: block;
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    border: none;
    background: none;
}

.nav-brand img {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 700;
    font-size: 1.02rem;
    width: 40px;
    height: 40px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    text-decoration: none;
    color: var(--foreground);
    font-weight: 700;
    font-size: 1.02rem;
    
}

.nav-brand .mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, hsl(0, 78%, 58%), hsl(0, 72%, 38%));
    box-shadow: 0 8px 20px -8px var(--primary-glow);
    flex-shrink: 0;
}

.nav-brand .mark svg {
    width: 20px;
    height: 20px;
}

.nav-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.25rem;
}

.nav-item {
    position: relative;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    border-radius: 0.5rem;
    transition: color 0.3s;
}

.nav-item:hover,
.nav-item.active {
    color: var(--foreground);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    padding: 0.5rem;
    border-radius: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px) scale(0.95);
    transition: all 0.3s var(--ease);
    z-index: 20;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    background: var(--glass-bg);
}

.nav-dropdown a {
    display: block;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--muted);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: all 0.2s;
}

.nav-dropdown a:hover {
    color: var(--foreground);
    background: var(--accent);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-select {
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: var(--foreground);
    background: transparent;
    border: none;
    cursor: pointer;
    outline: none;
}

.nav-select option {
    background: var(--card);
    color: var(--foreground);
}

.theme-toggle,
.mobile-toggle,
.sidebar-toggle {
    width: 36px;
    height: 36px;
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--foreground);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease);
}

.theme-toggle:hover svg {
    transform: rotate(20deg) scale(1.1);
}

.mobile-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex-direction: column;
    gap: 5px;
}

.mobile-toggle span {
    width: 22px;
    height: 2px;
    background: var(--foreground);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    width: 100%;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    padding: 1rem;
    z-index: 99;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.4s var(--ease);
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0.75rem 0 0.4rem;
    padding: 0 0.5rem;
}

.mobile-nav a {
    display: block;
    padding: 0.75rem;
    color: var(--foreground);
    text-decoration: none;
    border-radius: 0.5rem;
}

.mobile-nav a:hover {
    background: var(--accent);
}

.sidebar-toggle {
    display: none;
}

/* ---------- Shell ---------- */
.docs-shell {
    display: grid;
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    min-height: 100vh;
    padding-top: var(--nav-h);
}

.docs-sidebar {
    position: sticky;
    top: var(--nav-h);
    height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    padding: 1.25rem 0.85rem 2.5rem;
    scrollbar-width: thin;
    border-right: 1px solid var(--border);
    background: linear-gradient(180deg, hsla(0, 72%, 51%, 0.05), transparent 42%);
}

.docs-main {
    position: relative;
    min-width: 0;
}

.docs-main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--section-gradient);
    pointer-events: none;
}

.article-row {
    display: grid;
    grid-template-columns: minmax(1rem, 1fr) minmax(0, 820px) minmax(1rem, 1fr);
    align-items: start;
    width: 100%;
}

.article-wrap {
    position: relative;
    z-index: 1;
    grid-column: 2;
    width: 100%;
    max-width: 820px;
    margin: 0;
    padding: 2.4rem 1.5rem 5rem;
    min-width: 0;
}

.toc-sidebar {
    display: none;
    grid-column: 3;
    justify-self: start;
    width: var(--toc-w);
    position: sticky;
    top: calc(var(--nav-h) + 12px);
    max-height: calc(100vh - var(--nav-h) - 24px);
    overflow-y: auto;
    padding: 2.5rem 1rem 2rem 0.85rem;
    scrollbar-width: thin;
}

.docs-shell.has-toc .toc-sidebar {
    display: block;
}

.toc-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.2rem 0.55rem 0.65rem;
}

.toc-link {
    display: block;
    position: relative;
    padding: 0.32rem 0.55rem 0.32rem 0.8rem;
    margin-bottom: 0.12rem;
    border-radius: 0.4rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.35;
    transition: color 0.2s, background 0.2s;
}

.toc-link::before {
    content: "";
    position: absolute;
    left: 0.2rem;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 2px;
    border-radius: 2px;
    background: var(--border);
}

.toc-link:hover {
    color: var(--foreground);
    background: var(--accent);
}

.toc-link.active {
    color: var(--foreground);
}

.toc-link.active::before {
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.sidebar-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.65rem 0.8rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font: inherit;
    font-size: 0.85rem;
    cursor: text;
    margin-bottom: 1.25rem;
    text-align: left;
}

.sidebar-search:hover,
.sidebar-search:focus-visible {
    border-color: hsla(0, 72%, 51%, 0.45);
    color: var(--foreground);
    outline: none;
}

.sidebar-search kbd {
    margin-left: auto;
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 0.35rem;
    border: 1px solid var(--border);
    color: var(--muted);
}

.sidebar-group {
    margin-bottom: 1.15rem;
}

.sidebar-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    padding: 0.35rem 0.7rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.7rem;
    border-radius: 0.55rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.75;
}

.sidebar-link:hover {
    color: var(--foreground);
    background: var(--accent);
}

.sidebar-link.active {
    color: var(--foreground);
    background: var(--accent);
    box-shadow: inset 2px 0 0 var(--primary);
}

/* ---------- Article ---------- */
.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1.1rem;
}

.crumbs a {
    color: var(--muted);
    text-decoration: none;
}

.crumbs a:hover {
    color: var(--primary);
}

.article-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.7rem;
}

.article-wrap>h1 {
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 0.75rem;
}

.lede {
    font-size: 1.08rem;
    color: var(--muted);
    margin-bottom: 2rem;
    max-width: 62ch;
}

.article-body h2 {
    font-size: 1.28rem;
    font-weight: 750;
    margin: 2.1rem 0 0.7rem;
    letter-spacing: -0.02em;
    scroll-margin-top: calc(var(--nav-h) + 18px);
}

.article-body h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 1.4rem 0 0.5rem;
}

.article-body p {
    color: var(--foreground);
    margin-bottom: 0.9rem;
    max-width: 68ch;
}

.article-body p a,
.article-body li a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid hsla(0, 72%, 51%, 0.35);
}

.article-body p a:hover,
.article-body li a:hover {
    border-bottom-color: var(--primary);
}

.article-body ul,
.article-body ol {
    margin: 0 0 1rem 1.2rem;
    color: var(--foreground);
}

.article-body li {
    margin-bottom: 0.4rem;
    padding-left: 0.2rem;
}

.article-body li::marker {
    color: var(--primary);
}

.cli {
    position: relative;
    background: hsla(0, 72%, 51%, 0.06);
    border: 1px solid var(--border);
    border-left: 2px solid var(--primary);
    padding: 0.85rem 3.2rem 0.85rem 1rem;
    margin: 0.85rem 0 1.15rem;
    border-radius: 0.6rem;
    font-size: 0.84rem;
    line-height: 1.55;
    overflow-x: auto;
}

.cli code,
.cli pre {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    color: var(--foreground);
    white-space: pre-wrap;
    word-break: break-word;
}

.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #c01c28;
    color: #fff;
    padding: 0.28rem 0.55rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn:hover {
    background: #a31822;
}

.callout {
    padding: 1rem 1.1rem;
    border-radius: 0.85rem;
    margin: 1rem 0 1.25rem;
    border: 1px solid var(--border);
}

.callout.info {
    background: hsla(210, 80%, 50%, 0.08);
}

.callout.tip {
    background: hsla(0, 72%, 51%, 0.08);
    border-color: hsla(0, 72%, 51%, 0.25);
}

.callout.warn {
    background: hsla(32, 90%, 50%, 0.1);
}

.callout strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.86rem;
}

.callout p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.hero-help {
    position: relative;
    padding: 1.2rem 0 0.4rem;
}

.hero-help .badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.8rem;
    border-radius: 9px;
    font-size: 0.8rem;
    color: var(--muted);
    margin-bottom: 1rem;
}

.hero-help .badge svg {
    width: 15px;
    height: 15px;
    stroke: var(--primary);
}

.example-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin: 0 0 2.2rem;
}

.example-card {
    display: block;
    padding: 1.15rem 1.25rem;
    border-radius: 9px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: transform 0.35s var(--ease), border-color 0.25s;
}

.example-card:hover {
    transform: translateY(-3px);
    border-color: hsla(0, 72%, 51%, 0.35);
}

.example-card h3 {
    font-size: 1.12rem;
    font-weight: 750;
    margin-bottom: 0.35rem;
}

.example-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    max-width: none;
}

.example-card p a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid hsla(0, 72%, 51%, 0.35);
}

.search-hero {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.95rem 1.1rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--muted);
    font: inherit;
    font-size: 1rem;
    cursor: text;
    margin: 1.4rem 0 1.8rem;
    text-align: left;
    box-shadow: 0 10px 40px -18px var(--primary-glow);
}

.search-hero:hover {
    border-color: hsla(0, 72%, 51%, 0.4);
    color: var(--foreground);
}

.topic-grid,
.faq-list,
.channel-grid {
    display: grid;
    gap: 0.9rem;
}

.topic-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 2.2rem;
}

.topic-card,
.channel-card,
.faq-item {
    border-radius: 1rem;
    padding: 1.15rem 1.2rem;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.3s;
    cursor: pointer;
}

.topic-card:hover,
.channel-card:hover {
    transform: translateY(-5px) scale(1.015);
    box-shadow: 0 18px 50px -20px var(--primary-glow);
    border-color: hsla(0, 72%, 51%, 0.3);
}

.topic-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.7rem;
    background: var(--accent);
    display: grid;
    place-items: center;
    margin-bottom: 0.75rem;
}

.topic-icon svg {
    width: 20px;
    height: 20px;
    stroke: var(--primary);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.topic-card h3,
.channel-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.topic-card p,
.channel-card p {
    font-size: 0.86rem;
    color: var(--muted);
    margin: 0;
}

.channel-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin: 1rem 0 1.5rem;
}

.faq-item {
    width: 100%;
    text-align: left;
}

.faq-item+.faq-item {
    margin-top: 0;
}

.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-weight: 650;
    font-size: 0.95rem;
}

.faq-q svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.3s var(--ease);
}

.faq-item.open .faq-q svg {
    transform: rotate(45deg);
}

.faq-a {
    display: none;
    margin-top: 0.7rem;
    color: var(--muted);
    font-size: 0.92rem;
}

.faq-item.open .faq-a {
    display: block;
}

.article-footer {
    margin-top: 2.8rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.feedback-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
}

.feedback-btn {
    background: var(--card);
    color: var(--foreground);
    border: 1px solid var(--border);
}

.feedback-btn svg {
    width: 16px;
    height: 16px;
}

.feedback-btn.active-yes {
    border-color: hsla(142, 70%, 40%, 0.6);
    background: hsla(142, 70%, 40%, 0.12);
}

.feedback-btn.active-no {
    border-color: hsla(0, 72%, 51%, 0.55);
    background: var(--accent);
}

.feedback-thanks {
    font-size: 0.88rem;
    color: var(--muted);
}

.article-footer p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.15rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 0.7rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: scale(1.03);
}

.btn-glass {
    color: var(--foreground);
}

.btn-glass:hover {
    background: var(--accent);
}

.os-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.4rem 0 1.2rem;
}

.os-pill {
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--border);
}

.os-pill:hover,
.os-pill.active {
    color: var(--foreground);
    border-color: hsla(0, 72%, 51%, 0.4);
    background: var(--accent);
}

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.72);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 12vh 1rem 2rem;
}

.search-overlay.open {
    display: flex;
    animation: scale-in 0.25s var(--ease);
}

.search-panel {
    width: min(640px, 100%);
    border-radius: 1.1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.55);
}

.search-panel input {
    width: 100%;
    padding: 1rem 1.15rem;
    border: none;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--foreground);
    font: inherit;
    font-size: 1.02rem;
    outline: none;
}

.search-results {
    max-height: 52vh;
    overflow-y: auto;
    padding: 0.45rem;
}

.search-hit {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.75rem 0.85rem;
    border: none;
    background: transparent;
    color: inherit;
    border-radius: 0.65rem;
    cursor: pointer;
    font: inherit;
}

.search-hit:hover,
.search-hit.active {
    background: var(--accent);
}

.search-hit small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

.search-empty,
.search-hint {
    padding: 1.1rem;
    color: var(--muted);
    font-size: 0.88rem;
}

mark {
    background: hsla(0, 72%, 51%, 0.28);
    color: inherit;
    border-radius: 0.15rem;
    padding: 0 0.1rem;
}

/* ---------- Footer ---------- */
footer {
    border-top: 1px solid var(--border);
    padding: 1.4rem 1.5rem 1.7rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.8rem;
    color: var(--muted);
    font-size: 0.82rem;
}

footer a {
    color: var(--muted);
    text-decoration: none;
}

footer a:hover {
    color: var(--primary);
}

.status {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    border-radius: 50%;
}

.sidebar-scrim {
    display: none;
}

@media (max-width: 1359px) {

    .toc-sidebar,
    .docs-shell.has-toc .toc-sidebar {
        display: none;
    }
}

@media (max-width: 960px) {
    .nav-center {
        display: none;
    }

    .mobile-toggle,
    .sidebar-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .docs-shell {
        grid-template-columns: 1fr;
    }

    .docs-sidebar {
        position: fixed;
        left: 0;
        top: var(--nav-h);
        width: min(320px, 88vw);
        z-index: 90;
        transform: translateX(-105%);
        transition: transform 0.35s var(--ease);
        background: var(--background);
        border-right: 1px solid var(--border);
        box-shadow: 20px 0 50px -30px rgba(0, 0, 0, 0.5);
    }

    .docs-sidebar.open {
        transform: translateX(0);
    }

    .sidebar-scrim {
        display: block;
        position: fixed;
        inset: var(--nav-h) 0 0 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 80;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s;
    }

    .sidebar-scrim.open {
        opacity: 1;
        pointer-events: auto;
    }

    .article-wrap {
        padding: 1.5rem 1.1rem 4rem;
    }
}