/* Help site. Self-contained: no external font, image or script. Colours and fonts follow the product kit
   (plinth-fe tokens.css): neutral surfaces, one iris accent, system font stack. */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI Variable Text", "Segoe UI", "Inter", "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Noto Sans Mono", "DejaVu Sans Mono", monospace;
  --bg: #fdfdfe;
  --raised: #ffffff;
  --sunken: #f4f5f8;
  --fg: #1b1d24;
  --muted: #5b6072;
  --line: #dfe1e8;
  --line-strong: #c6c9d4;
  --accent: #5546e0;
  --accent-tint: #ecebfd;
  --warn: #8a5300;
  --warn-tint: #fdf3dc;
  --mark: #fff0a8;
  --shadow: 0 8px 28px rgb(20 22 40 / 0.14);
  --top: 3.5rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161b;
    --raised: #1a1d24;
    --sunken: #101216;
    --fg: #f1f2f5;
    --muted: #a3a8b8;
    --line: #2b2f3a;
    --line-strong: #3d4250;
    --accent: #a9a1ff;
    --accent-tint: #26244a;
    --warn: #f0c060;
    --warn-tint: #33290f;
    --mark: #5c5200;
    --shadow: 0 8px 28px rgb(0 0 0 / 0.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 1rem); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 1rem/1.6 var(--font); }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999rem; top: 0.5rem; z-index: 30; padding: 0.5rem 0.75rem; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 6px; }
.skip:focus { left: 0.5rem; }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem; min-height: var(--top); padding: 0.5rem 1rem; background: var(--raised); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--fg); text-decoration: none; font-weight: 650; margin: 0; }
.brand__mark { display: block; width: 1.75rem; height: 1.75rem; }
.brand__sub { color: var(--muted); font-weight: 500; }
.top__menu, .btn { font: inherit; color: var(--fg); background: var(--raised); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.35rem 0.75rem; cursor: pointer; text-decoration: none; display: inline-block; }
.top__menu:hover, .btn:hover { background: var(--sunken); }
.top__lang { margin-left: auto; white-space: nowrap; font-weight: 550; }

/* search */
.search { position: relative; flex: 1 1 14rem; max-width: 34rem; margin: 0 auto; }
.search__input { width: 100%; font: inherit; color: var(--fg); background: var(--sunken); border: 1px solid var(--line-strong); border-radius: 8px; padding: 0.45rem 0.75rem; }
.search__input::placeholder { color: var(--muted); opacity: 1; }
.search__results { position: absolute; left: 0; right: 0; top: calc(100% + 0.4rem); max-height: min(70vh, 34rem); overflow: auto; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow); padding: 0.35rem; }
.search__results ul { list-style: none; margin: 0; padding: 0; }
.search__hit { display: block; padding: 0.5rem 0.65rem; border-radius: 7px; color: var(--fg); text-decoration: none; }
.search__hit:hover, .search__hit:focus-visible, .search__hit[aria-current="true"] { background: var(--accent-tint); }
.search__where { display: block; font-weight: 600; }
.search__where span { color: var(--muted); font-weight: 500; }
.search__snippet { display: block; color: var(--muted); font-size: 0.925rem; overflow-wrap: anywhere; }
.search__msg { margin: 0; padding: 0.6rem 0.65rem; color: var(--muted); }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 0.1em; }

/* layout */
.layout { display: grid; grid-template-columns: 16.5rem minmax(0, 1fr); max-width: 92rem; margin: 0 auto; }
.nav { position: sticky; top: var(--top); align-self: start; max-height: calc(100vh - var(--top)); overflow: auto; padding: 1rem 0.75rem 2rem 1rem; border-right: 1px solid var(--line); }
.nav__label { margin: 1.1rem 0 0.25rem; padding: 0 0.6rem; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.nav__list { list-style: none; margin: 0; padding: 0; }
.nav__link { display: block; padding: 0.3rem 0.6rem; border-radius: 7px; color: var(--fg); text-decoration: none; }
.nav__link:hover { background: var(--sunken); }
.nav__link[aria-current="page"] { background: var(--accent-tint); color: var(--accent); font-weight: 600; }
.main { min-width: 0; padding: 1.5rem 2rem 4rem; overflow-wrap: break-word; }
.main:focus { outline: none; }

/* start page */
.hero__title { margin: 0.5rem 0 0.25rem; font-size: 2rem; line-height: 1.2; }
.hero__lead { margin: 0 0 1.5rem; color: var(--muted); font-size: 1.1rem; max-width: 46rem; }
.tiles__title { margin: 1.75rem 0 0.6rem; font-size: 1.15rem; }
.tiles__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); gap: 0.75rem; }
.tile { display: flex; flex-direction: column; gap: 0.25rem; height: 100%; padding: 0.9rem 1rem; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; color: var(--fg); text-decoration: none; }
.tile:hover { border-color: var(--accent); }
.tile__title { font-weight: 650; color: var(--accent); }
.tile__text { color: var(--muted); font-size: 0.95rem; line-height: 1.45; }

/* page */
.doc { display: grid; grid-template-columns: minmax(0, 46rem) 15rem; column-gap: 2.5rem; align-items: start; }
.doc > * { grid-column: 1; min-width: 0; }
.doc h1 { margin: 0.5rem 0 0.25rem; font-size: 1.9rem; line-height: 1.2; }
.doc__lead { margin: 0 0 1rem; color: var(--muted); font-size: 1.1rem; }
.toc { grid-column: 2; grid-row: 1 / span 40; position: sticky; top: calc(var(--top) + 1rem); max-height: calc(100vh - var(--top) - 2rem); overflow: auto; padding-left: 1rem; border-left: 1px solid var(--line); font-size: 0.925rem; }
.toc__title { margin: 0 0 0.4rem; font-weight: 650; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0.3rem 0; line-height: 1.35; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }
.toc__sub { padding-left: 0.85rem; }
.doc__body h2 { margin: 2.25rem 0 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--line); font-size: 1.4rem; line-height: 1.25; }
.doc__body h3 { margin: 1.5rem 0 0.4rem; font-size: 1.125rem; line-height: 1.3; }
.doc__body p, .doc__body ul, .doc__body ol { margin: 0.6rem 0; }
.doc__body ul, .doc__body ol { padding-left: 1.4rem; }
.doc__body li { margin: 0.25rem 0; }
.doc__body li > p { margin: 0.25rem 0; }
.doc__body code { font: 0.9em var(--mono); background: var(--sunken); border: 1px solid var(--line); border-radius: 5px; padding: 0.05em 0.3em; overflow-wrap: anywhere; }
.doc__body pre { overflow-x: auto; background: var(--sunken); border: 1px solid var(--line); border-radius: 8px; padding: 0.75rem 1rem; }
.doc__body pre code { background: none; border: 0; padding: 0; overflow-wrap: normal; }
.doc__body blockquote { margin: 1rem 0; padding: 0.1rem 1rem; border-left: 3px solid var(--line-strong); color: var(--muted); }
.doc__body blockquote.callout { background: var(--accent-tint); border-left-color: var(--accent); border-radius: 0 8px 8px 0; color: var(--fg); }
.doc__body blockquote.callout--warn { background: var(--warn-tint); border-left-color: var(--warn); }
.doc__body blockquote.callout--warn strong:first-child { color: var(--warn); }
.table-wrap { overflow-x: auto; margin: 1rem 0; border: 1px solid var(--line); border-radius: 8px; }
.table-wrap table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.table-wrap th, .table-wrap td { padding: 0.5rem 0.75rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); min-width: 9rem; }
.table-wrap th { background: var(--sunken); font-weight: 650; }
.table-wrap tr:last-child td { border-bottom: 0; }
.clip { margin: 1.25rem 0; }
.clip video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: #000; border: 1px solid var(--line); border-radius: 10px; }
.clip figcaption { margin-top: 0.4rem; color: var(--muted); font-size: 0.925rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; max-width: 46rem; margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.pager__link { display: flex; flex-direction: column; text-decoration: none; font-weight: 600; }
.pager__link--next { text-align: right; margin-left: auto; }
.pager__hint { color: var(--muted); font-weight: 500; font-size: 0.875rem; }

/* root and 404 */
.plain { display: grid; place-items: center; min-height: 100vh; padding: 1rem; }
.plain__box { text-align: center; }
.plain__box h1 { font-size: 1.4rem; }
.plain .brand { font-size: 1.4rem; justify-content: center; }

/* medium: the table of contents moves above the text */
@media (max-width: 75rem) {
  .doc { display: block; }
  .toc { position: static; max-height: none; margin: 1rem 0; padding: 0.75rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: var(--raised); }
}
/* small: the navigation becomes a menu (button with script, a plain list at the page end without) */
@media (max-width: 56rem) {
  .layout { display: flex; flex-direction: column; }
  .main { order: 1; padding: 1rem 1rem 3rem; }
  .nav { order: 2; position: static; max-height: none; border-right: 0; border-top: 1px solid var(--line); padding: 1rem; }
  .js .top__menu { display: inline-block; }
  .js .nav { order: 0; display: none; border-top: 0; border-bottom: 1px solid var(--line); }
  .js .nav.is-open { display: block; }
  .top { flex-wrap: wrap; gap: 0.5rem; }
  .brand__sub { display: none; }
  .search { order: 5; flex-basis: 100%; max-width: none; }
  .hero__title, .doc h1 { font-size: 1.6rem; }
}
@media (min-width: 56.01rem) {
  .top__menu { display: none !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .top, .nav, .toc, .pager, .skip { display: none !important; }
  .layout, .doc { display: block; }
}
