/* bgpvr.com/admin-help, the operator guide. bgpvr.com design A tokens (css/site.css): sand + navy + teal, Rubik headings, Inter text. */
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Inter';font-style:normal;font-weight:400 700;font-display:swap;src:url(/fonts/inter-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:'Rubik';font-style:normal;font-weight:500 700;font-display:swap;src:url(/fonts/rubik-latin.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Rubik';font-style:normal;font-weight:500 700;font-display:swap;src:url(/fonts/rubik-cyrillic.woff2) format('woff2');unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
:root {
  --bg: #F4EFE8; --surface: #FFFFFF; --subtle: #FBF9F5; --sunk: #F0EAE1;
  --ink: #0B1530; --ink-2: #343D56; --ink-3: #596174;
  --line: #E4DCD0; --line-2: rgba(11,21,48,.14);
  --accent: #0A6B79; --accent-ink: #FFFFFF; --accent-tint: #DFF1F3; --focus: #0A7A8A;
  --amber-tint: #FFF0D8; --amber-ink: #874800; --red-tint: #FBE4E1; --red-ink: #9B2C1F; --green-tint: #E1F2E9; --green-ink: #0C6A42;
  --code-bg: #0B1530; --code-ink: #E3EAF5; --code-line: rgba(255,255,255,.1); --inline-code: #EDE6DB;
  --mark: #FFE08A; --mark-ink: #0B1530;
  --shadow-1: 0 1px 2px rgba(11,21,48,.05), 0 8px 20px -8px rgba(11,21,48,.10);
  --shadow-2: 0 2px 6px rgba(11,21,48,.06), 0 24px 48px -16px rgba(11,21,48,.24);
  --ease: cubic-bezier(.23,1,.32,1);
  --display: 'Rubik', Inter, system-ui, sans-serif; --ui: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', 'Cascadia Mono', Menlo, Consolas, monospace;
  --top-h: 112px; --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0A1229; --surface: #101B38; --subtle: #0D1731; --sunk: #16234A;
    --ink: #EEF2F8; --ink-2: #C9D1E0; --ink-3: #9EA9BF; --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
    --accent: #5FE0EE; --accent-ink: #062027; --accent-tint: rgba(95,224,238,.12); --focus: #5FE0EE;
    --amber-tint: rgba(255,184,77,.12); --amber-ink: #FFC877; --red-tint: rgba(239,68,68,.13); --red-ink: #FF9C92; --green-tint: rgba(24,217,165,.12); --green-ink: #6EE7C1;
    --code-bg: #060C1E; --inline-code: rgba(255,255,255,.08); --mark: #8A6A12; --mark-ink: #FFF6DA;
    --shadow-1: 0 1px 2px rgba(0,0,0,.3), 0 8px 20px -8px rgba(0,0,0,.5); --shadow-2: 0 24px 48px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0A1229; --surface: #101B38; --subtle: #0D1731; --sunk: #16234A;
  --ink: #EEF2F8; --ink-2: #C9D1E0; --ink-3: #9EA9BF; --line: rgba(255,255,255,.09); --line-2: rgba(255,255,255,.16);
  --accent: #5FE0EE; --accent-ink: #062027; --accent-tint: rgba(95,224,238,.12); --focus: #5FE0EE;
  --amber-tint: rgba(255,184,77,.12); --amber-ink: #FFC877; --red-tint: rgba(239,68,68,.13); --red-ink: #FF9C92; --green-tint: rgba(24,217,165,.12); --green-ink: #6EE7C1;
  --code-bg: #060C1E; --inline-code: rgba(255,255,255,.08); --mark: #8A6A12; --mark-ink: #FFF6DA;
  --shadow-1: 0 1px 2px rgba(0,0,0,.3), 0 8px 20px -8px rgba(0,0,0,.5); --shadow-2: 0 24px 48px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--top-h) + 16px); -webkit-tap-highlight-color: transparent; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.65 var(--ui); -webkit-font-smoothing: antialiased; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 50; padding: 8px 14px; background: var(--ink); color: var(--bg); border-radius: 6px; }
.skip:focus { top: 12px; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
kbd { font: 600 12px var(--mono); }
button { font: inherit; color: inherit; }
* { scrollbar-color: var(--line-2) transparent; }

/* ── top bar + mega menu ── */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 var(--gutter); max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; white-space: nowrap; font-size: 15px; }
.brand img { border-radius: 7px; flex: none; }
.brand { min-width: 0; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
.brand b { font-family: var(--display); font-weight: 600; letter-spacing: .01em; }
.top-search { position: relative; flex: 1; max-width: 560px; margin-left: auto; display: flex; align-items: center; }
.top-search > .ic, .hero-search > .ic { position: absolute; left: 12px; color: var(--ink-3); pointer-events: none; }
.q { width: 100%; height: 40px; padding: 0 40px 0 40px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--subtle); color: var(--ink); font: 400 15px var(--ui); }
.q::placeholder { color: var(--ink-3); }
.q:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px var(--accent-tint); background: var(--surface); }
.q::-webkit-search-cancel-button { cursor: pointer; }
.slash { position: absolute; right: 10px; padding: 1px 7px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--ink-3); background: var(--surface); }
.q:focus ~ .slash, .q:not(:placeholder-shown) ~ .slash { display: none; }
.top-tools { display: flex; align-items: center; gap: 4px; }
.lang { padding: 8px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-2); cursor: pointer; }
.theme .ic:last-child { display: none; }
:root[data-theme="dark"] .theme .ic:first-child { display: none; }
:root[data-theme="dark"] .theme .ic:last-child { display: block; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) .theme .ic:first-child { display: none; } :root:not([data-theme]) .theme .ic:last-child { display: block; } }
.only-m { display: none; }

.megabar { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.mm-row { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; height: 52px; align-items: stretch; }
.mm { position: static; display: flex; }
.mm-btn { display: flex; align-items: center; gap: 4px; padding: 0 12px; border: 0; background: none; color: var(--ink-2); font-size: 14.5px; font-weight: 500; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.mm-btn .ic { width: 16px; height: 16px; transition: transform .2s var(--ease); }
.mm-btn[aria-expanded="true"] { color: var(--ink); }
.mm-btn[aria-expanded="true"] .ic { transform: rotate(180deg); }
.mm-btn[aria-current] { color: var(--ink); border-bottom-color: var(--accent); }
.mm-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
  display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 32px; padding: 24px max(var(--gutter), calc((100vw - 1440px) / 2 + var(--gutter))) 28px; }
.mm-panel:not([hidden]) { animation: mmIn .18s var(--ease); }
@keyframes mmIn { from { opacity: 0; transform: translateY(-4px); } }
.mm-intro p { margin: 0 0 12px; color: var(--ink-2); font-size: 15px; }
.mm-all { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14.5px; text-decoration: none; }
.mm-all .ic { width: 16px; height: 16px; }
.mm-list { columns: 3 200px; column-gap: 24px; margin: 0; padding: 0; list-style: none; }
.mm-list a { display: block; padding: 6px 10px; margin: 0 -10px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: 15px; break-inside: avoid; }

/* ── tier tag ── */
.tier { display: inline-block; vertical-align: .12em; margin-left: 8px; padding: 1px 7px; border-radius: 999px; font: 600 11px/1.6 var(--ui); letter-spacing: .02em; white-space: nowrap; background: var(--amber-tint); color: var(--amber-ink); }
.tier-business, .tier-enterprise { background: var(--accent-tint); color: var(--accent); }
h1 .tier { font-size: 13px; vertical-align: .3em; margin-left: 12px; padding: 2px 10px; }

/* ── page layout ── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); gap: 48px; }
.layout.has-side { grid-template-columns: 248px minmax(0, 1fr); }
@media (min-width: 1240px) { .layout.has-side:has(.toc) { grid-template-columns: 248px minmax(0, 1fr) 220px; } }
main { min-width: 0; padding: 28px 0 64px; outline: none; }
.side { position: sticky; top: var(--top-h); align-self: start; max-height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 28px 4px 40px 0; }
.side-d > summary { list-style: none; display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; pointer-events: none; }
.side-d > summary::-webkit-details-marker { display: none; }
.side-k { font-size: 13px; color: var(--ink-3); }
.side-g { font: 600 17px var(--display); color: var(--ink); }
.side ul { margin: 0; padding: 0; list-style: none; }
.side a { display: block; padding: 7px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14.5px; line-height: 1.4; }
.side a[aria-current] { background: var(--accent-tint); color: var(--ink); font-weight: 600; }
.toc { position: sticky; top: var(--top-h); align-self: start; max-height: calc(100vh - var(--top-h)); overflow-y: auto; padding: 32px 0 40px; display: none; }
@media (min-width: 1240px) { .toc { display: block; } }
.toc-k { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--ink-3); }
.toc ol, .toc-m ol { margin: 0; padding: 0; list-style: none; }
.toc a { display: block; padding: 5px 0 5px 12px; border-left: 1px solid var(--line-2); color: var(--ink-3); text-decoration: none; font-size: 13.5px; line-height: 1.4; }
.toc a.on { color: var(--accent); border-left: 2px solid var(--accent); padding-left: 11px; font-weight: 500; }
.toc-m { display: none; }

/* ── article ── */
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0 0 18px; padding: 0; list-style: none; font-size: 13.5px; color: var(--ink-3); }
.crumbs li + li::before { content: '/'; margin-right: 8px; color: var(--line-2); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.doc-head h1, .hero h1 { margin: 0; font: 600 clamp(28px, 3.4vw, 40px)/1.15 var(--display); letter-spacing: -.015em; text-wrap: balance; overflow-wrap: anywhere; }
.doc-head .lede { margin: 14px 0 0; font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 68ch; }
.needs { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 6px 12px; border-radius: 8px; background: var(--amber-tint); color: var(--amber-ink); font-size: 14px; font-weight: 500; }
.needs .ic { width: 16px; height: 16px; }
.doc { max-width: 760px; }
.prose { margin-top: 28px; font-size: 16px; color: var(--ink); overflow-wrap: break-word; }
.prose > *, .prose section > * { max-width: 72ch; }
.prose h2 { margin: 44px 0 10px; font: 600 21px/1.3 var(--display); letter-spacing: -.005em; text-wrap: balance; }
.prose h2.part { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 24px; }
.prose h3 { margin: 28px 0 8px; font: 600 17px/1.35 var(--display); }
.prose h2:target, .prose h3:target, .prose .task:target h2 { animation: hit 1.6s var(--ease); }
@keyframes hit { 0%, 40% { background: var(--accent-tint); box-shadow: 0 0 0 6px var(--accent-tint); border-radius: 4px; } }
.prose p, .prose li { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--ink-3); }
.prose code { font: .88em var(--mono); background: var(--inline-code); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }
.task p { margin: 0; }
.watch ul { padding: 0; list-style: none; }
.watch li { position: relative; padding: 12px 14px 12px 40px; margin: 8px 0; border-radius: 10px; background: var(--amber-tint); color: var(--ink); }
.watch li::before { content: ''; position: absolute; left: 15px; top: 19px; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--amber-ink); }

/* code blocks: dark in both themes, scroll inside, copy button */
.code { position: relative; margin: 16px 0 20px; max-width: 100%; }
.prose pre { margin: 0; padding: 16px 18px; padding-right: 56px; max-width: 100%; overflow-x: auto; background: var(--code-bg); color: var(--code-ink); border-radius: 10px; font: 13.5px/1.6 var(--mono); tab-size: 4; scrollbar-color: rgba(255,255,255,.25) transparent; }
.prose pre code { background: none; padding: 0; font: inherit; color: inherit; overflow-wrap: normal; white-space: pre; }
.copy { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--code-line); border-radius: 7px; background: rgba(255,255,255,.06); color: #C9D3E4; font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
.copy .ic { width: 16px; height: 16px; }
.copy span { display: none; }
.copy.done span, .copy:focus-visible span { display: inline; }
.copy.done { color: #6EE7C1; }
.copy:focus-visible { outline-color: #5FE0EE; }

.callout { margin: 20px 0; padding: 14px 16px; border-radius: 10px; background: var(--accent-tint); }
.callout.warn { background: var(--amber-tint); }
.callout.danger { background: var(--red-tint); }
.callout > strong { display: block; color: var(--ink); margin-bottom: 4px; }
.callout.danger > strong { color: var(--red-ink); }
.callout p { margin: 0; }
.op-table-wrap { overflow-x: auto; margin: 16px 0; }
table.op { border-collapse: collapse; width: 100%; font-size: 15px; font-variant-numeric: tabular-nums; }
table.op th, table.op td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); }
table.op th { font-weight: 600; color: var(--ink); background: var(--sunk); }
.shot { margin: 20px 0; }
.shot img, .op-shot { display: block; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--line); box-shadow: var(--shadow-1); background: var(--sunk); }
.op-fig { margin: 16px 0; overflow-x: auto; }
.op-fig-svg { display: block; width: 100%; min-width: 640px; height: auto; color: var(--ink); }
.opf-box, .opf-vm { fill: var(--subtle); stroke: var(--line-2); stroke-width: 1.5; } .opf-vm { fill: none; stroke-dasharray: 6 5; }
.opf-t { fill: currentColor; font: 600 14px var(--ui); text-anchor: middle; } .opf-s, .opf-k { fill: var(--ink-3); font: 500 13px var(--ui); text-anchor: middle; } .opf-k { text-anchor: start; }
.opf-l { fill: none; stroke: var(--ink-3); stroke-width: 1.6; } .opf-l.is-media { stroke: var(--accent); } .opf-k.is-media { fill: var(--accent); }
.op-fig figcaption { color: var(--ink-3); font-size: 14px; margin-top: 8px; }

.pn { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); }
.pn a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); text-decoration: none; color: var(--ink); font-weight: 600; transition: border-color .15s, box-shadow .15s; }
.pn span { font-size: 13px; font-weight: 400; color: var(--ink-3); }
.pn-next { text-align: right; grid-column: 2; }

/* ── group landing ── */
.glist { margin: 28px 0 0; padding: 0; list-style: none; max-width: 820px; border-top: 1px solid var(--line); }
.glist a { display: grid; gap: 4px; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.gl-t { font: 600 18px/1.35 var(--display); }
.gl-d { color: var(--ink-2); font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 72ch; }

/* ── home ── */
.hero { max-width: 760px; margin: 40px auto 0; text-align: center; }
.hero .lede { margin: 10px 0 24px; color: var(--ink-3); font-size: 15px; }
.hero-search { position: relative; display: flex; align-items: center; }
.hero-search > .ic { left: 18px; width: 22px; height: 22px; }
.q-big { height: 58px; padding-left: 52px; font-size: 17px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); }
.hero-search .slash { right: 16px; }
.hero-search:has(.q:not(:placeholder-shown)) + .hint { visibility: hidden; height: 0; margin: 0; }
.hint { margin: 10px 0 0; font-size: 14px; color: var(--ink-3); }
.start { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 28px 0 0; padding: 0; list-style: none; }
.start a { display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.start b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: var(--bg); font-size: 13px; }
.home-groups { columns: 3 320px; column-gap: 40px; max-width: 1180px; margin: 56px auto 72px; }
.hg { break-inside: avoid; padding: 0 0 32px; }
.hg h2 { margin: 0 0 4px; font: 600 20px/1.3 var(--display); }
.hg h2 a { color: var(--ink); text-decoration: none; }
.hg p { margin: 0 0 10px; color: var(--ink-3); font-size: 14.5px; }
.hg ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.hg li a { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: 15px; }

/* ── search results ── */
.results { font-size: 14.5px; }
.results.pop { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: min(70vh, 560px); overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-2); padding: 6px; z-index: 30; }
.results.inline { margin-top: 12px; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); padding: 6px; max-height: 60vh; overflow-y: auto; }
.r { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; }
.r[aria-selected="true"] { background: var(--sunk); }
.r-t { display: block; font-weight: 600; line-height: 1.35; }
.r-p { display: block; font-size: 12.5px; color: var(--ink-3); margin-bottom: 2px; }
.r-x { display: block; color: var(--ink-2); font-size: 13.5px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.r mark, .prose mark { background: var(--mark); color: var(--mark-ink); border-radius: 2px; padding: 0 1px; }
.r-empty { padding: 14px 12px; color: var(--ink-3); }

.foot { border-top: 1px solid var(--line); padding: 20px var(--gutter); text-align: center; color: var(--ink-3); font-size: 13px; }
.foot p { margin: 0; }

/* ── sheets (menu + search on a phone): in-page <dialog> ── */
.sheet { inset: 0; margin: 0; padding: 0; width: 100%; max-width: 100%; height: 100%; max-height: 100%; border: 0; background: var(--surface); color: var(--ink); overscroll-behavior: contain; }
.sheet::backdrop { background: rgba(5,10,25,.5); }
.sheet[open] { animation: shIn .22s var(--ease); }
@keyframes shIn { from { transform: translateY(12px); opacity: 0; } }
.sheet-head { position: sticky; top: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--line); }
.sheet-head b { flex: 1; font-family: var(--display); font-weight: 600; }
.sheet-head .q { flex: 1; min-width: 0; padding-left: 14px; font-size: 16px; }
.sheet .results { overflow-wrap: anywhere; }
.sheet-nav { padding: 8px 16px 32px; }
.sheet-nav details { border-bottom: 1px solid var(--line); }
.sheet-nav summary { padding: 14px 0; font: 600 17px var(--display); cursor: pointer; }
.sheet-nav ul { margin: 0 0 12px; padding: 0; list-style: none; }
.sheet-nav a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink-2); text-decoration: none; }
.sheet-top { display: flex; align-items: center; justify-content: space-between; }
.sheet-nav .sheet-lang { display: inline-block; color: var(--accent); font-weight: 600; }
.sheet-nav a[aria-current] { background: var(--accent-tint); color: var(--ink); font-weight: 600; }
.sheet-home { font-weight: 600; color: var(--ink) !important; padding-left: 0 !important; margin: 4px 0; }
.search-sheet .results { padding: 8px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ── phone and small tablet ── */
@media (max-width: 899px) {
  :root { --top-h: 60px; }
  .megabar, .top-search, .lang { display: none; }
  .only-m { display: inline-grid; }
  .top-tools { margin-left: auto; }
  .layout.has-side { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .side { position: static; max-height: none; padding: 16px 0 0; overflow: visible; }
  .side-d { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .side-d:not([open]) > summary, .side-d > summary { pointer-events: auto; cursor: pointer; flex-direction: row; align-items: center; gap: 8px; margin: 0; padding: 12px 14px; }
  .side-d > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border: solid var(--ink-3); border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .side-d[open] > summary::after { transform: rotate(-135deg); }
  .side-d ul { padding: 0 6px 8px; }
  .side-g { font-size: 15px; }
  main { padding-top: 16px; }
  .toc-m { display: block; margin: 20px 0 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .toc-m summary { padding: 12px 14px; font-weight: 600; font-size: 15px; cursor: pointer; }
  .toc-m ol { padding: 0 6px 8px; }
  .toc-m a { display: block; padding: 8px; color: var(--ink-2); text-decoration: none; font-size: 15px; }
  .doc-head .lede { font-size: 17px; }
  .prose pre { font-size: 13px; padding: 14px; padding-right: 52px; }
  .pn { grid-template-columns: 1fr; }
  .pn-next { grid-column: 1; }
  .hero { margin-top: 20px; text-align: left; }
  .start { justify-content: flex-start; }
  .home-groups { margin-top: 40px; }
  .q { font-size: 16px; } /* no zoom on focus in iOS Safari */
}
@media (hover: none) { .copy span { display: inline; } }
/* mobile-native: instant taps, no label selection on controls, press feedback, notch-safe header */
button, a, summary { touch-action: manipulation; }
button, summary, .mm-btn, .icon-btn { -webkit-user-select: none; user-select: none; }
.icon-btn:active, .copy:active, .mm-btn:active { transform: scale(.96); transition: transform .1s var(--ease); }
.side a:active, .sheet-nav a:active, .r:active, .glist a:active, .hg li a:active { background: var(--sunk); }
.top-row, .megabar { padding-left: max(var(--gutter), env(safe-area-inset-left, 0px)); padding-right: max(var(--gutter), env(safe-area-inset-right, 0px)); }
.sheet-nav { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }

/* home: about this guide */
.about { max-width: 760px; margin: 0 auto 72px; color: var(--ink-3); font-size: 15px; }
.about code { font: .88em var(--mono); background: var(--inline-code); padding: .1em .35em; border-radius: 4px; overflow-wrap: anywhere; }

/* the licence chapter's "from tier" pills: the plan script sets their class */
.pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--sunk); color: var(--ink-2); white-space: nowrap; }
.pill.pro { background: var(--accent-tint); color: var(--accent); }
.pill.biz, .pill.ent { background: var(--amber-tint); color: var(--amber-ink); }
.pill.free { background: var(--green-tint); color: var(--green-ink); }

/* the long Bulgarian menu needs a second row between the phone menu and a wide screen */
@media (min-width: 900px) and (max-width: 1239px) {
  :root { --top-h: 156px; }
  .mm-row { flex-wrap: wrap; height: auto; }
  .mm-btn { min-height: 44px; }
}
/* 200 % zoom on a phone: a long word yields, the page never scrolls sideways */
body { overflow-wrap: break-word; }
.layout > * { min-width: 0; }
.side-d summary { flex-wrap: wrap; }

/* hover only where a real pointer can: a tap leaves no stuck state */
@media (hover: hover) and (pointer: fine) {
  a:hover { text-decoration-thickness: 2px; }
  .lang:hover { background: var(--sunk); }
  .icon-btn:hover { background: var(--sunk); color: var(--ink); }
  .mm-btn:hover { color: var(--ink); }
  .mm-list a:hover { background: var(--sunk); }
  .side a:hover { background: var(--sunk); color: var(--ink); }
  .toc a:hover { color: var(--ink); }
  .crumbs a:hover { color: var(--accent); text-decoration: underline; }
  .copy:hover { background: rgba(255,255,255,.14); color: #fff; }
  .copy:hover span { display: inline; }
  .pn a:hover { border-color: var(--accent); box-shadow: var(--shadow-1); }
  .glist a:hover .gl-t { color: var(--accent); }
  .start a:hover { border-color: var(--accent); }
  .hg h2 a:hover { color: var(--accent); }
  .hg li a:hover { color: var(--accent); }
  .r:hover { background: var(--sunk); }
}
