:root {
  color-scheme: light dark;
  --background: #f7f8fa;
  --surface: #ffffff;
  --text: #172033;
  --muted: #5c667a;
  --border: #d9deea;
  --link: #0759c7;
  --focus: #ffbf47;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #10131a;
    --surface: #171c26;
    --text: #f3f5fa;
    --muted: #b8c0d0;
    --border: #374055;
    --link: #8fc1ff;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
  line-height: 1.65;
}

.shell {
  width: min(100% - 2rem, 52rem);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  padding: .75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border: 3px solid var(--focus);
}

.skip-link:focus { top: 1rem; }

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.site-header .shell {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1rem;
}

.app-name { margin: 0; font-weight: 700; }

nav { display: flex; flex-wrap: wrap; gap: .9rem; }

a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: .16em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.legal-document {
  margin-block: 2rem;
  padding: clamp(1.25rem, 4vw, 3rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .75rem;
}

h1, h2, h3 { line-height: 1.25; scroll-margin-top: 1rem; }
h1 { font-size: clamp(2rem, 6vw, 3rem); }
h2 { margin-top: 2.25rem; }
p, li { max-width: 72ch; }
table { width: 100%; border-collapse: collapse; overflow-wrap: anywhere; }
th, td { padding: .65rem; border: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: color-mix(in srgb, var(--surface), var(--text) 7%); }

.site-footer {
  padding-block: 1rem 3rem;
  color: var(--muted);
}

@media (max-width: 38rem) {
  .site-header .shell { align-items: flex-start; flex-direction: column; }
  .legal-document { margin-block: 1rem; border-radius: .5rem; }
  table { display: block; overflow-x: auto; }
}

@media print {
  .skip-link, nav { display: none; }
  body { background: #fff; color: #000; }
  .legal-document { border: 0; padding: 0; }
  a { color: inherit; }
}
