/*
 * Blog styles for Jabble.io — /blog, /blog/topic/<key>/ and /blog/<slug> (blog.php)
 * Standalone: blog pages don't load the site-wide stylesheets.
 *
 * Every colour is a token. Dark values are set twice: for the device setting
 * (unless the site switch chose light) and for the switch itself.
 */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
:root {
    color-scheme: light;
    --accent: #fc5c6c;            /* Jabble coral */
    --accent-ink: #c92f40;        /* coral that reads as text on light backgrounds */
    --accent-soft: #fff3f4;
    --accent-line: #ffd5da;
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --card: #ffffff;
    --ink: #16181d;               /* headings */
    --text: #30343b;              /* body copy */
    --muted: #646b78;
    --border: #e1e4e9;
    --code-bg: #f0f2f5;
    --head-bg: rgba(255, 255, 255, 0.9);
    --btn-bg: #d33f50;            /* white text on this passes WCAG AA */
    --btn-bg-hover: #b93445;
    --btn-text: #ffffff;
    --focus: #fc5c6c;

    --card-border: color-mix(in srgb, var(--border) 75%, transparent);
    --card-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.35);
    --card-hover-border: color-mix(in srgb, var(--accent) 45%, transparent);
    --card-hover-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.42);
    --card-hover-title: var(--accent-ink);
    --card-lift: -4px;

    --thumb-light: block;
    --thumb-dark: none;
    --icon-moon: block;
    --icon-sun: none;

    --head-h: 108px;
    --font: Arial, Helvetica, sans-serif;
    --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --accent-ink: #ff8a96;
        --accent-soft: #24161a;
        --accent-line: #4a2229;
        --bg: #0f1114;
        --bg-soft: #15181c;
        --card: #16191d;
        --ink: #f2f3f5;
        --text: #d0d4da;
        --muted: #9aa1ad;
        --border: #2c3139;
        --code-bg: #20242a;
        --head-bg: rgba(15, 17, 20, 0.88);
        --card-hover-border: color-mix(in srgb, var(--accent) 16%, transparent);
        --card-hover-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.6);
        --card-hover-title: color-mix(in srgb, var(--accent) 30%, var(--ink));
        --card-lift: -2px;
        --thumb-light: none;
        --thumb-dark: block;
        --icon-moon: none;
        --icon-sun: block;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --accent-ink: #ff8a96;
    --accent-soft: #24161a;
    --accent-line: #4a2229;
    --bg: #0f1114;
    --bg-soft: #15181c;
    --card: #16191d;
    --ink: #f2f3f5;
    --text: #d0d4da;
    --muted: #9aa1ad;
    --border: #2c3139;
    --code-bg: #20242a;
    --head-bg: rgba(15, 17, 20, 0.88);
    --card-hover-border: color-mix(in srgb, var(--accent) 16%, transparent);
    --card-hover-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.6);
    --card-hover-title: color-mix(in srgb, var(--accent) 30%, var(--ink));
    --card-lift: -2px;
    --thumb-light: none;
    --thumb-dark: block;
    --icon-moon: none;
    --icon-sun: block;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img, svg { display: block; max-width: 100%; }

a { color: inherit; }

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

.skip-link {
    position: absolute;
    left: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--ink);
    color: var(--bg);
    text-decoration: none;
}

.skip-link:focus { top: 12px; }

.container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--btn-bg);
    color: var(--btn-text);
    font: 700 15px/1 var(--font);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

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

.btn--small {
    min-height: 36px;
    padding: 0 16px;
    font-size: 14px;
}

.btn--outline {
    border-color: var(--border);
    background: transparent;
    color: var(--ink);
}

.btn--outline:hover {
    border-color: var(--accent);
    background: transparent;
    color: var(--accent-ink);
}

/* ── Header ──────────────────────────────────────────────────────────────── */
.site-mast {
    position: sticky;
    top: 0;
    z-index: 50;
}

.launch-notice {
    display: block;
    padding: 10px 16px;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.4;
    color: #fff;
    background: #fc5c6c;
}

.launch-notice:hover {
    background: #e84756;
    color: #fff;
}

.launch-notice strong {
    font-weight: 700;
}

[data-theme="dark"] .launch-notice {
    background: #c92f40;
}

[data-theme="dark"] .launch-notice:hover {
    background: #fc5c6c;
}

.site-head {
    position: relative;
    top: auto;
    z-index: 50;
    border-bottom: 1px solid var(--border);
    background: var(--head-bg);
    -webkit-backdrop-filter: saturate(160%) blur(12px);
    backdrop-filter: saturate(160%) blur(12px);
}

.site-head-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    max-width: 1160px;
    height: var(--head-h);
    margin: 0 auto;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
}

.brand--small { font-size: 16px; gap: 8px; }

.head-nav {
    display: flex;
    gap: 22px;
}

.head-link {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

.head-link:hover,
.head-link[aria-current] { color: var(--ink); }

.head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.theme-switch {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease;
}

.theme-switch:hover { border-color: var(--accent); color: var(--accent-ink); }
.theme-switch .icon-moon { display: var(--icon-moon); }
.theme-switch .icon-sun { display: var(--icon-sun); }

/* ── Topic bar ───────────────────────────────────────────────────────────── */
.topics {
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.topics-inner {
    display: flex;
    gap: 26px;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: auto;
    scrollbar-width: none;
}

.topics-inner::-webkit-scrollbar { display: none; }

.topics-link {
    flex-shrink: 0;
    padding: 13px 0 11px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.22s ease, border-color 0.22s ease;
}

.topics-link:hover { color: var(--ink); }

.topics-link--blog {
    color: var(--ink);
    font-weight: 700;
}

.topics-link[aria-current] {
    border-bottom-color: var(--accent);
    color: var(--ink);
}

/* ── Page headings ───────────────────────────────────────────────────────── */
.page-title {
    max-width: 980px;
    margin: 40px 0 12px;
    color: var(--ink);
    font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.75rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.page-title--home {
    margin-bottom: 28px;
    font-size: clamp(1.75rem, 1rem + 2.2vw, 2.375rem);
}

.lede {
    max-width: 640px;
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 18px;
}

.section-title {
    margin: 0 0 20px;
    color: var(--ink);
    font-size: 22px;
    letter-spacing: -0.01em;
}

.crumbs ol {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 14px;
}

.crumbs li + li::before {
    content: "›";
    margin-right: 6px;
}

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

.crumbs a:hover { color: var(--accent-ink); text-decoration: underline; }

.container > .crumbs { margin-top: 28px; }
.container > .crumbs + .page-title { margin-top: 16px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--card);
    box-shadow: var(--card-shadow);
    color: var(--ink);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.card:hover,
.card:focus-visible {
    transform: translateY(var(--card-lift));
    border-color: var(--card-hover-border);
    box-shadow: var(--card-hover-shadow);
}

.card:focus-visible { outline-offset: 3px; border-radius: 14px; }

.card-thumb {
    display: block;
    aspect-ratio: 1200 / 630;
    background: var(--bg-soft);
}

.card-thumb .thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.thumb--light { display: var(--thumb-light); }
.thumb--dark { display: var(--thumb-dark); }

.card-thumb--empty {
    display: grid;
    place-items: center;
    color: var(--muted);
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 20px 20px;
}

.card-topic {
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 700;
}

.card-title {
    margin: 0;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.35;
    transition: color 0.22s ease;
}

.card:hover .card-title,
.card:focus-visible .card-title { color: var(--card-hover-title); }

.card-excerpt {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.55;
}

.card--featured .card-body { gap: 8px; padding: 20px 24px 24px; }
.card--featured .card-title { font-size: clamp(1.4rem, 1rem + 1vw, 1.75rem); line-height: 1.2; letter-spacing: -0.01em; }

/* ── Blog home ───────────────────────────────────────────────────────────── */
.home-top {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 32px;
    align-items: start;
    margin-bottom: 56px;
}

.start-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0 8px;
    color: var(--ink);
    font-size: 18px;
}

.start-title svg { color: var(--accent); }

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

.start-list li + li { border-top: 1px solid var(--border); }

.start-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 0;
    text-decoration: none;
}

.start-topic {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.start-name {
    color: var(--muted);
    font-size: 16px;
    line-height: 1.45;
    transition: color 0.22s ease;
}

.start-item:hover .start-name { color: var(--accent-ink); }

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

.more { margin-bottom: 72px; }

.read-more {
    display: flex;
    margin: 32px auto 0;
}

.grid--topic { margin-bottom: 72px; }

.empty { margin-bottom: 72px; }

/* ── Article ─────────────────────────────────────────────────────────────── */
.article-layout {
    max-width: 1024px;
    margin: 0 auto;
    padding: 28px 24px 0;
}

.toc-col { display: none; }

.article {
    max-width: 720px;
    min-width: 0;
    margin: 0 auto;
}

.article-title {
    margin: 16px 0 12px;
    color: var(--ink);
    font-size: clamp(1.9rem, 1.3rem + 2vw, 2.6rem);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.byline {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 15px;
}

.byline a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: none;
}

.byline a:hover { color: var(--accent-ink); }

/* Share row */
.share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.share-btn,
.share-native {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.22s ease, color 0.22s ease;
}

.share-native {
    display: inline-flex;
    gap: 8px;
    width: auto;
    padding: 0 16px;
    border-radius: 999px;
    font: 700 14px/1 var(--font);
}

.share-btn:hover,
.share-native:hover {
    border-color: var(--accent);
    color: var(--accent-ink);
}

.share--touch .share-net { display: none; }

.share-copy .icon-check { display: none; }
.share-copy.is-copied .icon-link { display: none; }
.share-copy.is-copied .icon-check { display: block; }
.share-copy.is-copied { border-color: var(--accent); color: var(--accent-ink); }

.share-status {
    color: var(--accent-ink);
    font-size: 14px;
    font-weight: 700;
}

.pref-source {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 16px 0 28px;
    padding: 8px 16px 8px 12px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--card);
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.22s ease;
}

.pref-source:hover { border-color: var(--accent); }

/* Quick answer */
.quick {
    margin: 0 0 28px;
    padding: 18px 22px;
    border-left: 4px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: var(--bg-soft);
    color: var(--ink);
    font-size: 18px;
    line-height: 1.6;
}

.quick p { margin: 0; }

/* Long example links in inline code must wrap rather than overflow the box */
.quick code,
.prose code {
    overflow-wrap: anywhere;
}

.quick code {
    padding: 0.12em 0.38em;
    border-radius: 6px;
    background: var(--code-bg);
    font-family: var(--mono);
    font-size: 0.86em;
}

.quick .quick-label {
    margin-bottom: 6px;
    color: var(--accent-ink);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* "On this page" */
.toc-title {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 700;
}

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

.toc a,
.toc-mobile a {
    display: block;
    color: var(--muted);
    text-decoration: none;
}

.toc a {
    padding: 6px 0 6px 12px;
    border-left: 2px solid var(--border);
    font-size: 14px;
    line-height: 1.4;
    transition: color 0.22s ease, border-color 0.22s ease;
}

.toc a:hover { color: var(--ink); }

.toc a[aria-current] {
    border-left-color: var(--accent);
    color: var(--ink);
    font-weight: 700;
}

.toc-mobile {
    margin: 0 0 28px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--card);
}

.toc-mobile summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--ink);
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

.toc-mobile summary::-webkit-details-marker { display: none; }
.toc-mobile summary svg { transition: transform 0.22s ease; }
.toc-mobile[open] summary svg { transform: rotate(180deg); }

.toc-mobile ol { padding: 0 18px 12px; }
.toc-mobile a { padding: 7px 0; border-top: 1px solid var(--border); }
.toc-mobile a:hover { color: var(--accent-ink); }

@media (min-width: 1100px) {
    .article-layout {
        display: grid;
        grid-template-columns: 200px 720px;
        column-gap: 56px;
        justify-content: center;
    }

    .toc-col { display: block; }

    .toc {
        position: sticky;
        top: calc(var(--head-h) + 28px);
        max-height: calc(100vh - var(--head-h) - 56px);
        margin-top: 60px;
        overflow-y: auto;
    }

    .article { margin: 0; }
    .toc-mobile { display: none; }
}

/* Article body */
.prose {
    color: var(--text);
    font-size: 18px;
    line-height: 1.7;
}

.prose p,
.prose ul,
.prose ol { margin: 0 0 1.2em; }

.prose ul,
.prose ol { padding-left: 1.4em; }

.prose li { margin: 0.4em 0; }

.prose h2 {
    margin: 2em 0 0.6em;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.prose h3 {
    margin: 1.6em 0 0.4em;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.35;
}

.prose strong { color: var(--ink); }

.prose a:not([class]) {
    color: var(--accent-ink);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.prose a:not([class]):hover { text-decoration-thickness: 2px; }

.prose code {
    padding: 0.12em 0.38em;
    border-radius: 6px;
    background: var(--code-bg);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 0.86em;
}

.prose pre {
    margin: 0 0 1.4em;
    padding: 16px 18px;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-soft);
    font-size: 15px;
    line-height: 1.6;
}

.prose pre code { padding: 0; background: none; font-size: inherit; }

.prose .post-lede {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.6;
}

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

.table-wrap table {
    width: 100%;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.5;
}

.table-wrap th,
.table-wrap td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table-wrap tbody tr:last-child td { border-bottom: 0; }

.table-wrap th {
    background: var(--bg-soft);
    color: var(--ink);
    font-size: 14px;
}

.table-wrap td:first-child { color: var(--ink); font-weight: 700; }

/* Friendly box before the third section */
.nudge {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin: 2em 0;
    padding: 18px 20px;
    border: 1px solid var(--accent-line);
    border-radius: 14px;
    background: var(--accent-soft);
}

.prose .nudge p {
    margin: 0;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.5;
}

/* FAQ */
.faq h3 { margin-top: 1.4em; }
.faq h3 + p { margin-bottom: 0.8em; }

/* End of article */
.share--bottom {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.closing {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin: 32px 0 0;
    padding: 24px;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    background: var(--bg-soft);
}

.closing p {
    margin: 0;
    color: var(--ink);
    font-size: 17px;
    font-weight: 700;
}

.closing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.keep-reading {
    margin-top: 72px;
    padding: 56px 0 72px;
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-foot {
    border-top: 1px solid var(--border);
    background: var(--bg);
    padding: 36px 0 28px;
}

.site-foot-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.15fr 1fr;
    gap: 32px 40px;
    align-items: start;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.site-foot-brand p {
    margin: 10px 0 0;
    max-width: 28ch;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.site-foot-col h2 {
    margin: 0 0 12px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.site-foot-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.site-foot-col a {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.site-foot-col a:hover { color: var(--ink); }

.site-foot-app {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    text-decoration: none;
}

.site-foot-app-name {
    color: var(--ink);
    font-size: 15px;
    font-weight: 700;
}

.site-foot-app-note {
    color: var(--muted);
    font-size: 13px;
}

.site-foot-app:hover .site-foot-app-name { color: var(--accent); }

.site-foot-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 28px;
    padding-top: 20px;
}

.site-foot-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.site-foot-nav a {
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
}

.site-foot-nav a:hover { color: var(--ink); }

.site-foot-copy {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 960px) {
    .home-top { grid-template-columns: minmax(0, 1fr); }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .site-foot-grid { grid-template-columns: 1fr 1fr; gap: 28px 32px; }
}

@media (max-width: 640px) {
    .container,
    .site-head-inner,
    .topics-inner,
    .article-layout {
        padding-left: 16px;
        padding-right: 16px;
    }

    .site-head-inner { gap: 16px; }
    .head-link--blog { display: none; }   /* the topic bar already starts with Blog */
    .grid { grid-template-columns: minmax(0, 1fr); }
    .prose { font-size: 17px; }
    .prose h2 { font-size: 23px; }

    .nudge {
        grid-template-columns: auto 1fr;
    }

    .nudge .btn { grid-column: 1 / -1; justify-self: start; }
    .table-wrap table { min-width: 540px; }
    .site-foot-grid { grid-template-columns: 1fr; gap: 24px; }
    .site-foot-bar { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 400px) {
    .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    .card,
    .card:hover,
    .card:focus-visible {
        transform: none;
        box-shadow: var(--card-shadow);
        transition: border-color 0.22s ease;
    }

    .toc-mobile summary svg { transition: none; }
}
