/* web-static design tokens.
   Names/values: web-lite4/public/styles/base.css (colors, :lang() font stacks) +
   ui-reference/sites/manus.im/proposal-tokens.json (radius 4 · spacing 7 · shadow 3 · --cta --hover --selected --focus-ring).
   Plan §3 [결정]: same names/values as the app, but dark mode redefines --accent etc. from day one for WCAG AA
   (the app's dark --accent #1269d3 on panel #1c212b = 3.06:1 bug is NOT replicated).

   Contrast ratios (WCAG 2.x relative luminance, computed 2026-10-13):
     light  --text #171a1f on --bg #f7f8fb ........ 16.42:1
            --muted #626b78 on --bg ............... 5.08:1   on --panel #fff 5.39:1
            --accent #1269d3 on --bg .............. 4.96:1   on --panel 5.27:1   on --accent-soft #e8f1ff 4.63:1
            --good #087a55 on --panel 5.35:1 · on --good-soft #e7f5ef 4.77:1
            --warn #9a5b00 on --panel 5.43:1 · on --warn-soft #fbf1e2 4.85:1
            --cta-text #fff on --cta #1a1a19 ...... 17.42:1
     dark   --text #e8ebf2 on --panel #1c212b ..... 13.52:1
            --muted #9aa4b5 on --bg #12151b 7.27:1 · on --panel 6.42:1
            --accent #5aa2ff on --bg 7.00:1 · on --panel 6.18:1 · on --accent-soft #1d2f4a 5.17:1
            --good #34c38f on --panel 7.18:1 · on --good-soft #16302a 6.27:1
            --warn #f0b45a on --panel 8.74:1 · on --warn-soft #3a2e17 7.19:1
            --cta-text #1a1a19 on --cta #ececeb ... 14.73:1
   Theme selection: prefers-color-scheme, overridden by <html data-theme="light|dark"> (assets/theme.js). */

:root {
    --bg: #f7f8fb;
    --panel: #ffffff;
    --text: #171a1f;
    --muted: #626b78;
    --line: #dde3ec;
    --accent: #1269d3;
    --accent-soft: #e8f1ff;
    --accent-line: #cfe1fb;
    --on-accent: #ffffff;
    --good: #087a55;
    --good-soft: #e7f5ef;
    --warn: #9a5b00;
    --warn-soft: #fbf1e2;
    --surface-muted: #eef2f7;
    --surface-subtle: #f8fafc;

    --cta: #1a1a19;
    --cta-text: #ffffff;
    --hover: rgba(55, 53, 47, 0.04);
    --selected: rgba(55, 53, 47, 0.06);
    --focus-ring: 0 0 0 3px rgba(18, 105, 211, 0.35);
    --focus-outline: #1269d3;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-pill: 9999px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;

    --shadow-sm: 0 1px 2px -0.5px rgba(22, 25, 29, 0.06);
    --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 3px 3px -1.5px rgba(0, 0, 0, 0.06), 0 10px 20px 1px rgba(0, 0, 0, 0.04);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.06);

    --topbar-h: 56px;
    --content-max: 1040px;
    --reading-max: 690px;
    --control-h-sm: 32px;
    --control-h: 40px;

    --fs-xs: 12px;
    --fs-sm: 13px;
    --fs-base: 15px;
    --fs-md: 16px;
    --fs-lg: 20px;
    --fs-xl: 32px;
    --fs-hero: 40px;
    --lh-tight: 1.25;
    --lh-base: 1.6;

    /* Language font stacks — identical to base.css (#38 §4.3, no web fonts). Latin default. */
    --font-ui: Arial, Helvetica, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, "D2Coding", monospace;
    color-scheme: light;
}

:lang(ko) { --font-ui: Arial, Helvetica, "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", sans-serif; }
:lang(ja) { --font-ui: Arial, Helvetica, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, "Noto Sans JP", "Noto Sans CJK JP", sans-serif; }
:lang(zh-Hans) { --font-ui: Arial, Helvetica, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Noto Sans CJK SC", "Source Han Sans SC", sans-serif; }
:lang(zh-Hant) { --font-ui: Arial, Helvetica, "PingFang TC", "Microsoft JhengHei UI", "Microsoft JhengHei", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", sans-serif; }
:lang(ru) { --font-ui: Arial, Helvetica, "Segoe UI", Roboto, "Noto Sans", sans-serif; }
:lang(ar) { --font-ui: "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", Arial, sans-serif; }
:lang(vi) { --font-ui: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
:root:lang(vi) { --lh-base: 1.7; }
[lang] { font-family: var(--font-ui); }

/* Dark tokens — one block, applied by OS preference unless data-theme="light", or forced by data-theme="dark". */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #12151b;
        --panel: #1c212b;
        --text: #e8ebf2;
        --muted: #9aa4b5;
        --line: #2c3442;
        --accent: #5aa2ff;
        --accent-soft: #1d2f4a;
        --accent-line: #2f4f7d;
        --on-accent: #0b1424;
        --good: #34c38f;
        --good-soft: #16302a;
        --warn: #f0b45a;
        --warn-soft: #3a2e17;
        --surface-muted: #262d39;
        --surface-subtle: #161a21;
        --cta: #ececeb;
        --cta-text: #1a1a19;
        --hover: rgba(255, 255, 255, 0.06);
        --selected: rgba(255, 255, 255, 0.10);
        --focus-ring: 0 0 0 3px rgba(90, 162, 255, 0.5);
        --focus-outline: #5aa2ff;
        --shadow-sm: none;
        --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
        --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #12151b;
    --panel: #1c212b;
    --text: #e8ebf2;
    --muted: #9aa4b5;
    --line: #2c3442;
    --accent: #5aa2ff;
    --accent-soft: #1d2f4a;
    --accent-line: #2f4f7d;
    --on-accent: #0b1424;
    --good: #34c38f;
    --good-soft: #16302a;
    --warn: #f0b45a;
    --warn-soft: #3a2e17;
    --surface-muted: #262d39;
    --surface-subtle: #161a21;
    --cta: #ececeb;
    --cta-text: #1a1a19;
    --hover: rgba(255, 255, 255, 0.06);
    --selected: rgba(255, 255, 255, 0.10);
    --focus-ring: 0 0 0 3px rgba(90, 162, 255, 0.5);
    --focus-outline: #5aa2ff;
    --shadow-sm: none;
    --shadow-card: 0 0 0 1px rgba(255, 255, 255, 0.08);
    --shadow-pop: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.08);
    color-scheme: dark;
}

/* web-static layout — manus.im marketing skeleton on our tokens (plan §3).
   Mobile-first. Rules: no fixed width > 375px outside media queries (tested), tables scroll inside
   .table-scroll, long words wrap, logical properties for RTL (ar). */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + var(--space-4)); }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: var(--fs-base);
    line-height: var(--lh-base);
    overflow-wrap: anywhere;
}

:lang(ko) body, body:lang(ko) { word-break: keep-all; }

h1, h2, h3 { line-height: var(--lh-tight); font-weight: 600; margin: 0 0 var(--space-3); }
h1 { font-size: 30px; }
h2 { font-size: 24px; }
h3 { font-size: var(--fs-md); }
p { margin: 0 0 var(--space-3); }
ul, ol { margin: 0 0 var(--space-3); padding-inline-start: 1.25em; }
ul[role="list"] { list-style: none; padding-inline-start: 0; margin: 0; }
img, svg { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 2px solid var(--focus-outline); outline-offset: 2px; box-shadow: var(--focus-ring); border-radius: 4px; }
main:focus { outline: none; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute; inset-inline-start: var(--space-4); top: -100px; z-index: 100;
    background: var(--panel); color: var(--text); padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-pop);
}
.skip-link:focus { top: var(--space-2); }

.container { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--space-4); }
.reading { max-width: var(--reading-max); }
.container .reading { margin-inline: auto; }

/* ---- buttons ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    min-height: var(--control-h); padding: 0 var(--space-5);
    border-radius: var(--radius-pill); border: 1px solid transparent;
    font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn--sm { min-height: var(--control-h-sm); padding: 0 var(--space-4); font-size: var(--fs-sm); }
.btn--cta { background: var(--cta); color: var(--cta-text); }
.btn--cta:hover { opacity: 0.9; text-decoration: none; }
.btn--ghost { color: var(--text); border-color: var(--line); background: var(--panel); }
.btn--ghost:hover { background: var(--hover); }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: var(--control-h-sm); height: var(--control-h-sm); padding: 0;
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: var(--hover); }
.icon { flex: none; }

/* ---- top bar (56px sticky, one emphasized CTA) ---- */
.topbar {
    position: sticky; top: 0; z-index: 50;
    height: var(--topbar-h);
    background: var(--panel);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    height: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--space-4);
    display: flex; align-items: center; gap: var(--space-3);
}
.brand { font-weight: 600; font-size: var(--fs-md); color: var(--text); text-decoration: none; white-space: nowrap; }
.nav { display: none; flex: 1; min-width: 0; }
.nav-list { display: flex; align-items: center; gap: var(--space-1); }
.nav-list > li > a, .menu > summary {
    display: inline-flex; align-items: center; gap: var(--space-1);
    min-height: var(--control-h-sm); padding: 0 var(--space-3);
    border-radius: var(--radius-sm); color: var(--text); text-decoration: none; cursor: pointer;
}
.nav-list > li > a:hover, .menu > summary:hover { background: var(--hover); }
.nav-list a[aria-current="page"] { background: var(--selected); }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: var(--space-2); }
/* 375px: brand + lang + CTA + menu must fit; the theme toggle (optional, prefers-color-scheme already applies) shows from 480px */
.topbar-actions { gap: var(--space-1); min-width: 0; }
.theme-toggle { display: none; }
@media (min-width: 480px) { .topbar-actions { gap: var(--space-2); } .theme-toggle { display: inline-flex; } }

/* <details> menus — work without JS; theme.js only adds outside-click/Escape closing. */
.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu[open] > summary .icon--chevron { transform: rotate(180deg); }
.menu-panel {
    position: absolute; top: calc(100% + var(--space-2)); inset-inline-start: 0; z-index: 60;
    min-width: 220px; max-width: calc(100vw - 2 * var(--space-4));
    padding: var(--space-2); background: var(--panel); border-radius: var(--radius-md); box-shadow: var(--shadow-pop);
}
.menu-panel a {
    display: flex; align-items: center; gap: var(--space-2);
    padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); color: var(--text); text-decoration: none;
}
.menu-panel a:hover { background: var(--hover); }
.menu-panel a[aria-current] { background: var(--selected); }
.menu--lang .menu-panel, .menu--mobile .menu-panel { inset-inline-start: auto; inset-inline-end: 0; }
.menu--lang .lang-name { display: none; }
.menu--mobile .menu-panel { width: calc(100vw - 2 * var(--space-4)); max-height: calc(100vh - var(--topbar-h) - var(--space-4)); overflow-y: auto; }
.menu-heading { margin: var(--space-2) var(--space-3) var(--space-1); font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.menu-secondary { border-top: 1px solid var(--line); margin-top: var(--space-2); padding-top: var(--space-2); }

/* ---- sections (rhythm: mobile half of desktop) ---- */
.section { padding-block: var(--space-7); }
.section + .section { padding-top: 0; }
.section-head { max-width: var(--reading-max); margin-bottom: var(--space-5); }
.section-intro { color: var(--muted); }

.hero { display: grid; gap: var(--space-6); align-items: center; }
.hero > * { min-width: 0; }
.section--hero { padding-block: var(--space-7); }
.section--hero h1 { font-size: 30px; }
.eyebrow { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); margin-bottom: var(--space-2); }
.hero-sub { color: var(--muted); font-size: var(--fs-md); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-5); }
.figure { margin: 0; color: var(--text); }
.figure svg { display: block; width: 100%; height: auto; }
.prose-figure { margin-top: var(--space-5, 24px); max-width: 560px; }

/* Figure classes (inline SVG follows theme tokens) */
.fig-surface { fill: var(--panel); stroke: var(--line); stroke-width: 1.5; }
.fig-sunken { fill: var(--surface-muted); stroke: var(--line); stroke-width: 1; }
.fig-accent { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 1.5; }
.fig-line { fill: none; stroke: var(--muted); stroke-width: 1.5; }
.fig-arrow { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fig-bar { fill: var(--line); }
.fig-bar-accent { fill: var(--accent); }
.fig-box { fill: none; stroke: var(--warn); stroke-width: 2; stroke-dasharray: 4 3; }
.fig-text { fill: var(--text); font-family: var(--font-ui); font-size: 13px; }
.fig-text-muted { fill: var(--muted); font-family: var(--font-ui); font-size: 12px; }

/* cards */
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); }
.card {
    position: relative; min-width: 0;
    background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    padding: var(--space-5);
}
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }
.card p:last-child { margin-bottom: 0; }
.card-price { font-size: var(--fs-xl); font-weight: 600; font-variant-numeric: tabular-nums; margin-bottom: var(--space-2); }
.card-price-note { font-size: var(--fs-sm); font-weight: 400; color: var(--muted); }
.card-features { padding-inline-start: 1.1em; color: var(--text); }
.card-more { margin-top: var(--space-3); }
.badge {
    display: inline-block; margin-bottom: var(--space-2);
    padding: 2px var(--space-2); border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); font-weight: 600;
}
.badge--sm { margin: 0; }

/* tables (always inside .table-scroll) */
.table-block { margin: 0; }
.table-scroll { position: relative; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.table-scroll:focus-visible { box-shadow: var(--focus-ring); }
table { border-collapse: collapse; width: 100%; font-size: var(--fs-sm); }
caption { text-align: start; padding: var(--space-3) var(--space-4); font-weight: 600; font-size: var(--fs-base); }
th, td { text-align: start; vertical-align: top; padding: var(--space-3) var(--space-4); border-top: 1px solid var(--line); min-width: 96px; overflow-wrap: normal; word-break: normal; }
/* Korean cells break between words (not mid-word); a wider table scrolls inside .table-scroll */
:lang(ko) th, :lang(ko) td { word-break: keep-all; }
thead th { background: var(--surface-subtle); color: var(--muted); font-weight: 600; }
.is-highlight { background: var(--accent-soft); }
.mark { font-weight: 600; }
.mark--yes { color: var(--good); }
.mark--no { color: var(--muted); }
.footnotes { margin-top: var(--space-3); padding-inline-start: 1.1em; color: var(--muted); font-size: var(--fs-sm); }
/* grouped generated rows (data-table groupBy): one heading row per group, number badge per row (rowMarker) */
.row-group th { background: var(--surface-muted); color: var(--text); font-weight: 600; font-size: var(--fs-base); }
.row-marker {
    display: inline-flex; align-items: center; justify-content: center; min-width: 1.6em; height: 1.6em; margin-inline-end: var(--space-2); padding: 0 4px;
    border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-size: var(--fs-xs); font-weight: 600; vertical-align: 0.1em;
}
tr:target > * { background: var(--accent-soft); }
/* cell footnotes (data-table cellNotes): a link to the source row; assets/theme.js opens the sources in place (.fn-pop) */
.fn-ref {
    margin-inline-start: 2px; padding: 4px 3px; border-radius: 4px; color: var(--accent); font-size: var(--fs-xs); font-weight: 600;
    line-height: 0; vertical-align: super; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.fn-ref:hover { text-decoration: underline; }
.fn-ref[aria-expanded="true"] { background: var(--accent-soft); }
/* position: fixed so the .table-scroll overflow never clips it; theme.js sets top/left/max-height inside the viewport */
.fn-pop {
    position: fixed; z-index: 70; width: min(360px, calc(100vw - 2 * var(--space-4))); overflow-y: auto;
    padding: var(--space-3) var(--space-4); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); box-shadow: var(--shadow-pop);
    color: var(--text); font-size: var(--fs-sm); font-weight: 400; line-height: var(--lh-base); text-align: start; white-space: normal; overflow-wrap: anywhere;
}
.fn-pop-head { margin: 0 0 var(--space-2); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.fn-pop-list { margin: 0; padding: 0; list-style: none; }
.fn-pop-list > li + li { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 1px solid var(--line); }
.fn-pop-law { display: block; color: var(--text); font-weight: 600; text-decoration: none; }
.fn-pop-law:hover { text-decoration: underline; }
.fn-pop dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px var(--space-3); margin: var(--space-2) 0 0; }
.fn-pop dt { color: var(--muted); }
.fn-pop dd { margin: 0; min-width: 0; }

.maturity { display: inline-block; padding: 2px var(--space-2); border-radius: var(--radius-pill); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap; }
.maturity--live { background: var(--good-soft); color: var(--good); }
.maturity--designed { background: var(--accent-soft); color: var(--accent); }
.maturity--not-yet { background: var(--warn-soft); color: var(--warn); }

/* steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-4); grid-template-columns: minmax(0, 1fr); counter-reset: none; }
.step { min-width: 0; background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-5); }
.step-num {
    display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin-bottom: var(--space-3);
    border-radius: var(--radius-pill); background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: var(--fs-sm);
}

/* faq */
.faq { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item > summary { cursor: pointer; padding: var(--space-4) 0; font-weight: 600; list-style-position: inside; }
.faq-a { padding-bottom: var(--space-4); color: var(--text); }

/* prose / callout / blocked */
.prose h3 { margin-top: var(--space-5); }
.callout { border-inline-start: 4px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); padding: var(--space-4) var(--space-5); }
.callout--warn { border-color: var(--warn); background: var(--warn-soft); }
.callout p:last-child { margin-bottom: 0; }
.blocked { border: 1px dashed var(--line); border-radius: var(--radius-md); padding: var(--space-4) var(--space-5); background: var(--surface-subtle); color: var(--muted); }
.blocked-label { font-weight: 600; color: var(--text); }
.blocked p:last-child { margin-bottom: 0; }

/* closing CTA */
.cta-block { text-align: center; background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: var(--space-7) var(--space-5); }
.cta-block p:last-child { margin-bottom: 0; }

/* 404 / neutral pages */
.notfound-links { display: flex; flex-wrap: wrap; gap: var(--space-4); align-items: center; margin-top: var(--space-5); }
.neutral-main { max-width: var(--reading-max); margin-inline: auto; padding: var(--space-7) var(--space-4); }
.brand--neutral { display: block; margin-bottom: var(--space-6); }
.neutral-title { font-size: var(--fs-lg); }
.lang-choices { display: grid; gap: var(--space-3); margin-top: var(--space-5); }
.lang-choice {
    display: flex; flex-direction: column; gap: var(--space-1);
    padding: var(--space-4) var(--space-5); background: var(--panel); border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
    color: var(--text); text-decoration: none;
}
.lang-choice:hover { background: var(--hover); }
.lang-choice-name { font-size: var(--fs-lg); font-weight: 600; }
.lang-choice-prompt { color: var(--muted); font-size: var(--fs-sm); }
.neutral-block { margin-bottom: var(--space-6); }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--panel); margin-top: var(--space-7); padding-block: var(--space-7); font-size: var(--fs-sm); }
.footer-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-title { font-weight: 600; margin-bottom: var(--space-2); }
.footer-col li { margin-bottom: var(--space-1); }
.footer-col a { color: var(--muted); text-decoration: none; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-meta { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid var(--line); color: var(--muted); }

/* ---- technical docs (meta.layout "docs" — src/docs.mjs) ----
   ≤ 768px: one column, TOC in a <details> under the h1. > 768px: sticky TOC | main column.
   Code never wraps: <pre> scrolls inside .code-block (375px rule, tested); the main column can shrink (min-width: 0). */
code { font-family: var(--font-mono); font-size: 0.9em; }
:not(pre) > code { padding: 1px 5px; border-radius: 4px; background: var(--surface-subtle); border: 1px solid var(--line); overflow-wrap: anywhere; }
.docs-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-6); padding-block: var(--space-6) 0; }
.docs-main { min-width: 0; }
.docs-main .reading { max-width: none; }
.docs-main .section-head { max-width: none; margin-bottom: var(--space-4); }
.docs-main .section--hero { padding-block: var(--space-2) var(--space-5); }
.docs-main .section--hero h1 { font-size: 30px; }
.docs-section { padding-top: var(--space-4); }
.docs-section > .section-head > h2 { margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--line); }
.docs-section--sub > .section-head > h3 { margin-top: var(--space-5); font-size: var(--fs-lg); }
.docs-main .prose h4 { margin: var(--space-5) 0 var(--space-2); font-size: var(--fs-base); }
.docs-main .section--cta { padding-top: var(--space-7); }
.docs-toc { display: none; }
.docs-toc-title { margin: 0 0 var(--space-2); padding-inline-start: var(--space-3); font-size: var(--fs-xs); font-weight: 600; color: var(--muted); }
.docs-toc-list a {
    display: block; padding: 6px var(--space-3); border-inline-start: 2px solid transparent; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--muted); font-size: var(--fs-sm); line-height: var(--lh-tight); text-decoration: none;
}
.docs-toc-list a:hover { color: var(--text); background: var(--hover); }
.docs-toc-list a[aria-current] { color: var(--accent); border-inline-start-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.docs-toc-sub a { padding-inline-start: var(--space-5); font-size: var(--fs-xs); }
.docs-toc-mobile { margin-bottom: var(--space-5); border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--panel); }
.docs-toc-mobile > summary { cursor: pointer; padding: var(--space-3) var(--space-4); font-weight: 600; }
.docs-toc-mobile > nav { max-height: 60vh; overflow-y: auto; padding: 0 var(--space-2) var(--space-3); }

.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-bottom: var(--space-3); }
.endpoint-path { padding: 4px var(--space-2); border-radius: var(--radius-sm); background: var(--surface-subtle); border: 1px solid var(--line); font-size: var(--fs-sm); overflow-wrap: anywhere; min-width: 0; }
.method { display: inline-block; padding: 3px var(--space-2); border-radius: var(--radius-sm); font-family: var(--font-mono); font-size: var(--fs-xs); font-weight: 700; letter-spacing: .02em; }
.method--get { background: var(--good-soft); color: var(--good); }
.method--post, .method--put, .method--patch { background: var(--accent-soft); color: var(--accent); }
.method--delete { background: var(--warn-soft); color: var(--warn); }

.code-samples { display: grid; gap: var(--space-3); grid-template-columns: minmax(0, 1fr); }
.code-block { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-subtle); overflow: hidden; }
.code-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--line); color: var(--muted); font-size: var(--fs-xs); font-weight: 600; }
.code-copy { font: inherit; padding: 2px var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); cursor: pointer; }
.code-copy:hover { background: var(--hover); }
.code-pre { margin: 0; padding: var(--space-4); overflow-x: auto; white-space: pre; overflow-wrap: normal; word-break: normal; font-family: var(--font-mono); font-size: 13px; line-height: 1.6; tab-size: 2; }
.code-pre code { font-size: inherit; }
.code-samples + .footnotes { margin-top: var(--space-3); }
.table-block--params td p { margin-bottom: var(--space-2); }
.table-block--params td p:last-child { margin-bottom: 0; }
.table-block--params th code { white-space: nowrap; overflow-wrap: normal; }
.param-req { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.param-req--yes { color: var(--text); font-weight: 600; }

/* ---- wider screens ---- */
@media (min-width: 640px) {
    .container, .topbar-inner { padding-inline: var(--space-5); }
    .menu--lang .lang-name { display: inline; }
    .cards--2, .cards--3, .cards--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .menu--mobile .menu-panel { width: 320px; }
}

@media (min-width: 960px) {
    h1, .section--hero h1 { font-size: var(--fs-hero); }
    h2 { font-size: var(--fs-xl); }
    .section { padding-block: 96px; }
    .section--hero { padding-block: 112px 96px; }
    .nav { display: block; }
    .menu--mobile { display: none; }
    .hero--with-figure { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
    .cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .cards--pricing { align-items: stretch; }
    /* pricing variant keeps the section's own column count (equal-width cards: 2 → 2, 4 → 4) */
    .cards--pricing.cards--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards--pricing.cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cards--pricing.cards--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .footer-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (min-width: 769px) {
    .docs-layout { grid-template-columns: 220px minmax(0, 1fr); gap: var(--space-7); padding-top: var(--space-7); }
    .docs-toc {
        display: block; position: sticky; top: calc(var(--topbar-h) + var(--space-4)); align-self: start;
        max-height: calc(100vh - var(--topbar-h) - var(--space-6)); overflow-y: auto; padding-bottom: var(--space-4);
    }
    .docs-toc-mobile { display: none; }
}

@media (prefers-reduced-motion: no-preference) {
    .icon--chevron { transition: transform .15s ease; }
}
