/* Cortana documentation site */
:root {
    --sidebar-width: 272px;
    --accent: #2563eb;
    --accent-soft: #e8efff;
    --bg: #ffffff;
    --bg-subtle: #f7f8fa;
    --text: #1f2328;
    --text-muted: #5b6470;
    --border: #e3e6ea;
    --code-inline-bg: #f1f3f5;
    --code-bg: #1e222a;
    --code-text: #d7dce4;
    --note-bg: #f0f6ff;
    --note-border: #2563eb;
    --warn-bg: #fff7e8;
    --warn-border: #d97706;
    --hero-from: #0b1b3a;
    --hero-to: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --accent: #7aa7ff;
        --accent-soft: #1b2a47;
        --bg: #0f1216;
        --bg-subtle: #151a20;
        --text: #e4e7eb;
        --text-muted: #9aa4b0;
        --border: #262c34;
        --code-inline-bg: #1c2229;
        --code-bg: #0a0d11;
        --code-text: #d7dce4;
        --note-bg: #14203a;
        --warn-bg: #2a2111;
        --hero-from: #060b16;
        --hero-to: #173a8f;
    }
}

:root[data-theme="dark"] {
    --accent: #7aa7ff;
    --accent-soft: #1b2a47;
    --bg: #0f1216;
    --bg-subtle: #151a20;
    --text: #e4e7eb;
    --text-muted: #9aa4b0;
    --border: #262c34;
    --code-inline-bg: #1c2229;
    --code-bg: #0a0d11;
    --code-text: #d7dce4;
    --note-bg: #14203a;
    --warn-bg: #2a2111;
    --hero-from: #060b16;
    --hero-to: #173a8f;
}

* { box-sizing: border-box; }

html { scroll-padding-top: 1.5rem; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ---------- Landing page ---------- */

.hero {
    background: linear-gradient(135deg, var(--hero-from) 0%, var(--hero-to) 100%);
    color: #fff;
    padding: 6rem 16px 5rem;
    text-align: center;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 3.6rem); margin: 0 0 1rem; font-weight: 700; letter-spacing: -0.02em; }
.hero p { font-size: clamp(1.05rem, 2.5vw, 1.35rem); max-width: 42rem; margin: 0 auto 2.5rem; opacity: 0.9; }
.hero .install {
    display: inline-block;
    font-family: 'Fira Code', ui-monospace, monospace;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.6rem 1.1rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    max-width: 100%;
    overflow-x: auto;
    white-space: nowrap;
}
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    margin: 0.3rem;
}
.btn-primary { background: #fff; color: #1d4ed8; }
.btn-outline { border: 1px solid rgba(255, 255, 255, 0.6); color: #fff; }

.landing-section { max-width: 1100px; margin: 0 auto; padding: 4rem 16px; }
.landing-section h2 { text-align: center; font-size: 1.8rem; margin: 0 0 2.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; }
.card {
    display: block;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    background: var(--bg-subtle);
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card h3 { margin: 0 0 0.5rem; font-size: 1.1rem; color: var(--accent); }
.card h3 i { width: 1.4rem; }
.card p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }

.site-footer {
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    text-align: center;
    padding: 2rem 16px;
    font-size: 0.85rem;
}

/* ---------- Docs layout ---------- */

.doc-container { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--bg-subtle);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 1.5rem 1rem 3rem;
}
.sidebar .brand {
    display: block;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 0.08em;
    color: var(--text);
    text-decoration: none;
    padding: 0 0.75rem;
    margin-bottom: 0.5rem;
}
.sidebar h2 {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    margin: 1.6rem 0 0.4rem;
    padding: 0 0.75rem;
}
.sidebar ul { list-style: none; padding: 0; margin: 0; }
.sidebar a.nav-link {
    display: block;
    text-decoration: none;
    color: var(--text);
    font-size: 0.92rem;
    padding: 0.32rem 0.75rem;
    border-radius: 6px;
}
.sidebar a.nav-link:hover { background: var(--accent-soft); color: var(--accent); }
.sidebar a.nav-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.mobile-bar { display: none; }

.content-area {
    flex: 1;
    min-width: 0;
    padding: 3rem 4rem 5rem;
    max-width: 960px;
}

@media (max-width: 860px) {
    .doc-container { display: block; }
    .mobile-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        z-index: 20;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 0.7rem 16px;
    }
    .mobile-bar a { font-weight: 700; letter-spacing: 0.08em; color: var(--text); text-decoration: none; }
    .mobile-bar button {
        background: none;
        border: 1px solid var(--border);
        color: var(--text);
        border-radius: 6px;
        padding: 0.35rem 0.7rem;
        font-size: 0.9rem;
    }
    .sidebar {
        display: none;
        position: fixed;
        top: 49px;
        left: 0;
        right: 0;
        width: auto;
        height: calc(100vh - 49px);
        z-index: 19;
    }
    body.nav-open .sidebar { display: block; }
    .content-area { padding: 1.75rem 16px 4rem; }
    html { scroll-padding-top: 4rem; }
}

/* ---------- Doc typography ---------- */

.content-area h1 { font-size: 2.3rem; margin: 0 0 0.75rem; font-weight: 700; letter-spacing: -0.02em; }
.content-area .lead { font-size: 1.12rem; color: var(--text-muted); margin-bottom: 2rem; }
.content-area section { padding-top: 0.5rem; }
.content-area section + section { border-top: 1px solid var(--border); margin-top: 2.5rem; padding-top: 2rem; }
.content-area h2 { font-size: 1.6rem; margin: 0 0 1rem; font-weight: 650; letter-spacing: -0.01em; }
.content-area h3 { font-size: 1.15rem; margin: 2rem 0 0.7rem; font-weight: 600; }
.content-area p, .content-area li { font-size: 0.98rem; }
.content-area p { margin: 0 0 1.1rem; }
.content-area ul, .content-area ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.content-area li { margin-bottom: 0.35rem; }

.content-area code {
    font-family: 'Fira Code', ui-monospace, monospace;
    font-size: 0.86em;
    background: var(--code-inline-bg);
    padding: 0.12rem 0.35rem;
    border-radius: 4px;
}
.content-area pre {
    position: relative;
    background: var(--code-bg);
    color: var(--code-text);
    padding: 1.1rem 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 0 0 1.4rem;
    font-size: 0.86rem;
    line-height: 1.55;
}
.content-area pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.copy-btn {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: #c9d1db;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
}
pre:hover .copy-btn, .copy-btn:focus { opacity: 1; }

.table-wrap { overflow-x: auto; margin: 0 0 1.4rem; }
.content-area table { border-collapse: collapse; width: 100%; font-size: 0.9rem; }
.content-area th, .content-area td {
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid var(--border);
    padding: 0.55rem 0.75rem;
}
.content-area th { font-weight: 600; background: var(--bg-subtle); }
.content-area td code { white-space: nowrap; }

.callout {
    border-left: 3px solid var(--note-border);
    background: var(--note-bg);
    border-radius: 0 8px 8px 0;
    padding: 0.85rem 1.1rem;
    margin: 0 0 1.4rem;
    font-size: 0.95rem;
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--warn-border); background: var(--warn-bg); }

kbd {
    font-family: 'Fira Code', ui-monospace, monospace;
    font-size: 0.8em;
    border: 1px solid var(--border);
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 0.05rem 0.35rem;
    background: var(--bg-subtle);
}

.page-nav {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 4rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}
.page-nav a {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.8rem 1rem;
    text-decoration: none;
    color: var(--text);
}
.page-nav a:hover { border-color: var(--accent); }

/* ---------- Refined landing page ---------- */
:root {
    --accent: #3566d6;
    --hero-from: #101b35;
    --hero-to: #14284c;
    --landing-ink: #f5f7fb;
    --landing-muted: #aab5c7;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) { --landing-ink: #f5f7fb; --landing-muted: #aab5c7; }
}
:root[data-theme="dark"] { --landing-ink: #f5f7fb; --landing-muted: #aab5c7; }

.landing-header {
    height: 72px;
    padding: 0 max(6vw, calc((100vw - 1200px) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}
.landing-brand { display: inline-flex; align-items: center; gap: 0.62rem; color: var(--text); text-decoration: none; font-weight: 750; letter-spacing: 0.11em; font-size: 0.88rem; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #3566d6; color: #fff; font-size: 0.95rem; letter-spacing: 0; }
.landing-header nav { display: flex; align-items: center; gap: 2rem; }
.landing-header nav a { color: var(--text-muted); text-decoration: none; font-size: 0.86rem; font-weight: 550; }
.landing-header nav a:hover, .site-footer > a:last-child:hover { color: var(--accent); }
.landing-header nav a:last-child { color: var(--text); }
.landing-header nav i { margin-left: 0.25rem; font-size: 0.72rem; }

.hero {
    min-height: 565px;
    padding: 5.25rem max(6vw, calc((100vw - 1200px) / 2)) 5rem;
    display: grid;
    grid-template-columns: 1fr 0.95fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 5rem);
    text-align: left;
    background: radial-gradient(ellipse at 78% 48%, rgba(60, 111, 206, 0.28), transparent 38%), linear-gradient(120deg, #0b1427, #142a50 75%, #182e56);
    color: var(--landing-ink);
}
.hero-copy { max-width: 590px; }
.eyebrow { display: flex; align-items: center; gap: 0.58rem; margin-bottom: 1.5rem; color: #adc6ff; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #79e0b4; box-shadow: 0 0 12px #79e0b4; }
.hero h1 { margin: 0 0 1.2rem; font-size: clamp(2.8rem, 5.4vw, 4.55rem); line-height: 1.04; font-weight: 650; letter-spacing: -0.06em; }
.hero h1 em { color: #9bb9fb; font-style: normal; }
.hero p { max-width: 31rem; margin: 0 0 1.9rem; color: #c0cad9; font-size: 1.03rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 2.2rem; }
.hero .btn { margin: 0; padding: 0.78rem 1.05rem; border-radius: 7px; font-size: 0.86rem; }
.hero .btn-primary { display: inline-flex; align-items: center; gap: 0.65rem; background: #f7f9ff; color: #17294a; }
.hero .btn-primary:hover { background: #dce7ff; }
.hero .btn-outline { border-color: rgba(202, 216, 243, 0.32); color: #e5ecfa; }
.hero .btn-outline:hover { background: rgba(255,255,255,0.08); }
.install { display: flex; align-items: center; gap: 0.75rem; width: fit-content; max-width: 100%; margin: 0; padding: 0.8rem 0.9rem; border: 1px solid rgba(203, 218, 246, 0.15); border-radius: 7px; background: rgba(3, 10, 23, 0.32); }
.install-label { color: #7f93b2; font-size: 0.59rem; font-weight: 700; letter-spacing: 0.1em; }
.install code { overflow-x: auto; color: #e1eaff; font: 0.72rem 'Fira Code', monospace; white-space: nowrap; }
.install-prompt { color: #75d9a7; font: 700 1rem 'Fira Code', monospace; }
.hero-visual { position: relative; padding: 0.7rem 0 1.6rem; }
.terminal-window { overflow: hidden; border: 1px solid rgba(191, 211, 246, 0.2); border-radius: 12px; background: #0c1320; box-shadow: 0 30px 75px rgba(0,0,0,0.38), 0 0 0 7px rgba(255,255,255,0.025); transform: perspective(1100px) rotateY(-3deg) rotateX(1deg); }
.terminal-top { height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0 1rem; border-bottom: 1px solid rgba(174, 194, 225, 0.12); color: #8291a9; font-size: 0.63rem; }
.window-dots { display: flex; gap: 5px; }
.window-dots i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #ff6b64; }
.window-dots i:nth-child(2) { background: #f4bd4f; }.window-dots i:nth-child(3) { background: #53c76c; }
.terminal-lock { color: #86d7ad; font-size: 0.6rem; }
.terminal-body { min-height: 274px; padding: 1.35rem 1.5rem; color: #d2dced; font: 0.72rem/1.85 'Fira Code', monospace; }
.terminal-line { margin-bottom: 0.55rem; }.terminal-line.muted { color: #71809a; }.terminal-line.prompt { color: #edf3ff; }.terminal-line.prompt b { margin-right: 0.35rem; color: #7ce0ac; }
.terminal-rule { height: 1px; margin: 0.9rem 0 1rem; background: rgba(174,194,225,0.12); }
.answer-title { color: #9fc0ff; }.spark { margin-right: 0.35rem; color: #79d9aa; }
.terminal-line.answer { color: #bcc8da; }.terminal-tree { padding: 0.25rem 0 0.65rem 0.5rem; color: #9daec6; line-height: 2; }.terminal-tree span { color: #5b7090; }.terminal-tree b { color: #dbe7fa; font-weight: 500; }
.terminal-cursor { margin-top: 0.4rem; color: #7ce0ac; }.terminal-cursor i { display: inline-block; width: 6px; height: 13px; margin-left: 3px; vertical-align: -2px; background: #7ce0ac; animation: cursor-blink 1.1s steps(2, start) infinite; }
@keyframes cursor-blink { to { visibility: hidden; } }
.visual-caption { position: absolute; right: -0.5rem; bottom: 0; display: flex; align-items: center; gap: 0.7rem; padding: 0.72rem 0.9rem; border: 1px solid rgba(197, 216, 248, 0.18); border-radius: 9px; background: #182943; box-shadow: 0 14px 36px rgba(0,0,0,0.25); }
.caption-icon { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 8px; color: #8ce0b6; background: rgba(87,197,144,0.12); font-size: 0.8rem; }
.visual-caption b, .visual-caption small { display: block; }.visual-caption b { color: #f2f6fd; font-size: 0.7rem; }.visual-caption small { margin-top: 0.12rem; color: #a6b5cb; font-size: 0.61rem; }

.value-strip { min-height: 105px; display: flex; justify-content: center; align-items: center; gap: clamp(2rem, 8vw, 8rem); padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); background: var(--bg); }
.value-strip > div { display: flex; align-items: center; gap: 0.75rem; }
.value-icon { display: grid; place-items: center; width: 37px; height: 37px; border: 1px solid var(--border); border-radius: 9px; color: var(--accent); background: var(--bg-subtle); font-size: 0.82rem; }
.value-strip b, .value-strip small { display: block; }.value-strip b { color: var(--text); font-size: 0.76rem; font-weight: 650; }.value-strip small { margin-top: 0.12rem; color: var(--text-muted); font-size: 0.66rem; }
.landing-section { max-width: 1200px; padding: 5.4rem 2rem 5.5rem; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.section-kicker { margin-bottom: 0.55rem; color: var(--accent); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em; }
.landing-section h2 { max-width: 36rem; margin: 0; text-align: left; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.2; letter-spacing: -0.04em; }
.section-heading > p { max-width: 22rem; margin: 0 0 0.12rem; color: var(--text-muted); font-size: 0.87rem; }
.card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card { position: relative; min-height: 190px; padding: 1.25rem 1.3rem; border-radius: 9px; background: var(--bg); transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease; }
.card:hover { transform: translateY(-3px); border-color: #9bb6ec; box-shadow: 0 10px 25px rgba(24,50,94,0.07); }
.card-icon { display: grid; place-items: center; width: 35px; height: 35px; margin-bottom: 1.1rem; border-radius: 9px; font-size: 0.82rem; }
.icon-blue { color: #3566d6; background: #edf3ff; }.icon-green { color: #16845c; background: #e9f8f1; }.icon-purple { color: #7650c9; background: #f2edff; }.icon-amber { color: #ad6a0a; background: #fff5e4; }.icon-rose { color: #c04e69; background: #fff0f3; }.icon-slate { color: #536579; background: #edf1f5; }
.card-meta { display: block; margin-bottom: 0.35rem; color: var(--text-muted); font-size: 0.58rem; font-weight: 700; letter-spacing: 0.09em; }
.card h3 { margin: 0 0 0.45rem; color: var(--text); font-size: 1rem; font-weight: 650; }
.card p { max-width: 19rem; color: var(--text-muted); font-size: 0.79rem; line-height: 1.6; }
.card-arrow { position: absolute; top: 1.3rem; right: 1.3rem; color: #9aa6b5; font-size: 0.68rem; }

.features-section { padding: 5rem max(2rem, calc((100vw - 1200px) / 2 + 2rem)) 5.5rem; border-top: 1px solid var(--border); background: var(--bg-subtle); }
.features-section h2 { max-width: 36rem; margin: 0; font-size: clamp(1.7rem, 3vw, 2.2rem); line-height: 1.2; letter-spacing: -0.04em; }
.features-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.feature-card { display: block; padding: 1.2rem 1.2rem 1.25rem; border: 1px solid var(--border); border-radius: 9px; background: var(--bg); color: var(--text); text-decoration: none; transition: border-color 0.18s ease, transform 0.18s ease; }
.feature-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.feature-icon { display: grid; place-items: center; width: 32px; height: 32px; margin-bottom: 0.9rem; border-radius: 8px; color: var(--accent); background: var(--accent-soft); font-size: 0.8rem; }
.feature-card h3 { margin: 0 0 0.4rem; font-size: 0.92rem; font-weight: 650; }
.feature-card p { margin: 0; color: var(--text-muted); font-size: 0.78rem; line-height: 1.6; }

/* Card icon tints need darker backgrounds in dark mode. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .icon-blue { color: #8fb0ff; background: #1b2a47; }
    :root:not([data-theme="light"]) .icon-green { color: #6fd6a8; background: #12302a; }
    :root:not([data-theme="light"]) .icon-purple { color: #b59cf5; background: #261d40; }
    :root:not([data-theme="light"]) .icon-amber { color: #f0b45a; background: #33260f; }
    :root:not([data-theme="light"]) .icon-rose { color: #f08aa2; background: #3a1a24; }
    :root:not([data-theme="light"]) .icon-slate { color: #a9b7c8; background: #222a33; }
    :root:not([data-theme="light"]) .card:hover { border-color: var(--accent); box-shadow: none; }
}
:root[data-theme="dark"] .icon-blue { color: #8fb0ff; background: #1b2a47; }
:root[data-theme="dark"] .icon-green { color: #6fd6a8; background: #12302a; }
:root[data-theme="dark"] .icon-purple { color: #b59cf5; background: #261d40; }
:root[data-theme="dark"] .icon-amber { color: #f0b45a; background: #33260f; }
:root[data-theme="dark"] .icon-rose { color: #f08aa2; background: #3a1a24; }
:root[data-theme="dark"] .icon-slate { color: #a9b7c8; background: #222a33; }
:root[data-theme="dark"] .card:hover { border-color: var(--accent); box-shadow: none; }
.site-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.5rem max(6vw, calc((100vw - 1200px) / 2)); text-align: left; }
.site-footer .landing-brand { font-size: 0.75rem; }.site-footer .brand-mark { width: 25px; height: 25px; border-radius: 7px; font-size: 0.8rem; }
.site-footer > span { color: var(--text-muted); font-size: 0.73rem; }.site-footer > a:last-child { color: var(--text); font-size: 0.75rem; text-decoration: none; }.site-footer > a:last-child i { margin-left: 0.3rem; font-size: 0.68rem; }

/* Keep documentation readable on wide screens while using the available canvas. */
.content-area { max-width: 940px; padding: 3.5rem clamp(2rem, 5vw, 5rem) 5rem; }
.sidebar { width: 260px; padding: 1.6rem 1.15rem 3rem; }
.sidebar a.nav-link { padding-top: 0.4rem; padding-bottom: 0.4rem; }
.content-area h1 { font-size: clamp(2rem, 3.5vw, 2.55rem); letter-spacing: -0.045em; }
.content-area .lead { max-width: 48rem; font-size: 1.08rem; line-height: 1.75; }
.content-area section + section { margin-top: 2.8rem; padding-top: 2.2rem; }
.content-area pre { border: 1px solid rgba(128,145,169,0.12); border-radius: 9px; }
.content-area th, .content-area td { padding: 0.68rem 0.8rem; }

@media (max-width: 920px) {
    .hero { grid-template-columns: 1fr 0.9fr; gap: 2rem; padding-top: 4rem; }
    .hero h1 { font-size: clamp(2.6rem, 6vw, 3.7rem); }
    .terminal-body { padding: 1.15rem; font-size: 0.64rem; }
    .landing-section { padding-top: 4.2rem; }
    .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .landing-header { height: 62px; padding: 0 1.2rem; }
    .landing-header nav { gap: 1rem; }.landing-header nav a { font-size: 0.75rem; }
    .landing-header nav a { white-space: nowrap; }.landing-header nav a[href="#features"] { display: none; }
    .hero { display: block; min-height: 0; padding: 3.4rem 1.25rem 3rem; }
    .hero h1 { font-size: clamp(2.65rem, 12vw, 3.6rem); }.hero p { font-size: 0.94rem; }
    .install { gap: 0.5rem; width: 100%; padding: 0.7rem; }.install-label { display: none; }.install code { font-size: clamp(0.57rem, 2.8vw, 0.72rem); }
    .hero-visual { margin: 2.5rem 0 0.4rem; }.terminal-window { transform: none; }.terminal-body { min-height: 250px; font-size: 0.62rem; }.visual-caption { right: 0.5rem; }
    .value-strip { display: grid; grid-template-columns: 1fr 1fr; justify-content: stretch; gap: 1.1rem 0.6rem; padding: 1.3rem 1.2rem; }
    .value-strip > div { gap: 0.55rem; }.value-icon { width: 32px; height: 32px; font-size: 0.72rem; }.value-strip b { font-size: 0.69rem; }.value-strip small { font-size: 0.59rem; }
    .landing-section { padding: 3.7rem 1.2rem 4rem; }.section-heading { display: block; margin-bottom: 1.45rem; }.section-heading > p { margin-top: 0.7rem; font-size: 0.82rem; }.landing-section h2 { font-size: 1.75rem; }
    .features-section { padding: 3.7rem 1.2rem 4rem; }.features-section h2 { font-size: 1.75rem; }
    .features-grid { grid-template-columns: 1fr; gap: 0.75rem; }
    .card-grid { grid-template-columns: 1fr; gap: 0.75rem; }.card { min-height: 0; padding: 1rem 1.1rem 1.1rem 4.2rem; }.card-icon { position: absolute; left: 1.1rem; top: 1.15rem; }.card-meta { margin-top: 0.05rem; }.card p { max-width: none; }.card-arrow { top: 1.15rem; right: 1.1rem; }
    .site-footer { flex-wrap: wrap; padding: 1.3rem 1.2rem; }.site-footer > span { order: 3; flex-basis: 100%; }
    .content-area { padding: 1.6rem 1.2rem 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Documentation reading layout ---------- */
html { scroll-padding-top: 5rem; scroll-behavior: smooth; }
.mobile-bar {
    display: flex;
    position: sticky;
    z-index: 30;
    top: 0;
    height: 62px;
    align-items: center;
    gap: 1.5rem;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border);
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(14px);
}
.docs-brand { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--text) !important; text-decoration: none; font-size: 0.82rem; font-weight: 750; letter-spacing: 0.1em; }
.mobile-bar .brand-mark { width: 27px; height: 27px; border-radius: 8px; font-size: 0.83rem; }
.docs-bar-label { color: var(--text-muted); font-size: 0.75rem; }
.docs-bar-label span { padding: 0 0.5rem; color: var(--border); }
.mobile-bar button { margin-left: auto; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; padding: 0.4rem 0.75rem; font-size: 0.78rem; cursor: pointer; }
.mobile-bar button:hover { border-color: var(--accent); }
.mobile-bar #nav-toggle { display: none; }
.doc-container { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; align-items: start; min-height: calc(100vh - 62px); }
.sidebar { position: sticky; top: 62px; width: auto; height: calc(100vh - 62px); padding: 1.55rem 1rem 3rem; border-right: 1px solid var(--border); }
.sidebar .brand { display: none; }
.sidebar h2 { margin-top: 1.25rem; font-size: 0.65rem; letter-spacing: 0.1em; }
.sidebar a.nav-link { padding: 0.39rem 0.75rem; color: var(--text-muted); font-size: 0.82rem; }
.sidebar a.nav-link.active { color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 var(--accent); }
.content-area { width: 100%; max-width: 940px; padding: 3.15rem clamp(2.25rem, 5vw, 4.5rem) 5rem; }
.content-area h1 { margin-bottom: 0.55rem; font-size: clamp(2rem, 3vw, 2.5rem); }
.content-area .lead { margin-bottom: 2.5rem; }
.content-area section { scroll-margin-top: 5.5rem; }
.page-toc { position: sticky; top: 95px; max-height: calc(100vh - 120px); overflow-y: auto; margin-top: 3.5rem; padding: 0.15rem 1.2rem 1.5rem 0.8rem; border-left: 1px solid var(--border); }
.page-toc > p { margin: 0 0 0.7rem; color: var(--text-muted); font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em; }
.page-toc nav { display: grid; gap: 0.15rem; }
.page-toc a { display: block; padding: 0.38rem 0.65rem; border-left: 2px solid transparent; color: var(--text-muted); font-size: 0.72rem; line-height: 1.45; text-decoration: none; }
.page-toc a:hover { color: var(--text); }
.page-toc a.active { margin-left: -1px; border-left-color: var(--accent); color: var(--accent); font-weight: 600; }
.page-nav { margin-top: 3rem; }
.page-nav a { padding: 1rem 1.1rem; background: var(--bg-subtle); }
.page-nav small { display: block; margin-bottom: 0.3rem; color: var(--text-muted); font-size: 0.65rem; }

@media (max-width: 1180px) {
    .doc-container { grid-template-columns: 250px minmax(0, 1fr); }
    .page-toc { display: none; }
    .content-area { max-width: 900px; padding-right: clamp(2.5rem, 7vw, 6rem); }
}
@media (max-width: 860px) {
    .doc-container { display: block; min-height: calc(100vh - 56px); }
    .mobile-bar { height: 56px; padding: 0 1rem; }
    .docs-bar-label { margin-left: auto; font-size: 0.7rem; }
    .mobile-bar button { margin-left: 0; }
    .mobile-bar #nav-toggle { display: inline-block; }
    .sidebar { display: none; position: fixed; top: 56px; left: 0; right: 0; width: auto; height: calc(100vh - 56px); z-index: 29; padding: 1.25rem 1rem 3rem; background: var(--bg); }
    body.nav-open .sidebar { display: block; }
    .content-area { max-width: 760px; margin: 0 auto; padding: 2rem 1.35rem 4rem; }
}
@media (max-width: 460px) {
    .docs-bar-label { display: none; }
    .mobile-bar button { margin-left: auto; }
    .content-area h1 { font-size: 1.9rem; }
    .content-area .lead { font-size: 1rem; }
}
.page-nav small { display: block; color: var(--text-muted); font-size: 0.78rem; }
.page-nav .next { text-align: right; }
