:root { --bk: #000; --dk: #1b1b1b; --rule: #333; --mute: #555; --line: #bdbdba; --w: #f2f2f0; --a1: #2d6fd6; --a2: #2fa86b; --a4: #ff5a00; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bk); color: var(--w); font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 15px; line-height: 1.6; font-variant-ligatures: none; }
a { color: var(--w); text-underline-offset: .2em; }
a:hover, a:focus-visible { color: var(--a4); outline: none; }

.dtop { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; height: 4.5rem; padding: 0 1.5rem; background: var(--bk); }
.dtop::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 2rem; background: linear-gradient(#000, rgba(0, 0, 0, 0)); pointer-events: none; }
.brand { display: inline-flex; flex-direction: column; align-items: flex-end; text-decoration: none; color: var(--w); line-height: 1; }
.brand .name { position: relative; font-size: 2.75rem; font-weight: 500; letter-spacing: -.0294em; }
.brand sup { position: absolute; left: 100%; top: -.1em; margin-left: .2rem; font-size: 10px; font-weight: 400; letter-spacing: 0; color: var(--a4); }
.brand .by { margin-top: .15rem; font-size: 12px; color: var(--line); }
.brand:hover .name, .brand:focus-visible .name { color: var(--w); }

.dwrap { display: grid; grid-template-columns: 17rem minmax(0, 1fr); max-width: 80rem; margin: 0 auto; }
.dnav { position: sticky; top: 4.5rem; align-self: start; max-height: calc(100vh - 4.5rem); overflow-y: auto; padding: 1.5rem 1.5rem 3rem; font-size: 13px; }
.dnav h4 { margin: 1.5rem 0 .4rem; color: var(--mute); font-size: 12px; font-weight: 400; }
.dnav h4:first-child { margin-top: 0; }
.dnav ul { list-style: none; margin: 0; padding: 0; }
.dnav li ul { padding-left: 1rem; }
.dnav a { display: block; padding: .15rem 0; color: var(--line); text-decoration: none; }
.dnav a:hover { color: var(--w); }
.dnav a.on { color: var(--a4); }
.dnav summary { cursor: pointer; color: var(--line); padding: .15rem 0; }

main.doc { padding: 1.5rem 2.5rem 4rem; max-width: 52rem; min-width: 0; }
.splash { margin: 0 0 2rem; }
.splash canvas { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; border: 1px solid var(--dk); border-radius: 8px; touch-action: none; cursor: crosshair; }
.crumbs { display: flex; flex-wrap: wrap; gap: .5em; margin: 0 0 1.5rem; font-size: 13px; color: var(--mute); }
.crumbs a { color: var(--line); text-decoration: none; }
.crumbs a:hover { color: var(--a4); }
.crumbs [aria-current] { color: var(--w); }
main.doc h1 { font-size: 2.2rem; font-weight: 500; letter-spacing: -.02em; margin: 0 0 .6rem; line-height: 1.2; }
main.doc h2 { font-size: 1.3rem; font-weight: 500; margin: 2.2rem 0 .6rem; padding-top: .6rem; border-top: 1px solid var(--rule); }
main.doc h3 { font-size: 1rem; font-weight: 500; margin: 1.6rem 0 .4rem; }
main.doc p, main.doc li { color: var(--line); }
main.doc strong, main.doc b { color: var(--w); font-weight: 500; }
code, kbd { font-family: inherit; color: var(--w); background: var(--dk); border: 1px solid var(--rule); border-radius: 3px; padding: 0 .3em; font-size: .92em; }
.meta { color: var(--mute); margin: 0 0 1.5rem; }
.meta b { color: var(--line); font-weight: 400; }
figure.shot { margin: 1.5rem 0; }
figure.shot img { display: block; max-width: 100%; height: auto; }
figure.shot figcaption { color: var(--mute); font-size: 12px; margin-top: .4rem; }
table { width: 100%; border-collapse: collapse; margin: .8rem 0 1.2rem; font-size: 14px; }
th, td { text-align: left; vertical-align: top; padding: .55rem .8rem .55rem 0; border-bottom: 1px solid var(--rule); }
th { color: var(--mute); font-weight: 400; }
td { color: var(--line); }
td:first-child { color: var(--w); white-space: nowrap; padding-right: 1.5rem; }
.sub td:first-child { padding-left: 1.2rem; color: var(--line); }
.draft { border-left: 2px solid var(--a4); padding: .6rem 1rem; background: var(--dk); color: var(--line); margin: 0 0 1.5rem; }
.todo { color: var(--a4); font-style: italic; }
.tip { color: var(--mute); }
.tip::before { content: "draft text: "; color: var(--a4); }
.toc ul { padding-left: 1.2rem; }
.toc li { margin: .2rem 0; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 4rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.pager a { display: flex; flex-direction: column; gap: .2rem; text-decoration: none; max-width: 48%; }
.pager .next { text-align: right; margin-left: auto; }
.pager small { color: var(--mute); font-size: 12px; }

@media (max-width: 860px) {
  .dwrap { grid-template-columns: 1fr; }
  .dnav { position: static; max-height: none; padding: 1rem 16px; border-bottom: 1px solid var(--rule); }
  main.doc { padding: 1.5rem 16px 3rem; }
  td:first-child { white-space: normal; }
  .brand .name { font-size: 2rem; }
}
.dtop .srch { margin-left: auto; width: min(22rem, 45vw); }
