/* Privacy Policy and Terms of Service. One language shows at a time (legal.js; without JS both show, one after the
   other). Contents on the left from 980 px, numbered headings, a static light at the top like the cabinet. */
@import url("https://fonts.googleapis.com/css2?family=Unbounded:wght@600;800&family=Manrope:wght@400;500;700&family=JetBrains+Mono:wght@400;600&display=swap");
:root { color-scheme: dark; --fg: #f2f2f2; --text: #c9c9c9; --mute: #8a8a8a; --dim: #5a5a5a; --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
  --mono: "JetBrains Mono", ui-monospace, monospace; --display: Unbounded, system-ui, sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: #000; color: var(--text); font: 16px/1.7 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(760px 420px at 50% -120px, rgba(255, 255, 255, .1), transparent 70%); }
body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse 60% 40% at 50% 0%, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse 60% 40% at 50% 0%, #000 10%, transparent 70%); }
a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .3); text-underline-offset: 3px; transition: text-decoration-color .15s; }
a:hover { text-decoration-color: #fff; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[hidden] { display: none !important; }

/* top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1120px; margin: 0 auto; padding: 14px 22px; background: linear-gradient(#000 60%, rgba(0, 0, 0, 0)); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font: 800 17px var(--display); letter-spacing: .01em; }
.brand img { filter: drop-shadow(0 0 6px rgba(255, 255, 255, .55)); }
.brand.sm { font-size: 14px; gap: 8px; }
.top-r { display: flex; align-items: center; gap: 14px; }
.back { color: var(--mute); text-decoration: none; font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.back::before { content: ""; width: 7px; height: 7px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
.back:hover { color: #fff; }
.back:hover::before { transform: translateX(-3px) rotate(45deg); }
.seg { display: inline-flex; padding: 2px; gap: 2px; border: 1px solid var(--line2); border-radius: 10px; background: rgba(0, 0, 0, .5); }
.seg button { padding: 6px 10px; border-radius: 8px; font: 600 12px var(--mono); letter-spacing: .08em; color: var(--mute); transition: color .2s; }
.seg button:hover { color: #fff; }
.seg button.on { background: #fff; color: #000; }

/* layout */
.doc { max-width: 1120px; margin: 0 auto; padding: 24px 22px 40px; display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 64px; justify-content: center; }
.toc { position: sticky; top: 92px; align-self: start; }
.toc .caps { margin: 6px 0 12px; font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--dim); }
.toc ol { list-style: none; margin: 0; padding: 0 0 0 1px; border-left: 1px solid var(--line); counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { position: relative; display: flex; gap: 10px; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent; color: var(--mute); text-decoration: none; font-size: 13.5px; line-height: 1.4;
  transition: color .2s, border-color .2s; }
.toc a::before { content: counter(t, decimal-leading-zero); font: 11px/1.9 var(--mono); color: var(--dim); transition: color .2s; }
.toc a:hover { color: #fff; }
.toc a.on { color: #fff; border-left-color: #fff; }
.toc a.on::before { color: #fff; }
.js .toc a.on { box-shadow: -1px 0 10px -2px rgba(255, 255, 255, .6); }

main { min-width: 0; }
section { counter-reset: h; }
section + section { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--line); }
.js section + section { margin-top: 0; padding-top: 0; border-top: 0; }
.kick { display: inline-flex; align-items: center; gap: 8px; margin: 18px 0 0; font: 600 11px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.kick::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff, 0 0 16px rgba(255, 255, 255, .5); }
h1 { color: #fff; font: 800 clamp(26px, 5vw, 44px)/1.1 var(--display); letter-spacing: -.02em; margin: 14px 0 18px; hyphens: auto; overflow-wrap: break-word; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; }
.chip { font: 500 12px/1 var(--mono); color: var(--mute); padding: 7px 10px; border-radius: 99px; border: 1px solid var(--line2); background: rgba(255, 255, 255, .03); }
.chip:empty { display: none; }
.meta + p { font-size: 17.5px; color: #dcdcdc; }
h2 { counter-increment: h; display: flex; align-items: baseline; gap: 14px; color: #fff; font: 600 19px/1.35 var(--display); letter-spacing: -.01em; margin: 52px 0 12px; scroll-margin-top: 90px; }
h2::before { content: counter(h, decimal-leading-zero); flex: none; font: 600 12px var(--mono); letter-spacing: .06em; color: var(--dim); padding: 3px 7px; border: 1px solid var(--line2); border-radius: 6px; transform: translateY(-2px); }
p { margin: 0 0 14px; }
b { color: #fff; font-weight: 700; }
section ul { list-style: none; padding: 0; margin: 4px 0 18px; display: grid; gap: 10px; }
section li { position: relative; padding-left: 24px; }
section li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255, 255, 255, .7); }
code { font: 13.5px var(--mono); color: #fff; background: #121212; border: 1px solid #262626; border-radius: 6px; padding: 1px 6px; white-space: nowrap; }

/* footer */
.foot { max-width: 1120px; margin: 0 auto; padding: 28px 22px 48px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; border-top: 1px solid var(--line); font-size: 14px; color: var(--mute); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot nav a { color: var(--mute); text-decoration: none; transition: color .15s; }
.foot nav a:hover { color: #fff; }
.foot p { margin: 0 0 0 auto; }

/* the visible section fades in when the language changes without View Transitions */
.js section:not([hidden]) { animation: lg-in .4s cubic-bezier(.2, .7, .2, 1); }
@keyframes lg-in { from { opacity: 0; translate: 0 8px; } }

@media (max-width: 980px) {
  .doc { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 8px; }
  .toc { display: none; }
}
@media (max-width: 560px) {
  body { font-size: 15.5px; }
  .top { padding: 12px 16px; }
  .back span { display: none; }
  .doc { padding: 8px 16px 32px; }
  h1 { font-size: 26px; margin-bottom: 14px; }
  h2 { font-size: 17px; margin-top: 40px; gap: 10px; }
  .meta + p { font-size: 16px; }
  .foot { padding: 24px 16px 40px; }
  .foot p { margin: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
