/* docs.cleverpoint.pro — a reading-first documentation layout.
   Brand from the logobook (teal #259578, lime #A5BB61, graphite #313131, Raleway) as in
   cleverpoint_site/static/site.css. Raleway stays for headings and navigation; long text is
   set in the system UI font, which reads better in small sizes than a display face.
   Text and links use the deeper teal #1d7a62 (5.2:1 on white); pure teal and lime are fills.
   Dark theme: follows the system, or the reader's choice stored as data-theme on <html>. */
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/raleway-400.woff") format("woff"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/raleway-600.woff") format("woff"); }
@font-face { font-family: "Raleway"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/raleway-700.woff") format("woff"); }

:root {
  --brand-teal: #259578;
  --brand-lime: #A5BB61;
  --bg: #ffffff;
  --bg-soft: #f7f9f5;
  --bg-mute: #eff3ea;
  --panel: #ffffff;
  --line: #e4e9df;
  --line-strong: #d3dacb;
  --text: #1f2421;
  --muted: #4b524e;
  --dim: #6b736e;
  --accent: #1d7a62;
  --accent-hover: #15604d;
  --accent-soft: #e7f3ee;
  --accent-line: #b9dccf;
  --note-bg: #eef7f3;   --note-line: #259578;  --note-ink: #17604d;
  --warn-bg: #fff8e6;   --warn-line: #e0b43c;  --warn-ink: #7a5a00;
  --danger-bg: #fdf0ef; --danger-line: #d9534f; --danger-ink: #a3221d;
  --hi-bg: #f3f7e8;
  --code-bg: #f1f4ee;
  --img-bg: #ffffff;
  --shadow-sm: 0 1px 2px rgba(20, 30, 25, .06);
  --shadow: 0 10px 30px -12px rgba(20, 30, 25, .18), 0 2px 6px rgba(20, 30, 25, .05);
  --shadow-lg: 0 30px 80px -20px rgba(10, 20, 15, .35);
  --head: "Raleway", ui-sans-serif, system-ui, sans-serif;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Consolas, Menlo, monospace;
  --top: 60px;
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --bg-soft: #131a17; --bg-mute: #19221e; --panel: #151c19;
    --line: #243029; --line-strong: #2f3d36;
    --text: #e3e9e5; --muted: #b6c0ba; --dim: #8b968f;
    --accent: #5cc9a5; --accent-hover: #86dcc0; --accent-soft: rgba(37, 149, 120, .16); --accent-line: rgba(92, 201, 165, .35);
    --note-bg: rgba(37, 149, 120, .12); --note-line: #3fb38e; --note-ink: #9fe0c9;
    --warn-bg: rgba(224, 180, 60, .10); --warn-line: #c99a24; --warn-ink: #f0d58a;
    --danger-bg: rgba(217, 83, 79, .12); --danger-line: #e0645f; --danger-ink: #f3a9a6;
    --hi-bg: rgba(165, 187, 97, .10); --code-bg: #1a2420; --img-bg: #f4f6f3;
    --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513; --bg-soft: #131a17; --bg-mute: #19221e; --panel: #151c19;
  --line: #243029; --line-strong: #2f3d36;
  --text: #e3e9e5; --muted: #b6c0ba; --dim: #8b968f;
  --accent: #5cc9a5; --accent-hover: #86dcc0; --accent-soft: rgba(37, 149, 120, .16); --accent-line: rgba(92, 201, 165, .35);
  --note-bg: rgba(37, 149, 120, .12); --note-line: #3fb38e; --note-ink: #9fe0c9;
  --warn-bg: rgba(224, 180, 60, .10); --warn-line: #c99a24; --warn-ink: #f0d58a;
  --danger-bg: rgba(217, 83, 79, .12); --danger-line: #e0645f; --danger-ink: #f3a9a6;
  --hi-bg: rgba(165, 187, 97, .10); --code-bg: #1a2420; --img-bg: #f4f6f3;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6); --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .8);
  color-scheme: dark;
}
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--top) + 20px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.7 var(--font); font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
/* Raleway draws old-style figures by default; docs are full of numbered chapters */
h1, h2, h3, h4, .side, .toc, .crumbs, .switch, .pager, .link-card, .manual-card, .results { font-variant-numeric: lining-nums; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.25; letter-spacing: -.01em; font-weight: 700; color: var(--text); }
h1 { font-size: clamp(1.75rem, 3.2vw, 2.35rem); margin: .1em 0 .35em; letter-spacing: -.02em; }
p { margin: 0 0 1.1em; }
kbd { font: 600 .72rem/1 var(--mono); color: var(--dim); background: var(--panel); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: 3px 5px; }
:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(165, 187, 97, .35); }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--panel); padding: 8px 12px; border-radius: 8px; }
.btn { display: inline-flex; align-items: center; gap: .45em; padding: 9px 16px; border-radius: 9px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: 600 .9rem/1.2 var(--head); cursor: pointer; text-decoration: none; transition: background .15s, transform .15s; }
:root[data-theme="dark"] .btn { color: #0f1513; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn { color: #0f1513; } }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; transform: translateY(-1px); }
:root[data-theme="dark"] .btn:hover { color: #0f1513; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; }
.icon-btn:hover { background: var(--bg-mute); color: var(--text); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: saturate(1.6) blur(12px); -webkit-backdrop-filter: saturate(1.6) blur(12px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; gap: 16px; height: var(--top); padding: 0 24px; max-width: 1560px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font: 600 .95rem var(--head); white-space: nowrap; }
.brand img { height: 32px; width: auto; display: block; }
.brand a { text-decoration: none; }
.brand-docs { padding-left: 12px; border-left: 1px solid var(--line-strong); color: var(--muted); }
.brand-docs:hover { color: var(--text); }
.search-btn { display: flex; align-items: center; gap: 10px; flex: 0 1 380px; margin-left: 24px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--dim); font: .9rem var(--font); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.search-btn span { flex: 1; }
.search-btn:hover { border-color: var(--line-strong); background: var(--panel); color: var(--muted); }
.top-nav { display: flex; align-items: center; gap: 6px; margin-left: auto; font: 500 .9rem var(--head); white-space: nowrap; }
.top-nav a { display: inline-flex; align-items: center; gap: 3px; text-decoration: none; color: var(--muted); padding: 7px 10px; border-radius: 8px; }
.top-nav a:hover { color: var(--text); background: var(--bg-mute); }
.top-nav a svg { width: 14px; height: 14px; }
.top-nav .lang { font-weight: 700; letter-spacing: .04em; border: 1px solid var(--line); }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; }
}
.side-btn { display: none; }
.progress { position: absolute; left: 0; bottom: -1px; height: 2px; width: 0; background: linear-gradient(90deg, var(--brand-teal), var(--brand-lime)); transition: width .08s linear; }

/* ---------- search palette ---------- */
.palette { position: fixed; inset: 0; z-index: 60; background: rgba(10, 18, 14, .45); backdrop-filter: blur(3px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.palette[hidden] { display: none; }
.palette-box { width: 100%; max-width: 640px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column; max-height: 72vh; animation: pop .14s ease-out; }
@keyframes pop { from { transform: translateY(6px) scale(.985); opacity: 0; } }
.palette-input { display: flex; align-items: center; gap: 10px; padding: 0 16px; border-bottom: 1px solid var(--line); color: var(--dim); }
.palette-input input { flex: 1; height: 56px; border: 0; outline: 0; background: none; font: 1.05rem var(--font); color: var(--text); }
.palette-input input::-webkit-search-cancel-button { display: none; }
.results { overflow: auto; padding: 8px; min-height: 60px; }
.results a { display: block; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); border: 1px solid transparent; }
.results a[aria-selected="true"] { background: var(--accent-soft); border-color: var(--accent-line); }
.results small { display: block; color: var(--dim); font-size: .75rem; letter-spacing: .01em; }
.results b { display: block; font: 600 .98rem var(--head); color: var(--text); margin: 1px 0 2px; }
.results a[aria-selected="true"] b { color: var(--accent); }
.results span { display: block; font-size: .85rem; color: var(--muted); line-height: 1.5; }
.results mark { background: rgba(165, 187, 97, .38); color: inherit; border-radius: 3px; padding: 0 1px; }
.results .empty { padding: 22px 12px; color: var(--dim); text-align: center; font-size: .92rem; }
.palette-foot { display: flex; gap: 16px; padding: 9px 16px; border-top: 1px solid var(--line); background: var(--bg-soft); font-size: .75rem; color: var(--dim); }
.palette-foot kbd { margin-right: 2px; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: 288px minmax(0, 1fr); gap: 56px; max-width: 1560px; margin: 0 auto; padding: 0 24px; }
.layout.has-toc { grid-template-columns: 288px minmax(0, 1fr) 232px; }
.side { position: sticky; top: var(--top); align-self: start; height: calc(100vh - var(--top)); overflow: auto; border-right: 1px solid var(--line); scrollbar-width: thin; }
.side-in { padding: 22px 18px 40px 0; }
.switch { position: relative; margin-bottom: 20px; }
.switch summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); cursor: pointer; box-shadow: var(--shadow-sm); font: 600 .88rem/1.3 var(--head); color: var(--text); }
.switch summary::-webkit-details-marker { display: none; }
.switch summary:hover { border-color: var(--line-strong); }
.switch summary > svg:first-child { color: var(--accent); width: 20px; height: 20px; }
.switch summary span { flex: 1; min-width: 0; }
.switch summary small { display: block; font: 600 .66rem/1.4 var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--dim); }
.switch .chev { color: var(--dim); transition: transform .15s; }
.switch[open] .chev { transform: rotate(180deg); }
.switch-menu { position: absolute; z-index: 5; left: 0; right: 0; top: calc(100% + 6px); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; }
.switch-menu a { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--text); font: 500 .86rem/1.35 var(--head); }
.switch-menu a svg { color: var(--dim); margin-top: 1px; }
.switch-menu a:hover { background: var(--bg-mute); }
.switch-menu a[aria-current] { color: var(--accent); }
.switch-menu a[aria-current] svg { color: var(--accent); }
.side nav { font: .9rem/1.4 var(--head); }
.side-list { list-style: none; margin: 0 0 6px; padding: 0; }
.side-list li { margin: 0; }
.side-list a { display: block; padding: 6px 10px; margin-left: -1px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.side-list a:hover { color: var(--text); background: var(--bg-mute); }
.side-list a[aria-current] { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.side-group { margin: 18px 0 4px; }
.side-group-title { display: block; padding: 2px 10px 6px; font: 700 .72rem/1.35 var(--head); letter-spacing: .1em; text-transform: uppercase; color: var(--text); text-decoration: none; }
.side-group-title:hover { color: var(--accent); }
.side-group-title[aria-current] { color: var(--accent); }
.side-group .side-list { border-left: 1px solid var(--line); margin-left: 10px; }
.side-group .side-list a { border-radius: 0 8px 8px 0; padding-left: 14px; }
.side-group .side-list a[aria-current] { box-shadow: inset 2px 0 0 var(--brand-teal); }
.side-all { display: flex; align-items: center; gap: 8px; margin-top: 24px; padding: 10px; border-top: 1px solid var(--line); color: var(--dim); text-decoration: none; font-size: .85rem; }
.side-all:hover { color: var(--accent); }

/* ---------- article ---------- */
.doc { padding: 36px 0 80px; min-width: 0; max-width: 760px; width: 100%; }
.doc-wide { max-width: 980px; }
.layout:not(.has-toc) > .doc:not(.doc-wide) { justify-self: center; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font: 500 .82rem var(--head); color: var(--dim); margin-bottom: 14px; }
.crumbs a { color: var(--dim); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs span { opacity: .6; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; color: var(--dim); margin: 0 0 30px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.doc-meta span + span::before { content: "·"; margin-right: 18px; opacity: .6; }
.doc-meta a { text-decoration: none; font-weight: 500; }
.draft-banner { display: inline-block; background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); border-radius: 999px; padding: 3px 12px; font: 600 .78rem var(--head); }

.prose { font-size: 1.02rem; color: var(--text); overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.5rem; margin: 2.2em 0 .6em; padding-top: .2em; }
.prose h3 { font-size: 1.2rem; margin: 2em 0 .55em; }
.prose h4 { font-size: 1.02rem; margin: 1.6em 0 .5em; }
.prose h2, .prose h3, .prose h4 { position: relative; }
.prose .anchor { position: absolute; left: -1.15em; padding-right: .3em; color: var(--dim); text-decoration: none; opacity: 0; font-weight: 400; transition: opacity .12s; }
.prose :is(h2, h3, h4):hover .anchor, .prose .anchor:focus { opacity: 1; }
.prose .anchor:hover { color: var(--accent); }
.prose strong { font-weight: 650; color: var(--text); }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 1.2em; }
.prose li { margin: .35em 0; padding-left: .2em; }
.prose li::marker { color: var(--dim); }
.prose ol > li::marker { font-weight: 600; font-variant-numeric: tabular-nums; }
.prose li > ul, .prose li > ol { margin: .35em 0 .2em; }
.prose code { font: .88em var(--mono); background: var(--code-bg); border: 1px solid var(--line); border-radius: 6px; padding: .1em .38em; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
.prose p:has(> img:only-child), .prose p:has(> img + img) { margin: 1.6em 0 .4em; }
.prose img { display: block; margin: 0 auto; background: var(--img-bg); border-radius: 10px; }
.prose img.border, .prose img.border-inline { border: 1px solid var(--line); box-shadow: var(--shadow); }
.prose img.border-inline { border-radius: 8px; }
.prose img.zoomable { cursor: zoom-in; }
.prose .caption { font-size: .85rem; line-height: 1.5; color: var(--dim); text-align: center; margin: .75em auto 1.8em; max-width: 44em; }
.prose .caption strong { font-weight: 600; color: var(--muted); }
.prose .center { text-align: center; }
.prose .red { color: var(--danger-ink); }
.prose .highlight { background: var(--hi-bg); border: 1px solid var(--line); border-left: 3px solid var(--brand-lime); padding: 14px 18px; border-radius: 10px; }
.admonition { position: relative; margin: 1.6em 0; padding: 14px 18px 14px 50px; border: 1px solid var(--note-line); border-left-width: 3px; background: var(--note-bg); border-radius: 10px; font-size: .97rem; }
.admonition::before { content: ""; position: absolute; left: 16px; top: 16px; width: 20px; height: 20px; background: var(--note-line); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat;
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5v.5'/%3E%3C/svg%3E"); }
.admonition > :last-child { margin-bottom: 0; }
.admonition.note { border-color: color-mix(in srgb, var(--note-line) 45%, transparent); border-left-color: var(--note-line); }
.admonition.warning { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn-line) 45%, transparent); border-left-color: var(--warn-line); }
.admonition.warning::before { background: var(--warn-line);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l10 18H2z'/%3E%3Cpath d='M12 10v4M12 17.5v.5'/%3E%3C/svg%3E"); }
.admonition.danger { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger-line) 45%, transparent); border-left-color: var(--danger-line); }
.admonition.danger::before { background: var(--danger-line);
  --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 3h8l5 5v8l-5 5H8l-5-5V8z'/%3E%3Cpath d='M12 8v5M12 16.5v.5'/%3E%3C/svg%3E"); }
.admonition-title { font-weight: 700; margin-bottom: .3em; }
.media-text { display: grid; grid-template-columns: minmax(120px, 26%) 1fr; gap: 28px; align-items: start; margin: 1.6em 0; }
.media-text > p:first-child { margin: 0; }
.table-wrap { overflow-x: auto; margin: 1.6em 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.prose table { border-collapse: collapse; width: 100%; font-size: .9rem; line-height: 1.5; }
.prose th, .prose td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { position: sticky; top: 0; background: var(--bg-mute); font: 700 .8rem var(--head); color: var(--text); white-space: nowrap; }
.prose tbody tr:nth-child(even) td { background: var(--bg-soft); }
.prose tbody tr:hover td { background: var(--accent-soft); }
.prose tr:last-child td { border-bottom: 0; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.pager a { display: block; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); font: 600 .95rem/1.4 var(--head); transition: border-color .15s, box-shadow .15s, transform .15s; background: var(--panel); }
.pager a:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateY(-1px); color: var(--accent); }
.pager small { display: block; color: var(--dim); font: 500 .78rem var(--font); margin-bottom: 4px; }
.pager .next { text-align: right; grid-column: 2; }

/* on this page */
.toc { position: sticky; top: var(--top); align-self: start; max-height: calc(100vh - var(--top)); overflow: auto; padding: 40px 0 24px; font: .85rem/1.4 var(--head); scrollbar-width: thin; }
.toc-h { font: 700 .72rem var(--head); text-transform: uppercase; letter-spacing: .12em; color: var(--text); margin: 0 0 .9em; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; padding: 4px 0 4px 14px; margin-left: -1px; border-left: 2px solid transparent; text-decoration: none; color: var(--dim); }
.toc li.l3 a { padding-left: 26px; font-size: .82rem; }
.toc li a:hover { color: var(--text); }
.toc li a.on { color: var(--accent); border-left-color: var(--brand-teal); font-weight: 600; }
.to-top { display: inline-block; margin-top: 18px; font-size: .8rem; color: var(--dim); text-decoration: none; }
.to-top:hover { color: var(--accent); }

/* ---------- landing pages ---------- */
.landing-head { display: flex; gap: 18px; align-items: flex-start; }
.landing-head h1 { margin-top: 0; }
.landing-head .doc-meta { border: 0; padding: 0; margin-bottom: 12px; }
.icon-tile { display: inline-grid; place-items: center; width: 48px; height: 48px; flex: none; border-radius: 12px; background: var(--accent-soft); color: var(--accent); border: 1px solid var(--accent-line); }
.icon-tile svg { width: 24px; height: 24px; }
.landing-sec { margin-top: 36px; }
.landing-sec h2 { font-size: 1.15rem; margin: 0 0 14px; }
.landing-sec h2 a { color: var(--text); text-decoration: none; }
.landing-sec h2 a:hover { color: var(--accent); }
.link-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; margin: 18px 0 0; }
.link-card { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--panel); transition: border-color .15s, box-shadow .15s, transform .15s; }
.link-card b { font: 600 .92rem/1.35 var(--head); color: var(--text); }
.link-card small { color: var(--dim); font-size: .78rem; }
.link-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); transform: translateY(-1px); }
.link-card:hover b { color: var(--accent); }

/* ---------- home ---------- */
.home { max-width: 1200px; margin: 0 auto; padding: 0 24px 96px; }
.hero { position: relative; text-align: center; padding: 84px 0 64px; }
.hero::before { content: ""; position: absolute; inset: 0 -40vw; z-index: -1; background:
  radial-gradient(600px 260px at 50% 0%, color-mix(in srgb, var(--brand-teal) 16%, transparent), transparent 70%),
  radial-gradient(500px 220px at 72% 30%, color-mix(in srgb, var(--brand-lime) 16%, transparent), transparent 70%); }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); margin: 0 0 .35em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40em; margin: 0 auto; }
.hero-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 560px; margin: 32px auto 0; height: 54px; padding: 0 12px 0 18px; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--panel); color: var(--dim); font: 1rem var(--font); cursor: pointer; box-shadow: var(--shadow); text-align: left; transition: border-color .15s, box-shadow .15s; }
.hero-search span { flex: 1; }
.hero-search svg { width: 20px; height: 20px; }
.hero-search:hover { border-color: var(--accent-line); color: var(--muted); }
.manuals { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 20px; }
.manual-card { display: flex; flex-direction: column; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); transition: border-color .15s, box-shadow .2s; }
.manual-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow); }
.manual-card h2 { font-size: 1.2rem; margin: 18px 0 4px; }
.manual-card h2 a { color: var(--text); text-decoration: none; }
.manual-card h2 a:hover { color: var(--accent); }
.card-meta { font-size: .82rem; color: var(--dim); margin: 0 0 16px; }
.manual-card ul { list-style: none; margin: 0 0 22px; padding: 0; font: .9rem/1.35 var(--head); }
.manual-card li { border-top: 1px solid var(--line); }
.manual-card li a { display: block; padding: 8px 2px; color: var(--muted); text-decoration: none; }
.manual-card li a:hover { color: var(--accent); }
.manual-card li.more a { color: var(--dim); font-weight: 600; }
.card-foot { margin: auto 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font: 500 .85rem var(--head); }
.card-foot a:not(.btn) { color: var(--dim); text-decoration: none; }
.card-foot a:not(.btn):hover { color: var(--accent); }

/* ---------- manual on one page ---------- */
.doc-all { max-width: 820px; margin: 0 auto; padding: 36px 24px 80px; }
.all-toc { border: 1px solid var(--line); border-radius: 14px; padding: 18px 24px; margin: 0 0 40px; font-size: .92rem; background: var(--bg-soft); }
.all-toc ol { margin: 0; padding-left: 1.4em; }
.all-sec { font-size: 1.7rem; margin-top: 2.4em; padding-top: .6em; border-top: 3px solid var(--brand-lime); }
.all-h { font-size: 1.35rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--bg-soft); font-size: .85rem; color: var(--dim); }
.foot-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; max-width: 1560px; margin: 0 auto; padding: 22px 24px; }
.foot img { height: 26px; width: auto; display: block; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--accent); }
.foot-right { margin-left: auto; }

/* ---------- image zoom ---------- */
.zoom { position: fixed; inset: 0; z-index: 70; background: rgba(10, 15, 12, .9); display: flex; align-items: center; justify-content: center; padding: 20px; cursor: zoom-out; animation: fade .15s ease-out; }
@keyframes fade { from { opacity: 0; } }
.zoom img { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #fff; border-radius: 8px; box-shadow: var(--shadow-lg); }

/* ---------- responsive ---------- */
@media (max-width: 1240px) {
  .layout.has-toc { grid-template-columns: 268px minmax(0, 1fr); gap: 44px; }
  .toc { display: none; }
}
@media (max-width: 900px) {
  :root { --top: 56px; }
  .top-in { padding: 0 12px; gap: 8px; }
  .brand-docs { display: none; }
  .brand img { height: 28px; }
  .search-btn { margin-left: auto; flex: 0 0 auto; width: 38px; padding: 0; justify-content: center; }
  .search-btn span, .search-btn kbd { display: none; }
  .top-nav { margin-left: 0; gap: 2px; }
  .top-nav .main-site { display: none; }
  .side-btn { display: inline-grid; }
  .layout, .layout.has-toc { grid-template-columns: minmax(0, 1fr); padding: 0 18px; gap: 0; }
  .side { position: fixed; top: 0; left: 0; bottom: 0; height: auto; width: min(86vw, 340px); z-index: 50; background: var(--bg); border-right: 1px solid var(--line); box-shadow: var(--shadow-lg); transform: translateX(-105%); transition: transform .22s ease; visibility: hidden; }
  .side-in { padding: 18px 16px 40px; }
  body.side-open .side { transform: none; visibility: visible; }
  body.side-open::after { content: ""; position: fixed; inset: 0; background: rgba(10, 18, 14, .4); z-index: 45; }
  .doc { padding-top: 22px; }
  .prose .anchor { display: none; }
  .home { padding: 0 18px 64px; }
  .hero { padding: 52px 0 40px; }
  .hero-search kbd { display: none; }
  .media-text { grid-template-columns: 1fr; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
  .landing-head { flex-direction: column; gap: 12px; }
  .foot-right { margin-left: 0; }
  .palette { padding: 10px; }
  .palette-box { max-height: 85vh; }
  .palette-foot { display: none; }
}

@media print {
  .top, .side, .toc, .pager, .foot, .no-print, .skip, .palette, .progress { display: none !important; }
  :root { --bg: #fff; --text: #000; --muted: #222; --dim: #444; --line: #ccc; }
  body { font-size: 11pt; line-height: 1.45; }
  .layout { display: block; padding: 0; }
  .doc, .doc-all { max-width: none; padding: 0; }
  a { color: inherit; text-decoration: none; }
  .all-article, .all-sec { break-before: page; }
  img, figure, .admonition, tr { break-inside: avoid; }
  .prose img { box-shadow: none !important; }
  h1, h2, h3 { break-after: avoid; }
  .all-toc { border: 0; padding: 0; background: none; }
  .prose .anchor { display: none; }
}
