/* ==========================================================================
   Public site pages: functions reference, templates gallery, features, compare, legal, shortcuts, pricing.
   Generated by scripts/build-seo.mjs (and the landing page shares the blocks marked "shared").
   Colours come only from the tokens in app.css. No gradients.
   ========================================================================== */

.site { background: var(--bg); overflow-x: clip; }
.sx-wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.sx-wrap.narrow { max-width: 820px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sx-prose a:not(.btn), .sx-link { color: var(--accent-text); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); }
.sx-prose a:not(.btn):hover, .sx-link:hover { text-decoration-color: currentColor; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.sx code:not(.fn-code) { font-size: .92em; background: var(--surface-2); border: 1px solid var(--border); padding: 1px 6px; border-radius: 5px; overflow-wrap: anywhere; }

/* ---------- shared: hero ---------- */
.sx-hero { background: var(--surface); border-bottom: 1px solid var(--border); padding: 36px 0 44px; }
.sx-hero.center { text-align: center; }
.sx-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 0 0 20px; padding: 0; list-style: none; }
.sx-hero.center .sx-crumbs { justify-content: center; }
.sx-crumbs a { color: var(--muted); }
.sx-crumbs a:hover { color: var(--text); }
.sx-crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--border-strong); }
.sx-eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--accent-text); margin-bottom: 12px; }
.sx-hero h1 { font-size: clamp(30px, 4.6vw, 50px); line-height: 1.08; letter-spacing: -.035em; margin: 0 0 14px; text-wrap: balance; }
.sx-hero.center h1 { max-width: 860px; margin-left: auto; margin-right: auto; }
.sx-lead { font-size: clamp(16px, 1.8vw, 18.5px); color: var(--text-2); line-height: 1.6; max-width: 720px; margin: 0 0 26px; text-wrap: pretty; }
.sx-hero.center .sx-lead { margin-left: auto; margin-right: auto; }
.sx-ctas { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sx-hero.center .sx-ctas { justify-content: center; }
.sx-ctas .btn.big { height: 46px; padding: 0 22px; border-radius: 10px; font-weight: 600; }
.sx-trust { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 13.5px; color: var(--muted); }
.sx-hero.center .sx-trust { justify-content: center; }
.sx-trust li { display: inline-flex; align-items: center; gap: 6px; }
.sx-trust .i { color: var(--success); width: 15px; height: 15px; }

/* ---------- shared: sections ---------- */
.sx-section { padding: 64px 0; }
.sx-section.tight { padding: 40px 0; }
.sx-section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sx-section + .sx-section:not(.alt) { padding-top: 0; }
.sx-section.alt + .sx-section { padding-top: 64px; }
.sx-head { max-width: 720px; margin: 0 0 28px; }
.sx-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.sx-head h2, .sx-h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.03em; line-height: 1.15; margin: 0 0 10px; text-wrap: balance; }
.sx-head p { color: var(--muted); font-size: 16px; line-height: 1.6; margin: 0; }
.sx-kicker { display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent-text); margin-bottom: 10px; }
.sx-prose { font-size: 16.5px; line-height: 1.7; color: var(--text-2); }
.sx-prose h2 { font-size: clamp(21px, 2.4vw, 26px); color: var(--text); letter-spacing: -.02em; margin: 36px 0 10px; }
.sx-prose h2:first-child { margin-top: 0; }
.sx-prose p { margin: 0 0 14px; }
.sx-ticks { list-style: none; padding: 0; margin: 6px 0 16px; display: grid; gap: 10px; }
.sx-ticks li { display: flex; gap: 10px; line-height: 1.55; }
.sx-ticks .i { color: var(--success); margin-top: 3px; width: 16px; height: 16px; }
.sx-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; color: var(--text); }
.sx-more:hover { text-decoration: none; color: var(--accent-text); }
.sx-more .i { width: 15px; height: 15px; transition: transform .15s; }
.sx-more:hover .i { transform: translateX(3px); }

/* ---------- shared: screenshot frame (shared with landing) ---------- */
.sx-shot { margin: 0; border-radius: 14px; border: 1px solid var(--border-strong); background: var(--surface); overflow: hidden; box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 24px 48px -18px rgba(16, 24, 40, .25); }
.sx-shot-bar { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sx-shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); flex: none; }
.sx-shot-bar span { margin: 0 auto; transform: translateX(-20px); font-size: 11.5px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1px 14px; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-shot img { display: block; width: 100%; height: auto; background: var(--surface-2); }
.sx-phone { margin: 0 auto; width: min(320px, 80vw); border-radius: 36px; border: 10px solid var(--text); background: var(--text); overflow: hidden; box-shadow: var(--shadow-lg); }
.sx-phone img { display: block; width: 100%; height: auto; border-radius: 26px; }

/* ---------- shared: cards ---------- */
.sx-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; list-style: none; padding: 0; margin: 0; }
.sx-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.sx-card { display: flex; flex-direction: column; gap: 8px; height: 100%; padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
a.sx-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.sx-card b { font-size: 15.5px; }
.sx-card span:not(.i):not(.sx-ic) { font-size: 14px; color: var(--muted); line-height: 1.5; }
.sx-ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; margin-bottom: 6px; }
.sx-ic.soft { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- shared: FAQ ---------- */
.sx-faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.sx-faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.sx-faq summary { list-style: none; cursor: pointer; padding: 16px 20px; font-weight: 600; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.sx-faq summary::-webkit-details-marker { display: none; }
.sx-faq summary::after { content: '+'; font-size: 20px; font-weight: 400; color: var(--muted); line-height: 1; flex: none; }
.sx-faq details[open] summary::after { content: '\2212'; }
.sx-faq details p { margin: 0; padding: 0 20px 18px; color: var(--text-2); line-height: 1.65; font-size: 15px; }

/* ---------- shared: closing band ---------- */
.sx-band { --band: var(--accent); --band-ink: var(--on-accent); background: var(--band); color: var(--band-ink); text-align: center; padding: 72px 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sx-band { --band: var(--surface); --band-ink: var(--text); border-top: 1px solid var(--border); } }
:root[data-theme="dark"] .sx-band { --band: var(--surface); --band-ink: var(--text); border-top: 1px solid var(--border); }
.sx-band h2 { color: var(--band-ink); font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.035em; margin: 0 0 10px; }
.sx-band p { color: color-mix(in srgb, var(--band-ink) 78%, transparent); font-size: 17px; margin: 0 auto 26px; max-width: 560px; }
.sx-band .sx-ctas { justify-content: center; }
.sx-band .btn.invert { background: var(--band-ink); color: var(--band); border-color: var(--band-ink); }
.sx-band .btn.invert:hover { background: color-mix(in srgb, var(--band-ink) 88%, var(--band)); }
.sx-band .btn.outline { background: transparent; color: var(--band-ink); border-color: color-mix(in srgb, var(--band-ink) 40%, transparent); box-shadow: none; }
.sx-band .btn.outline:hover { background: color-mix(in srgb, var(--band-ink) 10%, transparent); }

/* ---------- search box and category chips (functions and templates) ---------- */
.sx-search { position: relative; max-width: 620px; margin: 0 auto; }
.sx-search .i { position: absolute; left: 18px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.sx-search input[type=search] { width: 100%; height: 52px; border-radius: 12px; padding: 0 18px 0 48px; font-size: 16px; box-shadow: var(--shadow); -webkit-appearance: none; appearance: none; }
.sx-chips { display: flex; gap: 8px; flex-wrap: wrap; padding: 0; margin: 22px 0 0; list-style: none; }
.sx-hero.center .sx-chips { justify-content: center; }
.sx-chips a, .sx-chips button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--border); border-radius: 99px; background: var(--surface); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.sx-chips a:hover, .sx-chips button:hover { border-color: var(--text); color: var(--text); text-decoration: none; }
.sx-chips button[aria-pressed="true"], .sx-chips a.on { background: var(--text); color: var(--surface); border-color: var(--text); }
.sx-chips small { color: inherit; opacity: .65; font-size: 12px; }
.sx-empty { display: none; text-align: center; color: var(--muted); padding: 40px 0; font-size: 15px; }
.sx-empty.show { display: block; }

/* ---------- functions index ---------- */
.fx-cat { padding-top: 36px; scroll-margin-top: calc(var(--header-h) + 12px); }
.fx-cat h2 { display: flex; align-items: baseline; gap: 10px; font-size: 22px; letter-spacing: -.02em; margin: 0 0 4px; }
.fx-cat h2 small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.fx-cat > p { color: var(--muted); margin: 0 0 16px; font-size: 14.5px; max-width: 760px; }
.fx-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fx-list a { display: flex; flex-direction: column; gap: 3px; height: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); min-width: 0; }
.fx-list a:hover { border-color: var(--accent); text-decoration: none; }
.fx-list b { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13.5px; font-weight: 600; color: var(--accent-text); overflow-wrap: anywhere; }
.fx-list span { font-size: 13px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fx-cat[hidden], .fx-list li[hidden] { display: none; }

/* ---------- one function ---------- */
.fn-hero h1 { font-family: var(--font); }
.fn-hero h1 code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: -.02em; font-weight: 700; }
.fn-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; }
.fn-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.fn-tag.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
a.fn-tag:hover { text-decoration: none; border-color: var(--border-strong); }
.fn-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 40px; align-items: start; padding: 40px 0 64px; }
.fn-main > section { margin-bottom: 40px; }
.fn-main h2 { font-size: 21px; letter-spacing: -.02em; margin: 0 0 12px; scroll-margin-top: calc(var(--header-h) + 12px); }
.fn-main p { color: var(--text-2); font-size: 15.5px; line-height: 1.65; }
.fn-code { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 15px; line-height: 1.6; padding: 16px 18px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); color: var(--text); overflow-x: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.fn-code .fn-name { color: var(--accent-text); font-weight: 700; }
.fn-code .opt { color: var(--muted); }
.sx-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.sx-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.sx-table th, .sx-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.sx-table tr:last-child td { border-bottom: 0; }
.sx-table th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.sx-table td { color: var(--text-2); line-height: 1.5; }
.sx-table td.arg { white-space: nowrap; }
.sx-table td.arg code { font-weight: 600; color: var(--text); }
.req { font-size: 12px; font-weight: 600; color: var(--text-2); }
.req.opt { color: var(--muted); font-weight: 500; }
.fn-ex { display: grid; gap: 12px; }
.fn-ex-item { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.fn-ex-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 16px; }
.fn-ex-row code { font-size: 14px; color: var(--text); overflow-wrap: anywhere; background: none; border: 0; padding: 0; }
.fn-ex-res { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.fn-ex-res output { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 14px; font-weight: 600; color: var(--accent-text); background: var(--accent-soft); padding: 3px 10px; border-radius: 6px; white-space: normal; overflow-wrap: anywhere; max-width: 260px; }
.fn-ex-res output.err { color: var(--danger); background: var(--danger-soft); }
.fn-ex-extra { border-top: 1px solid var(--border); background: var(--surface-2); padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; font-size: 13px; color: var(--muted); }
.fn-ex-extra > div { display: grid; gap: 6px; min-width: 0; max-width: 100%; overflow-x: auto; }
.fn-ex-extra b { font-weight: 600; color: var(--text-2); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.mini-grid { border-collapse: collapse; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; background: var(--surface); }
.mini-grid th, .mini-grid td { border: 1px solid var(--border); padding: 3px 9px; text-align: right; color: var(--text); }
.mini-grid th { background: var(--surface-3); color: var(--muted); font-weight: 500; text-align: center; font-size: 11px; }
.mini-grid td.t { text-align: left; }
.fn-aside { position: sticky; top: calc(var(--header-h) + 20px); display: grid; gap: 14px; }
.fn-try { padding: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.fn-try h2 { font-size: 16px; margin: 0 0 6px; }
.fn-try p { font-size: 14px; color: var(--muted); margin: 0 0 14px; line-height: 1.55; }
.fn-try .btn { width: 100%; height: 42px; font-weight: 600; }
.fn-try .btn + .btn { margin-top: 8px; }
.fn-toc { padding: 16px 20px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; font-size: 14px; }
.fn-toc b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 8px; }
.fn-toc a { display: block; padding: 4px 0; color: var(--text-2); }
.fn-rel { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.fn-rel a { display: block; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.4; height: 100%; }
.fn-rel a:hover { border-color: var(--accent); text-decoration: none; }
.fn-rel b { display: block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--accent-text); font-size: 13px; margin-bottom: 2px; }
.fn-rel span { color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fn-note { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: 14.5px; line-height: 1.55; margin: 0 0 12px; }
.fn-note .i { color: var(--accent-text); margin-top: 2px; }
.fn-pager { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.fn-pager a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--text-2); font-size: 14px; }

/* ---------- templates ---------- */
.tp-grid-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.tp-card { display: flex; flex-direction: column; height: 100%; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; color: var(--text); transition: border-color .15s, box-shadow .15s, transform .15s; }
.tp-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tp-thumb { display: block; aspect-ratio: 8 / 5; background: #fff; border-bottom: 1px solid var(--border); overflow: hidden; }
.tp-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top left; }
.tp-card-body { padding: 14px 16px 16px; display: grid; gap: 4px; }
.tp-card-body b { font-size: 15px; }
.tp-card-body span { font-size: 13px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tp-card-body small { font-size: 12px; color: var(--accent-text); font-weight: 600; }
.tp-cat { padding-top: 40px; scroll-margin-top: calc(var(--header-h) + 12px); }
.tp-cat h2 { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; display: flex; align-items: baseline; gap: 10px; }
.tp-cat h2 small { font-size: 13px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.tp-cat[hidden], .tp-grid-cards li[hidden] { display: none; }
.tp-hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 48px; align-items: center; }
.tp-hero-thumb { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: #fff; box-shadow: var(--shadow-lg); }
.tp-hero-thumb img { display: block; width: 100%; height: auto; }
.tp-facts { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tp-preview-wrap { overflow-x: auto; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.tp-sheet { border-collapse: collapse; table-layout: fixed; font-size: 13px; font-family: Inter, Arial, sans-serif; color: var(--text); background: var(--surface); }
.tp-sheet th { background: var(--surface-2); color: var(--muted); font-weight: 500; font-size: 11.5px; border: 1px solid var(--border); padding: 3px 0; text-align: center; height: 22px; }
.tp-sheet th.rh { width: 40px; }
.tp-sheet td { border: 1px solid color-mix(in srgb, var(--border) 70%, transparent); padding: 0 6px; height: 26px; white-space: nowrap; overflow: hidden; text-overflow: clip; max-width: 0; }
.tp-sheet td.r { text-align: right; }
.tp-sheet td.c { text-align: center; }
.tp-sheet td.b { font-weight: 700; }
.tp-sheet td.it { font-style: italic; }
.tp-sheet td.u { text-decoration: underline; }
.tp-inside { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tp-inside .sx-card ul { margin: 4px 0 0; padding-left: 18px; color: var(--text-2); font-size: 14px; line-height: 1.7; }

/* ---------- features ---------- */
.ft-hero-shot { max-width: 1080px; margin: 36px auto 0; }
.ft-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.ft-block + .ft-block { margin-top: 36px; }
.ft-block h2 { font-size: clamp(21px, 2.4vw, 26px); letter-spacing: -.02em; margin: 0 0 10px; }
.ft-block p { color: var(--text-2); font-size: 16px; line-height: 1.7; margin: 0 0 12px; }
.ft-block .sx-ticks li { font-size: 15.5px; color: var(--text-2); }

/* ---------- compare ---------- */
.cmp-table th:first-child, .cmp-table td:first-child { width: 18%; font-weight: 600; color: var(--text); }
.cmp-table td { width: 41%; }
.cmp-table thead th { font-size: 13px; text-transform: none; letter-spacing: 0; color: var(--text); }
.cmp-table thead th.us { color: var(--accent-text); }
.cmp-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.cmp-two .sx-card { padding: 24px; }
.cmp-two h3 { font-size: 17px; margin: 0 0 6px; }
.cmp-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.cmp-pick p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; }
.cmp-note { font-size: 13px; color: var(--muted); margin-top: 14px; }

/* ---------- shortcuts ---------- */
.kb-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kb-group { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; }
.kb-group h2 { font-size: 17px; margin: 0 0 10px; }
.kb-group dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 16px; }
.kb-group dt, .kb-group dd { margin: 0; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.kb-group dt:first-of-type, .kb-group dt:first-of-type + dd { border-top: 0; }
.kb-group dd { color: var(--text-2); }
kbd { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; padding: 2px 7px; border-radius: 6px; border: 1px solid var(--border-strong); border-bottom-width: 2px; background: var(--surface-2); color: var(--text); white-space: nowrap; margin: 1px 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .tp-grid-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sx-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .fn-layout { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .fn-aside { position: static; order: -1; }
  .fn-toc { display: none; }
  .fx-list, .fn-rel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-hero-grid, .ft-split { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .sx-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-inside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sx-wrap { padding: 0 16px; }
  .sx-hero { padding: 24px 0 32px; }
  .sx-section { padding: 44px 0; }
  .sx-section.alt + .sx-section { padding-top: 44px; }
  .fx-list, .fn-rel, .sx-cards, .sx-cards.four, .cmp-two, .cmp-pick, .tp-inside, .kb-groups { grid-template-columns: minmax(0, 1fr); }
  .tp-grid-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .tp-card-body { padding: 10px 12px 12px; }
  .tp-card-body span { display: none; }
  .tp-card-body b { font-size: 14px; }
  .fn-ex-row { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .sx-ctas .btn.big { flex: 1 1 auto; }
  .sx-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .sx-chips::-webkit-scrollbar { display: none; }
  .sx-hero.center .sx-chips { justify-content: flex-start; }
  .cmp-table th:first-child, .cmp-table td:first-child { width: auto; }
  .sx-table { font-size: 14px; }
  .sx-band { padding: 52px 0; }
}

/* ---------- 404 ---------- */
.site .nf-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 72px; letter-spacing: -.04em; }
@media (max-width: 600px) { .site .nf-code { font-size: 54px; } }
.kb-os { margin-top: 4px; }
.kb-group dt { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; }
.kb-plus, .kb-sep { color: var(--muted); font-size: 12px; }
.sx .fn-hero h1 code, .sx .fn-ex-row code, .sx .fn-code code { background: none; border: 0; padding: 0; font-size: inherit; border-radius: 0; }
.sx .fn-ex-row code { font-size: 14px; }
/* The preview is a picture of the document itself (like the template thumbnails), so it keeps the document's own
   light paper colours in dark mode too: template text and fill colours are designed for a white sheet. */
.tp-preview-wrap { background: #ffffff; border-color: #c3c4bb; color-scheme: light; }
.tp-sheet { --paper: #ffffff; --paper-head: #f4f4f0; --paper-line: #e3e4dc; --paper-ink: #151515; --paper-muted: #6b6d66; background: var(--paper); color: var(--paper-ink); }
.tp-sheet th { background: var(--paper-head); color: var(--paper-muted); border-color: var(--paper-line); }
.tp-sheet td { border-color: var(--paper-line); }
.tp-preview-wrap { width: fit-content; max-width: 100%; }
