/*
 * Minimal, accessible styling for Tife's hosted legal pages.
 * No fonts, no JS, no analytics — just typography, color, and rhythm
 * so the docs read well on phones (where most app-store reviewers and
 * users will open them) and desktops alike.
 */

:root {
  --tife-bg: #fffaf2;
  --tife-surface: #ffffff;
  --tife-text: #1a1410;
  --tife-text-muted: #5a4f48;
  --tife-border: #efe2cf;
  --tife-brand: #c5651a;
  --tife-brand-strong: #9b4a0e;
  --tife-radius: 12px;
  --tife-max-width: 720px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --tife-bg: #15110d;
    --tife-surface: #1d1814;
    --tife-text: #f3ece2;
    --tife-text-muted: #b3a89a;
    --tife-border: #2e261f;
    --tife-brand: #f0a062;
    --tife-brand-strong: #f3b67e;
  }
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--tife-bg);
  color: var(--tife-text);
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.6;
}

main {
  max-width: var(--tife-max-width);
  margin: 0 auto;
  padding: 32px 20px 96px;
}

header.page-header {
  border-bottom: 1px solid var(--tife-border);
  margin-bottom: 32px;
  padding-bottom: 16px;
}

header.page-header .eyebrow {
  margin: 0 0 6px;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tife-text-muted);
}

header.page-header h1 {
  margin: 0;
  font-size: 1.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

header.page-header .meta {
  margin: 12px 0 0;
  font-size: 0.875rem;
  color: var(--tife-text-muted);
}

h2 {
  margin: 40px 0 12px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

h3 {
  margin: 28px 0 10px;
  font-size: 1.0625rem;
  font-weight: 600;
}

p,
ul,
ol {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 22px;
}

li {
  margin-bottom: 6px;
}

a {
  color: var(--tife-brand);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover,
a:focus {
  color: var(--tife-brand-strong);
}

blockquote {
  margin: 16px 0;
  padding: 14px 18px;
  background: var(--tife-surface);
  border: 1px solid var(--tife-border);
  border-radius: var(--tife-radius);
  color: var(--tife-text);
  font-size: 0.95rem;
}

blockquote p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 0.95rem;
}

th,
td {
  border: 1px solid var(--tife-border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--tife-surface);
  font-weight: 600;
}

code {
  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Consolas,
    monospace;
  font-size: 0.9em;
  background: var(--tife-surface);
  border: 1px solid var(--tife-border);
  border-radius: 4px;
  padding: 1px 5px;
}

footer.page-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--tife-border);
  font-size: 0.875rem;
  color: var(--tife-text-muted);
}

footer.page-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

@media (max-width: 540px) {
  main {
    padding: 24px 16px 64px;
  }

  header.page-header h1 {
    font-size: 1.625rem;
  }

  h2 {
    font-size: 1.125rem;
  }
}
