:root {
  --bg: #FFFFFF;
  --surface: #F6F5F3;
  --track: #F1F0EE;
  --line: #ECEAE7;
  --ink: #1C1B1A;
  --ink-2: #3A3936;
  --muted: #63615D;
  --accent: #A8385A;
  --serif: Newsreader, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); }
body { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: #4A4845; text-decoration-color: #C9C6C1; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.page { max-width: 440px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; }

/* Header photo */
.hero { position: relative; height: 400px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding: 0 24px 28px; }
.hero__week { position: absolute; left: 24px; top: 24px; display: flex; flex-direction: column; gap: 8px; }
.hero__num { font-family: var(--serif); font-size: 26px; font-weight: 500; }
.hero__day { font-size: 13px; color: var(--muted); margin-left: 8px; }
.progress { width: 160px; height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--accent); }
.hero__due { font-size: 12px; color: var(--muted); }
.hero img { width: 220px; height: auto; margin-bottom: 20px; }
.hero__fruit { font-family: var(--serif); font-size: 30px; margin: 0; font-weight: 400; }

/* Stats */
.stats { margin: 0 24px; display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.stat { padding: 18px 0; display: flex; flex-direction: column; gap: 4px; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat dt { font-size: 12px; color: var(--muted); }
.stat dd { margin: 0; font-family: var(--serif); font-size: 26px; }

/* Tabs */
.tabs { margin: 24px 24px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--track); }
.tabs button { min-height: 44px; border: 0; border-radius: 999px; background: transparent; color: #4A4845; font: 500 15px var(--sans); cursor: pointer; }
.tabs button[aria-selected="true"] { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

.panel { margin: 28px 24px 0; display: flex; flex-direction: column; gap: 16px; }
.panel[hidden] { display: none; }
.section-label { font-size: 13px; font-weight: 600; color: var(--accent); margin: 0; }
.panel__head { display: flex; justify-content: space-between; align-items: baseline; }
.hint { font-size: 12px; color: var(--muted); }

.quote { margin: 0; font-family: var(--serif); font-style: italic; font-size: 24px; line-height: 1.35; }
.milestones { list-style: none; margin: 0; padding: 0; }
.milestones li { display: flex; align-items: center; gap: 14px; padding: 12px 0; font-size: 15px; }
.milestones li + li { border-top: 1px solid var(--line); }

.icon { width: 28px; height: 28px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.symptoms { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.symptom { min-height: 92px; padding: 14px; border: 0; border-radius: 14px; background: var(--surface); color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; text-align: left; font: 400 14px/1.3 var(--sans); cursor: pointer; }
.symptom:hover { background: #EFEDEA; }
.also { margin: 0; font-size: 14px; line-height: 1.55; color: var(--ink-2); }

/* Page sources */
.page-sources { margin: auto 24px 24px; padding-top: 28px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.page-sources h2 { font-size: 12px; font-weight: 600; margin: 0; }

/* Pop-up card */
.modal { position: fixed; inset: 0; z-index: 10; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,19,18,.5); }
.modal__card { position: absolute; left: 5%; top: 5%; width: 90%; height: 90%; max-width: 480px; margin: 0 auto; right: 0;
  background: #FFFFFF; border-radius: 22px; box-shadow: 0 12px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
@media (min-width: 534px) { .modal__card { left: 0; } }
.modal__head { display: flex; align-items: center; gap: 12px; padding: 20px 12px 16px 20px; border-bottom: 1px solid var(--line); }
.modal__icon { width: 44px; height: 44px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; flex-shrink: 0; }
.modal__icon svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.modal__head h2 { margin: 0; flex: 1; font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.15; }
.modal__close { width: 44px; height: 44px; border: 0; border-radius: 999px; background: var(--track); display: grid; place-items: center; cursor: pointer; flex-shrink: 0; }
.modal__close svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.modal__body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; }
.facts { margin: 0; }
.facts div { padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 12px; font-weight: 600; color: var(--accent); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 15px; line-height: 1.45; }
.sources { margin-top: 18px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.sources h3 { font-size: 12px; font-weight: 600; margin: 0 0 6px; }
.sources ol { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }

.empty { padding: 48px 24px; font-size: 15px; line-height: 1.5; }

/* Mother tab: tags, "Still common" chips, week-by-week chart */
.symptom__top { display: flex; width: 100%; align-items: flex-start; justify-content: space-between; gap: 8px; }
.tag { font-size: 11px; font-weight: 600; line-height: 1; padding: 5px 8px; border-radius: 999px; background: #FFFFFF; color: var(--accent); white-space: nowrap; }
.tag--new { color: var(--ink-2); }
.secondary { display: flex; flex-direction: column; gap: 10px; }
.section-label--muted { color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 6px 14px 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--ink);
  display: inline-flex; align-items: center; gap: 8px; font: 400 14px/1.2 var(--sans); cursor: pointer; }
.chip:hover { background: var(--surface); }
.icon--sm { width: 20px; height: 20px; }
.chart { margin: 18px 0 0; }
.chart[hidden] { display: none; }
.chart h3 { margin: 0 0 8px; font-size: 12px; font-weight: 600; color: var(--accent); }
.chart__box { position: relative; }
.chart__box img { display: block; width: 100%; height: auto; }
.chart__mark { position: absolute; width: 0; border-left: 2.5px solid var(--accent); box-shadow: 0 0 0 1px rgba(255,255,255,.8); }
.chart__label { position: absolute; top: -2px; left: 4px; font-size: 11px; font-weight: 600; color: var(--accent); background: rgba(255,255,255,.9); padding: 1px 4px; border-radius: 4px; white-space: nowrap; }
.chart figcaption { margin-top: 6px; font-size: 12px; line-height: 1.45; color: var(--muted); }
.chart__label--left { left: auto; right: 4px; }
.chart { margin: 16px 0 4px; }
.lead { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: var(--surface); font-family: var(--serif); font-size: 18px; line-height: 1.4; }
.lead[hidden] { display: none; }
.chart__credit { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.hero:not(:has(img)) { height: 210px; }
.hero--big { height: auto; min-height: 400px; padding-top: 130px; }
.hero__scale { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.made-with { margin: 0 24px 32px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); }
