/*
 * keepupproject.ru -- one stylesheet for every page, both languages.
 *
 * Glass panels over a quiet blue backdrop, neutral text, monospace wherever
 * the page names something you would type. Nothing is fetched from elsewhere:
 * no web font, no framework, no reset. A page opened from a working copy has to
 * look exactly like the published one, and a stylesheet from another host
 * renders as unstyled text without a network.
 *
 * Colours are tokens on :root. The dark set is declared twice -- once for the
 * system preference, once for an explicit choice -- because a media query
 * cannot be switched off by an attribute any other way.
 */

/* ---- 1. Tokens ------------------------------------------------------------ */

:root {
    color-scheme: light;

    --bg: #f3f6fb;
    --bg-deep: #e6ecf5;
    --text: #0f172a;
    --text-dim: #475569;
    --text-faint: #64748b;
    --accent: #2563eb;
    --accent-strong: #1d4ed8;
    --accent-2: #0891b2;
    --accent-soft: rgba(37, 99, 235, 0.09);
    --accent-line: rgba(37, 99, 235, 0.28);

    --glass: rgba(255, 255, 255, 0.58);
    --glass-strong: rgba(255, 255, 255, 0.78);
    --glass-border: rgba(255, 255, 255, 0.85);
    --hairline: rgba(15, 23, 42, 0.09);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset, 0 12px 32px -14px rgba(15, 23, 42, 0.22);
    --grid-line: rgba(37, 99, 235, 0.06);
    --orb-1: rgba(59, 130, 246, 0.30);
    --orb-2: rgba(34, 211, 238, 0.22);
    --orb-3: rgba(99, 102, 241, 0.14);

    /* Code stays dark in both themes: it reads as a terminal either way. */
    --code-bg: #0b1220;
    --code-border: rgba(148, 163, 184, 0.16);
    --code-text: #d8e1f0;
    --code-dim: #6b7a90;
    --inline-code-bg: rgba(37, 99, 235, 0.08);
    --inline-code-text: #1e3a8a;

    --tok-keyword: #93b4ff;
    --tok-string: #a6e3a1;
    --tok-comment: #6b7a90;
    --tok-number: #f5b97f;
    --tok-func: #67e8f9;
    --tok-builtin: #c4b5fd;

    --radius: 16px;
    --radius-sm: 10px;
    --page-width: 74rem;
    --gutter: 16px;
    --header-h: 64px;
    --blur: 18px;

    --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;

        --bg: #060a13;
        --bg-deep: #0a1020;
        --text: #e6ebf4;
        --text-dim: #9aa7bd;
        --text-faint: #7c8aa3;
        --accent: #60a5fa;
        --accent-strong: #93c5fd;
        --accent-2: #22d3ee;
        --accent-soft: rgba(96, 165, 250, 0.10);
        --accent-line: rgba(96, 165, 250, 0.32);

        --glass: rgba(15, 23, 42, 0.52);
        --glass-strong: rgba(15, 23, 42, 0.74);
        --glass-border: rgba(148, 163, 184, 0.14);
        --hairline: rgba(148, 163, 184, 0.12);
        --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px -18px rgba(0, 0, 0, 0.7);
        --grid-line: rgba(148, 163, 184, 0.05);
        --orb-1: rgba(37, 99, 235, 0.26);
        --orb-2: rgba(6, 182, 212, 0.16);
        --orb-3: rgba(79, 70, 229, 0.14);

        --code-bg: #070c18;
        --inline-code-bg: rgba(96, 165, 250, 0.12);
        --inline-code-text: #bfdbfe;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;

    --bg: #060a13;
    --bg-deep: #0a1020;
    --text: #e6ebf4;
    --text-dim: #9aa7bd;
    --text-faint: #7c8aa3;
    --accent: #60a5fa;
    --accent-strong: #93c5fd;
    --accent-2: #22d3ee;
    --accent-soft: rgba(96, 165, 250, 0.10);
    --accent-line: rgba(96, 165, 250, 0.32);

    --glass: rgba(15, 23, 42, 0.52);
    --glass-strong: rgba(15, 23, 42, 0.74);
    --glass-border: rgba(148, 163, 184, 0.14);
    --hairline: rgba(148, 163, 184, 0.12);
    --shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 16px 40px -18px rgba(0, 0, 0, 0.7);
    --grid-line: rgba(148, 163, 184, 0.05);
    --orb-1: rgba(37, 99, 235, 0.26);
    --orb-2: rgba(6, 182, 212, 0.16);
    --orb-3: rgba(79, 70, 229, 0.14);

    --code-bg: #070c18;
    --inline-code-bg: rgba(96, 165, 250, 0.12);
    --inline-code-text: #bfdbfe;
}

/* ---- 2. Base -------------------------------------------------------------- */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 24px);
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16.5px;
    line-height: 1.65;
    overflow-x: hidden;
}

/* Light orbs and a faint engineering grid, fixed so scrolling does not move
 * them. The grid fades out toward the edges rather than ending in a line. */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(38rem 38rem at 12% -8%, var(--orb-1), transparent 70%),
        radial-gradient(32rem 32rem at 92% 8%, var(--orb-2), transparent 70%),
        radial-gradient(40rem 30rem at 60% 110%, var(--orb-3), transparent 70%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.backdrop::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 44px 44px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 20%, #000 30%, transparent 75%);
}

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

a:hover {
    color: var(--accent-strong);
    text-decoration: underline;
    text-underline-offset: 3px;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 6px;
}

h1, h2, h3, h4 {
    line-height: 1.2;
    letter-spacing: -0.015em;
    margin: 0 0 0.6em;
}

h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: 1rem; }

p { margin: 0 0 1em; }

code, kbd, pre {
    font-family: var(--font-mono);
    font-size: 0.9em;
}

:not(pre) > code {
    background: var(--inline-code-bg);
    color: var(--inline-code-text);
    padding: 0.12em 0.4em;
    border-radius: 6px;
    /* A long name must not widen the page on a phone; it breaks instead. */
    overflow-wrap: anywhere;
}

.wrap {
    width: 100%;
    max-width: var(--page-width);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.skip-link {
    position: absolute;
    left: -999px;
    top: 8px;
}

.skip-link:focus {
    left: 8px;
    z-index: 100;
    background: var(--glass-strong);
    padding: 8px 12px;
    border-radius: 8px;
}

/* ---- 3. Glass, header, buttons -------------------------------------------- */

.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
    backdrop-filter: blur(var(--blur)) saturate(150%);
}

.site-header {
    position: sticky;
    top: 12px;
    z-index: 50;
    margin: 12px auto 0;
}

.site-header .bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: var(--header-h);
    padding: 0 12px 0 16px;
    border-radius: 999px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand:hover { color: var(--text); text-decoration: none; }

.brand img { width: 30px; height: 30px; border-radius: 8px; }

.brand .pkg {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.78rem;
    color: var(--text-faint);
    padding: 2px 8px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

.nav a {
    color: var(--text-dim);
    font-size: 0.94rem;
    padding: 6px 12px;
    border-radius: 999px;
    white-space: nowrap;
}

.nav a:hover {
    color: var(--text);
    background: var(--accent-soft);
    text-decoration: none;
}

.nav a[aria-current="page"] {
    color: var(--accent);
    background: var(--accent-soft);
}

.tools {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 8px;
    border-left: 1px solid var(--hairline);
}

.icon-btn,
.lang-switch {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    min-width: 36px;
    padding: 0 10px;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    background: transparent;
    color: var(--text-dim);
    font: 600 0.8rem/1 var(--font-mono);
    cursor: pointer;
}

.icon-btn:hover,
.lang-switch:hover {
    color: var(--text);
    border-color: var(--accent-line);
    text-decoration: none;
}

.icon-btn svg { width: 17px; height: 17px; }

/* One icon per theme; which one shows is decided by the same attribute. */
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
    :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.menu-toggle { display: none; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: 0.97rem;
    white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 130%);
    color: #fff;
    box-shadow: 0 8px 24px -10px var(--accent);
}

.btn-primary:hover { color: #fff; filter: brightness(1.08); }

.btn-ghost {
    background: var(--glass);
    border-color: var(--glass-border);
    color: var(--text);
    -webkit-backdrop-filter: blur(var(--blur));
    backdrop-filter: blur(var(--blur));
}

.btn-ghost:hover { color: var(--text); border-color: var(--accent-line); }

.btn svg { width: 18px; height: 18px; }

/* ---- 4. Page sections: hero, cards, stack, docs, code, footer ------------- */

main { padding-bottom: 64px; }

section { margin-top: 88px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font: 500 0.8rem/1 var(--font-mono);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.eyebrow::before {
    content: "";
    width: 18px;
    height: 1px;
    background: currentColor;
}

.section-head { max-width: 46rem; margin-bottom: 32px; }
.section-head p { color: var(--text-dim); font-size: 1.05rem; }

/* Hero */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 48px;
    align-items: center;
    margin-top: 72px;
}

.hero h1 {
    font-size: clamp(2.3rem, 5.2vw, 3.9rem);
    letter-spacing: -0.035em;
    line-height: 1.04;
    margin-bottom: 20px;
}

.gradient-text {
    background: linear-gradient(120deg, var(--accent) 10%, var(--accent-2) 90%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lede {
    font-size: 1.14rem;
    color: var(--text-dim);
    max-width: 36rem;
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.chip {
    font: 500 0.78rem/1 var(--font-mono);
    color: var(--text-dim);
    padding: 7px 11px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--glass-border);
}

.chip strong { color: var(--text); font-weight: 600; }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 28px 0 22px;
}

.install {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 30rem;
    padding: 6px 6px 6px 16px;
    border-radius: 14px;
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    color: var(--code-text);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.install .prompt { color: var(--accent-2); user-select: none; }
.install code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; background: none; color: inherit; padding: 0; }

.note {
    font-size: 0.9rem;
    color: var(--text-faint);
    margin-top: 12px;
    max-width: 34rem;
}

/* A code window: the glass frame with a title bar around a code block. */

.window {
    overflow: hidden;
    padding: 0;
    background: var(--code-bg);
    border-color: var(--code-border);
}

.window-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    border-bottom: 1px solid var(--code-border);
    color: var(--code-dim);
    font: 0.8rem/1 var(--font-mono);
}

.window-bar .dots { display: inline-flex; gap: 6px; margin-right: 8px; }
.window-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(148, 163, 184, 0.28); }
.window-bar .dots i:first-child { background: rgba(96, 165, 250, 0.7); }

.window pre { margin: 0; border: 0; border-radius: 0; }

.window-foot {
    padding: 10px 14px;
    border-top: 1px solid var(--code-border);
    color: var(--code-dim);
    font: 0.8rem/1.5 var(--font-mono);
}

.window-foot code { background: none; color: var(--tok-func); padding: 0; }

/* Code */

pre {
    position: relative;
    margin: 0 0 1.2em;
    padding: 18px 20px;
    overflow-x: auto;
    background: var(--code-bg);
    color: var(--code-text);
    border: 1px solid var(--code-border);
    border-radius: var(--radius-sm);
    line-height: 1.6;
    font-size: 0.87rem;
    tab-size: 4;
}

pre code { background: none; color: inherit; padding: 0; white-space: pre; }

.tok-k { color: var(--tok-keyword); }
.tok-s { color: var(--tok-string); }
.tok-c { color: var(--tok-comment); font-style: italic; }
.tok-n { color: var(--tok-number); }
.tok-f { color: var(--tok-func); }
.tok-b { color: var(--tok-builtin); }

.copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    height: 28px;
    padding: 0 10px;
    border: 1px solid var(--code-border);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.7);
    color: var(--code-dim);
    font: 500 0.72rem/1 var(--font-mono);
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s;
}

pre:hover .copy-btn,
.copy-btn:focus-visible,
.install .copy-btn { opacity: 1; }

.install .copy-btn { position: static; height: 34px; }
.copy-btn:hover { color: var(--code-text); }
.copy-btn.done { color: var(--tok-string); }

/* Cards */

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    padding: 22px 22px 18px;
}

.card h3 { display: flex; align-items: center; gap: 10px; }
.card p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

.card .glyph {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
    color: var(--accent);
    font: 600 0.72rem/1 var(--font-mono);
    flex: none;
}

a.card { display: block; color: inherit; transition: transform 0.15s, border-color 0.15s; }
a.card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--accent-line); }
a.card .arrow { margin-left: auto; color: var(--text-faint); font-family: var(--font-mono); }

/* The layer stack on the front page: what sits on what. */

.split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.stack { display: grid; gap: 10px; padding: 22px; }

.layer {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--hairline);
    background: var(--glass-strong);
}

.layer b { font-weight: 600; }
.layer span { font: 0.8rem/1.4 var(--font-mono); color: var(--text-faint); text-align: right; }
.layer.you { border-style: dashed; }
.layer.core { border-color: var(--accent-line); background: var(--accent-soft); }
.layer.core b { color: var(--accent); }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }

.checks li {
    position: relative;
    padding-left: 30px;
    color: var(--text-dim);
}

.checks li strong { color: var(--text); }

.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3em;
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: var(--accent-soft);
    border: 1px solid var(--accent-line);
}

.checks li::after {
    content: "";
    position: absolute;
    left: 6px;
    top: calc(0.3em + 4px);
    width: 5px;
    height: 8px;
    border: solid var(--accent);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Docs: a table of contents beside the text. */

.docs {
    display: grid;
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 40px;
    margin-top: 40px;
    align-items: start;
}

.toc {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    max-height: calc(100vh - var(--header-h) - 56px);
    overflow-y: auto;
    padding: 16px 10px;
}

.toc p {
    font: 600 0.72rem/1 var(--font-mono);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin: 4px 10px 10px;
}

.toc ol { list-style: none; margin: 0; padding: 0; }

.toc a {
    display: block;
    padding: 6px 10px;
    border-radius: 8px;
    color: var(--text-dim);
    font-size: 0.92rem;
    border-left: 2px solid transparent;
}

.toc a:hover { background: var(--accent-soft); color: var(--text); text-decoration: none; }
.toc a.active { color: var(--accent); border-left-color: var(--accent); background: var(--accent-soft); }

.prose { padding: 36px 40px; }
.prose > section { margin-top: 0; padding-top: 8px; }
.prose > section + section { margin-top: 44px; padding-top: 36px; border-top: 1px solid var(--hairline); }
.prose h2 { font-size: 1.6rem; }
.prose h3 { margin-top: 1.6em; }
.prose p, .prose li { color: var(--text-dim); }
.prose strong { color: var(--text); }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.35em; }

.page-title { margin-top: 56px; max-width: 48rem; }
.page-title h1 { font-size: clamp(2rem, 4vw, 2.8rem); letter-spacing: -0.03em; }
.page-title p { color: var(--text-dim); font-size: 1.1rem; }

.callout {
    margin: 0 0 1.2em;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--accent-line);
    background: var(--accent-soft);
    color: var(--text-dim);
    font-size: 0.95rem;
}

.callout strong { color: var(--text); }

.table-wrap { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--hairline); border-radius: 12px; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--hairline); }
th { font: 600 0.74rem/1.3 var(--font-mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-faint); background: var(--glass-strong); }
tr:last-child td { border-bottom: 0; }
td { color: var(--text-dim); }
td:first-child code { white-space: nowrap; }

/* Examples: one card per example, the text above its code. */

.example { padding: 28px; margin-top: 24px; }
.example h2 { font-size: 1.35rem; }
.example > p { color: var(--text-dim); max-width: 50rem; }
.example pre:last-child { margin-bottom: 0; }

.file-label {
    display: inline-block;
    margin: 4px 0 6px;
    font: 0.78rem/1 var(--font-mono);
    color: var(--text-faint);
}

/* Footer */

.site-footer {
    margin-top: 40px;
    padding: 28px 0 40px;
    border-top: 1px solid var(--hairline);
    color: var(--text-faint);
    font-size: 0.9rem;
}

.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--text-dim); }

/* ---- 5. Narrow screens ---------------------------------------------------- */

@media (max-width: 960px) {
    .hero,
    .split { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .grid,
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .docs { grid-template-columns: minmax(0, 1fr); gap: 16px; }

    /* The contents become a strip that scrolls sideways above the text. */
    .toc {
        position: sticky;
        top: calc(var(--header-h) + 20px);
        z-index: 10;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 8px;
    }
    .toc p { display: none; }
    .toc ol { display: flex; gap: 4px; }
    .toc a { white-space: nowrap; border-left: 0; }
    .prose { padding: 28px 24px; }
}

@media (max-width: 760px) {
    :root { --header-h: 56px; }
    body { font-size: 16px; }
    section { margin-top: 64px; }
    .hero { margin-top: 44px; }
    .grid,
    .grid-4 { grid-template-columns: minmax(0, 1fr); }

    .site-header .bar { border-radius: 18px; padding: 0 8px 0 12px; }
    .brand .pkg { display: none; }
    .menu-toggle { display: inline-flex; }

    /* The navigation folds into a panel under the bar. */
    .nav {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        left: var(--gutter);
        right: var(--gutter);
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        border-radius: 16px;
        background: var(--glass-strong);
        border: 1px solid var(--glass-border);
        box-shadow: var(--shadow);
        -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
        backdrop-filter: blur(var(--blur)) saturate(150%);
    }
    .site-header.open .nav { display: flex; }
    .nav a { padding: 10px 14px; border-radius: 10px; }
    .tools { margin-left: auto; padding-left: 0; border-left: 0; }

    .prose { padding: 22px 16px; }
    .example { padding: 20px 16px; }
    .layer { flex-direction: column; gap: 2px; }
    .layer span { text-align: left; }
    pre { font-size: 0.82rem; padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    a.card { transition: none; }
}
