/* Terms and Privacy pages (public/terms.html, public/privacy.html). Static, served as-is.
   Colours mirror src/v7/ui/styles/tokens.css (NOIR dark, warm ivory light). The theme follows the visitor's stored
   site choice (public/legal.js sets data-theme from 'meadows-v7-theme'); with no stored choice it follows the
   device setting (prefers-color-scheme). Fonts are the site's own, self-hosted in /fonts. */

@font-face{font-family:'Fraunces';src:url('/fonts/fraunces-latin-wght-normal.woff2?v=7f9d191d') format('woff2');font-weight:100 900;font-style:normal;font-display:swap}
@font-face{font-family:'Fraunces';src:url('/fonts/fraunces-latin-wght-italic.woff2?v=bceec2ef') format('woff2');font-weight:100 900;font-style:italic;font-display:swap}
@font-face{font-family:'Figtree';src:url('/fonts/figtree-latin-wght-normal.woff2?v=4ba7d3d0') format('woff2');font-weight:300 900;font-style:normal;font-display:swap}

:root {
  --ground: #0B0806;
  --glow: #1B140F;
  --surface: #16110D;
  --raised: #211A14;
  --hairline: rgba(243, 237, 226, 0.12);
  --ink: #F3EDE2;
  --muted: #B3A894;
  --link: #8FD3C1;
  --accent: #D9C7A0;
  --focus: #8FD3C1;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --ground: #F6F1EA;
    --glow: #FFFAF2;
    --surface: #FFFFFF;
    --raised: #EFE7DB;
    --hairline: rgba(34, 21, 7, 0.16);
    --ink: #221507;
    --muted: #6A6054;
    --link: #0F5E57;
    --accent: #8A6F2E;
    --focus: #0F5E57;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --ground: #F6F1EA;
  --glow: #FFFAF2;
  --surface: #FFFFFF;
  --raised: #EFE7DB;
  --hairline: rgba(34, 21, 7, 0.16);
  --ink: #221507;
  --muted: #6A6054;
  --link: #0F5E57;
  --accent: #8A6F2E;
  --focus: #0F5E57;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 16px; }
html, body { margin: 0; background: var(--ground); color: var(--ink); }
body {
  font: 16px/1.6 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: radial-gradient(120% 60% at 50% 0%, var(--glow) 0%, var(--ground) 60%) no-repeat, var(--ground);
  overflow-wrap: break-word;
}
a { color: var(--link); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus { left: 16px; background: var(--surface); padding: 8px 12px; z-index: 2; }

.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }

.top { border-bottom: 1px solid var(--hairline); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; min-height: 60px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; margin-right: auto; }
/* The brand links to the front page: a 44 px touch target. */
.brand { min-height: 44px; align-items: center; border-radius: 6px; }
.brand-mark { font: italic 600 30px/1 'Fraunces', Georgia, 'Times New Roman', serif; }
.brand-name { font-weight: 600; font-size: 18px; }
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.top nav a { color: var(--muted); text-decoration: none; padding: 10px 0; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.top nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }

main.wrap { padding-top: 40px; padding-bottom: 48px; }
h1, h2 { font-family: 'Fraunces', Georgia, 'Times New Roman', serif; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em; }
h1 { font-size: clamp(32px, 6vw, 44px); margin: 0 0 8px; }
h2 { font-size: 24px; margin: 40px 0 8px; padding-top: 8px; }
h3 { font-size: 17px; margin: 24px 0 4px; }
p, ul, ol, dl { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin: 4px 0; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.lede { font-size: 18px; color: var(--ink); }
.muted { color: var(--muted); }
strong { font-weight: 650; }

.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: 16px; padding: 18px 20px; margin: 20px 0 8px; }
.card h2 { margin: 0 0 8px; padding: 0; font-size: 20px; }
.card ul, .card ol { margin-bottom: 0; }
.toc ol { columns: 2 220px; column-gap: 32px; padding-left: 22px; }
.toc li { break-inside: avoid; margin: 0 0 6px; }
.toc ol { margin-top: 0; }
.defaults li::marker { color: var(--accent); }

dl.facts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; border-top: 1px solid var(--hairline); }
dl.facts > div { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
dl.facts dt { font-weight: 650; }
dl.facts dd { margin: 2px 0 0; color: var(--muted); }

.foot { border-top: 1px solid var(--hairline); font-size: 14px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; padding-top: 20px; padding-bottom: 32px; }
.foot a { color: var(--muted); }
.foot .spacer { flex: 1 1 auto; }

@media (max-width: 520px) {
  main.wrap { padding-top: 28px; }
  h2 { font-size: 22px; margin-top: 32px; }
  .card { padding: 16px; }
  .lede { font-size: 17px; }
}
@media print {
  body { background: #fff; color: #000; }
  .top nav, .skip { display: none; }
}
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; padding: 0 0.25em; border-radius: 4px; background: var(--raised); }
