/* Paws & Numbers: one stylesheet for every page. System fonts only, no external requests. */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --ink: #23201c;
  --ink-2: #5b554d;
  --line: #e4ddd2;
  --accent: #1f6f5c;
  --accent-ink: #ffffff;
  --accent-soft: #e2f0eb;
  --warm: #c8641e;
  --ok: #2c7a3f;
  --ok-soft: #e4f3e7;
  --warn: #9a6a00;
  --warn-soft: #fbf1d6;
  --bad: #b3261e;
  --bad-soft: #fbe5e3;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(35, 32, 28, .06), 0 4px 16px rgba(35, 32, 28, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171614;
    --surface: #211f1c;
    --surface-2: #2a2723;
    --ink: #f1ece4;
    --ink-2: #b9b1a6;
    --line: #3a3630;
    --accent: #5fc0a5;
    --accent-ink: #10201b;
    --accent-soft: #1f332d;
    --warm: #f0995a;
    --ok: #7fd394;
    --ok-soft: #1e3123;
    --warn: #f1c35a;
    --warn-soft: #362d17;
    --bad: #ff8a80;
    --bad-soft: #3c1f1c;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--font);
}
a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }
img, svg { max-width: 100%; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 4vw, 2.4rem); margin: .2em 0 .4em; }
h2 { font-size: 1.45rem; margin: 2em 0 .6em; }
h3 { font-size: 1.12rem; margin: 1.5em 0 .4em; }
code { font-size: .92em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }

/* ---------- header / footer ---------- */
header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
header.site .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.1rem; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand .amp { color: var(--warm); }
nav.site { display: flex; gap: 18px; font-size: .95rem; }
nav.site a { color: var(--ink-2); text-decoration: none; }
nav.site a:hover { color: var(--accent); }

footer.site { margin-top: 64px; border-top: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: .9rem; }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; padding-top: 24px; padding-bottom: 32px; }
footer.site a { color: var(--ink-2); }
.foot-tools { display: flex; flex-wrap: wrap; gap: 6px 16px; }

.breadcrumb { font-size: .88rem; color: var(--ink-2); margin-top: 18px; }
.breadcrumb a { color: var(--ink-2); }

/* ---------- page header ---------- */
.page-head { margin-top: 8px; }
.lede { font-size: 1.1rem; color: var(--ink-2); max-width: 720px; margin-top: 0; }
.updated { font-size: .85rem; color: var(--ink-2); }

/* ---------- calculator layout ---------- */
.calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  margin: 24px 0 8px;
}
@media (max-width: 760px) { .calc { grid-template-columns: minmax(0, 1fr); } }
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

.field { margin-bottom: 16px; }
.field > label, .field > .label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.hint { display: block; font-size: .83rem; color: var(--ink-2); margin-top: 4px; font-weight: 400; }
.row { display: flex; gap: 8px; }
.row > * { min-width: 0; }
.row > input { flex: 1 1 0; }
.row > .unit { flex: none; align-self: center; white-space: nowrap; color: var(--ink-2); }
.row > select { flex: 0 0 auto; width: auto; }
input[type=number], input[type=date], select {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 46px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button {
  font: inherit; font-size: .9rem; border: 0; background: var(--bg); color: var(--ink-2);
  padding: 8px 14px; cursor: pointer; min-height: 40px;
}
.seg button + button { border-left: 1px solid var(--line); }
.seg button[aria-pressed=true] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.btn {
  display: inline-block; font: inherit; font-weight: 600; border: 0; border-radius: 10px;
  background: var(--accent); color: var(--accent-ink); padding: 11px 18px; cursor: pointer; text-decoration: none;
}

/* ---------- results ---------- */
.result { position: sticky; top: 16px; align-self: start; }
@media (max-width: 760px) { .result { position: static; } }
.result-label { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; }
.big { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 800; line-height: 1.1; margin: 4px 0 6px; color: var(--accent); }
.big small { font-size: .45em; font-weight: 600; color: var(--ink-2); }
.sub { color: var(--ink-2); margin: 0 0 12px; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.stat { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; }
.stat b { display: block; font-size: 1.15rem; }
.stat span { display: block; font-size: .82rem; line-height: 1.35; color: var(--ink-2); }
.note { font-size: .86rem; color: var(--ink-2); margin: 12px 0 0; }
.err { color: var(--bad); font-weight: 600; }

.level { border-radius: 10px; padding: 12px 14px; margin: 10px 0; font-weight: 600; }
.level p { font-weight: 400; margin: 4px 0 0; }
.level.ok { background: var(--ok-soft); color: var(--ok); }
.level.warn { background: var(--warn-soft); color: var(--warn); }
.level.bad { background: var(--bad-soft); color: var(--bad); }
.level p { color: var(--ink); }

.alert {
  border: 2px solid var(--bad);
  background: var(--bad-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 16px 0;
}
.alert strong { color: var(--bad); }
.alert a { color: var(--ink); font-weight: 700; }
.alert p { margin: 4px 0; }

/* ---------- content ---------- */
.content { max-width: 760px; }
.content p, .content li { color: var(--ink); }
.content ul, .content ol { padding-left: 1.3em; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--surface-2); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.hl td { background: var(--accent-soft); font-weight: 600; }
.formula { background: var(--surface-2); border-radius: 10px; padding: 12px 16px; font-family: ui-monospace, Consolas, monospace; font-size: .95rem; overflow-x: auto; }

.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; font-weight: 600; padding: 10px 0; }
.faq details p { margin: 0 0 12px; }

.sources { font-size: .9rem; color: var(--ink-2); }
.sources li { color: var(--ink-2); margin-bottom: 4px; }
.disclaimer { font-size: .88rem; color: var(--ink-2); border-left: 3px solid var(--line); padding-left: 12px; margin-top: 28px; }

.related { margin-top: 40px; }
.tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin: 16px 0; }
.tile {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); transition: border-color .15s;
}
.tile:hover { border-color: var(--accent); }
.tile .t-kicker { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--warm); font-weight: 700; }
.tile .t-title { font-weight: 700; font-size: 1.08rem; margin: 4px 0; }
.tile .t-desc { font-size: .9rem; color: var(--ink-2); }

/* home */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(2rem, 5vw, 2.9rem); max-width: 760px; }
.section-title { display: flex; align-items: center; gap: 10px; margin-top: 40px; }
.section-title svg { width: 28px; height: 28px; color: var(--warm); }

/* growth chart */
.chart { width: 100%; height: auto; display: block; margin-top: 8px; }
.chart .axis { stroke: var(--line); }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .curve { stroke: var(--accent); fill: none; stroke-width: 3; }
.chart .band { fill: var(--accent); opacity: .12; }
.chart .dot { fill: var(--warm); }
.chart text { fill: var(--ink-2); font-size: 12px; font-family: var(--font); }

/* pregnancy timeline */
.timeline { list-style: none; padding: 0; margin: 16px 0; }
.timeline li { border-left: 3px solid var(--line); padding: 0 0 18px 18px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -8px; top: 4px; width: 13px; height: 13px; border-radius: 50%; background: var(--surface); border: 3px solid var(--line); }
.timeline li.now { border-left-color: var(--accent); }
.timeline li.now::before { border-color: var(--accent); background: var(--accent); }
.timeline li.done::before { background: var(--line); }
.timeline .tl-head { font-weight: 700; }
.timeline .tl-date { font-size: .88rem; color: var(--ink-2); }
.timeline p { margin: 4px 0 0; font-size: .95rem; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); margin-left: 6px; vertical-align: 2px; }

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nw { white-space: nowrap; }

/* consent banner */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50;
  max-width: 560px; margin: 0 auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .18);
  padding: 16px 18px; font-size: .92rem;
}
.consent p { margin: 0 0 12px; }
.consent-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
