/* Growth tools: the mothers' growth chart (/ejeler/osus/, .gr-*) and the
   doctors' WHO z-score calculator (/lukmanlar/osus/, .zs-*). Built on hub.css;
   colours come only from its variables, so dark mode follows on its own. */

[data-page="growth"] #app > h1, [data-page="zscore"] #app > h1 {
  font-size: 26px; line-height: 1.15; letter-spacing: -.015em; margin: 4px 0 8px;
}
.gr-sect { margin-top: 8px; }
.gr-sect > .h2:focus { outline: none; }
.gr-h3 { font-size: 16px; font-weight: 800; margin: 16px 0 6px; line-height: 1.3; }
.res .gr-h3:first-child, .card .gr-h3:first-child { margin-top: 0; }
.gr-status:empty { display: none; }
.gr-status { margin: 0 0 10px; font-weight: 800; color: var(--green); font-size: 14px; }
.gr-err { margin: 12px 0; padding: 12px 14px; border-radius: 16px; background: var(--red-bg); border: 1px solid var(--red-line); color: var(--red-ink); font-size: 14px; font-weight: 700; }
.gr-err p { margin: 0; }
.gr-err p + p { margin-top: 6px; }
.gr-checked { padding: 0 16px 12px; margin: 0; }

/* child profile */
.gr-child { margin-bottom: 4px; }
.gr-childhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.gr-childname { font-size: 19px; }
.gr-childmeta { font-size: 14px; color: var(--ink-soft); font-weight: 700; }
.gr-age { margin: 8px 0 0; font-weight: 700; color: var(--ink-mid); }
.gr-childform, .gr-form { margin-top: 12px; }
.gr-confirm { margin-top: 10px; padding: 12px 14px; border-radius: 16px; background: var(--amber-bg); border: 1px solid var(--amber-line); }
.gr-confirm p { margin: 0; font-weight: 800; color: var(--amber-ink); }
.gr-confirm .btnrow { margin-top: 10px; }

/* the reading of the latest point and of the trend */
.gr-reading .res { margin-top: 4px; }
.gr-when { font-weight: 800; color: var(--ink) !important; margin-top: 10px !important; }
.gr-lines { margin: 8px 0 0; padding-left: 20px; color: var(--ink-mid); font-size: 15px; }
.gr-lines li { margin: 4px 0; }
.res .gr-act { margin-top: 14px !important; padding-top: 12px; border-top: 1px solid currentColor; border-top-color: var(--amber-line); color: var(--ink) !important; font-weight: 800; }
/* swelling of both feet: the urgent card, then the point readings on their own */
.gr-reading .res + .res { margin-top: 10px; }
.gr-ask { margin: 12px 0 0; font-weight: 800; color: var(--ink-mid); }
.gr-p { margin: 8px 0 0; }

/* chart: the indicator tabs fold to 2 x 2 on a phone */
.gr-tabs { display: grid; grid-template-columns: 1fr 1fr; }
.gr-tabs span { min-height: 48px; font-size: 14px; line-height: 1.2; }
.gr-spans { margin-top: 8px; }
.gr-spans span, .zs-form .seg-pick span, .gr-form .seg-pick span, .gr-childform .seg-pick span { min-height: 48px; }
.gr-svg { display: block; width: 100%; height: auto; }
.gc-grid line { stroke: var(--line); stroke-width: 1; }
.gc-tick { font-size: 12px; fill: var(--ink-soft); font-weight: 700; font-variant-numeric: tabular-nums; }
.gc-axis { font-size: 12px; fill: var(--ink-mid); font-weight: 800; }
.gc-lab { font-size: 11px; fill: var(--ink-soft); font-weight: 800; }
.gc-p { fill: none; stroke-width: 2; stroke-linejoin: round; }
.gc-p50 { stroke: var(--green); stroke-width: 2.6; }
.gc-p15, .gc-p85 { stroke: var(--olive); }
.gc-p3, .gc-p97 { stroke: var(--amber); stroke-dasharray: 6 4; }
.gc-kid { fill: none; stroke: var(--terracotta); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.gc-dot { fill: var(--terracotta); stroke: var(--surface); stroke-width: 2; }

/* measurements */
.gr-help { margin: 0 0 12px; }
.gr-list { margin-top: 18px; }
.gr-mtable td { white-space: nowrap; }
.gr-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 999px; background: var(--red-bg); color: var(--red-ink); font-size: 12px; font-weight: 800; }
.gr-rowact { white-space: nowrap; text-align: right !important; }
.gr-q { font-weight: 800; color: var(--amber-ink); margin-right: 6px; }
.gr-file { margin-top: 18px; }
.gr-filenote { margin: 10px 0 0; font-size: 14px; font-weight: 700; line-height: 1.4; color: var(--green); }
.gr-filenote:empty { display: none; }
.gr-filenote.warn { padding: 10px 14px; border-radius: 14px; background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber-ink); }

/* printable summary card */
.gr-printsect { margin-top: 22px; }
.gr-pmeta { margin: 0 0 8px; font-weight: 700; color: var(--ink-mid); }
.gr-print .dtable td { white-space: nowrap; }

/* doctors' calculator */
.zs-form { margin-top: 8px; }
.zs-basis:empty { display: none; }
.zs-basis { margin-top: 12px; }
.zs-results:empty { display: none; }
.zs-results > .h2:focus { outline: none; }
.zs-age { margin: 0 0 4px; font-weight: 700; color: var(--ink-mid); }
.zs-table th[scope="row"] { font-weight: 800; }
.zs-abbr { display: block; font-size: 12px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }
.zs-st { color: var(--ink-soft); font-style: italic; }
.zs-notes { margin: 6px 0 14px; padding-left: 20px; font-size: 13.5px; color: var(--ink-mid); }
.zs-notes li { margin: 4px 0; }
.zs-w { margin: 14px 0; }
.zs-wlevel { font-size: 18px; font-weight: 800; color: var(--ink) !important; margin: 4px 0 8px !important; }
.zs-wl { font-weight: 800; color: var(--ink) !important; margin-top: 12px !important; }
.zs-w .rflist { color: var(--ink-mid); font-size: 15px; }
/* a WHO 2023 criterion the entries meet (A2a iii, A2b iii): marked in words too */
.zs-w .rflist li.zs-hit { font-weight: 800; color: var(--ink); background: rgba(255,255,255,.6); border-radius: 8px; padding: 4px 8px; margin-left: -8px; }
:root[data-theme="dark"] .zs-w .rflist li.zs-hit { background: rgba(0,0,0,.22); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .zs-w .rflist li.zs-hit { background: rgba(0,0,0,.22); } }
.zs-met { color: var(--amber-ink); }
.zs-ig { margin: 4px 0 0; }
.zs-sum { margin: 14px 0; }
.zs-line { min-height: 0; height: auto; padding: 12px 14px; font-size: 15px; font-weight: 700; line-height: 1.45; resize: vertical; font-family: var(--font); }

@media (min-width: 520px) {
  .gr-tabs { display: flex; }
}
@media (min-width: 760px) {
  [data-page="growth"] #app > h1, [data-page="zscore"] #app > h1 { font-size: 32px; margin-bottom: 10px; }
  .gr-childname { font-size: 21px; }
}

@media print {
  .gr-sect, .gr-printsect { break-inside: avoid; }
  .gc-dot { stroke: #fff; }
  .zs-line { border: 1px solid #999; }
  .zs-form { display: none; }
}
.gr-rfnote { margin: 4px 0 0; font-weight: 700; }
