:root {
  color-scheme: light;
  --canvas: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #eef2f7;
  --ink: #17202a;
  --text: #17202a;
  --muted: #526074;
  --border: #d8e0ec;
  --action: #1f5eff;
  --radius: 0.5rem;
  --font-sans: "Instrument Sans Variable", "Instrument Sans", system-ui, sans-serif;
}

:root.dark {
  color-scheme: dark;
  --canvas: #10151c;
  --surface: #181f28;
  --surface-alt: #202934;
  --ink: #f4f7fb;
  --text: #f4f7fb;
  --muted: #b9c4d3;
  --border: #34404e;
  --action: #91adff;
}

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

body {
  margin: 0;
  min-width: 20rem;
  color: var(--text);
  background: var(--canvas);
  font-family: var(--font-sans);
  line-height: 1.6;
}

a {
  color: inherit;
  text-underline-offset: 0.22rem;
}

a:hover,
a:focus-visible {
  color: var(--action);
}

:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 3px;
}

.legal-shell {
  width: min(100%, 58rem);
  margin-inline: auto;
  padding: 1rem 1.25rem 3rem;
}

.legal-nav {
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.brand {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ink);
  font-weight: 720;
  text-decoration: none;
}

.brand img {
  width: 2rem;
  height: 2rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-actions a,
.theme-toggle {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  color: var(--text);
  background: var(--surface);
  font: inherit;
  text-decoration: none;
}

.theme-toggle {
  cursor: pointer;
}

.legal-hero {
  display: grid;
  gap: 1rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.legal-hero h1 {
  max-width: 15ch;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.25rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: 0;
}

.legal-hero p,
.meta {
  color: var(--muted);
}

main {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
}

h2 {
  margin: 0 0 0.5rem;
  color: var(--ink);
  line-height: 1.2;
}

p,
ul,
ol {
  margin-top: 0;
}

li {
  margin: 0.4rem 0;
}

.callout {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
}

.legal-footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 40rem) {
  .legal-nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
