/* Docs. Same galah palette and type as the landing page (public/index.html). */
:root {
  color-scheme: light;
  --sky: #f2f3f6; --sky-2: #e9ebf0; --paper: #ffffff; --line: #dfe1e7; --line-soft: #eaecf0;
  --ink: #191a21; --ink-2: #4d505b; --dove: #858996;
  --rose: #d13a6d; --rose-hi: #bd2f5f; --crest: #fbe3eb;
  --good: #14805a; --bad: #c9373d; --warn: #a86400; --band: #191a21; --on-rose: #ffffff;
  --code-bg: #191a21; --code-line: #2b2d35;
  --side-w: 272px; --top-h: 60px;
  --display: "Funnel Display", ui-sans-serif, system-ui, sans-serif;
  --text: "Funnel Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --sky: #111216; --sky-2: #1c1d23; --paper: #17181d; --line: #2b2d35; --line-soft: #23252c;
    --ink: #f1f1f4; --ink-2: #b5b7c0; --dove: #8a8d98;
    --rose: #ef6a96; --rose-hi: #f5809f; --crest: #3a1f2a;
    --good: #3fbf8f; --bad: #f07a7e; --warn: #e3a64a; --band: #0b0c0f; --on-rose: #1f0b14; --code-bg: #0c0d10; --code-line: #23252c;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --sky: #111216; --sky-2: #1c1d23; --paper: #17181d; --line: #2b2d35; --line-soft: #23252c;
  --ink: #f1f1f4; --ink-2: #b5b7c0; --dove: #8a8d98;
  --rose: #ef6a96; --rose-hi: #f5809f; --crest: #3a1f2a;
  --good: #3fbf8f; --bad: #f07a7e; --warn: #e3a64a; --band: #0b0c0f; --on-rose: #1f0b14; --code-bg: #0c0d10; --code-line: #23252c;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + 24px); scrollbar-gutter: stable; }
html, body { margin: 0; }
body { background: var(--sky); color: var(--ink); font: 16px/1.7 var(--text); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
svg { display: block; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spacer { flex: 1; }
kbd { font: 500 11.5px var(--text); color: var(--dove); padding: 1px 6px; border-radius: 5px; box-shadow: 0 0 0 1px var(--line); background: var(--sky); }

/* thin scrollbars that only show on hover */
.side, .toc, .search-results { scrollbar-width: thin; scrollbar-color: transparent transparent; }
.side:hover, .toc:hover, .search-results:hover { scrollbar-color: var(--line) transparent; }

/* a platform's logo, shown bare. Logos that vanish on dark backgrounds ship a .dark variant (fav-d). */
.fav { width: 18px; height: 18px; flex: none; object-fit: contain; }
.fav-d { display: none; }
.fav-none { color: var(--dove); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .fav-l { display: none; } :root:not([data-theme="light"]) .fav-d { display: block; } }
:root[data-theme="dark"] .fav-l { display: none; }
:root[data-theme="dark"] .fav-d { display: block; }

/* ---- top bar ---------------------------------------------------------------- */
.top { position: fixed; inset: 0 0 auto; z-index: 40; height: var(--top-h); display: flex; align-items: center; gap: 12px; padding: 0 20px;
  background: color-mix(in srgb, var(--sky) 86%, transparent); backdrop-filter: saturate(1.6) blur(14px); -webkit-backdrop-filter: saturate(1.6) blur(14px);
  box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px var(--display); letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 26px; height: 26px; }
.crumb { font: 500 15px var(--display); color: var(--dove); text-decoration: none; padding-left: 12px; box-shadow: -1px 0 0 var(--line); }
.crumb:hover { color: var(--ink); }
.search-btn { display: flex; align-items: center; gap: 10px; width: 300px; height: 36px; margin-left: calc(var(--side-w) - 196px); padding: 0 8px 0 12px;
  border: 0; border-radius: 10px; background: var(--paper); color: var(--dove); font-size: 14px; cursor: pointer; box-shadow: 0 0 0 1px var(--line); }
.search-btn:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rose) 50%, var(--line)); color: var(--ink-2); }
.search-btn svg { width: 15px; height: 15px; flex: none; }
.search-btn span { flex: 1; text-align: left; }
.top-link { font-size: 14.5px; color: var(--ink-2); text-decoration: none; }
.top-link:hover { color: var(--ink); }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--sky-2); color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.menu { display: none; margin-left: -8px; }
.btn { display: inline-flex; align-items: center; height: 36px; padding: 0 15px; border-radius: 999px; background: var(--ink); color: var(--sky);
  font: 600 14px/1 var(--text); text-decoration: none; white-space: nowrap; transition: transform .15s; }
.btn:hover { transform: translateY(-1px); }

/* ---- sidebar: pinned to the left edge, scrolls on its own --------------------- */
/* One 12px gutter everywhere: group headings, links and the highlight all share the same left edge. */
.side { position: fixed; top: var(--top-h); left: 0; bottom: 0; z-index: 30; width: var(--side-w); overflow-y: auto; overscroll-behavior: contain;
  padding: 16px 12px 48px; box-shadow: 1px 0 0 var(--line); background: var(--sky); }
.side-group + .side-group { margin-top: 4px; }
.side-group summary { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px; border-radius: 8px; cursor: pointer; list-style: none; user-select: none;
  font: 600 13.5px var(--text); color: var(--ink); }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary:hover { background: var(--sky-2); }
.side-group .count { margin-left: auto; font-weight: 500; font-size: 12px; color: var(--dove); }
.side-group .chev { width: 14px; height: 14px; color: var(--dove); transition: transform .2s ease; }
.side-group[open] .chev { transform: rotate(90deg); }
.side ul { list-style: none; margin: 2px 0 10px; padding: 0; }
.side li { margin: 0; }
.side li a { display: flex; align-items: center; gap: 10px; min-height: 32px; padding: 5px 10px; border-radius: 8px; font-size: 14px; line-height: 1.35;
  color: var(--ink-2); text-decoration: none; }
.side li a:hover { color: var(--ink); background: var(--sky-2); }
.side li a[aria-current="page"] { color: var(--rose); font-weight: 600; background: color-mix(in srgb, var(--rose) 10%, transparent); }

/* ---- main column: article centred between the sidebar and "On this page" ------ */
.main { margin-left: var(--side-w); padding: calc(var(--top-h) + 48px) 48px 64px; display: flex; justify-content: center; gap: 64px; }
.doc { flex: 1; min-width: 0; max-width: 740px; }
.doc.loading { opacity: .55; transition: opacity .2s .1s; }
.toc { position: sticky; top: calc(var(--top-h) + 48px); align-self: flex-start; flex: none; width: 216px; max-height: calc(100dvh - var(--top-h) - 72px); overflow-y: auto; font-size: 13.5px; }
.toc p { margin: 0 0 8px; font-weight: 600; color: var(--ink); font-size: 13px; }
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 0; color: var(--dove); text-decoration: none; line-height: 1.4; transition: color .15s; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--rose); font-weight: 600; }

/* ---- article ------------------------------------------------------------------ */
.eyebrow { margin: 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--rose); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; text-wrap: balance; position: relative; scroll-margin-top: calc(var(--top-h) + 24px); }
h1 { display: flex; align-items: center; gap: 16px; font-size: clamp(34px, 4vw, 44px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 14px; }
h1 .fav { width: 40px; height: 40px; }
h2 { font-size: 25px; line-height: 1.2; letter-spacing: -0.025em; margin: 56px 0 14px; }
h3 { font-size: 18.5px; line-height: 1.3; letter-spacing: -0.015em; margin: 32px 0 8px; }
h4 { font-size: 16px; margin: 24px 0 6px; }
.anchor { position: absolute; left: -24px; width: 24px; color: var(--dove); text-decoration: none; opacity: 0; font-weight: 400; transition: opacity .15s; }
h2:hover .anchor, h3:hover .anchor { opacity: 1; }
.doc article > h1 + p { font-size: 18.5px; line-height: 1.6; color: var(--ink-2); margin-bottom: 28px; }
p { margin: 0 0 16px; text-wrap: pretty; }
article a { color: var(--rose); text-decoration-thickness: 1px; text-underline-offset: 3px; }
article a:hover { color: var(--rose-hi); }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin: 4px 0; }
li::marker { color: var(--dove); }
strong { font-weight: 600; }
em { color: var(--ink); }
hr { border: 0; height: 1px; background: var(--line); margin: 40px 0; }

code { font: 500 .86em var(--mono); padding: 1.5px 5px; border-radius: 5px; background: var(--sky-2); overflow-wrap: anywhere; }

/* code blocks: docs.js wraps each <pre> in .code with a header (file name or language, plus Copy) */
.code { margin: 0 0 20px; border-radius: 12px; background: var(--code-bg); box-shadow: 0 0 0 1px var(--line-soft); overflow: hidden; }
.code-head { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 8px 0 16px; box-shadow: 0 1px 0 var(--code-line); }
.code-head span { flex: 1; min-width: 0; font: 500 12.5px var(--mono); color: #8a8d98; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent; color: #8a8d98;
  font: 500 12px var(--text); cursor: pointer; }
.copy:hover { background: #2b2d35; color: #f1f1f4; }
.copy svg { width: 13px; height: 13px; }
.copy.done { color: #3fbf8f; }
pre { margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: var(--code-bg); color: #d9dae0; font: 13.5px/1.7 var(--mono); overflow-x: auto; tab-size: 2; }
.code pre { margin: 0; border-radius: 0; background: none; }
pre code { font: inherit; padding: 0; background: none; color: inherit; overflow-wrap: normal; }
.tk-t { color: #f39bb9; } .tk-a { color: #a8c5f0; } .tk-s { color: #b8e0c8; } .tk-c { color: #7d808b; font-style: italic; } .tk-k { color: #f3c58b; }
li > .code, li > pre { margin-top: 10px; }

.table-wrap { margin: 0 0 20px; overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); background: var(--paper); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 14px; vertical-align: top; }
th { font-weight: 600; color: var(--ink); white-space: nowrap; background: var(--sky-2); font-size: 13.5px; }
td { color: var(--ink-2); box-shadow: 0 -1px 0 var(--line-soft); }
td code { white-space: nowrap; }

/* callouts: a softly tinted box, its first <strong> is the title with a small coloured dot */
.callout { --c: var(--dove); margin: 0 0 20px; padding: 14px 18px; border-radius: 12px; font-size: 15px;
  background: color-mix(in srgb, var(--c) 7%, var(--paper)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c) 20%, transparent); }
.callout > :last-child { margin-bottom: 0; }
.callout p { margin-bottom: 8px; }
.callout > strong:first-child { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; color: var(--ink); }
.callout > strong:first-child::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: none; }
.callout.tip { --c: var(--good); }
.callout.warn { --c: var(--warn); }
.callout.note { --c: var(--rose); }

/* numbered steps: the number sits beside the step's heading; nothing is indented */
ol.steps { list-style: none; padding: 0; counter-reset: step; margin: 8px 0 24px; }
ol.steps > li { counter-increment: step; margin: 0 0 26px; }
ol.steps > li > h3:first-child, ol.steps > li > h4:first-child, ol.steps > li > strong:first-child { display: flex; align-items: center; gap: 12px; margin: 0 0 8px; font: 600 17px/1.3 var(--display); letter-spacing: -0.01em; }
ol.steps > li > h3:first-child::before, ol.steps > li > h4:first-child::before, ol.steps > li > strong:first-child::before { content: counter(step); width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font: 600 13px var(--display); letter-spacing: 0; background: var(--crest); color: var(--rose); }
ol.steps > li > :last-child { margin-bottom: 0; }

/* card grid of links, e.g. the install index */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; margin: 0 0 28px; padding: 0; list-style: none; }
.cards li { margin: 0; }
.cards a { display: flex; flex-direction: column; height: 100%; padding: 14px 16px; border-radius: 12px; background: var(--paper); color: var(--ink); text-decoration: none;
  box-shadow: 0 0 0 1px var(--line-soft); transition: box-shadow .15s, transform .15s; }
.cards a:hover { color: var(--ink); box-shadow: 0 0 0 1px var(--rose), 0 8px 24px -12px color-mix(in srgb, var(--rose) 40%, transparent); transform: translateY(-1px); }
.cards b { display: flex; align-items: center; gap: 10px; font: 600 15.5px var(--display); letter-spacing: -0.01em; }
.cards .fav { width: 22px; height: 22px; }
.cards span { font-size: 13.5px; line-height: 1.45; color: var(--dove); margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; }
.pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 12px; background: var(--paper); text-decoration: none;
  box-shadow: 0 0 0 1px var(--line-soft); font: 600 15.5px var(--display); transition: box-shadow .15s; }
.pager a:hover { box-shadow: 0 0 0 1px var(--rose); }
.pager span { font: 13px var(--text); color: var(--dove); }
.pager .next { text-align: right; }
.doc-foot { margin-top: 40px; padding-top: 20px; box-shadow: 0 -1px 0 var(--line); font-size: 14px; color: var(--dove); }
.doc-foot a { color: var(--ink-2); }

/* ---- search --------------------------------------------------------------------- */
.search { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px;
  background: color-mix(in srgb, #0b0c0f 45%, transparent); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.search[hidden] { display: none; }
.search-box { width: min(640px, 100%); max-height: 72vh; display: flex; flex-direction: column; border-radius: 16px; background: var(--paper); overflow: hidden;
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -24px rgba(0,0,0,.45); animation: pop .16s cubic-bezier(.2,.8,.2,1); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.985); } }
.search-field { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; box-shadow: 0 1px 0 var(--line); flex: none; }
.search-field svg { width: 18px; height: 18px; color: var(--dove); flex: none; }
.search-field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font: 17px var(--text); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-results { list-style: none; margin: 0; padding: 8px; overflow-y: auto; }
.search-results li { margin: 0; }
.search-results a { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; text-decoration: none; }
.search-results .fav { margin-top: 3px; }
.search-results .r-dot { width: 18px; height: 18px; flex: none; margin-top: 3px; border-radius: 5px; background: var(--sky-2); }
.search-results .r-body { min-width: 0; flex: 1; }
.search-results a[aria-selected="true"] { background: color-mix(in srgb, var(--rose) 10%, transparent); }
.search-results .r-where { display: block; font-size: 12px; color: var(--dove); }
.search-results .r-title { display: block; font-weight: 600; font-size: 15px; color: var(--ink); }
.search-results a[aria-selected="true"] .r-title { color: var(--rose); }
.search-results .r-snip { display: block; font-size: 13.5px; color: var(--ink-2); line-height: 1.45; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-results mark { background: none; color: var(--rose); font-weight: 600; }
.search-results .r-empty { padding: 28px 12px; text-align: center; color: var(--dove); font-size: 14.5px; }

/* ---- smaller screens ---------------------------------------------------------- */
@media (max-width: 1240px) {
  .toc { display: none; }
  .main { padding-left: 56px; padding-right: 40px; }
}
@media (max-width: 1020px) {
  .search-btn { margin-left: auto; width: 36px; padding: 0; justify-content: center; border-radius: 50%; box-shadow: none; background: transparent; }
  .search-btn span, .search-btn kbd { display: none; }
  .search-btn svg { width: 18px; height: 18px; }
  .search-btn + .spacer { display: none; }
}
@media (max-width: 860px) {
  .menu { display: grid; }
  .top { padding: 0 16px; gap: 8px; }
  .top-link, .crumb { display: none; }
  .side { width: min(320px, 86vw); transform: translateX(-102%); visibility: hidden; transition: transform .25s ease, visibility .25s; }
  body.nav-open .side { transform: none; visibility: visible; box-shadow: 1px 0 0 var(--line), 24px 0 48px -24px rgba(0,0,0,.3); }
  .main { margin-left: 0; padding: calc(var(--top-h) + 28px) 16px 48px; }
  h1 .fav { width: 32px; height: 32px; }
  h2 { font-size: 23px; margin-top: 44px; }
  .anchor { display: none; }
  .pager { grid-template-columns: 1fr; }
}
@media (max-width: 420px) { .top .btn { display: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
h1:focus { outline: none; }

/* ---- your platform ---------------------------------------------------------------- */
.mine { display: flex; align-items: center; gap: 6px; margin: 0 0 14px; padding-bottom: 14px; box-shadow: 0 1px 0 var(--line); }
.mine-pick, .mine-guide { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; border: 0;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line); color: var(--ink-2); font-size: 14px; text-align: left; text-decoration: none; cursor: pointer; }
.mine-pick { border: 1px dashed var(--line); box-shadow: none; background: transparent; }
.mine-pick:hover, .mine-guide:hover { color: var(--ink); box-shadow: 0 0 0 1px color-mix(in srgb, var(--rose) 50%, var(--line)); }
.mine-guide .fav { width: 22px; height: 22px; }
.mine-guide span { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mine-guide small { font-size: 11.5px; font-weight: 500; color: var(--dove); }
.mine-guide[aria-current] { box-shadow: 0 0 0 1px var(--rose); }
.mine-change { flex: none; height: 30px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--dove); font-size: 13px; cursor: pointer; }
.mine-change:hover { background: var(--sky-2); color: var(--ink); }

.picker { margin: 8px 0 32px; padding: 22px; border-radius: 16px; background: var(--paper); box-shadow: 0 0 0 1px var(--line-soft); }
.picker-q { margin: 0 0 14px; font: 600 19px var(--display); letter-spacing: -0.015em; }
.picker-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.picker-grid li { margin: 0; }
.tile { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 0; border-radius: 10px; background: var(--sky); color: var(--ink);
  font: 500 14.5px var(--text); text-align: left; text-decoration: none; cursor: pointer; transition: box-shadow .15s, background .15s; }
article a.tile { color: var(--ink); text-decoration: none; }
.tile .fav { width: 20px; height: 20px; }
.tile:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--rose) 55%, transparent); }
.tile.on { background: color-mix(in srgb, var(--rose) 11%, var(--paper)); box-shadow: 0 0 0 1.5px var(--rose); font-weight: 600; }
.picker-more { margin-top: 12px; padding: 0; border: 0; background: none; color: var(--rose); font: 500 14.5px var(--text); cursor: pointer; }
.picker-more:hover { text-decoration: underline; text-underline-offset: 3px; }
.picker-path { margin-top: 20px; padding-top: 18px; box-shadow: 0 -1px 0 var(--line-soft); }
.picker-path-h { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; font-size: 15px; color: var(--ink-2); }
.picker-path-h .fav { width: 20px; height: 20px; }
.path { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 560px) { .path { grid-template-columns: 1fr; } }
.path li { margin: 0; counter-increment: s; }
.path a { display: block; height: 100%; padding: 12px 14px 12px 46px; position: relative; border-radius: 10px; background: var(--sky); text-decoration: none; color: var(--ink); }
article .path a { color: var(--ink); }
.path a::before { content: counter(s); position: absolute; left: 12px; top: 12px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font: 600 12.5px var(--display); background: var(--crest); color: var(--rose); }
.path a:hover { box-shadow: 0 0 0 1px var(--rose); }
.path b { display: block; font: 600 15px var(--display); }
.path span { display: block; font-size: 13.5px; color: var(--dove); line-height: 1.4; margin-top: 2px; }

.picker-dialog .search-box { width: min(760px, 100%); }
.picker-all { overflow-y: auto; padding: 6px 18px 18px; scrollbar-width: thin; }
.picker-sec { margin: 16px 0 8px; font: 600 12px var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--dove); }
.picker-all .picker-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.picker-clear { margin-top: 18px; padding: 0; border: 0; background: none; color: var(--dove); font-size: 13.5px; cursor: pointer; }
.picker-clear:hover { color: var(--ink); }

.platform-guide { margin: 0 0 28px; padding: 18px 20px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1px var(--line-soft); }
.platform-guide > p:only-child { margin: 0; color: var(--ink-2); }
.platform-guide.filled { padding: 0; overflow: hidden; }
.pg-head { display: flex; align-items: center; gap: 10px; padding: 14px 20px; box-shadow: 0 1px 0 var(--line-soft); background: var(--sky-2); }
.pg-head .fav { width: 22px; height: 22px; }
.pg-head b { font: 600 16px var(--display); }
.pg-head a { margin-left: auto; font-size: 14px; white-space: nowrap; }
.pg-body { padding: 18px 20px 4px; }
.pg-body > h3:first-child { margin-top: 0; }
.pg-body h4 { font-size: 16.5px; }
.pg-wait { color: var(--dove); }

.variants { margin: 0 0 22px; }
.tabs { display: flex; gap: 4px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.tabs button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent;
  color: var(--ink-2); font: 500 14px var(--text); white-space: nowrap; cursor: pointer; }
.tabs button .fav { width: 16px; height: 16px; }
.tabs button:hover { background: var(--sky-2); color: var(--ink); }
.tabs button[aria-selected="true"] { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.variants > section > :last-child { margin-bottom: 0; }

/* ---- screenshots: natural size (never upscaled), centred, optional interactive markers ---- */
.shot { margin: 8px 0 28px; }
.shot-frame { position: relative; width: min(100%, var(--w)); margin: 0 auto; }
.shot-frame > a { display: block; border-radius: 12px; box-shadow: 0 0 0 1px var(--line), 0 18px 40px -24px rgba(25,26,33,.35); cursor: zoom-in; }
.shot img { display: block; width: 100%; height: auto; border-radius: 12px; background: var(--sky-2); }
.shot .shot-d { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .shot .shot-l { display: none; } :root:not([data-theme="light"]) .shot .shot-d { display: block; } }
:root[data-theme="dark"] .shot .shot-l { display: none; }
:root[data-theme="dark"] .shot .shot-d { display: block; }
.shot figcaption { margin-top: 10px; font-size: 13.5px; color: var(--dove); text-align: center; }
li > .shot { margin-top: 12px; }

/* The highlight: the active box is outlined in rose and everything around it dims. The layer clips to the image's
   rounded corners; the marker buttons sit above it and may hang over the edge. */
.mark-layer { position: absolute; inset: 0; border-radius: 12px; overflow: hidden; pointer-events: none; }
.mark-box { position: absolute; border-radius: 7px; opacity: 0; transform: scale(1.04);
  box-shadow: 0 0 0 2px var(--rose), 0 0 0 6px color-mix(in srgb, var(--rose) 22%, transparent), 0 0 0 9999px rgba(17,18,22,.38);
  transition: opacity .22s ease, transform .28s cubic-bezier(.2,.9,.3,1.2); }
.mark-box.on { opacity: 1; transform: none; }
.shot .mark { position: absolute; z-index: 2; transform: translate(-50%, -50%); width: 24px; height: 24px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; font: 700 12px/1 var(--display); color: #fff; background: var(--rose); cursor: pointer;
  box-shadow: 0 0 0 2px var(--paper), 0 4px 10px rgba(0,0,0,.25); transition: transform .2s cubic-bezier(.2,.9,.3,1.4), box-shadow .2s ease; }
.shot .mark::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--rose); opacity: 0; animation: mark-ping 2.4s ease-out infinite; }
.shot .mark:nth-of-type(2)::after { animation-delay: .3s; } .shot .mark:nth-of-type(3)::after { animation-delay: .6s; }
.shot .mark:nth-of-type(4)::after { animation-delay: .9s; } .shot .mark:nth-of-type(5)::after { animation-delay: 1.2s; }
@keyframes mark-ping { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.9); opacity: 0; } }
.shot.active .mark::after { animation: none; }
.shot .mark.on { transform: translate(-50%, -50%) scale(1.18); box-shadow: 0 0 0 2px var(--paper), 0 0 0 6px color-mix(in srgb, var(--rose) 30%, transparent), 0 6px 14px rgba(0,0,0,.3); }
.shot.active .mark:not(.on) { opacity: .55; }
.mark-tip { position: absolute; z-index: 3; max-width: min(280px, 80%); padding: 8px 12px; border-radius: 10px; pointer-events: none;
  font: 600 13.5px/1.35 var(--text); color: #f1f1f4; background: #191a21; box-shadow: 0 10px 30px -8px rgba(0,0,0,.45);
  opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .18s ease, transform .22s cubic-bezier(.2,.9,.3,1.2); }
.mark-tip.on { opacity: 1; transform: none; }
.mark-tip b { color: #f5809f; margin-right: 6px; }
:root[data-theme="dark"] .mark-tip { background: #f1f1f4; color: #191a21; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .mark-tip { background: #f1f1f4; color: #191a21; } }

.legend { list-style: none; width: min(100%, max(var(--w), 520px)); margin: 16px auto 0; padding: 0; display: grid; gap: 2px; }
.legend li { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 5px 8px; border-radius: 8px; font-size: 15px; color: var(--ink-2); cursor: default; transition: background .15s, color .15s; }
.legend li::before { content: attr(value); flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; transform: translateY(4px);
  font: 700 12px/1 var(--display); color: #fff; background: var(--rose); }
.legend li.on { background: color-mix(in srgb, var(--rose) 9%, transparent); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .shot .mark::after { animation: none; } }

.zoom { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 24px; background: color-mix(in srgb, #0b0c0f 78%, transparent);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); cursor: zoom-out; animation: pop .16s ease; }
.zoom img { max-width: min(1600px, 100%); max-height: 100%; width: auto; height: auto; border-radius: 12px; box-shadow: 0 40px 80px -24px rgba(0,0,0,.6); }

/* "For <platform>" panel on topic pages */
.for-platform { margin: 0 0 32px; border-radius: 14px; background: var(--paper); box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--rose) 45%, var(--line)); overflow: hidden; }
.fp-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: color-mix(in srgb, var(--rose) 7%, var(--paper)); box-shadow: 0 1px 0 var(--line-soft); }
.fp-head .fav { width: 24px; height: 24px; }
.fp-head span { display: flex; flex-direction: column; line-height: 1.2; }
.fp-head small { font-size: 12px; color: var(--dove); }
.fp-head b { font: 600 16px var(--display); }
.fp-head a { margin-left: auto; font-size: 14px; white-space: nowrap; }
.fp-head button, .for-platform.slim button, .for-platform.empty button { padding: 0; border: 0; background: none; color: var(--dove); font: inherit; font-size: 14px; cursor: pointer; }
.fp-head button:hover, .for-platform.slim button:hover { color: var(--ink); }
.fp-body { padding: 16px 20px 4px; }
.fp-body > :first-child { margin-top: 0; }
.fp-body h4 { font-size: 16px; }
.for-platform.slim, .for-platform.empty { display: flex; align-items: center; gap: 10px; padding: 10px 14px; font-size: 14px; color: var(--ink-2);
  box-shadow: 0 0 0 1px var(--line-soft); background: transparent; }
.for-platform.empty { border: 1px dashed var(--line); box-shadow: none; }
.for-platform.empty button { color: var(--rose); font-weight: 600; }
.for-platform .fav { width: 18px; height: 18px; }
@media (max-width: 560px) { .fp-head { flex-wrap: wrap; } .fp-head a { margin-left: 34px; } }

/* stacked tables */
@media (max-width: 640px) {
  table:has(thead) { min-width: 0; }
  table:has(thead) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  table:has(thead) tr { display: block; padding: 12px 16px; border-top: 1px solid var(--line-soft); }
  table:has(thead) tr:first-child { border-top: 0; }
  :is(.tbl, body) table:has(thead) tbody tr > td, :is(.tbl, body) table:has(thead) tbody tr > th { display: block; padding: 3px 0; border: 0; box-shadow: none; white-space: normal; text-align: left; }
  table:has(thead) tr > :first-child { font-weight: 600; color: var(--ink); }
  table:has(thead) [data-label]::before { content: attr(data-label); display: block; color: var(--dove); font-size: 13px; font-weight: 600; margin-bottom: 1px; }
}
