/* KinderGlow static site — no JavaScript, no external requests.
   Fonts are system stacks on purpose: a webfont fetch would leak visitor IPs
   to a third party on a page whose whole job is to explain data handling. */

:root {
  --bg: #fffdf8;
  --surface: #ffffff;
  --text: #24303f;
  --muted: #5d6b7d;
  --line: #e7e2d6;
  --accent: #e07a3f;
  --accent-ink: #b45a24;
  --focus: #2563eb;
  --maxw: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181e;
    --surface: #1b2129;
    --text: #e8edf4;
    --muted: #9dabbd;
    --line: #2c343f;
    --accent: #f0a06a;
    --accent-ink: #f5bd93;
    --focus: #7aa7ff;
  }
}

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

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ---- header ---- */

.site-head {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.site-head .wrap {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  justify-content: space-between;
}

.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.brand span { color: var(--accent-ink); }

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a { color: var(--muted); }

/* ---- type ---- */

h1 {
  font-size: 1.9rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 2rem 0 0.5rem;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.35;
  margin: 2.25rem 0 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--line);
}

h2:first-of-type { border-top: 0; }

h3 {
  font-size: 1rem;
  margin: 1.5rem 0 0.35rem;
}

p, ul, ol { margin: 0 0 1rem; }

ul, ol { padding-left: 1.35rem; }

li { margin-bottom: 0.4rem; }

.lede {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.muted { color: var(--muted); }

small, .small { font-size: 0.9rem; }

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

a:hover { text-decoration-thickness: 2px; }

a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

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

/* ---- components ---- */

.notice {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}

.notice p:last-child { margin-bottom: 0; }

.notice strong { color: var(--accent-ink); }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.75rem 0;
  padding: 0;
  list-style: none;
}

.links a {
  display: inline-block;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 0.55rem 1rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.links a:hover { border-color: var(--accent); }

.toc {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1rem 1.1rem;
  font-size: 0.95rem;
}

.toc p { font-weight: 600; margin-bottom: 0.5rem; }

.toc ul { margin: 0; }

/* Definition-style rows for the data tables — reads better than a real table
   on a phone, where a 3-column table would need horizontal scrolling. */
.rows { margin: 1rem 0; }

.rows > div {
  border-top: 1px solid var(--line);
  padding: 0.7rem 0;
}

.rows > div:last-child { border-bottom: 1px solid var(--line); }

.rows dt, .rows .k {
  font-weight: 600;
  font-size: 0.95rem;
}

.rows dd, .rows .v {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-foot {
  border-top: 1px solid var(--line);
  margin-top: 3rem;
  padding-top: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: space-between;
}

.site-foot a { color: var(--muted); }

@media (max-width: 30rem) {
  body { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  .site-head .wrap { flex-direction: column; align-items: flex-start; }
}
