    :root {
        --bg: #ffffff;
        --bg-2: #f7f7f7;
        --bg-3: #efefef;
        --surface: #ffffff;
        --border: #e2e2e2;
        --border-2: #c4c4c4;
        --text: #0a0a0a;
        --text-2: #525252;
        --text-3: #6a6a6a;
        --accent: #FF5F15;
        --accent-hover: #db5314;
        --accent-pale: rgb(255, 95, 21, 0.08);
        --accent-text: #FF5F15;
        --code-bg: #f1f1f1;
        --code-border: #cdcdcd;
        --t: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
        --ff-display: 'Newsreader', Georgia, serif;
        --ff-body: 'Inter', system-ui, sans-serif;
        --ff-mono: 'JetBrains Mono', monospace;
        --nav-bg: rgba(255, 255, 255, 0.75);
        --sidebar-w: 264px;
        --toc-w: 200px;
    }

    [data-theme="dark"] {
        --bg: rgb(8, 8, 8);
        --bg-2: #111111;
        --bg-3: #1c1c1c;
        --surface: #0f0f0f;
        --border: #1e1e1e;
        --border-2: #303030;
        --text: #f0f0f0;
        --text-2: #888888;
        --text-3: #444444;
        --accent: #FF5F15;
        --accent-hover: #db5314;
        --accent-pale: rgb(255, 95, 21, 0.08);
        --accent-text: #FF5F15;
        --code-bg: #050505;
        --code-border: #161616;
        --nav-bg: rgba(8, 8, 8, 0.75);
    }

    /* ─── Reset ──────────────────────────────────────────────────────── */
    *,
    *::before,
    *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }

    html {
        scroll-behavior: smooth;
    }

    body {
        font-family: var(--ff-body);
        background: var(--bg);
        color: var(--text);
        font-size: 15px;
        line-height: 1.6;
        -webkit-font-smoothing: antialiased;
        overflow-x: hidden;
        transition: background var(--t), color var(--t);
    }

    a {
        text-decoration: none;
        color: inherit;
    }

    button {
        cursor: pointer;
        border: none;
        background: none;
        font-family: inherit;
    }

    ::selection {
        background: var(--accent);
        color: #fff;
    }

    code {
        font-family: var(--ff-mono);
    }

    /* ─── Topnav ─────────────────────────────────────────────────────── */
    #topnav {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        height: 56px;
        border-bottom: 1px solid var(--border);
        background: var(--nav-bg);
        backdrop-filter: url('#wave-filter');
        display: flex;
        align-items: center;
        transition: background var(--t), border-color var(--t);
    }

    .nav-inner {
        width: 100%;
        padding: 0 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
    }

    .nav-left {
        display: flex;
        align-items: center;
        gap: 24px;
    }

    .nav-logo {
        font-family: var(--ff-display);
        font-size: 22px;
        letter-spacing: -0.3px;
        color: var(--text);
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .nav-logo-icon {
        width: 26px;
        height: 26px;
        background: var(--accent);
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-logo-icon svg {
        width: 15px;
        height: 15px;
        fill: #fff;
    }

    .nav-divider {
        width: 1px;
        height: 22px;
        background: var(--border);
    }

    .nav-doc-label {
        font-family: var(--ff-mono);
        font-size: 11.5px;
        color: var(--text-3);
        letter-spacing: 0.05em;
    }

    /* search */
    .nav-search {
        display: flex;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 6px 12px;
        background: var(--bg-2);
        color: var(--text-3);
        font-size: 12.5px;
        font-family: var(--ff-body);
        cursor: pointer;
        transition: all var(--t);
        min-width: 180px;
    }

    .nav-search:hover {
        border-color: var(--border-2);
        color: var(--text-2);
    }

    .nav-search svg {
        width: 13px;
        height: 13px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
        flex-shrink: 0;
    }

    .nav-search-kbd {
        margin-left: auto;
        font-family: var(--ff-mono);
        font-size: 10px;
        padding: 2px 5px;
        border: 1px solid var(--border);
        border-radius: 3px;
        color: var(--text-3);
    }

    @media (max-width: 640px) {
        .nav-search {
            display: none;
        }
    }

    .nav-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .nav-version {
        font-family: var(--ff-mono);
        font-size: 11px;
        color: var(--text-3);
        letter-spacing: 0.02em;
    }

    .theme-btn {
        width: 32px;
        height: 32px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: var(--bg-2);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-2);
        transition: all var(--t);
    }

    .theme-btn:hover {
        border-color: var(--border-2);
        color: var(--text);
    }

    .theme-btn svg {
        width: 15px;
        height: 15px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
    }

    .nav-gh {
        display: flex;
        align-items: center;
        gap: 6px;
        font-size: 12.5px;
        color: var(--text-2);
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 5px 12px;
        background: var(--bg-2);
        transition: all var(--t);
    }

    .nav-gh:hover {
        border-color: var(--border-2);
        color: var(--text);
    }

    .nav-gh svg {
        width: 14px;
        height: 14px;
        fill: currentColor;
    }

    @media (max-width: 480px) {
        .nav-gh {
            display: none;
        }
    }

    /* sidebar mobile toggle */
    .sidebar-toggle {
        display: none;
        width: 32px;
        height: 32px;
        border-radius: 6px;
        border: 1px solid var(--border);
        background: var(--bg-2);
        align-items: center;
        justify-content: center;
        color: var(--text-2);
        transition: all var(--t);
    }

    .sidebar-toggle svg {
        width: 16px;
        height: 16px;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
    }

    @media (max-width: 900px) {
        .sidebar-toggle {
            display: flex;
        }
    }

    /* ─── Layout ─────────────────────────────────────────────────────── */
    .docs-layout {
        display: grid;
        grid-template-columns: var(--sidebar-w) 1fr var(--toc-w);
        min-height: 100vh;
        padding-top: 56px;
    }

    @media (max-width: 1100px) {
        .docs-layout {
            grid-template-columns: var(--sidebar-w) 1fr;
        }

        #toc-col {
            display: none;
        }
    }

    @media (max-width: 900px) {
        .docs-layout {
            grid-template-columns: 1fr;
        }
    }

    /* ─── Sidebar ────────────────────────────────────────────────────── */
    #sidebar {
        position: sticky;
        /* ← Change this from 'fixed' to 'sticky' */
        top: 56px;
        left: 0;
        width: var(--sidebar-w);
        height: calc(100vh - 56px);
        overflow-y: auto;
        border-right: 1px solid var(--border);
        background: var(--bg);
        padding: 24px 0 40px;
        transition: transform var(--t);
        z-index: 150;
    }

    #sidebar::-webkit-scrollbar {
        width: 3px;
    }

    #sidebar::-webkit-scrollbar-thumb {
        background: var(--border-2);
        border-radius: 3px;
    }

    @media (max-width: 900px) {
        #sidebar {
            position: fixed;
            /* ← Add this so it overlays properly on mobile */
            transform: translateX(-100%);
        }

        #sidebar.open {
            transform: translateX(0);
            box-shadow: 16px 0 48px rgba(0, 0, 0, 0.18);
        }
    }


    .sb-section {
        margin-bottom: 4px;
    }

    .sb-section-label {
        font-family: var(--ff-mono);
        font-size: 10px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--text-3);
        padding: 16px 20px 6px;
        display: block;
    }

    .sb-section:first-child .sb-section-label {
        padding-top: 4px;
    }

    .sb-link {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 7px 20px;
        font-size: 13px;
        color: var(--text-2);
        transition: color var(--t), background var(--t);
        border-left: 2px solid transparent;
        position: relative;
    }

    .sb-link:hover {
        color: var(--text);
        background: var(--bg-2);
    }

    .sb-link.active {
        color: var(--accent-text);
        border-left-color: var(--accent);
        background: var(--accent-pale);
    }

    .sb-link-badge {
        font-family: var(--ff-mono);
        font-size: 9.5px;
        padding: 1px 6px;
        border-radius: 3px;
        background: var(--accent-pale);
        color: var(--accent-text);
        border: 1px solid var(--accent);
        margin-left: auto;
    }

    /* sidebar overlay */
    #sb-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 140;
    }

    #sb-overlay.show {
        display: block;
    }

    /* ─── Main content ────────────────────────────────────────────────── */
    #main {
        min-width: 0;
        padding: 0;
    }

    .content {
        max-width: 760px;
        padding: 56px 48px 96px;
    }

    @media (max-width: 640px) {
        .content {
            padding: 40px 20px 80px;
        }
    }

    /* ─── TOC ────────────────────────────────────────────────────────── */
    #toc-col {
        position: sticky;
        top: 56px;
        height: calc(100vh - 56px);
        overflow-y: auto;
        padding: 40px 20px 40px 0;
        border-left: 1px solid var(--border);
    }

    .toc-label {
        font-family: var(--ff-mono);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.12em;
        color: var(--text-3);
        margin-bottom: 12px;
        padding-left: 16px;
    }

    .toc-link {
        display: block;
        font-size: 12.5px;
        color: var(--text-3);
        padding: 5px 16px;
        border-left: 1px solid var(--border);
        transition: color var(--t), border-color var(--t);
        line-height: 1.4;
    }

    .toc-link:hover {
        color: var(--text-2);
        border-color: var(--border-2);
    }

    .toc-link.active {
        color: var(--accent-text);
        border-color: var(--accent);
    }

    .toc-link.l2 {
        padding-left: 28px;
    }

    /* ─── Doc content typography ─────────────────────────────────────── */
    .doc-eyebrow {
        font-family: var(--ff-mono);
        font-size: 11px;
        color: var(--accent-text);
        letter-spacing: 0.1em;
        text-transform: uppercase;
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .doc-eyebrow::before {
        content: '';
        display: inline-block;
        width: 20px;
        height: 1px;
        background: var(--accent);
    }

    .doc-h1 {
        font-family: var(--ff-display);
        font-style: italic;
        font-weight: 300;
        font-size: clamp(2.4rem, 5vw, 3.8rem);
        line-height: 1.05;
        letter-spacing: -0.03em;
        color: var(--text);
        margin-bottom: 20px;
    }

    .doc-lead {
        font-size: 16px;
        color: var(--text-2);
        line-height: 1.8;
        max-width: 560px;
        margin-bottom: 40px;
        border-bottom: 1px solid var(--border);
        padding-bottom: 40px;
    }

    .doc-h2 {
        font-family: var(--ff-display);
        font-style: italic;
        font-weight: 400;
        font-size: 1.8rem;
        line-height: 1.15;
        letter-spacing: -0.02em;
        color: var(--text);
        margin-top: 56px;
        margin-bottom: 16px;
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border);
    }

    .doc-h2:first-of-type {
        margin-top: 0;
    }

    .doc-h3 {
        font-size: 15px;
        font-weight: 600;
        letter-spacing: -0.2px;
        color: var(--text);
        margin-top: 32px;
        margin-bottom: 10px;
    }

    .doc-p {
        font-size: 14.5px;
        color: var(--text-2);
        line-height: 1.8;
        margin-bottom: 16px;
    }

    .doc-p:last-child {
        margin-bottom: 0;
    }

    .doc-p code,
    .doc-h3 code {
        font-family: var(--ff-mono);
        font-size: 0.85em;
        padding: 2px 6px;
        border-radius: 3px;
        background: var(--bg-3);
        color: var(--accent-text);
        border: 1px solid var(--border);
    }

    .doc-inline-code {
        font-family: var(--ff-mono);
        font-size: 0.85em;
        padding: 2px 6px;
        border-radius: 3px;
        background: var(--bg-3);
        color: var(--accent-text);
        border: 1px solid var(--border);
    }

    .doc-ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 16px 0 24px;
    }

    .doc-ul li {
        font-size: 14px;
        color: var(--text-2);
        padding-left: 18px;
        position: relative;
        line-height: 1.7;
    }

    .doc-ul li::before {
        content: '';
        position: absolute;
        left: 0;
        top: 9px;
        width: 5px;
        height: 5px;
        border-radius: 50%;
        background: var(--accent);
    }

    .doc-ul li code {
        font-family: var(--ff-mono);
        font-size: 0.85em;
        padding: 1px 5px;
        border-radius: 3px;
        background: var(--bg-3);
        border: 1px solid var(--border);
        color: var(--accent-text);
    }

    /* callout */
    .callout {
        border: 1px solid var(--border);
        border-left: 3px solid var(--accent);
        border-radius: 0 6px 6px 0;
        padding: 14px 18px;
        margin: 24px 0;
        background: var(--accent-pale);
    }

    .callout-label {
        font-family: var(--ff-mono);
        font-size: 10px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--accent-text);
        margin-bottom: 6px;
    }

    .callout p {
        font-size: 13.5px;
        color: var(--text-2);
        line-height: 1.7;
    }

    .callout p code {
        font-family: var(--ff-mono);
        font-size: 0.85em;
        padding: 1px 5px;
        border-radius: 3px;
        background: var(--bg-3);
        border: 1px solid var(--border);
        color: var(--accent-text);
    }

    .callout.tip {
        border-left-color: #22c55e;
        background: rgba(34, 197, 94, 0.06);
    }

    .callout.tip .callout-label {
        color: #22c55e;
    }

    .callout.warn {
        border-left-color: #f59e0b;
        background: rgba(245, 158, 11, 0.06);
    }

    .callout.warn .callout-label {
        color: #f59e0b;
    }

    /* ─── Code frame ─────────────────────────────────────────────────── */
    .code-frame {
        border-radius: 8px;
        overflow: hidden;
        border: 1px solid var(--code-border);
        background: var(--code-bg);
        margin: 20px 0;
    }

    .code-bar {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--code-border);
    }

    .cdot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
    }

    .cdot-r {
        background: #ff5f57;
    }

    .cdot-y {
        background: #ffbd2e;
    }

    .cdot-g {
        background: #28ca41;
    }

    .code-fn {
        font-family: var(--ff-mono);
        font-size: 11px;
        color: var(--text-3);
        margin-left: 6px;
    }

    .code-copy {
        margin-left: auto;
        font-family: var(--ff-mono);
        font-size: 10.5px;
        padding: 3px 8px;
        border-radius: 3px;
        border: 1px solid var(--code-border);
        color: var(--text-3);
        background: transparent;
        cursor: pointer;
        transition: all var(--t);
    }

    .code-copy:hover {
        color: var(--accent-text);
        border-color: var(--accent);
    }

    .code-body {
        padding: 20px 22px;
        font-family: var(--ff-mono);
        font-size: 13px;
        line-height: 1.85;
        color: #888;
        overflow-x: auto;
    }

    .code-body pre {
        margin: 0;
    }

    /* syntax */
    .ct {
        color: #5c9ee5;
    }

    /* tag */
    .ca {
        color: #a78bfa;
    }

    /* attr */
    .cs {
        color: var(--accent);
    }

    /* string/value */
    .cc {
        color: #555;
        font-style: italic;
    }

    /* comment */
    .ck {
        color: #e879f9;
    }

    /* keyword */
    .cn {
        color: #fb923c;
    }

    /* number */
    .cp {
        color: #86efac;
    }

    /* property */
    .cv {
        color: #67e8f9;
    }

    /* variable */

    /* ─── Table ──────────────────────────────────────────────────────── */
    .doc-table-wrap {
        overflow-x: auto;
        margin: 20px 0;
    }

    table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
    }

    thead tr {
        border-bottom: 1px solid var(--border);
    }

    thead th {
        font-family: var(--ff-mono);
        font-size: 10.5px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-3);
        padding: 8px 12px;
        text-align: left;
    }

    tbody tr {
        border-bottom: 1px solid var(--border);
        transition: background var(--t);
    }

    tbody tr:hover {
        background: var(--bg-2);
    }

    tbody td {
        padding: 10px 12px;
        color: var(--text-2);
        vertical-align: top;
        line-height: 1.6;
    }

    tbody td:first-child {
        font-family: var(--ff-mono);
        font-size: 12px;
        color: var(--accent-text);
        white-space: nowrap;
    }

    tbody td code {
        font-family: var(--ff-mono);
        font-size: 0.9em;
        padding: 1px 4px;
        background: var(--bg-3);
        border-radius: 3px;
        color: var(--accent-text);
    }

    /* ─── Tag chips ──────────────────────────────────────────────────── */
    .tag-row {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin: 14px 0;
    }

    .tag {
        font-family: var(--ff-mono);
        font-size: 11.5px;
        padding: 4px 10px;
        border-radius: 4px;
        background: var(--bg-3);
        color: var(--text-3);
        border: 1px solid var(--border);
    }

    .tag.accent {
        background: var(--accent-pale);
        border-color: var(--accent);
        color: var(--accent-text);
    }

    /* ─── Steps ──────────────────────────────────────────────────────── */
    .steps {
        display: flex;
        flex-direction: column;
        gap: 0;
        margin: 24px 0;
    }

    .step {
        display: flex;
        gap: 20px;
        padding-bottom: 32px;
        position: relative;
    }

    .step:last-child {
        padding-bottom: 0;
    }

    .step-num {
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 1px solid var(--border);
        background: var(--bg-2);
        font-family: var(--ff-mono);
        font-size: 11px;
        color: var(--accent-text);
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        position: relative;
        z-index: 1;
    }

    .step::before {
        content: '';
        position: absolute;
        left: 13px;
        top: 28px;
        bottom: 0;
        width: 1px;
        background: var(--border);
    }

    .step:last-child::before {
        display: none;
    }

    .step-body {
        padding-top: 3px;
        flex: 1;
        min-width: 0;
    }

    .step-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 6px;
    }

    .step-desc {
        font-size: 13.5px;
        color: var(--text-2);
        line-height: 1.7;
    }

    /* ─── Feature grid (mini) ────────────────────────────────────────── */
    .mini-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        margin: 24px 0;
    }

    @media (max-width: 560px) {
        .mini-grid {
            grid-template-columns: 1fr;
        }
    }

    .mini-item {
        padding: 22px 24px;
        border-right: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        transition: background var(--t);
    }

    .mini-item:hover {
        background: var(--bg-2);
    }

    .mini-item:nth-child(2n) {
        border-right: none;
    }

    .mini-item:nth-last-child(-n+2) {
        border-bottom: none;
    }

    @media (max-width: 560px) {
        .mini-item {
            border-right: none;
        }

        .mini-item:last-child {
            border-bottom: none;
        }
    }

    .mini-num {
        font-family: var(--ff-mono);
        font-size: 10px;
        color: var(--accent-text);
        letter-spacing: 0.1em;
        margin-bottom: 8px;
    }

    .mini-title {
        font-size: 13.5px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 6px;
    }

    .mini-desc {
        font-size: 12.5px;
        color: var(--text-2);
        line-height: 1.65;
    }

    /* ─── Utility reference pill grid ───────────────────────────────── */
    .util-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin: 12px 0 20px;
    }

    .util-pill {
        font-family: var(--ff-mono);
        font-size: 11.5px;
        padding: 4px 10px;
        border-radius: 4px;
        background: var(--bg-2);
        border: 1px solid var(--border);
        color: var(--text-3);
        transition: all var(--t);
        cursor: default;
    }

    .util-pill:hover {
        border-color: var(--border-2);
        color: var(--text-2);
    }

    /* ─── Config key-val ─────────────────────────────────────────────── */
    .kv-list {
        display: flex;
        flex-direction: column;
        gap: 0;
        border: 1px solid var(--border);
        border-radius: 8px;
        overflow: hidden;
        margin: 20px 0;
    }

    .kv-item {
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transition: background var(--t);
    }

    .kv-item:last-child {
        border-bottom: none;
    }

    .kv-item:hover {
        background: var(--bg-2);
    }

    .kv-key {
        padding: 14px 16px;
        font-family: var(--ff-mono);
        font-size: 12px;
        color: var(--accent-text);
        border-right: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .kv-key span {
        font-family: var(--ff-body);
        font-size: 10.5px;
        color: var(--text-3);
    }

    .kv-val {
        padding: 14px 16px;
        font-size: 13px;
        color: var(--text-2);
        line-height: 1.65;
    }

    .kv-val code {
        font-family: var(--ff-mono);
        font-size: 0.85em;
        padding: 1px 5px;
        border-radius: 3px;
        background: var(--bg-3);
        border: 1px solid var(--border);
        color: var(--accent-text);
    }

    @media (max-width: 560px) {
        .kv-item {
            grid-template-columns: 1fr;
        }

        .kv-key {
            border-right: none;
            border-bottom: 1px solid var(--border);
        }
    }

    /* ─── Separator ──────────────────────────────────────────────────── */
    .doc-sep {
        width: 100%;
        height: 1px;
        background: var(--border);
        margin: 48px 0;
    }

    /* ─── Page nav ───────────────────────────────────────────────────── */
    .page-nav {
        display: flex;
        gap: 12px;
        margin-top: 64px;
        border-top: 1px solid var(--border);
        padding-top: 32px;
        flex-wrap: wrap;
    }

    .page-nav-btn {
        flex: 1;
        min-width: 160px;
        padding: 16px 20px;
        border: 1px solid var(--border);
        border-radius: 8px;
        background: var(--bg-2);
        transition: all var(--t);
        display: flex;
        flex-direction: column;
        gap: 4px;
        cursor: pointer;
    }

    .page-nav-btn:hover {
        border-color: var(--border-2);
        background: var(--bg-3);
    }

    .page-nav-btn.next {
        text-align: right;
    }

    .page-nav-dir {
        font-family: var(--ff-mono);
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-3);
    }

    .page-nav-title {
        font-size: 14px;
        font-weight: 500;
        color: var(--text);
    }

    /* ─── Reveal animation ───────────────────────────────────────────── */
    .reveal {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }

    .reveal.in {
        opacity: 1;
        transform: none;
    }

    /* ─── Toast ──────────────────────────────────────────────────────── */
    #toast {
        position: fixed;
        bottom: 24px;
        left: 50%;
        transform: translateX(-50%) translateY(80px);
        background: var(--text);
        color: var(--bg);
        font-family: var(--ff-mono);
        font-size: 12px;
        padding: 9px 18px;
        border-radius: 6px;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
        opacity: 0;
        z-index: 999;
        pointer-events: none;
        white-space: nowrap;
    }

    #toast.show {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    /* ─── Search modal ───────────────────────────────────────────────── */
    #search-modal {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(6px);
        z-index: 300;
        align-items: flex-start;
        justify-content: center;
        padding-top: 15vh;
    }

    #search-modal.open {
        display: flex;
    }

    .search-box {
        width: 100%;
        max-width: 560px;
        background: var(--bg);
        border: 1px solid var(--border-2);
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
    }

    .search-input-row {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
    }

    .search-input-row svg {
        width: 16px;
        height: 16px;
        stroke: var(--text-3);
        fill: none;
        stroke-width: 1.8;
        flex-shrink: 0;
    }

    #search-input {
        flex: 1;
        background: none;
        border: none;
        outline: none;
        font-family: var(--ff-body);
        font-size: 15px;
        color: var(--text);
    }

    #search-input::placeholder {
        color: var(--text-3);
    }

    .search-esc {
        font-family: var(--ff-mono);
        font-size: 10.5px;
        padding: 2px 7px;
        border-radius: 3px;
        border: 1px solid var(--border);
        color: var(--text-3);
        cursor: pointer;
    }

    .search-results {
        padding: 8px 0;
        max-height: 360px;
        overflow-y: auto;
    }

    .search-result {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 16px;
        cursor: pointer;
        transition: background var(--t);
    }

    .search-result:hover {
        background: var(--bg-2);
    }

    .sr-icon {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
        color: var(--text-3);
    }

    .sr-icon svg {
        width: 100%;
        height: 100%;
        stroke: currentColor;
        fill: none;
        stroke-width: 1.8;
    }

    .sr-text {
        flex: 1;
    }

    .sr-title {
        font-size: 13.5px;
        color: var(--text);
    }

    .sr-section {
        font-family: var(--ff-mono);
        font-size: 11px;
        color: var(--text-3);
    }

    .search-empty {
        padding: 32px 16px;
        text-align: center;
        font-size: 13.5px;
        color: var(--text-3);
        font-style: italic;
    }

    /* Base sizing for both logos */
    .brand-logo-light,
    .brand-logo-dark {
        height: 26px;
        /* Adjust this to match your desired logo size */
        width: auto;
        object-fit: contain;
    }

    /* Default (Light Mode): Hide the dark logo */
    .brand-logo-dark {
        display: none;
    }

    /* Dark Mode: Hide the light logo, show the dark logo */
    [data-theme="dark"] .brand-logo-light {
        display: none;
    }

    [data-theme="dark"] .brand-logo-dark {
        display: block;
    }