/* Help, Privacy and Terms pages (app/templates/legal): the app's paper look.
   Gold marks rules and link underlines only; every word is ink or caption, so text keeps its contrast. */
:root {
  color-scheme: light;
  --paper: #FAF5EA;
  --ink: #1F1A15;
  --caption: #4B3F35;
  --gold: #C9A24E;
  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #14110E;
    --ink: #F1E8D8;
    --caption: #C9BCA6;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #14110E;
  --ink: #F1E8D8;
  --caption: #C9BCA6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-text-size-adjust: 100%;
}

.page {
  max-width: 42rem;
  margin: 0 auto;
  padding: 32px max(16px, env(safe-area-inset-right, 0px)) 64px max(16px, env(safe-area-inset-left, 0px));
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gold);
  font-size: 0.95rem;
}

nav a[aria-current="page"] { font-weight: 600; text-decoration: none; }

.wordmark {
  font: 700 1.05rem/1 var(--serif);
  color: var(--ink);
  margin: 24px 0 4px;
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
}

h1 { font-size: 2rem; margin: 6px 0 4px; }
h2 { font-size: 1.25rem; margin: 32px 0 6px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); }

p, li { color: var(--caption); }
p { margin: 10px 0; }
ul { padding-left: 1.2rem; margin: 10px 0; }
li { margin: 6px 0; }
strong { color: var(--ink); font-weight: 600; }

.updated { font-style: italic; font-family: var(--serif); color: var(--caption); margin-top: 0; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

footer {
  margin-top: 40px;
  padding-top: 14px;
  border-top: 1px solid var(--gold);
  font-size: 0.9rem;
  color: var(--caption);
}
