/* The subpages: docs, terms, privacy, support.
   The same world as the front page, landed on paper. Same tokens, same
   mono labels, same rules; none of the theatre, because these pages are
   for reading. Deliberately single-ground like the front page. */
:root {
  --paper: #f4f2ee;
  --ink: #121418;
  --soft: #53575d;
  --faint: #8a8e95;
  --rule: #d7d3cb;
  --card: #fdfdfb;

  --blue: #004aad;
  --purple: #cb6ce6;
  --red: #ff3131;
  --orange: #ff751f;
  --green: #4a9e2f;
  --amber: #b97e0a;

  --t-label: .68rem;
  --t-sm: .92rem;
  --t-body: 1.04rem;
  --t-md: clamp(1.4rem, 2.2vw, 1.8rem);
  --t-lg: clamp(2rem, 4.4vw, 3.2rem);

  --ease: cubic-bezier(.23, 1, .32, 1);
  --glide: cubic-bezier(.19, 1, .22, 1);
}

* { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: var(--t-body);
  line-height: 1.66;
  -webkit-font-smoothing: antialiased;
}
.wrap { width: min(1180px, 100% - 3rem); margin-inline: auto; }
.col { max-width: 42rem; }

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: var(--t-label);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--faint);
}
.label { display: flex; align-items: center; gap: .9rem; margin: 0 0 1.4rem; }
.label span { white-space: nowrap; }
.label hr { flex: 1; height: 1px; border: 0; background: var(--rule); margin: 0; }

/* ---------- header ---------- */
header.site {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.6rem 0; gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); font-weight: 700; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand .bmark { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; width: 18px; height: 18px; }
.brand .bmark i { display: block; }
header.site nav { display: flex; gap: 1.5rem; align-items: center; flex-wrap: wrap; }
header.site nav a { color: var(--soft); text-decoration: none; font-size: var(--t-sm); font-weight: 520; }
header.site nav a:hover, header.site nav a[aria-current] { color: var(--ink); }
header.site .gh { display: inline-flex; color: var(--soft); }
header.site .gh:hover { color: var(--ink); }

/* ---------- page head ---------- */
.pagehead { padding: clamp(2.5rem, 6vw, 5rem) 0 0; }
h1 { margin: 0; font-size: var(--t-lg); line-height: 1.02; letter-spacing: -0.038em; font-weight: 700; text-wrap: balance; }
.pagehead .lede { font-size: clamp(1.08rem, 1.5vw, 1.28rem); line-height: 1.5; color: var(--soft); max-width: 36rem; margin: 1.3rem 0 0; }
.updated { margin: 1.6rem 0 0; }

/* ---------- prose ---------- */
main { padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(4rem, 8vw, 6rem); }
.prose h2 { font-size: var(--t-md); letter-spacing: -0.024em; margin: 2.8rem 0 .7rem; font-weight: 690; }
.prose h3 { font-size: 1.05rem; letter-spacing: -0.014em; margin: 1.8rem 0 .4rem; font-weight: 660; }
.prose p, .prose li { color: var(--soft); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.2rem; }
.prose li { margin-bottom: .45rem; }
.prose strong, .prose b { color: var(--ink); font-weight: 650; }
.prose a { color: var(--ink); text-decoration: none; background-image: linear-gradient(var(--faint), var(--faint)); background-size: 100% 1px; background-repeat: no-repeat; background-position: 0 100%; }
.prose a:hover { background-image: linear-gradient(var(--ink), var(--ink)); }
.prose code, .kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .84em; background: var(--card); border: 1px solid var(--rule);
  padding: .1em .4em; border-radius: 4px; color: var(--ink); white-space: nowrap;
}
.prose pre { background: #121418; color: #e8eaef; border-radius: 8px; padding: 1rem 1.2rem; overflow-x: auto; font-size: .84rem; line-height: 1.6; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; white-space: pre; }
.aside {
  border-left: 4px solid var(--blue);
  background: var(--card);
  padding: .85rem 1.15rem; margin: 1.5rem 0;
  font-size: var(--t-sm); color: var(--soft);
}
.prose .qa { border-bottom: 1px solid var(--rule); }
.prose .qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1.5rem; padding: 1rem 0; font-weight: 640; color: var(--ink); letter-spacing: -0.012em; }
.prose .qa summary::-webkit-details-marker { display: none; }
.prose .qa summary::after { content: "+"; color: var(--faint); font-size: 1.25em; line-height: 1; transition: rotate 400ms var(--ease); flex: none; }
.prose .qa[open] summary::after { rotate: 45deg; }
.prose .qa p { margin: 0 0 1.1rem; }

/* ---------- docs layout ---------- */
.docs { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.toc { position: sticky; top: 1.5rem; display: flex; flex-direction: column; gap: .1rem; }
.toc a { color: var(--soft); text-decoration: none; font-size: var(--t-sm); padding: .32rem .6rem; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.on { color: var(--ink); border-left-color: var(--ink); font-weight: 600; }
.toc .mono { padding: .8rem .6rem .4rem; letter-spacing: .22em; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } .toc { position: static; flex-direction: row; flex-wrap: wrap; gap: .2rem .8rem; border-bottom: 1px solid var(--rule); padding-bottom: 1rem; } .toc .mono { display: none; } .toc a { border-left: 0; padding: .2rem 0; } }
.doc-section { scroll-margin-top: 1.5rem; }
.doc-section + .doc-section { margin-top: 3.2rem; border-top: 1px solid var(--rule); padding-top: 2.4rem; }

/* ---------- strip + footer ---------- */
.strip { display: flex; height: 8px; width: 100%; }
.strip i { display: block; height: 100%; }
footer.site { border-top: 1px solid var(--rule); padding: 2.2rem 0 3rem; }
.foot { display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem; justify-content: space-between; align-items: center; }
footer.site a { color: var(--soft); text-decoration: none; font-size: var(--t-sm); }
footer.site a:hover { color: var(--ink); }
footer.site .gh { display: inline-flex; }

:is(a, button, input, summary):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
