
/* Layout: one calm reading column for a phone held in one hand; a single age picker up top answers "what's normal today?", reference sections follow. */
:root {
  --bg: #F1F5F6;
  --surface: #FFFFFF;
  --ink: #17303A;
  --muted: #55707A;
  --line: #D3DEE2;
  --accent: #176B66;
  --accent-ink: #FFFFFF;
  --gold: #F4D577;
  --gold-ink: #453603;
  --alert: #A3302A;
  --alert-bg: #FBECEA;
  --display: "Bricolage Grotesque", "Trebuchet MS", "Segoe UI", sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", Verdana, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1C22; --surface: #172A32; --ink: #E6EEF0; --muted: #9DB3BA; --line: #2B424B;
    --accent: #6FCFC6; --accent-ink: #0B2422; --gold: #E6C562; --gold-ink: #2E2403;
    --alert: #F2A199; --alert-bg: #3A1F1D; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1C22; --surface: #172A32; --ink: #E6EEF0; --muted: #9DB3BA; --line: #2B424B;
  --accent: #6FCFC6; --accent-ink: #0B2422; --gold: #E6C562; --gold-ink: #2E2403;
  --alert: #F2A199; --alert-bg: #3A1F1D; color-scheme: dark;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-inline: 16px;
  padding-block: 32px 56px;
}
.page { max-width: 42rem; margin-inline: auto; display: flex; flex-direction: column; gap: 3rem; }
section, header, footer { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(2rem, 7vw, 2.9rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 1.1rem; font-weight: 500; }
.eyebrow { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.09em; color: var(--accent); font-weight: 700; }
.lead { font-size: 1.15rem; color: var(--muted); }
.note { color: var(--muted); font-size: 0.95rem; }
mark { background: var(--gold); color: var(--gold-ink); padding: 0.05em 0.3em; border-radius: 3px; }
ul, ol { padding-left: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Age picker */
.picker { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; display: flex; flex-direction: column; gap: 1.1rem; }
.ages { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ages button {
  font: inherit; font-size: 0.95rem; color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer;
}
.ages button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.facts div { display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.facts dt { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); }
.facts dd { font-family: var(--display); font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.25; }
.facts dd small { display: block; font-family: var(--body); font-size: 0.9rem; font-weight: 400; color: var(--muted); line-height: 1.4; }
#age-tip { border-top: 1px solid var(--line); padding-top: 1rem; }
@media (max-width: 420px) { .facts { grid-template-columns: 1fr; } }

/* Tummy sizes, circles drawn to scale by volume */
.tummies { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; }
.tummies figure { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
.tummies i { display: block; border-radius: 50%; background: var(--gold); }
.tummies figcaption { font-size: 0.9rem; line-height: 1.35; color: var(--muted); }
.tummies b { display: block; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Hunger cues */
.cues { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.cues div { border-top: 3px solid var(--accent); padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; }
.cues div:last-child { border-top-color: var(--alert); }
.cues p { font-size: 0.97rem; }
@media (max-width: 560px) { .cues { grid-template-columns: 1fr; } }

.terms { display: flex; flex-direction: column; gap: 0.9rem; }
.terms div { display: flex; flex-direction: column; gap: 0.15rem; }
.terms dt { font-weight: 700; }

/* Calculator */
.calc { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.fields { display: flex; flex-wrap: wrap; gap: 1rem; }
.fields label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.9rem; color: var(--muted); flex: 1 1 9rem; min-width: 0; }
.fields input { font: inherit; font-size: 1.1rem; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 0.55rem 0.7rem; width: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; }
#calc-out { font-size: 1.05rem; }
#calc-out b { font-family: var(--display); font-size: 1.3rem; font-variant-numeric: tabular-nums; }

.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.65rem 0.75rem 0.65rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 400; }
td:last-child { font-weight: 700; }

.urgent { background: var(--alert-bg); border-radius: 14px; padding: 1.25rem; }
.urgent h2, .urgent h3 { color: var(--alert); }
footer { border-top: 1px solid var(--line); padding-top: 1.25rem; gap: 0.6rem; }

