/* CROWNLINE privacy policy. Plain CSS, no web fonts, no external requests.
   Palette = the app's design system (Ivory / Charcoal / Light Oak). Two values differ from the app's tokens on purpose:
   the light secondary text and the light link colour are darkened so that they reach WCAG AA (4.5:1) on Ivory. */

:root {
  color-scheme: light dark;
  --bg: #f7f3ea;
  --surface: #fbf9f3;
  --text: #1b1a18;
  --text-2: #5e574c;
  --accent: #8a5326;
  --line: rgba(27, 26, 24, 0.14);
  --focus: #8a5326;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18;
    --surface: #242320;
    --text: #f7f3ea;
    --text-2: #b4ac9e;
    --accent: #d7a567;
    --line: rgba(247, 243, 234, 0.16);
    --focus: #d7a567;
  }
}

* { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

.wrap {
  max-width: 45rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--surface);
  color: var(--text);
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}
.skip:focus { top: 0.75rem; }

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

/* Header */
.site-header { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--line); }
.brand {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 7vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
.meta { color: var(--text-2); margin: 0; font-size: 0.95rem; }
.meta + .meta { margin-top: 0.15rem; }

/* Contents */
.toc {
  margin: 2rem 0 0.5rem;
  padding: 1.25rem 1.25rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.toc h2 {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  border: 0;
  margin: 0 0 0.6rem;
  padding: 0;
}
.toc ol { margin: 0; padding-left: 1.4rem; columns: 1; }
.toc li { padding: 0.12rem 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
@media (min-width: 40rem) { .toc ol { columns: 2; column-gap: 2rem; } }

/* Body */
main { padding-bottom: 3rem; }
main > section { padding-top: 2.4rem; scroll-margin-top: 1rem; }
h2 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.4rem, 4.5vw, 1.7rem);
  line-height: 1.25;
  margin: 0 0 0.9rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}
h3 { font-size: 1.02rem; font-weight: 650; margin: 1.5rem 0 0.4rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin: 0.3rem 0; }
li > ul, li > ol { margin: 0.3rem 0 0.2rem; }
strong { font-weight: 650; }
.lede { font-size: 1.12rem; }
/* Fact lists (providers, retention). Definition lists, not tables: they stay readable at any width without sideways scrolling.
   Narrow screens stack the term above its details; wider screens put the term in its own column. */
.facts { margin: 0.4rem 0 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.facts > div { padding: 1rem 1.15rem; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-weight: 650; margin: 0 0 0.3rem; }
.facts dd { margin: 0 0 0.3rem; }
.facts dd:last-child { margin-bottom: 0; }
@media (min-width: 40rem) {
  .facts > div { display: grid; grid-template-columns: 13rem 1fr; column-gap: 1.5rem; align-items: start; }
  .facts dt { margin: 0; }
  .facts dd { grid-column: 2; }
}

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 1.75rem 0 3rem; color: var(--text-2); font-size: 0.92rem; }
.site-footer p { margin: 0 0 0.35rem; }

@media print {
  :root { --bg: #fff; --surface: #fff; --text: #000; --text-2: #333; --accent: #000; --line: #999; }
  .skip, .toc { display: none; }
  a { text-decoration: underline; }
}
