/* Plate, the app's visual system (DESIGN.md), carried onto its legal pages. Dark is the
   app's default; light follows the reader's system setting. Fonts are served from this
   site, never a third party, so opening a page contacts nobody else. */

@font-face {
  font-family: Geist;
  src: url("/fonts/Geist-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Geist;
  src: url("/fonts/Geist-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --ground: #0e0d0a;
  --surface: #1a1813;
  --raised: #25221b;
  --hairline: #322e25;
  --ink: #f3efe6;
  --ink-secondary: #a59e8f;
  --accent-ink: #f4ce3f;
  --accent-soft: #352e13;
}
@media (prefers-color-scheme: light) {
  :root {
    --ground: #faf8f2;
    --surface: #f1eee4;
    --raised: #e7e3d6;
    --hairline: #ddd8c9;
    --ink: #1c1a14;
    --ink-secondary: #5f594b;
    --accent-ink: #7a5c00;
    --accent-soft: #f9f1d4;
  }
}

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

html {
  background: var(--ground);
  scrollbar-color: var(--hairline) var(--ground);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--ink-secondary);
  font: 400 1rem/1.6 Geist, system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
}

::selection {
  background: var(--accent-soft);
  color: var(--ink);
}

.page {
  max-width: 68ch;
  margin: 0 auto;
  padding: 24px 16px 48px;
}
@media (min-width: 640px) {
  .page {
    padding: 48px 24px 64px;
  }
}

/* The wordmark leads home; the plate is the same drawing the app uses for a photo-less
   exercise. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand svg {
  width: 28px;
  height: 28px;
  color: var(--accent-ink);
  flex: none;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-weight: 600;
  text-wrap: balance;
}
h1 {
  margin: 40px 0 4px;
  font-size: clamp(1.875rem, 1.5rem + 2vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
}
h2 {
  margin: 48px 0 12px;
  font-size: 1.25rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  scroll-margin-top: 24px;
}
h3 {
  margin: 28px 0 8px;
  font-size: 1rem;
}

.updated {
  margin: 0;
  font-size: 0.8125rem;
}

p,
ul,
ol,
address {
  margin: 0 0 16px;
}
address {
  font-style: normal;
}
ul,
ol {
  padding-left: 1.25em;
}
li + li {
  margin-top: 6px;
}
strong {
  color: var(--ink);
  font-weight: 600;
}

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

/* The summary sits on the app's card surface: rounded, tonal, no border or shadow. */
.summary {
  margin: 32px 0 0;
  padding: 20px 24px;
  border-radius: 28px;
  background: var(--surface);
}
.summary p {
  margin: 0;
}

.contents {
  margin: 32px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--hairline);
}
.contents h2 {
  margin: 0 0 8px;
  font-size: 0.875rem;
  color: var(--ink-secondary);
}
.contents ol {
  margin: 0;
}

table {
  width: 100%;
  margin: 0 0 16px;
  border-collapse: collapse;
}
th,
td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
th {
  color: var(--ink);
  font-weight: 600;
  white-space: nowrap;
}
thead th {
  color: var(--ink-secondary);
  font-size: 0.8125rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  margin: 24px 0 0;
  list-style: none;
}
.links li + li {
  margin: 0;
}
/* The same outlined pills the app's settings screen uses for these pages. */
.links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
}
.links a:hover {
  background: var(--raised);
}
.links a[aria-current="page"] {
  background: var(--raised);
  color: var(--accent-ink);
}

footer {
  margin-top: 64px;
  padding-top: 8px;
  border-top: 1px solid var(--hairline);
  font-size: 0.875rem;
}
footer .links {
  margin: 8px 0 16px;
}
footer .links a {
  min-height: 40px;
  padding: 0 14px;
  font-size: 0.8125rem;
  color: var(--ink-secondary);
}
footer p {
  margin: 0;
}
