/* =====================================================================
   help.css: loaded after the cabinet's own /core/css/core.css and /core/css/fa.css (common/header.php).
   Every class here starts with help-. The rest of the markup uses core.css classes the way the cabinet does:
   main-header, logo, sidebar-toggle, main-sidebar, sidebar-menu, treeview-menu, content-wrapper, content-header,
   breadcrumb, section-label, table, btn, label, modal, main-footer, fa.
   Colours, radii, shadows and control heights come only from core.css tokens
   (--c-*, --accent*, --header-*, --sidebar-*, --radius*, --shadow-*, --h-*).
   No hue literal and no prefers-color-scheme block: light/dark and the colour scheme (body.skin-*) arrive through
   the tokens. The one colour value is the neutral black backdrop of an enlarged screenshot, rgba(0,0,0,...), as in
   core.css. Breakpoints are core's: 767 / 991 / 1199. Design: docs/design/ui.md.
   ===================================================================== */

/* --- Help-only sizes --- */
.help-body {
  --help-page-w: 1244px;          /* article 1000 + gap 24 + on-page TOC 220 */
  --help-toc-w: 220px;
  --help-anchor: calc(var(--header-h) + 16px);   /* scroll-margin-top of every anchor target: clear of the fixed header */
  --help-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}
.help-body [hidden] { display: none !important; }
.help-body code { color: var(--c-text); }            /* core paints inline code red; docs have too much of it */
.help-body .section-label { scroll-margin-top: var(--help-anchor); }   /* #manual, #api on the home page */
.help-muted { color: var(--c-text-muted); }
.help-container { max-width: var(--help-page-w); }
.help-body .content-header h1 { font-size: 24px; text-wrap: balance; }
.help-intro { margin: -4px 0 6px; font-size: 15.5px; line-height: 1.6; color: var(--c-text-muted); }

/* --- Header: brand, search button, language, cabinet --- */
.help-header .navbar { gap: 10px; padding-left: 20px; }
.help-menu-btn, .help-brand { display: none; }
.help-brand { min-width: 0; height: var(--header-h); padding: 0 4px; overflow: hidden; text-overflow: ellipsis; line-height: var(--header-h); color: var(--header-text-on); font-size: 16px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.help-brand:hover { color: var(--header-text-on); text-decoration: none; }

/* The header only holds the button that opens the search window (below); with JS off it is not shown. */
.help-search { flex: 0 1 360px; min-width: 0; }
.help-search-open { display: flex; align-items: center; gap: 9px; width: 100%; height: var(--h-md); padding: 0 8px 0 11px; font: inherit; font-size: 13px; text-align: left; color: var(--header-text); background: var(--header-item-hover); border: 1px solid transparent; border-radius: var(--radius); cursor: pointer; appearance: none; -webkit-appearance: none; transition: background .15s, color .15s; }
.help-search-open:hover { color: var(--header-text-on); }
.help-search-open:focus-visible { outline: 2px solid var(--header-text-on); outline-offset: 2px; }
.help-search-open .fa { flex: none; font-size: 13px; }
.help-search-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-search-open kbd { flex: none; padding: 0 6px; font: 11px/16px var(--help-mono); color: inherit; border: 1px solid currentColor; border-radius: var(--radius-sm); opacity: .75; }

/* --- Search window: core's .modal + .modal-dialog, shown by adding .in (as on the manuals site) --- */
.help-search-modal { padding: 10vh 20px 20px; overscroll-behavior: contain; }
.help-search-dialog { display: flex; flex-direction: column; max-width: 660px; max-height: min(78vh, 620px); overflow: hidden; }
.help-search-form { display: flex; flex: none; align-items: center; gap: 10px; height: 54px; margin: 0; padding: 0 12px 0 16px; border-bottom: 1px solid var(--c-border); }
.help-search-icon { flex: none; font-size: 15px; color: var(--c-text-muted); }
.help-search-input { flex: 1; min-width: 0; height: 100%; padding: 0; font: inherit; font-size: 16px; color: var(--c-text); background: none; border: 0; border-radius: 0; box-shadow: none; outline: none; appearance: none; -webkit-appearance: none; }
.help-search-input::placeholder { color: var(--c-text-subtle); opacity: 1; }
.help-search-input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
.help-search-close { display: inline-flex; flex: none; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 2px; color: var(--c-text-muted); background: none; border: 0; border-radius: var(--radius); font-size: 15px; cursor: pointer; }
.help-search-close:hover { background: var(--c-surface-alt); }
.help-search-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.help-search-close .fa { display: none; }

.help-sr { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 6px 0; overscroll-behavior: contain; }
.help-sr-group { padding: 8px 16px 4px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c-text-muted); }
.help-sr-item { display: block; padding: 8px 16px 8px 13px; border-left: 3px solid transparent; color: var(--c-text); text-decoration: none; }
.help-sr-item:hover, .help-sr-item.help-is-active { background: var(--c-surface-alt); border-left-color: var(--accent); color: var(--c-text); text-decoration: none; }
.help-sr-title { display: block; font-size: 14px; font-weight: 500; line-height: 1.35; }
.help-sr-path { display: block; margin-top: 1px; font-size: 11.5px; color: var(--c-text-muted); }
.help-sr-text { display: -webkit-box; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--c-text-muted); overflow: hidden; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.help-sr mark { background: var(--accent-light); color: inherit; border-radius: 2px; box-shadow: 0 1px 0 var(--c-link); }
.help-sr-empty { padding: 18px 16px; font-size: 13.5px; line-height: 1.5; color: var(--c-text-muted); }
.help-sr-foot { display: flex; flex: none; flex-wrap: wrap; gap: 4px 16px; padding: 8px 16px; border-top: 1px solid var(--c-border); background: var(--c-surface-alt); font-size: 11.5px; color: var(--c-text-muted); }
.help-kbd { display: inline-block; min-width: 18px; margin-right: 2px; padding: 0 4px; font: 10.5px/16px var(--help-mono); text-align: center; color: var(--c-text-muted); background: var(--c-surface); border: 1px solid var(--c-border-strong); border-bottom-width: 2px; border-radius: var(--radius-sm); }

.help-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.help-lang { display: inline-flex; padding: 2px; border-radius: var(--radius); background: var(--header-item-hover); }
.help-lang a { display: inline-flex; align-items: center; height: 26px; padding: 0 9px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; letter-spacing: .04em; color: var(--header-text); text-decoration: none; }
.help-lang a:hover { color: var(--header-text-on); text-decoration: none; }
.help-lang a[aria-current] { background: var(--header-bg); color: var(--header-text-on); box-shadow: var(--shadow-sm); }
.help-cabinet { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: var(--radius); background: var(--header-item-hover); color: var(--header-text-on); font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background .12s; }
.help-lang a:not([href]) { opacity: .45; cursor: default; }
.help-lang a:not([href]):hover { color: var(--header-text); }
.help-cabinet:hover { background: var(--header-logo-hover); color: var(--header-text-on); text-decoration: none; }
.help-cabinet:focus-visible, .help-lang a:focus-visible { outline: 2px solid var(--header-text-on); outline-offset: 1px; }

/* --- Navigation tree: core's sidebar, a few reading tweaks --- */
.help-nav .sidebar-menu > li > a { white-space: normal; line-height: 1.35; }
.help-nav .treeview-menu > li > a { line-height: 1.4; }
.help-nav .treeview-menu > li.active > a { color: var(--sidebar-text-active); font-weight: 500; box-shadow: inset 3px 0 0 var(--accent); }
.help-nav .sidebar-menu > li.active:not(.menu-open) > .treeview-menu { display: none; }
.help-nav .sidebar-menu > li.active:not(.menu-open) > a .fa-angle-left { transform: none; opacity: .5; }

/* --- Page grid and article --- */
.help-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.help-article {
  min-width: 0; padding: 28px 40px 36px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  font-size: var(--font-size); line-height: 1.65;   /* the cabinet's own text size (core token, 14px) */
}
.help-article p { margin: 0 0 14px; }
.help-article li { margin-bottom: 6px; }
.help-lead { font-size: 16.5px; line-height: 1.6; color: var(--c-text-muted); margin-bottom: 22px; }
.help-article h2 { position: relative; margin: 40px 0 12px; font-size: 21px; text-wrap: balance; scroll-margin-top: var(--help-anchor); }
.help-article h3 { margin: 28px 0 10px; font-size: 16px; scroll-margin-top: var(--help-anchor); }
.help-article > :first-child, .help-article h2:first-child { margin-top: 0; }
.help-anchor { margin-left: 8px; font-weight: 400; color: var(--c-text-subtle); text-decoration: none; opacity: 0; transition: opacity .12s; }
.help-article h2:hover .help-anchor, .help-article h3:hover .help-anchor, .help-anchor:focus-visible { opacity: 1; }
.help-anchor:hover { color: var(--c-link); text-decoration: none; }
.help-article code { padding: 1px 5px; font-size: 13px; overflow-wrap: anywhere; }
.help-ui { display: inline-block; padding: 0 6px; font-size: 13px; font-weight: 600; line-height: 1.6; color: var(--c-text); white-space: nowrap; background: var(--c-surface-alt); border: 1px solid var(--c-border-strong); border-radius: var(--radius-sm); }

/* --- Numbered steps: the accent marks the order --- */
.help-steps { list-style: none; counter-reset: help-step; margin: 10px 0 26px; padding: 0; }
.help-steps > li { position: relative; counter-increment: help-step; margin: 0; padding: 0 0 20px 44px; }
.help-steps > li::before {
  content: counter(help-step); position: absolute; left: 0; top: 0;
  display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.help-steps > li::after { content: ""; position: absolute; left: 13.5px; top: 34px; bottom: 6px; width: 1px; background: var(--c-border); }
.help-steps > li:last-child { padding-bottom: 0; }
.help-steps > li:last-child::after { display: none; }
.help-step-title { display: block; margin: 2px 0 4px; font-size: 15px; font-weight: 600; line-height: 1.45; }
.help-steps > li > p { margin-bottom: 8px; }

/* --- Screenshot figure: a framed card centred in the article. The shot lies on a mat inside a hairline edge, the
       caption is a strip of the same card. The frame is CSS only, the PNG stays as taken; shots are dark-theme, so the
       frame insets them on the light page and parts them from the dark one. A click enlarges (help.js). --- */
.help-figure {
  --help-fig-pad: 10px;           /* the mat around the shot */
  --help-fig-r: var(--radius);    /* the image's corners; the card's are this plus the mat, so both curves are concentric */
  --help-fig-inset: 24px;         /* how far a wide card stays inside the text column on each side */
  display: flex; flex-direction: column; align-items: center;
  width: -moz-fit-content; width: fit-content; min-width: min(100%, 360px); max-width: calc(100% - 2 * var(--help-fig-inset));
  margin: 22px auto 26px;
  background: var(--c-surface-alt); border: 1px solid var(--c-border);
  border-radius: calc(var(--help-fig-r) + var(--help-fig-pad)); box-shadow: var(--shadow-lg);
  transition: border-color .15s;
}
/* The link wraps exactly the image box: the markers are placed in percent of it. Nothing clips (no overflow), so a
   marker at an edge stands out over the mat; the rounding is the image's own. */
.help-shot { position: relative; isolation: isolate; display: block; min-width: 0; margin: var(--help-fig-pad); border-radius: var(--help-fig-r); cursor: zoom-in; }
.help-shot > img { display: block; max-width: 100%; height: auto; border-radius: var(--help-fig-r); box-shadow: 0 0 0 1px var(--c-border); }
.help-shot:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.help-figure:has(> .help-shot:hover) { border-color: var(--accent); }
/* The enlarge cue: a small magnifier chip in the image's top right corner on hover or focus, under any marker.
   On a very short strip it shrinks to the strip's height. */
.help-shot::after {
  content: "\f00e"; position: absolute; top: clamp(4px, calc(50% - 14px), 8px); right: 8px;
  display: flex; align-items: center; justify-content: center; height: min(28px, calc(100% - 8px)); aspect-ratio: 1;
  font-family: var(--fa-style-family, "Font Awesome 6 Free"); font-weight: 900; font-size: 12px; line-height: 1;
  color: var(--c-text); background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-md);
  opacity: 0; pointer-events: none; transition: opacity .15s;
}
.help-shot:hover::after, .help-shot:focus-visible::after { opacity: .94; }
/* Optional numbered markers, only on a busy screenshot: one span per step right after the image, positioned in
   PERCENT of the image (style="left:X%;top:Y%" = centre of the marker), so they scale with it and a retaken shot
   needs no redrawing. The ring is the one fixed light token, so the marker reads on the dark shot in both themes.
   `line-height: 1` and `min-height: 0` keep the digit's line from outgrowing the aspect-ratio box: a marker is always a circle. */
.help-shot-mark {
  position: absolute; z-index: 1; transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center; width: clamp(18px, 2.6%, 26px); aspect-ratio: 1; min-height: 0; line-height: 1;
  border-radius: 50%; background: var(--accent); color: var(--accent-text);
  font-size: clamp(10px, 1.3vw, 13px); font-weight: 700; box-shadow: 0 0 0 2px var(--c-text-inv);
}
/* The place of a shot not yet taken (draft build only): on the mat, a dashed box in the border colour with the small
   muted label above the instruction text of the `todo`; the caption strip follows as under a real shot. */
.help-shot-todo { align-self: stretch; min-width: 0; margin: var(--help-fig-pad); padding: 14px 16px 16px; border: 1px dashed var(--c-border-strong); border-radius: var(--help-fig-r); background: var(--c-surface); color: var(--c-text); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.help-shot-todo > span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; color: var(--c-text-muted); }
/* The caption strip: as wide as the card whatever its text (no width of its own: contain), under a hairline. */
.help-figure figcaption {
  align-self: stretch; contain: inline-size; padding: 9px 16px 10px; border-top: 1px solid var(--c-border);
  font-size: 13px; line-height: 1.5; text-align: center; text-wrap: balance; color: var(--c-text-muted);
}
.help-figure figcaption:only-child { border-top: 0; }
.help-figure figcaption b { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: var(--radius-sm); background: var(--accent-light); color: var(--c-link); font-size: 11.5px; font-weight: 700; line-height: 19px; letter-spacing: .02em; white-space: nowrap; }
/* The enlarged view: the bare image and its markers at 1:1, never upscaled, capped by the window's width;
   a shot taller than the window scrolls (auto margins centre it without cutting its top). */
.help-zoom { position: fixed; inset: 0; z-index: 1060; display: flex; overflow: auto; padding: 24px; background: rgba(0,0,0,.72); cursor: zoom-out; overscroll-behavior: contain; }
.help-zoom-in { position: relative; width: -moz-fit-content; width: fit-content; max-width: 100%; margin: auto; }
.help-zoom-in > img { display: block; max-width: 100%; height: auto; }
.help-zoom:focus { outline: none; }
.help-zoom-close { position: fixed; top: 12px; right: 12px; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; font-size: 16px; color: var(--c-text); background: var(--c-surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow-md); cursor: pointer; }
.help-zoom-close:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Callouts: tinted, quiet; the icon carries the type --- */
.help-callout { position: relative; margin: 18px 0; padding: 12px 16px 12px 44px; background: var(--c-info-bg); border: 1px solid var(--c-info-border); border-radius: var(--radius); color: var(--c-text); font-size: 14px; line-height: 1.55; }
.help-callout::before { content: "\f05a"; position: absolute; left: 16px; top: 12px; font-family: var(--fa-style-family, "Font Awesome 6 Free"); font-weight: 900; font-size: 15px; line-height: 1.45; color: var(--c-info-fg); }
.help-article .help-callout p { margin: 0 0 6px; }
.help-callout > :last-child { margin-bottom: 0; }
.help-callout-title { display: block; margin-bottom: 2px; font-weight: 600; }
.help-callout-warning { background: var(--c-warning-bg); border-color: var(--c-warning-border); }
.help-callout-warning::before { content: "\f071"; color: var(--c-warning-fg); }
.help-callout-tip { background: var(--c-success-bg); border-color: var(--c-success-border); }
.help-callout-tip::before { content: "\f0eb"; color: var(--c-success-fg); }
.help-callout-key { background: var(--accent-light); border-color: var(--c-border); }
.help-callout-key::before { content: "\f084"; color: var(--c-link); }

/* --- Tables: core .table in a scrolling frame, left-aligned for reading --- */
.help-table { margin: 12px 0 22px; overflow-x: auto; -webkit-overflow-scrolling: touch; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); }
.help-table .table { margin: 0; font-size: 13px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.help-table .table th { text-align: left; padding: 8px 12px; }
.help-table .table td { height: auto; padding: 8px 12px; vertical-align: top; }
.help-table .table code { white-space: nowrap; font-size: 12.5px; }
.help-table-cap { margin: -14px 0 22px; font-size: 12.5px; color: var(--c-text-muted); }
.help-type { font-family: var(--help-mono); font-size: 12px; color: var(--c-text-muted); white-space: nowrap; }
.help-req { font-size: 11px; font-weight: 700; letter-spacing: .03em; color: var(--c-danger-fg); white-space: nowrap; }
.help-opt { color: var(--c-text-subtle); }
.help-alias { display: block; margin-top: 2px; font-size: 12px; color: var(--c-text-muted); }

/* --- Code blocks: header strip with language or tabs, copy button --- */
.help-code { margin: 10px 0 22px; overflow: hidden; background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); }
.help-code-head { display: flex; align-items: center; gap: 2px; min-height: 38px; padding: 0 8px 0 12px; background: var(--c-surface); border-bottom: 1px solid var(--c-border); }
.help-code-lang { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-muted); }
.help-tab { height: 38px; margin: 0 0 -1px; padding: 0 10px; font: inherit; font-size: 12.5px; font-weight: 500; color: var(--c-text-muted); background: none; border: 0; border-bottom: 2px solid transparent; cursor: pointer; appearance: none; }
.help-tab:hover { color: var(--c-text); }
.help-tab[aria-selected="true"] { color: var(--c-text); border-bottom-color: var(--accent); }
.help-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; border-radius: var(--radius-sm); }
.help-copy { width: var(--h-xs); margin-left: auto; padding: 0; }   /* icon only: a square, no label padding */
.help-copy.help-is-done { color: var(--c-success-fg); border-color: var(--c-success-border); }
.help-code pre { max-height: 520px; margin: 0; padding: 14px 16px; background: none; border: 0; border-radius: 0; font-size: 12.5px; line-height: 1.6; tab-size: 2; }
.help-code pre code { padding: 0; background: none; border: 0; font-size: inherit; color: var(--c-text); }
.help-code pre.help-wrap { white-space: pre-wrap; overflow-wrap: anywhere; }
.help-k { color: var(--c-primary-fg); }   /* keys, parameter names, keywords */
.help-s { color: var(--c-success-fg); }   /* strings */
.help-n { color: var(--c-orange); }       /* numbers, booleans */
.help-c { color: var(--c-text-muted); font-style: italic; }   /* comments */

/* --- API: basics and endpoint blocks --- */
.help-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 12px 0 8px; padding: 14px 16px; background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 14px; line-height: 1.5; }
.help-facts dt { padding-top: 1px; font-size: 12px; font-weight: 600; color: var(--c-text-muted); }
.help-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.help-ep { margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--c-border); }
.help-article h2.help-ep-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin: 0 0 14px; }
.help-article .help-ep-name { padding: 0; font-family: var(--help-mono); font-size: 20px; font-weight: 600; color: var(--c-text); background: none; border: 0; }
.help-ep-sub { font-size: 16px; font-weight: 500; color: var(--c-text-muted); }
.help-ep-url { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; padding: 7px 8px 7px 10px; background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); }
.help-ep-url code { flex: 1 1 280px; min-width: 0; padding: 0; font-size: 13px; color: var(--c-text); background: none; border: 0; overflow-wrap: anywhere; }
.help-method { font-family: var(--help-mono); letter-spacing: .04em; }

/* --- The reader's API token --- */
.help-token { color: var(--c-link); font-weight: 600; white-space: nowrap; }
.help-guest .help-token { border-bottom: 1px dashed currentColor; }
.help-user .help-token { padding: 0 4px; border-radius: var(--radius-sm); background: var(--accent-light); }
.help-guest .help-if-user, .help-user .help-if-guest { display: none !important; }

/* --- On-page table of contents --- */
.help-toc { display: none; position: sticky; top: calc(var(--header-h) + 20px); max-height: calc(100vh - var(--header-h) - 40px); overflow-y: auto; padding-top: 4px; font-size: 13px; }
.help-toc-title { display: flex; align-items: center; gap: 7px; margin: 0 0 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-muted); }
.help-toc ul { list-style: none; margin: 0; padding: 0; }
.help-toc > ul { border-left: 1px solid var(--c-border); }
.help-toc a { display: block; margin-left: -1px; padding: 5px 0 5px 14px; border-left: 2px solid transparent; line-height: 1.4; color: var(--c-text-muted); text-decoration: none; }
.help-toc a:hover { color: var(--c-text); text-decoration: none; }
.help-toc a.help-is-active { color: var(--c-text); font-weight: 500; border-left-color: var(--accent); }
.help-toc ul ul a { padding: 3px 0 3px 26px; font-size: 12.5px; }
.help-toc-code { font-family: var(--help-mono); font-size: 12.5px; }
.help-toc-inline { margin: 0 0 22px; background: var(--c-surface-alt); border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 14px; }
.help-toc-inline summary { display: flex; align-items: center; gap: 8px; padding: 10px 14px; font-weight: 600; cursor: pointer; list-style: none; }
.help-toc-inline summary::-webkit-details-marker { display: none; }
.help-toc-inline summary::after { content: "\f107"; margin-left: auto; font-family: var(--fa-style-family, "Font Awesome 6 Free"); font-weight: 900; color: var(--c-text-muted); transition: transform .15s; }
.help-toc-inline[open] summary::after { transform: rotate(180deg); }
.help-toc-inline summary .fa { color: var(--c-text-muted); }
.help-toc-inline ul { margin: 0; padding: 0 14px 12px 36px; }
.help-toc-inline li { margin: 3px 0; }
.help-toc-inline ul ul { padding: 0 0 0 16px; }

/* --- Previous / next --- */
.help-pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--c-border); }
.help-pager a { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border: 1px solid var(--c-border); border-radius: var(--radius); color: var(--c-text); text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.help-pager a:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); color: var(--c-text); text-decoration: none; }
.help-pager span { font-size: 12px; color: var(--c-text-muted); }
.help-pager b { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--c-link); }
.help-pager-next { grid-column: 2; text-align: right; }

/* --- Home --- */
.help-start { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; list-style: none; counter-reset: help-step; margin: 0 0 6px; padding: 0; }
.help-start > li { counter-increment: help-step; margin: 0; }
.help-start a { position: relative; display: block; height: 100%; padding: 14px 14px 14px 54px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); color: var(--c-text); text-decoration: none; transition: border-color .12s; }
.help-start a::before { content: counter(help-step); position: absolute; left: 14px; top: 14px; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: 13px; font-weight: 700; }
.help-start a:hover { border-color: var(--accent); color: var(--c-text); text-decoration: none; }
.help-start b { display: block; font-size: 14px; font-weight: 600; line-height: 1.35; }
.help-start span { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.45; color: var(--c-text-muted); }
.help-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0 0 6px; }
.help-card { display: flex; flex-direction: column; min-width: 0; padding: 16px 18px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.help-card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.help-card-icon { display: flex; flex: none; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); background: var(--accent-light); color: var(--c-link); font-size: 14px; }
.help-card-title { margin: 0; font-size: 15px; font-weight: 600; }
.help-card-title a { color: var(--c-text); }
.help-card-title a:hover { color: var(--c-link); }
.help-card p { margin: 0 0 10px; font-size: 13px; line-height: 1.5; color: var(--c-text-muted); }
.help-card ul { margin: 0; padding: 0; list-style: none; font-size: 13.5px; }
.help-card li { padding: 3px 0; }
.help-card-eps { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; }
.help-card-eps code { font-size: 12px; }
.help-apibar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; margin: 0 0 16px; padding: 12px 16px; background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); font-size: 13.5px; }
.help-apibar-k { margin-right: 6px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--c-text-muted); }

/* --- Footer --- */
.help-footer-in { max-width: var(--help-page-w); }

/* --- Desktop: the on-page TOC becomes a third column --- */
@media (min-width: 1200px) {
  .help-page.help-has-toc { grid-template-columns: minmax(0, 1fr) var(--help-toc-w); }
  .help-toc { display: block; }
  .help-toc-inline { display: none; }
}
@media (max-width: 1199px) {
  .help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-start { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .help-article { padding: 24px 28px 30px; }
  .help-figure { --help-fig-inset: 16px; }
}

/* --- Phone: off-canvas tree (core's body.sidebar-open), search behind an icon, search window full screen --- */
@media (max-width: 767px) {
  .help-header .navbar { gap: 2px; padding: 0 6px 0 2px; }
  .help-menu-btn { display: inline-flex; margin-right: 0; }
  .help-brand { display: block; }
  .help-search { flex: 0 0 auto; margin-left: auto; }
  .help-search-open { justify-content: center; width: 36px; padding: 0; background: none; font-size: 15px; }
  .help-search-open:hover { background: var(--header-item-hover); }
  .help-search-open .fa { font-size: 15px; }
  .help-search-label, .help-search-open kbd, .help-sr-foot { display: none; }
  .help-search-modal { padding: 0; }
  .help-search-dialog { max-width: none; height: 100%; max-height: none; border-radius: 0; box-shadow: none; }
  .help-search-form { height: var(--header-h); padding: 0 6px 0 14px; }
  .help-search-close { width: 36px; height: 36px; }
  .help-search-close .help-kbd { display: none; }
  .help-search-close .fa { display: block; }
  .help-tools { gap: 4px; margin-left: 2px; }
  .help-cabinet { justify-content: center; width: 34px; padding: 0; }
  .help-cabinet span { display: none; }
  .help-body .content-header h1 { font-size: 21px; }
  .help-intro { font-size: 15px; }
  .help-article { padding: 18px 16px 22px; }
  .help-article h2 { margin-top: 32px; font-size: 19px; }
  .help-lead { font-size: 16px; }
  .help-steps > li { padding-left: 40px; }
  .help-figure { --help-fig-pad: 6px; --help-fig-r: var(--radius-sm); --help-fig-inset: 0px; margin: 18px auto 22px; }
  .help-figure figcaption { padding: 8px 10px 9px; font-size: 12.5px; }
  .help-callout { padding: 11px 14px 11px 40px; }
  .help-callout::before { left: 14px; top: 11px; }
  .help-code pre { padding: 12px; font-size: 12px; }
  .help-ep-url code { order: 3; flex-basis: 100%; }
  .help-article .help-ep-name { font-size: 18px; }
  .help-facts { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .help-facts dd { margin-bottom: 10px; }
  .help-facts dd:last-child { margin-bottom: 0; }
  .help-pager { grid-template-columns: minmax(0, 1fr); }
  .help-pager-next { grid-column: auto; }
  .help-cards, .help-start { grid-template-columns: minmax(0, 1fr); }
  /* parameter tables fold into one card per row */
  .help-params thead { display: none; }
  .help-params, .help-params tbody { display: block; }
  .help-params tr { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--c-border); }
  .help-params tr:last-child { border-bottom: 0; }
  .help-params td, .help-table .help-params td { display: block; height: auto; padding: 0; background: none; border: 0; }
  .help-params td:last-child { flex-basis: 100%; }
}
/* --- Without JS: html.help-no-js (the first inline script in <head> removes it). Search and the burger are
       absent, the help stays readable; on phones the navigation tree is a plain block above the article. --- */
.help-no-js .help-search, .help-no-js .help-menu-btn, .help-no-js .help-search-modal { display: none !important; }
@media (max-width: 767px) {
  .help-no-js .help-tools { margin-left: auto; }
  .help-no-js .main-sidebar { position: static; transform: none; width: auto; margin-top: var(--header-h); overflow: visible; border-right: 0; border-bottom: 1px solid var(--sidebar-border); }
  .help-no-js .content-wrapper { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .help-body *, .help-body *::before, .help-body *::after { transition: none !important; animation: none !important; }
}
