/* The shared page shell's stylesheet (docs/adr/0003): tokens, accents, base
   styles, document pages and the legal footer. One source, two uses: published
   as /assets/css/site.css for every page, and inlined into the Shared Meal page
   (/m/), whose Content-Security-Policy allows no request.

   A page picks its accent with <html data-accent="gme|nutrimax"> and may opt into
   a colour scheme with <html data-color-scheme="nutrimax">. Pages only use these
   tokens; they never define them (tools/check-site.mjs).
   Beyond the base rules, style classes only, never bare elements (nav, section,
   footer): this file reaches every page, the Shared Meal page included. */

/* ── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
  --text:    #111827;
  --muted:   #6b7280;
  --bg:      #ffffff;
  --surface: #f9fafb;
  --border:  #e5e7eb;
  --radius:  12px;
  --font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* Accents. --accent fills buttons and badges; --accent-strong is accent text,
   lines and fills on the page background (--accent-hover: hovered fills);
   --accent-soft tints backgrounds; --accent-bright is accent on dark
   backgrounds; --accent-gradient fills heroes. */
:root,
[data-accent="gme"] {
  --accent:          #22c55e;
  --accent-strong:   #16a34a;
  --accent-hover:    #15803d;
  --accent-soft:     #dcfce7;
  --accent-bright:   #86efac;
  --accent-gradient: linear-gradient(135deg, #052e16 0%, #14532d 45%, #166534 100%);
}
[data-accent="nutrimax"] {
  --accent:          #22c55e;
  --accent-strong:   #16a34a;
  --accent-hover:    #15803d;
  --accent-soft:     #dcfce7;
  --accent-bright:   #86efac;
  --accent-gradient: linear-gradient(135deg, #052e16 0%, #14532d 45%, #166534 100%);
}

/* Colour schemes. Pages are light, with the neutrals above, unless they opt in:
   <html data-color-scheme="nutrimax"> gives NutriMax's green-tinted neutrals,
   light or dark as the system is set. The Shared Meal page uses it to keep the
   app's own look. */
[data-color-scheme="nutrimax"] {
  --text:    #0f2a1a;
  --muted:   #4b6455;
  --bg:      #ffffff;
  --surface: #f3faf5;
  --border:  #d7eadd;
}
@media (prefers-color-scheme: dark) {
  [data-color-scheme="nutrimax"] {
    --text:    #e6f4ea;
    --muted:   #a3bfae;
    --bg:      #13211a;
    --surface: #0b1510;
    --border:  #23382b;
    --accent-strong: #4ade80;
    --accent-hover:  #22c55e;
  }
}

/* ── BASE ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

/* ── DOCUMENTS ───────────────────────────────────────────────────────────── */
/* <main class="doc">: the legal documents, the Impressum and the Datenschutz. */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; line-height: 1.7; }
.doc h1 { font-size: 2rem; margin-bottom: 8px; }
.doc .subtitle { color: var(--muted); margin-bottom: 32px; }
.doc h2 { font-size: 1.25rem; margin: 36px 0 12px; color: var(--accent-strong); border-bottom: 1px solid var(--border); padding-bottom: 4px; }
.doc h3 { font-size: 1rem; margin: 20px 0 8px; }
.doc p, .doc li { margin-bottom: 12px; }
.doc ul { padding-left: 24px; margin-bottom: 12px; }
.doc a { color: var(--accent-strong); }
.doc .toc {
  background: var(--accent-soft);
  background: color-mix(in srgb, var(--accent-soft) 50%, var(--bg));
  border-left: 4px solid var(--accent-strong);
  padding: 16px 20px;
  margin: 24px 0 32px;
  border-radius: 4px;
}
.doc .toc h2 { margin: 0 0 10px; border: none; font-size: 1rem; }
.doc .toc ol { padding-left: 20px; }
.doc .toc li { margin-bottom: 4px; }
.doc .notice { background: #fff8e1; border-left: 4px solid #ffc107; padding: 12px 16px; border-radius: 4px; margin-bottom: 20px; }
.doc .notice-ok { background: #e8f5e9; border-left-color: #43a047; }

/* ── FOOTER ──────────────────────────────────────────────────────────────── */
/* _includes/shell/footer.html, on every page. Light by default; the product
   landing pages use the dark tone (site-footer-dark). */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.25rem;
  margin-bottom: 0.5rem;
}
.site-footer-links a:first-child { font-weight: 600; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

.site-footer-dark {
  background: var(--text);
  color: #9ca3af;
  border-top: none;
  padding: 2.5rem 1.5rem;
  font-size: 0.875rem;
}
.site-footer-dark a { color: var(--accent-bright); }
.site-footer-dark a:hover { color: var(--accent-bright); text-decoration: underline; }

