/* OPUS Support Knowledge Base — theme.
   Brand: orange #FF9900 + dark grey #333333, Roboto (see 05 UX/Brand/Brand Guide.md). */

:root {
  --orange: #ff9900;
  --orange-deep: #d97f00;
  --ink: #333333;
  --blue: #0465b2;
  --green: #03a45e;

  --bg: #ffffff;
  --bg-soft: #f7f6f3;
  --surface: #ffffff;
  --text: #2f2f2f;
  --muted: #68645d;
  --line: #e7e4de;
  --line-strong: #d6d2ca;
  --brand-soft: #fff3de;
  --link: #0465b2;
  --info-bg: #eaf3fb;
  --info-line: #0465b2;
  --warn-bg: #fff6e3;
  --warn-line: #e08a00;
  --code-bg: #f3f1ec;
  --shadow: 0 1px 2px rgba(34, 30, 20, 0.06), 0 8px 24px rgba(34, 30, 20, 0.08);
  --shadow-lg: 0 18px 50px rgba(20, 18, 12, 0.22);
  --hero: #2b2b2b;

  --radius: 12px;
  --header-h: 64px;
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-cond: "Roboto Condensed", "Roboto", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
[data-theme="dark"] {
  --bg: #18191b;
  --bg-soft: #1e2023;
  --surface: #232528;
  --text: #ecebe8;
  --muted: #a9a59e;
  --line: #34363a;
  --line-strong: #46494e;
  --brand-soft: #3b2d12;
  --link: #7dbff2;
  --info-bg: #17293a;
  --info-line: #4da3e6;
  --warn-bg: #33270f;
  --warn-line: #ffab2e;
  --code-bg: #2a2c30;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.6);
  --hero: #202124;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 20px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--text); text-wrap: balance; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.eyebrow { margin: 0 0 10px; font: 700 13px/1 var(--font-cond); letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 9px 18px; border-radius: 999px; font-weight: 500; font-size: 15px; line-height: 1.3; text-decoration: none; border: 1px solid transparent; cursor: pointer; white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.15s; }
.btn-primary { background: var(--orange); color: #2b2b2b; }
.btn-primary:hover { background: #ffab2e; transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--orange); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; background: none; border-radius: 10px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn .icon { width: 20px; height: 20px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1480px; margin: 0 auto; padding: 0 24px; height: var(--header-h); display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--muted); flex: none; }
.brand img { display: block; height: 34px; width: auto; }
.brand-tag { padding-left: 12px; border-left: 1px solid var(--line-strong); font: 700 12px/1.2 var(--font-cond); letter-spacing: 0.14em; text-transform: uppercase; }
.brand .logo-dark, [data-theme="dark"] .brand .logo-light { display: none; }
[data-theme="dark"] .brand .logo-dark { display: block; }
.header-spacer { flex: 1; }
.site-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex: none; }
.site-nav a:not(.btn) { padding: 8px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 15px; font-weight: 500; }
.site-nav a:not(.btn):hover { background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--orange-deep); }
[data-theme="dark"] .site-nav a[aria-current="page"] { color: var(--orange); }
.site-nav .btn { margin-left: 8px; }
.theme-toggle .i-sun, [data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.nav-toggle { display: none; }
.nav-toggle .i-close, .nav-open .nav-toggle .i-menu { display: none; }
.nav-open .nav-toggle .i-close { display: block; }

/* Search */
.search { position: relative; flex: 1; max-width: 460px; margin: 0 auto; }
.search-input { width: 100%; height: 40px; padding: 0 44px 0 40px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--bg-soft); color: var(--text); font: inherit; font-size: 15px; outline: none; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s; }
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--orange); background: var(--surface); box-shadow: 0 0 0 4px rgba(255, 153, 0, 0.22); }
.search-input::-webkit-search-cancel-button { display: none; }
.search-icon { position: absolute; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search-key { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 500 12px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 3px 6px; background: var(--surface); pointer-events: none; }
.search-input:focus ~ .search-key { display: none; }
.search-results { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: min(70vh, 540px); overflow: auto; padding: 6px; text-align: left; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: var(--text); }
.search-results a:hover, .search-results a.is-active { background: var(--brand-soft); }
.search-results strong { display: block; font-weight: 500; font-size: 15px; line-height: 1.35; }
.search-results small { display: block; font: 700 11px/1.4 var(--font-cond); letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.search-results span { display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted); margin-top: 3px; }
.search-results mark { background: rgba(255, 153, 0, 0.32); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-none { padding: 16px 14px; color: var(--muted); font-size: 14.5px; }
.search-lg { max-width: 640px; }
.search-lg .search-input { height: 58px; padding-left: 54px; font-size: 17px; background: #fff; color: #2f2f2f; border-color: transparent; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28); }
.search-lg .search-input::placeholder { color: #77736c; }
.search-lg .search-icon { left: 20px; width: 21px; height: 21px; color: #77736c; }
.search-lg .search-key { right: 18px; background: #f3f1ec; color: #77736c; border-color: #d6d2ca; }

/* Home */
/* The hero must not clip (overflow) or sit in its own stacking context: the search results drop down over the cards below it. The gear ring is therefore a background layer, not a positioned element. */
.hero { position: relative; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='420' height='420'%3E%3Ccircle cx='210' cy='210' r='183' fill='none' stroke='white' stroke-opacity='.045' stroke-width='54' stroke-dasharray='96 48'/%3E%3C/svg%3E") no-repeat right -90px top -110px, radial-gradient(820px 380px at 88% -8%, rgba(255, 153, 0, 0.34), transparent 62%), radial-gradient(560px 300px at -4% 112%, rgba(255, 153, 0, 0.16), transparent 62%), var(--hero); color: #fff; border-bottom: 4px solid var(--orange); }
.hero-inner { position: relative; z-index: 5; max-width: 760px; margin: 0 auto; padding: 76px 24px 84px; text-align: center; }
.hero h1 { margin: 0; color: #fff; font-size: clamp(34px, 5vw, 50px); letter-spacing: -0.01em; }
.hero-tag { margin: 14px 0 30px; font-size: 19px; font-weight: 300; color: rgba(255, 255, 255, 0.82); }
.hero .search { margin: 0 auto; }
.section { padding: 56px 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-title { margin: 0 0 26px; font-size: 26px; }
.section-title::after { content: ""; display: block; width: 44px; height: 4px; margin-top: 12px; border-radius: 2px; background: var(--orange); }
.quick { padding: 0; margin-top: -34px; position: relative; z-index: 2; }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.quick-card { display: flex; align-items: center; gap: 18px; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform 0.18s, border-color 0.18s; }
.quick-card:hover { transform: translateY(-3px); border-color: var(--orange); }
.quick-card img { width: 112px; height: 76px; object-fit: contain; flex: none; background: #fff; border-radius: 8px; padding: 4px; }
.quick-card > span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.quick-card strong { font-size: 17px; }
.quick-card span span { font-size: 14px; line-height: 1.45; color: var(--muted); }
.quick-card em, .cat-card em { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-style: normal; font-weight: 500; font-size: 14px; color: var(--link); }
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cat-card { display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s; }
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--orange); }
.cat-icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--orange-deep); flex: none; }
[data-theme="dark"] .cat-icon { color: var(--orange); }
.cat-icon .icon { width: 24px; height: 24px; }
.cat-card strong { font-size: 17.5px; margin-top: 6px; }
.cat-card-desc { font-size: 14.5px; line-height: 1.5; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat-card em { margin-top: auto; padding-top: 8px; }
.cat-card em .icon, .quick-card em .icon { width: 15px; height: 15px; transition: transform 0.18s; }
.cat-card:hover em .icon, .quick-card:hover em .icon { transform: translateX(3px); }

/* Article lists */
.article-list { list-style: none; margin: 0 0 8px; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.article-list li + li { border-top: 1px solid var(--line); }
.article-link { display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none; color: var(--text); font-weight: 500; font-size: 15.5px; line-height: 1.4; transition: background 0.12s; }
.article-link:hover { background: var(--brand-soft); }
.article-link .icon { color: var(--muted); width: 18px; height: 18px; }
.article-link span { flex: 1; min-width: 0; }
.article-link .go { opacity: 0; transform: translateX(-4px); transition: opacity 0.15s, transform 0.15s; color: var(--orange-deep); }
.article-link:hover .go { opacity: 1; transform: none; }
.article-list-cols { display: grid; grid-template-columns: repeat(2, 1fr); border: 0; background: none; gap: 12px; overflow: visible; }
.article-list-cols li { border: 1px solid var(--line) !important; border-radius: 10px; background: var(--surface); overflow: hidden; }
.empty-note { color: var(--muted); font-style: italic; }

/* Help block */
.help-block { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-top: 48px; padding: 24px 28px; border: 1px solid var(--line); border-left: 4px solid var(--orange); border-radius: var(--radius); background: var(--bg-soft); }
.section .help-block { margin-top: 0; }
.help-block h2 { margin: 0 0 4px; font-size: 19px; }
.help-block p { margin: 0; color: var(--muted); font-size: 15px; max-width: 560px; }
.help-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Doc layout */
.doc-layout { max-width: 1480px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 290px minmax(0, 1fr) 230px; gap: 48px; align-items: start; }
.doc-layout.no-toc { grid-template-columns: 290px minmax(0, 1fr); }
.doc-side, .doc-toc { position: sticky; top: var(--header-h); max-height: calc(100vh - var(--header-h)); overflow: auto; padding: 28px 0 40px; overscroll-behavior: contain; scrollbar-width: thin; }
.doc-side { padding-right: 20px; border-right: 1px solid var(--line); }
.doc { min-width: 0; padding: 28px 0 72px; max-width: 820px; }
.no-toc .doc { max-width: 900px; }
.side-toggle { display: none; }

.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.side-nav a:hover { background: var(--bg-soft); }
.side-nav > ul > .nav-cat > details > summary > a, .side-nav > ul > .nav-empty > a { font-weight: 700; }
.side-nav summary { display: flex; align-items: flex-start; list-style: none; cursor: pointer; border-radius: 8px; }
.side-nav summary::-webkit-details-marker { display: none; }
.side-nav summary a { flex: 1; font-weight: 500; }
.nav-caret { width: 16px; height: 16px; margin: 8px 0 0 4px; color: var(--muted); transition: transform 0.15s; }
details[open] > summary > .nav-caret { transform: rotate(90deg); }
.side-nav details > ul { margin: 2px 0 6px 12px; padding-left: 10px; border-left: 1px solid var(--line); }
.side-nav details > ul a { color: var(--muted); }
.side-nav details > ul summary a { color: var(--text); }
.side-nav .nav-empty > a { padding-left: 30px; color: var(--muted); }
.side-nav details > ul .nav-empty > a { padding-left: 30px; }
.side-nav a[aria-current="page"] { background: var(--brand-soft); color: var(--text) !important; font-weight: 500; box-shadow: inset 3px 0 0 var(--orange); }
.side-nav a.is-current { color: var(--text) !important; }

.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; }
.breadcrumb a:hover { color: var(--link); text-decoration: underline; }
.crumb-sep { width: 13px; height: 13px; opacity: 0.6; }
.doc-header h1, .cat-header h1 { margin: 0; font-size: clamp(28px, 3.4vw, 38px); letter-spacing: -0.01em; }
.doc-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; margin: 16px 0 28px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.doc-meta-info { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.doc-meta-info > span { display: inline-flex; align-items: center; gap: 6px; }
.doc-actions { display: flex; gap: 4px; }
.doc-actions button { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 0; border-radius: 8px; background: none; color: var(--muted); font-size: 14px; cursor: pointer; }
.doc-actions button:hover { background: var(--bg-soft); color: var(--text); }
.cat-header { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 28px; }
.cat-header p { margin: 8px 0 0; color: var(--muted); font-size: 17px; font-weight: 300; max-width: 640px; }
.cat-header .cat-icon { width: 54px; height: 54px; margin-top: 2px; }
.cat-section { margin-top: 34px; }
.cat-section .cat-section { margin: 22px 0 0 18px; padding-left: 18px; border-left: 2px solid var(--line); }
.cat-section h2, .cat-section h3, .cat-section h4 { margin: 0 0 10px; font-size: 20px; }
.cat-section h3 { font-size: 17.5px; }
.cat-section h4 { font-size: 16px; }
.cat-section h2 a, .cat-section h3 a, .cat-section h4 a { color: inherit; text-decoration: none; }
.cat-section h2 a:hover, .cat-section h3 a:hover, .cat-section h4 a:hover { color: var(--link); }
.cat-desc { margin: -4px 0 12px; color: var(--muted); font-size: 14.5px; }

/* Table of contents */
.toc h2 { margin: 0 0 10px; font: 700 12px/1 var(--font-cond); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 5px 0 5px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.toc a:hover { color: var(--text); }
.toc a.is-active { color: var(--text); border-left-color: var(--orange); font-weight: 500; }
.toc-l3 a { padding-left: 26px; }
.toc-l4 a { padding-left: 38px; }
.toc-inline { display: none; margin: 0 0 24px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; background: var(--bg-soft); }
.toc-inline summary { cursor: pointer; font-weight: 500; }
.toc-inline .toc h2 { display: none; }
.toc-inline .toc { margin-top: 10px; }

/* Prose */
.prose { font-size: 16.5px; line-height: 1.7; overflow-wrap: break-word; }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 44px 0 14px; font-size: 26px; letter-spacing: -0.005em; }
.prose h3 { margin: 34px 0 10px; font-size: 20.5px; }
.prose h4 { margin: 28px 0 8px; font-size: 17.5px; }
.prose h5, .prose h6 { margin: 24px 0 6px; font-size: 16px; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 26px; }
.prose li { margin: 5px 0; }
.prose li > p { margin: 0 0 8px; }
.prose li > ul, .prose li > ol { margin: 6px 0 8px; }
.prose li::marker { color: var(--orange-deep); font-weight: 500; }
.prose ol ol { list-style-type: lower-alpha; }
.prose ol ol ol { list-style-type: lower-roman; }
.prose ol.ol-lower-roman { list-style-type: lower-roman; }
.prose ol.ol-upper-roman { list-style-type: upper-roman; }
.prose ol.ol-lower-alpha, .prose ol.ol-lower-latin { list-style-type: lower-alpha; }
.prose ol.ol-upper-alpha, .prose ol.ol-upper-latin { list-style-type: upper-alpha; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose strong { font-weight: 700; }
.prose img { border-radius: 8px; border: 1px solid var(--line); background: #fff; }
.prose img[data-zoom] { cursor: zoom-in; }
.prose img.img-missing { display: none; }
.prose figure, .prose .figure { margin: 20px 0; }
.prose li .figure { margin: 12px 0; }
.figure-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.prose figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.prose code { font: 0.9em var(--mono); background: var(--code-bg); padding: 2px 6px; border-radius: 5px; }
.prose pre { margin: 0 0 18px; padding: 14px 16px; background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px; overflow: auto; font-size: 14px; line-height: 1.55; }
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose blockquote { margin: 0 0 18px; padding: 4px 18px; border-left: 3px solid var(--line-strong); color: var(--muted); }
.video { display: block; position: relative; aspect-ratio: 16 / 9; margin: 20px 0; border-radius: var(--radius); overflow: hidden; background: #000; box-shadow: var(--shadow); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.callout { margin: 22px 0; padding: 16px 20px; border-radius: 10px; border: 1px solid transparent; border-left-width: 4px; background: var(--info-bg); border-left-color: var(--info-line); }
.callout-warning, .callout-caution, .callout-danger, .callout-attention { background: var(--warn-bg); border-left-color: var(--warn-line); }
.callout > :first-child { margin-top: 0; }
.callout > :last-child { margin-bottom: 0; }
.callout .callout-title { margin: 0 0 8px; font-size: 17px; }
.table-wrap { margin: 20px 0; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
.prose th:last-child, .prose td:last-child { border-right: 0; }
.prose tr:last-child td { border-bottom: 0; }
.prose thead th { background: var(--bg-soft); font-weight: 700; font-size: 14px; }
.prose thead.thead-empty { display: none; }
.prose td img { border: 0; }

.doc-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.doc-pager a { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); font-weight: 500; line-height: 1.35; transition: border-color 0.15s, background 0.15s; }
.doc-pager a:hover { border-color: var(--orange); background: var(--brand-soft); }
.doc-pager small { display: block; font: 700 11px/1.5 var(--font-cond); letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.pager-next { justify-content: flex-end; text-align: right; grid-column: 2; }
.doc-pager .icon { color: var(--orange-deep); }

/* Glossary */
.glossary-tools { position: sticky; top: var(--header-h); z-index: 5; background: var(--bg); padding: 12px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.glossary-search { max-width: none; margin: 0 0 12px; }
.glossary-letters { display: flex; flex-wrap: wrap; gap: 6px; }
.glossary-letters button { min-width: 34px; height: 32px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.glossary-letters button:hover { border-color: var(--orange); }
.glossary-letters button.is-active { background: var(--orange); border-color: var(--orange); color: #2b2b2b; }
.glossary-list { margin: 0; }
.glossary-term { padding: 18px 0; border-bottom: 1px solid var(--line); }
.glossary-term dt { font-weight: 700; font-size: 18px; margin-bottom: 4px; }
.glossary-term dd { margin: 0; color: var(--text); }
.glossary-term dd p { margin: 0 0 8px; }
.glossary-term dd p:last-child { margin: 0; }
.glossary-empty { color: var(--muted); padding: 24px 0; }

/* Footer */
.site-footer { margin-top: 24px; background: #262626; color: #cfccc6; font-size: 14.5px; }
.footer-inner { max-width: 1180px; margin: 0 auto; padding: 52px 24px 40px; display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr 1fr; gap: 36px; }
.footer-about p { margin: 14px 0 0; max-width: 340px; line-height: 1.6; }
.footer-logo { display: block; height: 32px; width: auto; }
.footer-contact { display: flex; flex-direction: column; gap: 6px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 8px; }
.site-footer a { color: #e9e6e0; text-decoration: none; }
.site-footer a:hover { color: var(--orange); }
.footer-col h2 { margin: 0 0 14px; font: 700 12px/1 var(--font-cond); letter-spacing: 0.16em; text-transform: uppercase; color: var(--orange); }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer .btn-ghost { border-color: #55524d; color: #fff; }
.site-footer .btn-ghost:hover { border-color: var(--orange); }
.footer-legal { border-top: 1px solid #3a3a3a; }
.footer-legal-inner { max-width: 1180px; margin: 0 auto; padding: 18px 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px 24px; font-size: 13.5px; color: #a29e97; }
.footer-legal a { margin-left: 20px; color: #a29e97; }

.to-top { position: fixed; right: 22px; bottom: 22px; z-index: 40; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--orange); color: #2b2b2b; box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.to-top[hidden] { display: none; }
.notfound { padding: 96px 0 72px; text-align: center; }
.notfound h1 { margin: 0 0 12px; font-size: 36px; }
.notfound p { color: var(--muted); }

/* Lightbox + toast */
.lightbox { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 28px; background: rgba(15, 15, 15, 0.88); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 56px); border-radius: 8px; background: #fff; box-shadow: var(--shadow-lg); }
.toast { position: fixed; left: 50%; bottom: 28px; z-index: 210; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14.5px; box-shadow: var(--shadow-lg); }

/* Responsive */
@media (max-width: 1240px) {
  .doc-layout { grid-template-columns: 270px minmax(0, 1fr); gap: 36px; }
  .doc-toc { display: none; }
  .toc-inline { display: block; }
}
@media (max-width: 1080px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-grid { grid-template-columns: 1fr; }
  .quick { margin-top: 28px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .brand-tag { display: none; }
}
@media (max-width: 900px) {
  .nav-toggle { display: inline-grid; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: var(--header-h); flex-direction: column; align-items: stretch; gap: 2px; padding: 12px 16px 18px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav-open .site-nav { display: flex; }
  .site-nav .btn { margin: 8px 0 0; justify-content: center; }
  .header-inner { gap: 10px; padding: 0 16px; }
  .search-key { display: none; }
  .doc-layout, .doc-layout.no-toc { grid-template-columns: minmax(0, 1fr); padding: 0 18px; }
  .doc-side { display: none; position: static; max-height: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin-top: 16px; }
  .side-open .doc-side { display: block; }
  .side-toggle { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); font-size: 14.5px; font-weight: 500; cursor: pointer; }
  .doc { padding-top: 20px; }
  .article-list-cols { grid-template-columns: 1fr; }
  .glossary-tools { position: static; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .cat-grid { grid-template-columns: 1fr; }
  .hero-inner { padding: 52px 16px 60px; }
  .hero-tag { font-size: 17px; }
  .section { padding: 40px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .doc-pager { grid-template-columns: 1fr; }
  .pager-next { grid-column: 1; }
  .doc-actions span { display: none; }
  .brand img { height: 28px; }
  .prose { font-size: 16px; }
  .cat-section .cat-section { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .doc-side, .doc-toc, .toc-inline, .doc-actions, .doc-pager, .help-block, .to-top, .side-toggle, .skip-link { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc { max-width: none; padding: 0; }
  body { font-size: 11pt; background: #fff; color: #000; }
  .prose img { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}
