/* ParelVR docs. Same palette and type as the player site, laid out for reading. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg: #121215;
  --s0: #16161a;
  --s1: #1b1b20;
  --s2: #222228;
  --s3: #2a2a31;
  --line: #2c2c34;
  --line2: #3a3a44;
  --tx: #ececf1;
  --tx2: #b3b3bf;
  --mut: #8b8b98;
  --ac: #7350d0;
  --ac-h: #8263dc;
  --ac-soft: rgba(115, 80, 208, 0.14);
  --ac-tx: #b9a7ff;
  --green: #35b46b;
  --amber: #e3a23b;
  --red: #e5566b;
  --blue: #4a9eff;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  --top: 64px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top) + 16px); scrollbar-color: var(--s3) var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--tx); font: 400 15px/1.65 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--ac-tx); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
::selection { background: var(--ac); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--s3); border-radius: 5px; }
:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 14px; background: var(--ac); color: #fff; border-radius: 8px; }
.skip:focus { left: 12px; }

/* ── header ── */
.top { position: sticky; top: 0; z-index: 60; height: var(--top); display: flex; align-items: center; gap: 8px; padding: 0 24px; background: var(--s0); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; flex: none; width: 236px; color: var(--tx); text-decoration: none !important; }
.brand img { height: 28px; width: auto; display: block; }
.brand span { padding-left: 10px; border-left: 1px solid var(--line2); color: var(--tx2); font-weight: 500; font-size: 15px; }
.tabs { display: flex; align-items: center; gap: 2px; height: 100%; }
.tabs a { position: relative; display: flex; align-items: center; height: 100%; padding: 0 12px; color: var(--tx2); font-weight: 500; font-size: 14.5px; text-decoration: none; }
.tabs a:hover { color: var(--tx); }
.tabs a.on { color: var(--tx); }
.tabs a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: var(--ac); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.find { display: flex; align-items: center; gap: 8px; width: 300px; height: 36px; padding: 0 10px; background: var(--s1); border: 1px solid var(--line2); border-radius: 8px; color: var(--mut); cursor: text; font: 400 14px var(--font); }
.find:hover { border-color: #4a4a56; }
.find svg { flex: none; }
.find span { flex: 1; text-align: left; }
.find kbd, .kbd { display: inline-block; min-width: 20px; padding: 0 6px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 4px; background: var(--s2); color: var(--tx2); font: 500 12px/18px var(--font); text-align: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; background: var(--ac); border: 1px solid var(--ac); border-radius: 8px; color: #fff; font: 500 14px var(--font); text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--ac-h); border-color: var(--ac-h); }
.btn.ghost { background: var(--s2); border-color: var(--line2); color: var(--tx); }
.btn.ghost:hover { background: var(--s3); }
.menu-btn { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; margin-right: 4px; background: none; border: 1px solid var(--line2); border-radius: 8px; color: var(--tx); cursor: pointer; }

/* ── three columns ── */
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr) 220px; max-width: 1440px; margin: 0 auto; }
.side { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 24px 12px 48px 24px; border-right: 1px solid var(--line); scrollbar-width: thin; }
.side h4 { margin: 22px 0 6px; padding: 0 10px; color: var(--tx); font-size: 13.5px; font-weight: 600; }
.side h4:first-child { margin-top: 0; }
.side ul { list-style: none; margin: 0; padding: 0; }
.side li a { display: block; padding: 5px 10px; border-radius: 6px; color: var(--tx2); font-size: 14px; line-height: 1.45; text-decoration: none; }
.side li a:hover { background: var(--s1); color: var(--tx); }
.side li a.on { background: var(--ac-soft); color: var(--tx); font-weight: 500; }
.side li ul { margin: 2px 0 4px 10px; padding-left: 8px; border-left: 1px solid var(--line); }
.side li ul a { font-size: 13.5px; padding: 4px 10px; }
.side .back { display: block; margin-bottom: 14px; padding: 0 10px; color: var(--mut); font-size: 13px; }

.doc { min-width: 0; padding: 36px 56px 80px; }
.doc-inner { max-width: 800px; }
.crumb { margin: 0 0 8px; color: var(--mut); font-size: 13.5px; }
.crumb a { color: var(--mut); }
.doc h1 { margin: 0 0 8px; font-size: 32px; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
.lede { margin: 0 0 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); color: var(--tx2); font-size: 16.5px; line-height: 1.6; }
.body h2 { margin: 40px 0 12px; padding-top: 4px; font-size: 22px; line-height: 1.3; font-weight: 600; }
.body h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; }
.body h4 { margin: 22px 0 6px; font-size: 15px; font-weight: 600; }
.body h2 .hl, .body h3 .hl { margin-left: 8px; color: var(--line2); font-weight: 400; text-decoration: none; visibility: hidden; }
.body h2:hover .hl, .body h3:hover .hl { visibility: visible; }
.body p, .body ul, .body ol { margin: 0 0 14px; color: #d9d9e1; }
.body ul, .body ol { padding-left: 22px; }
.body li { margin: 4px 0; }
.body li > ul, .body li > ol { margin: 4px 0 0; }
.body strong { color: var(--tx); font-weight: 600; }
.body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.body img { display: block; margin: 16px 0; border: 1px solid var(--line); border-radius: 8px; }
.body code { padding: 1px 6px; background: var(--s2); border: 1px solid var(--line); border-radius: 5px; font: 400 13px/1.5 var(--mono); color: #e4dcff; }
.body pre { margin: 0 0 18px; padding: 14px 16px; overflow-x: auto; background: var(--s0); border: 1px solid var(--line); border-radius: 8px; }
.body pre code { padding: 0; background: none; border: 0; color: #dcdce4; font-size: 13px; line-height: 1.6; }
.code-wrap { position: relative; }
.code-wrap .copy { position: absolute; top: 8px; right: 8px; height: 26px; padding: 0 10px; background: var(--s2); border: 1px solid var(--line2); border-radius: 6px; color: var(--tx2); font: 500 12px var(--font); cursor: pointer; opacity: 0; }
.code-wrap:hover .copy, .code-wrap .copy:focus { opacity: 1; }
.tk-k { color: #c6a7ff; } .tk-s { color: #9fd99f; } .tk-c { color: #7c7c8a; font-style: italic; } .tk-n { color: #f0b47a; } .tk-t { color: #7fc8ff; }

.body .tbl { margin: 0 0 20px; overflow-x: auto; }
.body table { width: 100%; border-collapse: collapse; font-size: 14px; }
.body table thead th { text-align: left; }
.body th, .body td { padding: 9px 12px; border: 1px solid var(--line); vertical-align: top; }
.body th { background: var(--s1); color: var(--tx); font-weight: 600; white-space: nowrap; }
.body td { color: #d2d2da; }
.body td code { white-space: nowrap; }
.yes { color: var(--green); font-weight: 600; } .no { color: var(--mut); }

/* callouts (admonitions) */
.admonition { margin: 0 0 18px; padding: 12px 16px; background: var(--s1); border: 1px solid var(--line); border-left: 3px solid var(--ac); border-radius: 8px; }
.admonition p { margin: 0 0 6px; }
.admonition p:last-child { margin-bottom: 0; }
.admonition-title { color: var(--tx); font-weight: 600; font-size: 14px; }
.admonition.warning { border-left-color: var(--amber); }
.admonition.danger { border-left-color: var(--red); }
.admonition.tip { border-left-color: var(--green); }

/* member lists in the API reference */
.member { margin: 0 0 12px; padding: 12px 14px; background: var(--s0); border: 1px solid var(--line); border-radius: 8px; }
.member .sig { font: 400 13px/1.55 var(--mono); color: #dcdce4; word-break: break-word; }
.member .sig b { color: var(--tx); font-weight: 500; }
.member .sig .ty { color: #7fc8ff; }
.member p { margin: 6px 0 0; color: var(--tx2); font-size: 14px; }
.tag { display: inline-block; margin-right: 6px; padding: 0 7px; border-radius: 4px; background: var(--s2); color: var(--tx2); font: 500 11.5px/20px var(--font); vertical-align: 1px; }
.tag.ac { background: var(--ac-soft); color: var(--ac-tx); }

/* prev / next and page footer */
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 48px; }
.pager a { display: block; padding: 14px 16px; background: var(--s1); border: 1px solid var(--line); border-radius: 10px; color: var(--tx); text-decoration: none; }
.pager a:hover { border-color: var(--line2); background: var(--s2); }
.pager small { display: block; color: var(--mut); font-size: 12.5px; }
.pager .next { text-align: right; grid-column: 2; }
.doc-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--mut); font-size: 13px; }
.doc-foot a { color: var(--mut); }

/* on this page */
.toc { position: sticky; top: var(--top); height: calc(100vh - var(--top)); overflow-y: auto; padding: 36px 24px 40px 8px; scrollbar-width: thin; }
.toc h5 { margin: 0 0 10px; color: var(--tx); font-size: 13px; font-weight: 600; }
.toc ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a { display: block; margin-left: -1px; padding: 4px 0 4px 12px; border-left: 1px solid transparent; color: var(--mut); font-size: 13px; line-height: 1.4; text-decoration: none; }
.toc li a:hover { color: var(--tx); }
.toc li a.on { color: var(--tx); border-left-color: var(--ac); }
.toc li.l3 a { padding-left: 24px; }

/* ── home ── */
.home { max-width: 1120px; margin: 0 auto; padding: 48px 24px 80px; }
.home-head { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: end; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.home-head h1 { margin: 0 0 10px; font-size: 34px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.home-head p { margin: 0; color: var(--tx2); font-size: 16.5px; max-width: 620px; }
.home-head .find { width: 100%; height: 44px; font-size: 15px; }
.paths { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 32px 0 40px; }
.path { display: block; padding: 18px; background: var(--s1); border: 1px solid var(--line); border-radius: 10px; color: var(--tx); text-decoration: none !important; }
.path:hover { border-color: var(--line2); background: var(--s2); }
.path b { display: block; margin-bottom: 4px; font-size: 15.5px; font-weight: 600; }
.path span { color: var(--tx2); font-size: 13.5px; line-height: 1.5; }
.hub { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 32px; }
.hub h3 { margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; }
.hub ul { list-style: none; margin: 0; padding: 0; }
.hub li { margin: 0 0 7px; }
.hub li a { color: var(--tx2); font-size: 14.5px; }
.hub li a:hover { color: var(--tx); }
.home-latest { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 44px; padding: 16px 18px; background: var(--s1); border: 1px solid var(--line); border-radius: 10px; }
.home-latest b { font-weight: 600; }
.home-latest span { color: var(--tx2); font-size: 14px; }

/* home */
.intro { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 48px; align-items: center; padding: 8px 0 44px; }
.intro h1 { margin: 0 0 14px; font-size: 40px; line-height: 1.12; font-weight: 700; letter-spacing: -0.015em; }
.intro-text > p { margin: 0; color: var(--tx2); font-size: 17px; line-height: 1.6; }
.intro-cta { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 18px; }
.btn.big { height: 44px; padding: 0 20px; font-size: 15px; font-weight: 600; }
.intro .find { width: 100%; max-width: 420px; height: 42px; font-size: 14.5px; }
.shot { margin: 0; border: 1px solid var(--line2); border-radius: 10px; overflow: hidden; background: var(--s1); }
.shot img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; object-position: 30% 40%; }
.shot.banner { background: #000; }
.shot.banner img { aspect-ratio: 1200 / 630; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; padding-top: 36px; border-top: 1px solid var(--line); }
.tile h2 { margin: 14px 0 4px; font-size: 18px; font-weight: 600; }
.tile h2 a { color: var(--tx); }
.tile p { margin: 0 0 10px; color: var(--tx2); font-size: 14px; line-height: 1.55; }
.tile ul { list-style: none; margin: 0; padding: 0; }
.tile li { padding: 5px 0; border-top: 1px solid var(--line); font-size: 14px; }
.tile li:last-child { border-bottom: 1px solid var(--line); }
.tile-pic { display: block; aspect-ratio: 16 / 9; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--s0); }
.tile-pic img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity .15s; }
.tile-pic:hover img { opacity: .85; }
.tile-pic.code { text-decoration: none !important; }
.tile-pic.code pre { margin: 0; height: 100%; padding: 12px 14px; overflow: hidden; color: #dcdce4; font: 400 11.5px/1.55 var(--mono); }
.updates { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-top: 48px; padding-top: 36px; border-top: 1px solid var(--line); }
.upd-main { display: block; color: var(--tx); text-decoration: none !important; }
.upd-main img { display: block; width: 100%; height: auto; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 8px; }
.upd-main b { display: block; margin: 4px 0; font-size: 18px; font-weight: 600; }
.upd-main:hover b { text-decoration: underline; }
.upd-main > span:last-child { color: var(--tx2); font-size: 14px; }
.upd-ver { color: var(--mut); font-size: 13px; font-family: var(--mono); }
.upd-list h2 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.upd-list ul { list-style: none; margin: 0 0 14px; padding: 0; }
.upd-list li a { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); color: var(--tx2); font-size: 14px; text-decoration: none !important; }
.upd-list li a:hover b { text-decoration: underline; }
.upd-list time { color: var(--mut); font-size: 13px; padding-top: 1px; }
.upd-list b { display: block; color: var(--tx); font-weight: 600; }
.upd-all { font-size: 14px; }
.players { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.players h2 { margin: 0 0 12px; font-size: 18px; font-weight: 600; }
.players .hub ul { list-style: none; margin: 0; padding: 0; }
.players .hub li { margin: 0 0 7px; }
.players .hub a { color: var(--tx2); font-size: 14.5px; }

.site-foot { border-top: 1px solid var(--line); background: var(--s0); color: var(--mut); font-size: 13px; }
.site-foot div { display: flex; flex-wrap: wrap; gap: 8px 20px; max-width: 1440px; margin: 0 auto; padding: 22px 24px; }
.site-foot a { color: var(--tx2); }
.site-foot .sp { margin-left: auto; }

/* ── search ── */
.sx { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; background: rgba(8, 8, 10, 0.7); }
.sx.open { display: flex; }
.sx-box { width: 100%; max-width: 640px; max-height: 72vh; display: flex; flex-direction: column; background: var(--s1); border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.sx-in { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); color: var(--mut); }
.sx-in input { flex: 1; height: 52px; background: none; border: 0; outline: 0; color: var(--tx); font: 400 16px var(--font); }
.sx-list { overflow-y: auto; padding: 6px; }
.sx-list a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--tx); text-decoration: none; }
.sx-list a small { display: block; color: var(--mut); font-size: 12.5px; }
.sx-list a em { display: block; margin-top: 2px; color: var(--tx2); font-size: 13px; font-style: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sx-list a mark { background: none; color: var(--ac-tx); }
.sx-list a.on, .sx-list a:hover { background: var(--s2); }
.sx-empty { padding: 22px; color: var(--mut); text-align: center; font-size: 14px; }
.sx-foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--line); color: var(--mut); font-size: 12px; }

/* ── small screens ── */
@media (max-width: 1180px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); }
  .toc { display: none; }
  .doc { padding: 32px 40px 72px; }
}
@media (max-width: 980px) {
  .paths { grid-template-columns: repeat(2, 1fr); }
  .hub { grid-template-columns: repeat(2, 1fr); }
  .home-head { grid-template-columns: 1fr; }
  .intro { grid-template-columns: 1fr; gap: 28px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .updates { grid-template-columns: 1fr; }
  .top-right .btn { display: none; }
}
@media (max-width: 860px) {
  .top { padding: 0 12px; }
  .menu-btn { display: inline-flex; }
  .brand { width: auto; }
  .tabs { display: none; }
  .find { width: 36px; padding: 0; justify-content: center; }
  .find span, .find kbd { display: none; }
  .home-head .find { width: 100%; padding: 0 10px; justify-content: flex-start; }
  .home-head .find span { display: inline; }
  .intro .find { width: 100%; padding: 0 10px; justify-content: flex-start; }
  .intro .find span { display: inline; }
  .layout { display: block; }
  .side { position: fixed; top: var(--top); left: 0; bottom: 0; z-index: 50; width: 300px; max-width: 86vw; height: auto; background: var(--s0); transform: translateX(-100%); transition: transform .18s ease; }
  .side .mobile-tabs { display: block; }
  body.nav-open .side { transform: none; }
  body.nav-open::after { content: ''; position: fixed; inset: var(--top) 0 0 0; z-index: 40; background: rgba(0, 0, 0, 0.55); }
  .doc { padding: 24px 16px 64px; }
  .doc h1 { font-size: 27px; }
  .home { padding: 28px 16px 64px; }
  .home-head h1 { font-size: 28px; }
  .paths, .hub, .tiles { grid-template-columns: 1fr; }
  .intro h1 { font-size: 30px; }
  .intro-text > p { font-size: 16px; }
  .intro-cta .btn { flex: 1 1 100%; }
  .pager { grid-template-columns: 1fr; }
  .pager .next { grid-column: 1; }
}
.mobile-tabs { display: none; margin: 0 0 18px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.mobile-tabs a { display: block; padding: 6px 10px; color: var(--tx2); font-weight: 500; border-radius: 6px; }
.mobile-tabs a.on { color: var(--tx); background: var(--s2); }
