:root {
  /* warm page tinted toward the brand orange (#e8871e), with white code/cards
     on top; the blue accent is complementary to it and carries the links */
  --bg: #fdf6ed; --fg: #1f2630; --muted: #6d6154; --accent: #1d5aa7;
  --accent2: #c96a09; --code-bg: #ffffff; --border: #ecdcc7; --hero-bg: #fbead6;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161d; --fg: #dfe7ef; --muted: #93a3b3; --accent: #6aa9e8;
    --accent2: #f0a04b; --code-bg: #1a222c; --border: #26313d; --hero-bg: #141c25;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 17px/1.65 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 860px; margin: 0 auto; padding: 0 24px; }
header.hero { background: var(--hero-bg); border-bottom: 1px solid var(--border); padding: 56px 0 40px; text-align: center; }
/* no radius/shadow: the logo is a transparent PNG, so both would frame its
   bounding box rather than the artwork — a panel floating behind the mark */
.hero img { max-width: 420px; width: 90%; height: auto; }
.hero p.tag { font-size: 1.25rem; color: var(--muted); margin: 18px auto 8px; max-width: 560px; }
nav.toc { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--border); z-index: 5; }
nav.toc .wrap { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 10px 24px; font-size: .95rem; }
main { padding: 8px 0 64px; }
h2 { margin-top: 2.6em; padding-top: .4em; border-top: 1px solid var(--border); font-size: 1.5rem; }
h3 { margin-top: 1.8em; font-size: 1.15rem; }
pre { background: #0d1117; border: 1px solid #26313d; color: #c9d5e0; border-radius: 8px; padding: 14px 16px; overflow-x: auto; font-size: .92rem; line-height: 1.5; }
.tok-cmd { color: #79b8ff; font-weight: 600; }
.tok-sub { color: #79b8ff; }
.tok-flag { color: #8b98a5; }
.tok-op { color: #ff7b72; }
.tok-com { color: #f0a04b; }
.codewrap { position: relative; }
.codewrap pre { padding-right: 44px; }
.copy { position: absolute; top: 8px; right: 8px; padding: 5px 6px; border-radius: 6px; border: 1px solid #30363d; background: #161b22; color: #8b98a5; cursor: pointer; line-height: 0; opacity: .7; }
.copy:hover { opacity: 1; color: #c9d5e0; border-color: #8b98a5; }
.copy.ok, .copy.ok:hover { color: #2e9e5b; opacity: 1; }
code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; }
p code, li code, td code { background: var(--code-bg); border: 1px solid var(--border); border-radius: 4px; padding: .08em .35em; font-size: .88em; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; display: block; overflow-x: auto; }
th, td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }
.pill { display: inline-block; background: var(--code-bg); border: 1px solid var(--border); border-radius: 999px; padding: 2px 12px; font-size: .85rem; margin: 2px; }
footer { border-top: 1px solid var(--border); padding: 28px 0 48px; color: var(--muted); font-size: .9rem; text-align: center; }
.demo { color: #93a3b3; }
@media print {
  pre, pre.demo { background: #fff; border-color: #bbb; color: #111; }
  .demo { color: #444; }
  .demo b, .tok-com { color: #a15c00; }
  .tok-cmd, .tok-sub { color: #1d5aa7; }
  .tok-op { color: #b3261e; }
  .tok-flag { color: #555; }
  .copy { display: none; }
}
td.y { color: #2e9e5b; font-weight: 600; }
td.n { color: #c05555; }
td.m { color: var(--accent2); }
.cmp td, .cmp th { white-space: nowrap; }
.cmp td:not(:first-child), .cmp th:not(:first-child) { text-align: center; }
.demo b { color: #f0a04b; font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.install-grid { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; }
.install-card { border: 1px solid var(--border); border-radius: 10px; padding: 4px 20px 16px; background: var(--hero-bg); }
.install-card h3 { margin-top: 14px; display: flex; align-items: baseline; gap: 10px; }
.install-card .arch { font-size: .8rem; font-weight: 400; color: var(--muted); }
.install-card pre { font-size: .8rem; white-space: pre-wrap; word-break: break-all; }
.install-card p { font-size: .92rem; margin: 10px 0 6px; }

/* ---- manual: sidebar layout ---- */
.manual-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px;
  max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.sidebar { position: sticky; top: 0; align-self: start; max-height: 100vh;
  overflow-y: auto; padding: 28px 0 40px; font-size: .92rem; }
.sidebar .group { margin: 0 0 6px; padding: 14px 0 4px; font-size: .78rem;
  font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sidebar a { display: block; padding: 4px 10px; border-left: 2px solid transparent;
  color: inherit; text-decoration: none; border-radius: 0 6px 6px 0; }
.sidebar a:hover { background: var(--hero-bg); }
.sidebar a.active { border-left-color: var(--accent); color: var(--accent); font-weight: 600; }
.sidebar code { font-size: .85em; background: none; padding: 0; }
.manual-main { min-width: 0; padding-bottom: 60px; }
.manual-main h2 { margin-top: 56px; }
.manual-main h3 { margin-top: 40px; }
.manual-main h3 code { font-size: 1em; }
.sig { color: var(--muted); font-size: .95rem; margin-top: -8px; }
.manual-top { border-bottom: 1px solid var(--border); }
/* Mirrors .manual-layout exactly — same max-width, padding, column widths and
   gap — so the bar sits on the same two columns as the page beneath it: the
   logo over the sidebar, "Manual" over the body text. The default .wrap is
   860px, which left the whole bar indented past the menu. */
.manual-top .wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px; align-items: center; max-width: 1160px; padding: 10px 20px; }
.manual-top .bar { display: flex; align-items: center; gap: 16px; min-width: 0; }
.manual-top img { height: 52px; width: auto; display: block; }
.manual-top .links { margin-left: auto; display: flex; gap: 18px; font-size: .95rem; }
@media (max-width: 860px) {
  .manual-layout { grid-template-columns: 1fr; }
  /* The sidebar column is gone below here, so the bar collapses to a row. */
  .manual-top .wrap { display: flex; gap: 16px; }
  .sidebar { position: static; max-height: none; columns: 2; padding-bottom: 0; }
  .sidebar .group { break-after: avoid; }
}

/* ---- FAQ accordion ---- */
.faq { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary { cursor: pointer; padding: 14px 18px; list-style: none;
  display: flex; align-items: center; gap: 10px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { background: var(--hero-bg); }
.faq summary h3 { margin: 0; font-size: 1rem; display: inline; flex: 1; }
/* chevron drawn in CSS so there's no icon font or SVG to load */
.faq summary::after { content: ""; width: 8px; height: 8px; flex: none;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(-45deg); transition: transform .15s ease; margin-right: 2px; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { background: var(--hero-bg); }
.faq details > p { margin: 0; padding: 2px 18px 16px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
