/* Shared styles for Terra Rescues legal pages (terms, privacy, food-safety).
   Utilitarian, long-form-readable, brand-consistent, light + dark. */

* { box-sizing: border-box; }

:root {
  --bg: #F5F7F4;
  --surface: #FFFFFF;
  --ink: #14211A;
  --muted: #5F6E64;
  --line: #DCE4DB;
  --brand: #0F5132;
  --brand-2: #16704A;
  --accent: #F2A65A;
  --warn-bg: #FDF6E9;
  --warn-line: #F0DCB4;
  --warn-ink: #7A6320;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A1710; --surface: #10231A; --ink: #EAF3EC; --muted: #9EB2A5;
    --line: #223A2C; --brand: #34A76A; --brand-2: #4FBE84;
    --warn-bg: #241B0E; --warn-line: #4A3B1C; --warn-ink: #E7C98A;
  }
}
:root[data-theme="light"] {
  --bg: #F5F7F4; --surface: #FFFFFF; --ink: #14211A; --muted: #5F6E64;
  --line: #DCE4DB; --brand: #0F5132; --brand-2: #16704A;
  --warn-bg: #FDF6E9; --warn-line: #F0DCB4; --warn-ink: #7A6320;
}
:root[data-theme="dark"] {
  --bg: #0A1710; --surface: #10231A; --ink: #EAF3EC; --muted: #9EB2A5;
  --line: #223A2C; --brand: #34A76A; --brand-2: #4FBE84;
  --warn-bg: #241B0E; --warn-line: #4A3B1C; --warn-ink: #E7C98A;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; letter-spacing: -0.02em; color: inherit; text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 9px; background: color-mix(in srgb, var(--brand) 16%, transparent); display: grid; place-items: center; font-size: 16px; }
.topbar a.home { color: var(--brand-2); font-weight: 700; font-size: 0.9rem; text-decoration: none; }
.topbar a.home:hover { text-decoration: underline; }

main { max-width: 760px; margin: 0 auto; padding: 40px 24px 80px; }

.doc-title { font-family: var(--serif); font-size: clamp(2rem, 1.5rem + 2vw, 2.8rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 8px; text-wrap: balance; }
.updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 28px; }

.lede { font-size: 1.08rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; margin: 0 0 28px; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin: 0 0 36px; }
.toc h2 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 28px; }
.toc li { margin-bottom: 6px; }
.toc a { color: var(--brand-2); text-decoration: none; font-size: 0.92rem; }
.toc a:hover { text-decoration: underline; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

h2.section { font-family: var(--serif); font-size: 1.4rem; letter-spacing: -0.01em; margin: 40px 0 12px; scroll-margin-top: 80px; }
h2.section .n { color: var(--brand-2); font-variant-numeric: tabular-nums; margin-right: 8px; }
h3 { font-size: 1.05rem; margin: 22px 0 8px; }
p, li { color: var(--ink); }
p { margin: 0 0 14px; }
ul, ol.body { padding-left: 22px; margin: 0 0 16px; }
li { margin-bottom: 8px; }
a { color: var(--brand-2); }
strong { font-weight: 700; }

.callout {
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 14px;
  padding: 18px 22px;
  margin: 24px 0;
}
.callout .h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--warn-ink); margin-bottom: 8px; }
.callout p, .callout li { color: var(--warn-ink); }
.callout :last-child { margin-bottom: 0; }

/* Apple-style "privacy nutrition label" summary */
.nutrition { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 6px 22px 20px; margin: 0 0 36px; }
.nutrition h2 { font-family: var(--serif); font-size: 1.25rem; margin: 18px 0 4px; }
.nutrition .sub { color: var(--muted); font-size: 0.9rem; margin: 0 0 16px; }
.nutrition .row { border-top: 1px solid var(--line); padding: 16px 0; }
.nutrition .row:first-of-type { border-top: none; }
.nutrition .row .k { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 0.95rem; margin-bottom: 10px; }
.nutrition .row .k .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand) 16%, transparent); font-size: 14px; }
.nutrition .chips { display: flex; flex-wrap: wrap; gap: 8px; }
.nutrition .chip { font-size: 0.85rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; background: color-mix(in srgb, var(--brand) 10%, transparent); color: var(--ink); border: 1px solid var(--line); }
.nutrition .none { color: var(--brand-2); font-weight: 700; font-size: 0.92rem; }

footer { border-top: 1px solid var(--line); }
.footer-inner { max-width: 760px; margin: 0 auto; padding: 28px 24px 60px; color: var(--muted); font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 18px; justify-content: space-between; }
.footer-inner a { color: var(--muted); text-decoration: none; margin-right: 16px; }
.footer-inner a:hover { color: var(--ink); }

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