:root {
  color-scheme: light dark;
  --paper: #f6f5f1;
  --surface: #ffffff;
  --ink: #1a1d21;
  --ink-secondary: #4d525a;
  --ink-muted: #686d75;
  --rule: #d9d6cf;
  --rule-strong: #1a1d21;
  --accent: #9a5a0e;
  --button-bg: #1a1d21;
  --button-fg: #ffffff;
  --press: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #131518;
    --surface: #1b1e22;
    --ink: #e9e7e2;
    --ink-secondary: #a9adb3;
    --ink-muted: #8a8f96;
    --rule: #2e3238;
    --rule-strong: #e9e7e2;
    --accent: #e0a24a;
    --button-bg: #e9e7e2;
    --button-fg: #131518;
  }
}

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

html {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", "PT Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  padding: 0 24px;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.legal-shell {
  width: min(100%, 900px);
  margin: 0 auto;
  padding: 32px 0 72px;
}

.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule-strong);
}

.brand {
  color: var(--ink);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.back-link {
  font-size: 14px;
}

.legal-meta {
  margin: 14px 0 0;
  color: var(--ink-muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.legal-content {
  max-width: 72ch;
  padding-top: 48px;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

h1 {
  max-width: 18ch;
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 750;
}

h2 {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  font-size: 24px;
  font-weight: 700;
}

h3 {
  margin-top: 28px;
  font-size: 17px;
  font-weight: 700;
}

p,
ul,
ol,
table {
  margin-top: 16px;
}

p,
li,
td,
th {
  font-size: 16px;
}

p {
  color: var(--ink-secondary);
}

strong,
th {
  color: var(--ink);
}

ul,
ol {
  padding-left: 24px;
  color: var(--ink-secondary);
}

li + li {
  margin-top: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 700;
}

td {
  color: var(--ink-secondary);
}

.callout {
  margin-top: 24px;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  background: var(--surface);
}

.callout p {
  margin: 0;
}

.legal-footer {
  margin-top: 64px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-strong);
  color: var(--ink-muted);
  font-size: 14px;
}

.legal-footer a {
  color: inherit;
}

@media (max-width: 640px) {
  body {
    padding: 0 16px;
  }

  .legal-shell {
    padding-top: 20px;
  }

  .legal-content {
    padding-top: 36px;
  }

  p,
  li,
  td,
  th {
    font-size: 15px;
  }

  th,
  td {
    display: block;
    padding-right: 0;
  }

  th {
    padding-bottom: 2px;
    border-bottom: 0;
  }

  td {
    padding-top: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.legal-translation {
  margin-top: 64px;
  padding-top: 32px;
  border-top: 1px solid currentColor;
  border-top-color: color-mix(in srgb, currentColor 20%, transparent);
}
