/* BodySight legal pages. Colours from DESIGN.md (linen, ink, forest); system fonts only. */

:root {
  --ground: #F3F0EA;       /* linen */
  --surface: #FBF9F5;      /* card-top */
  --ink: #1A1C1A;          /* ink */
  --ink-body: #3E413C;     /* ink-body */
  --ink-quiet: #5F625B;    /* ink-secondary */
  --line: rgba(26, 28, 26, 0.12); /* track */
  --accent: #135C49;       /* forest-green */
  --accent-wash: rgba(19, 92, 73, 0.10); /* forest-wash */
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0F1512;     /* capture-night */
    --surface: #16201C;
    --ink: #F3F0EA;        /* linen */
    --ink-body: rgba(243, 240, 234, 0.86);
    --ink-quiet: rgba(255, 255, 255, 0.72); /* night-secondary */
    --line: rgba(255, 255, 255, 0.14);      /* night-glass-edge */
    --accent: #9FE3CB;     /* mint-soft */
    --accent-wash: rgba(159, 227, 203, 0.12);
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-body);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  hyphens: auto;
}

header.site, main, footer.site {
  max-width: 46rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

header.site { padding-top: 1.5rem; }

.brand {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.01em;
}

main { padding-top: 1rem; padding-bottom: 2.5rem; }

h1, h2, h3 { color: var(--ink); line-height: 1.25; hyphens: manual; }
h1 { font-size: 1.75rem; font-weight: 700; margin: 1rem 0 1.25rem; }
h2 { font-size: 1.25rem; font-weight: 650; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.0625rem; font-weight: 650; margin: 1.75rem 0 0.5rem; }

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
strong { color: var(--ink); font-weight: 600; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.table { margin: 0 0 1.25rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.975rem; }
th, td { text-align: left; vertical-align: top; padding: 0.7rem 0.75rem; border-bottom: 1px solid var(--line); }
th { color: var(--ink); font-weight: 600; background: var(--accent-wash); }
td:first-child { width: 32%; color: var(--ink); }

/* Narrow screens: each row becomes a block, the first cell its heading. */
@media (max-width: 40rem) {
  table, thead, tbody, tr, th, td { display: block; width: auto; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  tr { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
  td { padding: 0; border: 0; }
  td:first-child { width: auto; font-weight: 600; margin-bottom: 0.3rem; }
}

footer.site {
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
  padding-bottom: 2.5rem;
  font-size: 0.9375rem;
}

footer.site nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
footer.site a { color: var(--ink-quiet); }
footer.site a[aria-current="page"] { color: var(--ink); text-decoration: none; font-weight: 600; }
