/* Static legal pages (scripts/build-legal.mjs). System fonts only; light/dark follows the OS. */
:root {
  --bg: #f6f6f4;
  --surface: #ffffff;
  --border: #e2e2de;
  --text: #17181a;
  --muted: #5f646a;
  --accent: #e87722; /* brand */
  --link: #a84d00; /* accent darkened for 4.5:1 text contrast on light */
  --code-bg: #ecece8;
  --measure: 46rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1012;
    --surface: #16181b;
    --border: #2a2e33;
    --text: #ecedee;
    --muted: #9aa0a6;
    --link: #f39a5c;
    --code-bg: #1d2024;
  }
}

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

html {
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
body { margin: 0; background: var(--bg); }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

header.site, main, footer.site { max-width: var(--measure); margin: 0 auto; padding: 0 16px; }

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 650;
  text-decoration: none;
}
.brand img { border-radius: 7px; }
.back { font-size: 0.9375rem; white-space: nowrap; }

article { overflow-wrap: anywhere; padding-bottom: 48px; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; overflow-wrap: normal; }
h1 { font-size: clamp(1.75rem, 5vw, 2.25rem); margin: 24px 0 8px; }
h1::after { content: ''; display: block; width: 48px; height: 4px; margin-top: 14px; border-radius: 2px; background: var(--accent); }
h2 { font-size: 1.25rem; margin: 2.2em 0 0.6em; scroll-margin-top: 16px; }
h3 { font-size: 1.0625rem; margin: 1.6em 0 0.4em; }
p, ul, ol { margin: 0 0 1em; }
ul, ol { padding-left: 1.4em; }
li + li { margin-top: 0.3em; }
.stand { color: var(--muted); font-size: 0.9375rem; }
strong { font-weight: 650; }

code {
  font: 0.85em/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.table { overflow-x: auto; margin: 0 0 1.2em; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; overflow-wrap: normal; }
th, td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { font-weight: 650; background: color-mix(in srgb, var(--accent) 7%, transparent); }
tr:last-child td { border-bottom: 0; }
td a { overflow-wrap: anywhere; }

/* Phones: each row becomes a card, the column name (data-label) above each value. */
@media (max-width: 40rem) {
  .table { border: 0; background: none; overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tr { margin-bottom: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
  td, tr:last-child td { border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
  tr td:last-child { border-bottom: 0; }
  td::before { content: attr(data-label); display: block; color: var(--muted); font-size: 0.8125rem; font-weight: 650; }
}

footer.site { border-top: 1px solid var(--border); padding-top: 20px; padding-bottom: 32px; }
footer.site nav { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 0.9375rem; }
footer.site a { color: var(--muted); }
footer.site a[aria-current='page'] { color: var(--text); font-weight: 650; text-decoration: none; }

@media print {
  .back, footer.site { display: none; }
  a { color: inherit; }
  h1::after { background: #000; }
}
