/* The site's own styles. Every rule is scoped to the site's header, footer
   or `main.page`: the docs page's main area belongs to Scalar, which uses the
   same elements (nav, button, input, table...) and must not inherit these. */
:root {
  --ink: #1b1f24; --muted: #5b6470; --line: #d9dee4; --bg: #ffffff;
  --accent: #3b2a8c; --danger: #a12622; --warn-bg: #fff7e0;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #e7eaee; --muted: #9aa4b0; --line: #2f3741; --bg: #14181d;
          --accent: #a99cf0; --danger: #f08a85; --warn-bg: #3a3320; }
}
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; line-height: 1.5; }

header.site, footer.site { display: flex; justify-content: space-between; align-items: center;
  max-width: 46rem; margin: 0 auto; padding: 1rem; }
header.site { border-bottom: 1px solid var(--line); }
footer.site { color: var(--muted); font-size: .9rem; }
header.site nav { display: flex; gap: 1rem; align-items: center; }
header.site a, footer.site a, main.page a { color: var(--accent); }
header.site .brand { font-weight: 700; text-decoration: none; color: var(--ink); }
header.site form.inline { display: inline; }
header.site button.link { font: inherit; background: none; border: 0; color: var(--accent);
  padding: 0; margin: 0; text-decoration: underline; cursor: pointer; }

main.page { max-width: 46rem; margin: 2rem auto; padding: 0 1rem; }
main.page label { display: block; margin: 1rem 0 .25rem; }
main.page input { font: inherit; padding: .5rem; width: 100%; max-width: 24rem; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); }
main.page button, main.page .button { font: inherit; padding: .5rem 1rem; margin-top: .75rem; border: 0;
  border-radius: 4px; background: var(--accent); color: #fff; cursor: pointer; text-decoration: none;
  display: inline-block; }
main.page button.danger { background: var(--danger); }
main.page .muted { color: var(--muted); }
main.page .error { color: var(--danger); }
main.page .warning { background: var(--warn-bg); padding: .75rem; border-radius: 4px; }
main.page table { border-collapse: collapse; width: 100%; }
main.page th, main.page td { text-align: left; padding: .5rem; border-bottom: 1px solid var(--line); }
main.page tr.revoked { color: var(--muted); }
main.page code.key { font-size: 1.05rem; word-break: break-all; }
main.page pre { overflow-x: auto; background: color-mix(in srgb, var(--line) 40%, transparent);
  padding: .75rem; border-radius: 4px; }
main.page .hero { margin: 2rem 0 3rem; }
main.page .lead { font-size: 1.15rem; }
main.page a.secondary { margin-left: 1rem; }
main.page .features { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1.5rem; margin: 2rem 0; }
main.page .features h3 { margin-bottom: .25rem; }
main.page .error-type { border-left: 3px solid var(--line); padding-left: 1rem; margin: 1.5rem 0; }
main.page .error-type.current { border-left-color: var(--accent); }
main.page .release { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 2rem; }
main.page .release h2 { margin: 0 0 .5rem; font-size: 1.25rem; }
main.page .release h2 a { color: var(--ink); text-decoration: none; }
main.page .release h3 { font-size: 1rem; margin: 1rem 0 .25rem; color: var(--muted); }
main.page .release li { margin: .25rem 0; }
main.page .badge { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em;
  padding: .1rem .4rem; border-radius: 4px; background: var(--danger); color: var(--bg); }

/* The docs page: full width, nothing of ours inside. */
main.wide { max-width: none; margin: 0; padding: 0; }

main.page .admin-nav { display: flex; gap: 1rem; margin-bottom: 1rem; }
main.page form.inline-form { display: flex; gap: .25rem; align-items: center; }
main.page form.inline-form input { width: 6rem; padding: .25rem; }
main.page form.inline-form button { margin: 0; padding: .25rem .6rem; }
