
/*
 * Styles for the public pages (docs, support, privacy, terms) and the
 * server-rendered OAuth pages. No JavaScript, no web fonts, no external
 * requests. Same palette as the app; light and dark follow the system.
 */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1b1c1f;
  --muted: #555a64;
  --border: #d5d8de;
  --accent: #1f4fd1;
  --warn: #8a5100;
  --focus: #1f4fd1;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1c1e22;
    --text: #eceef2;
    --muted: #a7adb8;
    --border: #3a3e46;
    --accent: #8fb0ff;
    --warn: #f3c06b;
    --focus: #8fb0ff;
  }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); }
.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }
.wrap.narrow { max-width: 34rem; padding-top: 3rem; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 3px; }
.button { display: inline-block; padding: 0.55rem 1.1rem; border-radius: 8px; background: var(--accent); color: var(--bg); font-weight: 600; text-decoration: none; }
.button:hover { filter: brightness(1.08); }
.skip-link { position: absolute; left: -999px; top: 0.5rem; background: var(--bg); padding: 0.5rem 0.75rem; }
.skip-link:focus { left: 0.5rem; z-index: 1; }

.site-header { border-bottom: 1px solid var(--border); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 0.75rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--text); font-weight: 700; text-decoration: none; }
.site-header ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; margin: 0; padding: 0; list-style: none; }
.site-header li + li { margin-top: 0; }
.site-header nav a { color: var(--muted); text-decoration: none; padding: 0.25rem 0; }
.site-header nav a:hover { color: var(--text); text-decoration: underline; }
.site-header nav a[aria-current="page"] { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

main { padding-block: 2rem 3rem; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.3rem; line-height: 1.3; margin: 2.25rem 0 0.5rem; scroll-margin-top: 1rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.meta { color: var(--muted); font-size: 0.9rem; }
ul, ol { padding-left: 1.4rem; }
li + li { margin-top: 0.35rem; }

.draft-note { border: 1px dashed var(--warn); color: var(--warn); border-radius: 8px; padding: 0.5rem 0.75rem; }

.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 0.75rem 1.25rem; margin: 1.5rem 0; }
.toc-title { font-size: 0.95rem; margin: 0 0 0.25rem; color: var(--muted); }
.toc ol { margin: 0; columns: 2 14rem; }

.qa dt { font-weight: 600; margin-top: 1rem; }
.qa dd { margin: 0.25rem 0 0; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 1.25rem; }
.facts dt { font-weight: 600; }
.facts dd { margin: 0; }

.table-scroll { overflow-x: auto; margin: 1rem 0; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
caption { text-align: left; font-weight: 600; padding-bottom: 0.5rem; }
th, td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--surface); }
tbody th { font-weight: 500; }

.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; }
.site-footer .wrap { padding-block: 1.25rem; }

@media (forced-colors: active) {
  .site-header nav a[aria-current="page"] { text-decoration: underline; box-shadow: none; }
}
@media print {
  .site-header nav, .skip-link, .toc { display: none; }
  a { color: inherit; }
}
