/* Shared stylesheet for /privacy and /terms.
   Served from 'self' only: the CSP forbids inline styles and scripts, so every
   rule lives here. No web fonts, no external resources. */

:root {
  --bg: #ffffff;
  --text: #1a1f2b;
  --muted: #4a5468;
  --rule: #d9dee8;
  --link: #0b57d0;
  --link-visited: #6a3fb5;
  --banner-bg: #fff4d6;
  --banner-text: #4a3500;
  --banner-rule: #e0b440;
  --table-head: #f2f4f8;
  --code-bg: #f2f4f8;
  --focus: #ffb000;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0f1a;
    --text: #f2f5fa;
    --muted: #c9d2e3;
    --rule: #2a3347;
    --link: #8ab8ff;
    --link-visited: #c3a6ff;
    --banner-bg: #3a2e05;
    --banner-text: #ffe9a8;
    --banner-rule: #8a6d12;
    --table-head: #161d2c;
    --code-bg: #161d2c;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--bg);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border: 2px solid var(--focus);
  z-index: 10;
}

.draft-banner {
  margin: 0;
  padding: 0.75rem 1rem;
  background: var(--banner-bg);
  color: var(--banner-text);
  border-bottom: 2px solid var(--banner-rule);
  font-weight: 700;
  text-align: center;
}

main {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0.5rem 0 0.25rem;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  margin: 2.25rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--rule);
}

h3 {
  font-size: 1.125rem;
  line-height: 1.35;
  margin: 1.5rem 0 0.375rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.4rem;
}

li {
  margin-bottom: 0.375rem;
}

.updated {
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.summary {
  border-left: 4px solid var(--rule);
  padding: 0.25rem 0 0.25rem 1rem;
  margin: 1.5rem 0;
}

.toc ol {
  columns: 2 14rem;
  column-gap: 2rem;
}

.toc li {
  break-inside: avoid;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
  overflow-wrap: anywhere;
}

a:visited {
  color: var(--link-visited);
}

a:focus-visible,
.table-wrap:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.1em 0.3em;
  border-radius: 3px;
  overflow-wrap: anywhere;
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  -webkit-overflow-scrolling: touch;
}

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 32rem;
  font-size: 0.975rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--rule);
}

thead th {
  background: var(--table-head);
}

footer {
  max-width: 46rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}

footer a {
  margin-right: 1rem;
}

@media (max-width: 30rem) {
  body {
    font-size: 1rem;
  }

  h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  main {
    padding: 1rem 1rem 2.5rem;
  }
}

@media print {
  :root {
    --bg: #ffffff;
    --text: #000000;
    --muted: #333333;
    --link: #000000;
    --link-visited: #000000;
  }

  .skip-link,
  .toc {
    display: none;
  }

  .table-wrap {
    overflow: visible;
  }

  table {
    min-width: 0;
  }

  h2 {
    break-after: avoid;
  }
}
