/*
 * Shared across every page.
 *
 * Extracted the moment there was a second doc page. Three copies of a stylesheet agree on the day
 * they are written and drift afterwards, and the drift shows up as a site that looks subtly
 * different depending on which page you landed on.
 */

:root {
  color-scheme: dark;
  --bg: #050507;
  --ink: #b4b4b8;
  --bright: #e6e6ea;
  --white: #fff;
  --dim: #6e6e75;
  --line: #1c1c21;
  --panel: #0c0c10;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 4rem 1.5rem 6rem;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
}

main { max-width: 46rem; margin: 0 auto; }

h1 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2.1rem;
  letter-spacing: 0.03em;
  color: var(--white);
  font-weight: 500;
  margin: 0 0 0.4rem;
}

h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--dim);
  margin: 3.2rem 0 0.9rem;
  font-weight: 400;
}

h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1rem;
  color: var(--bright);
  font-weight: 500;
  margin: 2rem 0 0.4rem;
}

.tag { color: var(--dim); font-size: 0.82rem; letter-spacing: 0.2em; text-transform: uppercase; margin: 0 0 2.5rem; }
.updated { color: var(--dim); font-size: 0.8rem; margin: 0 0 2rem; }

a { color: var(--white); }
ul { padding-left: 1.1rem; }
li { margin: 0.5rem 0; }
strong { color: var(--bright); font-weight: 500; }
hr { border: none; border-top: 1px solid var(--line); margin: 3.5rem 0; }
.foot { color: var(--dim); font-size: 0.82rem; }

code, pre { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.84rem; }
pre {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  color: #c8c8cf;
  line-height: 1.6;
}
code { color: #d8d8de; }

/* Wide content scrolls inside its own box; the page body must never scroll sideways. */
.scroll { overflow-x: auto; }

table { border-collapse: collapse; width: 100%; font-size: 0.88rem; margin: 0.5rem 0; }
th, td { text-align: left; padding: 0.5rem 0.9rem 0.5rem 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--dim); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
td.n { font-family: "JetBrains Mono", monospace; }
.win { color: var(--white); }

/* An aside that qualifies a claim rather than decorating it. */
.note {
  border-left: 2px solid #2a2a32;
  padding: 0.2rem 0 0.2rem 1.1rem;
  margin: 1.4rem 0;
  color: #96969c;
}

.links { margin-top: 2.5rem; display: flex; gap: 1.6rem; flex-wrap: wrap; font-size: 0.9rem; }

/* Docs navigation. Grows as topics are added, so it wraps rather than assuming a count. */
.docnav {
  display: flex; gap: 1.4rem; flex-wrap: wrap;
  margin: 0 0 2.5rem; padding: 0 0 1.2rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.86rem;
}
.docnav a { color: var(--dim); text-decoration: none; }
.docnav a:hover { color: var(--ink); }
.docnav a[aria-current="page"] { color: var(--white); }

/* A doc that exists as a heading but has not been written yet. Saying so beats a dead link. */
.docnav span { color: #3a3a42; }

.doclist { list-style: none; padding: 0; }
.doclist li { margin: 0 0 1.6rem; }
.doclist a { font-family: "Space Grotesk", sans-serif; font-size: 1.05rem; text-decoration: none; }
.doclist p { margin: 0.2rem 0 0; color: var(--dim); font-size: 0.9rem; }
