/*
  The documentation section — bin/docs.mjs.

  The tokens, the bar and the footer are index.html's, kept the same by hand because that page
  carries its styles inline. Read at a desk by somebody part-way through installing something,
  so: a wide measure for commands, wrapping turned off inside them, and headings that can be
  found by scrolling rather than by reading.
*/
:root{
  --ink:#FFFFFF;
  --paper:#0B0D10;
  --accent:#6BA1FF;
  --muted:#99A3B2;
  --dim:#7B8698;
  --panel:#12161C;
  --border:rgba(153,163,178,.14);
  --border2:rgba(153,163,178,.22);
}
*{box-sizing:border-box}
/* The bar is sticky, so a heading jumped to would otherwise arrive underneath it. */
html{scroll-behavior:smooth;scroll-padding-top:100px}
body{
  margin:0;background:var(--paper);color:var(--muted);
  font-family:"Geist",system-ui,sans-serif;
  font-size:16px;line-height:1.7;-webkit-font-smoothing:antialiased;
}
a{color:inherit;text-decoration:none}
code,pre{font-family:"Geist Mono",ui-monospace,monospace}
.wrap{max-width:1200px;margin:0 auto;padding:0 32px}

header.nav{position:sticky;top:0;z-index:50;background:rgba(5,7,10,.72);backdrop-filter:blur(14px);border-bottom:1px solid var(--border)}
.nav-in{display:flex;align-items:center;justify-content:space-between;height:76px}
.brand{display:flex;align-items:center;gap:12px;font-family:"Archivo",sans-serif;font-weight:800;font-size:24px;color:var(--ink)}
.brand img{width:38px;height:38px}
.nav-links{display:flex;align-items:center;gap:34px}
.nav-links a{font-size:15px;font-weight:500}
.nav-links a:hover{color:var(--ink)}
.btn{display:inline-flex;align-items:center;justify-content:center;font-weight:600;border-radius:11px;padding:11px 20px;min-height:44px;border:1px solid transparent;transition:filter .15s}
.nav-links a.btn-primary,.nav-links a.btn-primary:hover{background:var(--accent);color:#07101f;border-color:var(--accent)}
.btn-primary:hover{filter:brightness(1.08)}

.doc{display:grid;grid-template-columns:200px minmax(0,1fr);gap:64px;padding-top:48px;padding-bottom:88px}

.doc__nav{position:sticky;top:108px;align-self:start;display:flex;flex-direction:column;gap:2px;font-size:14px}
.doc__nav a{padding:7px 12px;border-radius:8px}
.doc__nav a:hover{color:var(--ink)}
.doc__nav a[aria-current]{color:var(--ink);background:var(--panel)}

.doc__body{max-width:760px}
.doc__body h1,.doc__body h2,.doc__body h3{font-family:"Archivo",sans-serif;color:var(--ink);letter-spacing:-.02em}
.doc__body h1{font-size:clamp(32px,5vw,44px);font-weight:800;line-height:1.1;margin:0 0 24px}
.doc__body h2{font-size:24px;font-weight:800;line-height:1.2;margin:56px 0 14px}
.doc__body h3{font-size:17px;font-weight:700;line-height:1.3;margin:32px 0 10px}
.doc__body p,.doc__body ul,.doc__body ol{margin:16px 0}
.doc__body ul,.doc__body ol{padding-left:22px}
.doc__body li+li{margin-top:6px}
.doc__body strong{color:var(--ink);font-weight:500}
.doc__body a{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.doc__body code{font-size:.9em;color:var(--ink)}

/* A command is read left to right. Wrapping one makes it a different command. */
.doc__body pre{background:#08090D;border:1px solid var(--border2);border-radius:12px;padding:16px 18px;overflow-x:auto;font-size:13px;line-height:1.6}
.doc__body pre code{font-size:inherit}

.doc__body blockquote{margin:20px 0;padding-left:16px;border-left:2px solid var(--accent)}
.doc__body table{width:100%;border-collapse:collapse;margin:20px 0;font-size:14px}
.doc__body th{text-align:left;color:var(--ink);font-weight:500}
.doc__body th,.doc__body td{padding:8px 12px 8px 0;vertical-align:top;border-bottom:1px solid var(--border)}
.doc__body hr{border:0;border-top:1px solid var(--border);margin:48px 0}

footer{background:#08090D;border-top:1px solid var(--border);padding:40px 0;font-size:14px;color:var(--dim)}
footer p{margin:0}
footer a{color:var(--muted)}
footer a:hover{color:var(--accent)}

@media(max-width:900px){
  .wrap{padding:0 22px}
  .nav-links a:not(.btn){display:none}
  /* The list of guides goes above the page as a row, because the bar's links are gone at this width. */
  .doc{grid-template-columns:minmax(0,1fr);gap:20px;padding-top:28px}
  .doc__nav{position:static;flex-direction:row;flex-wrap:wrap;gap:6px}
  .doc__nav a{border:1px solid var(--border)}
  /* A table of permissions is wider than a phone; let it scroll inside itself, not the page. */
  .doc__body table{display:block;overflow-x:auto}
}
