/* Mothers' guides with printable / shareable cards (/ejeler/gollanma/), package
   p8-guides. Built on hub.css (tokens, .card, .res, .redcard, .printcard, .dtable,
   details.fold, .btn2, .grid/.tile); colours come only from its CSS variables, so
   dark mode follows the hub. Mobile first (320 / 375 px); >= 760 px desktop.
   Print: only the card, on an A6 page. Never use the em dash here; use "-". */

/* ---------------------------------------------------------------- page --- */
.gtitle { font-size: 26px; line-height: 1.15; letter-spacing: -.015em; margin: 4px 0 12px; }
.gblock { margin-top: 6px; }
.gblock > .h2 { margin-bottom: 12px; }

/* pictures: own SVGs on a cream panel; no words inside (labels are HTML) */
.gfig { margin: 6px 0 16px; max-width: 440px; }
.gfig img { display: block; width: 100%; height: auto; border-radius: 18px; }

/* numbered steps */
.gsteps { list-style: none; counter-reset: gs; margin: 0; padding: 0; }
.gsteps li {
  counter-increment: gs; position: relative; min-height: 30px;
  padding: 3px 0 0 44px; margin: 0 0 14px; font-size: 16px; line-height: 1.45;
}
.gsteps li:last-child { margin-bottom: 0; }
.gsteps li::before {
  content: counter(gs); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--tint-t); color: var(--terracotta-d);
  font-size: 14px; font-weight: 800;
}

/* bullets, ticks and crosses */
.glist { margin: 0; padding-left: 22px; }
.glist li { margin: 0 0 8px; line-height: 1.45; }
.glist li:last-child { margin-bottom: 0; }
.gcheck, .gavoid { list-style: none; margin: 0; padding: 0; }
.gcheck li, .gavoid li { display: flex; gap: 12px; align-items: flex-start; padding: 5px 0; line-height: 1.45; }
.gi {
  flex: none; width: 26px; height: 26px; padding: 5px; border-radius: 50%; margin-top: -1px;
  fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}
.gcheck .gi { background: var(--green-bg); stroke: var(--green); }
.gavoid .gi { background: var(--red-bg); stroke: var(--red); }

/* "when to see a doctor" box */
.gwhen { margin-top: 22px; padding: 16px 18px 18px; border-radius: 22px; }
.gwhen-h { margin: 0 0 8px; font-size: 17px; line-height: 1.3; color: var(--amber-ink); }
.gwhen .glist li { color: var(--ink); }

/* positions: small picture beside its caption */
.gfigs { display: grid; gap: 10px; }
.gpos {
  margin: 0; max-width: none; display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 8px 12px 8px 8px;
}
.gpos img { border-radius: 12px; }
.gpos figcaption { font-size: 14.5px; line-height: 1.4; color: var(--ink-mid); }
@media (max-width: 340px) { .gpos { grid-template-columns: 92px minmax(0, 1fr); } }

/* storage table: a real table from 560 px, stacked rows below */
.gtable caption { color: var(--ink-mid); font-weight: 700; font-size: 13px; }
.gtable tbody th { font-weight: 800; }
.gtable tr.gwarn th, .gtable tr.gwarn td { background: var(--amber-bg); color: var(--amber-ink); font-weight: 700; }
@media (max-width: 559px) {
  .gtable thead { display: none; }
  .gtable, .gtable caption, .gtable tbody, .gtable tr, .gtable th, .gtable td { display: block; width: 100%; }
  .gtable caption { padding: 12px 14px 6px; border-bottom: 1px solid var(--line); }
  .gtable tr { padding: 10px 14px 12px; border-bottom: 1px solid var(--line); }
  .gtable tbody tr:last-child { border-bottom: 0; }
  .gtable tbody th, .gtable td { padding: 0; border: 0; }
  .gtable tbody th { font-size: 15.5px; margin-bottom: 4px; }
  .gtable td { display: flex; justify-content: space-between; gap: 14px; padding: 3px 0; text-align: right; }
  .gtable td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; color: var(--ink-soft); font-size: 13px; font-weight: 700; padding-top: 1px; }
  .gtable tr.gwarn td::before { color: var(--amber-ink); }
  .gtable td[data-label=""] { display: block; text-align: left; }
  .gtable td[data-label=""]::before { content: none; }
  .gtable tr.gwarn th, .gtable tr.gwarn td { background: none; }
  .gtable tr.gwarn { background: var(--amber-bg); }
}

/* link to another tool or guide */
.glink { margin-top: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.glink p { margin: 0; color: var(--ink-mid); font-size: 15px; line-height: 1.45; }

/* worries */
.gq > p { margin: 0; color: var(--ink-mid); font-size: 15px; line-height: 1.5; }
.gq > summary { line-height: 1.3; padding-top: 12px; padding-bottom: 12px; }

/* off-ramp, return-now lists, checker */
.goff { margin-top: 26px; }
.goff .redcard { margin-top: 0; }
.rfafter { margin: 10px 0 0; font-weight: 800; }
.gret { margin-top: 14px; }
.gret-h { margin: 0 0 2px; font-size: 17px; line-height: 1.3; }
.gret-age { margin: 12px 0 4px; font-size: 14px; color: var(--ink-soft); }
.goff .glink { margin-top: 14px; }

/* p17-cpr: the red block first on the page (also static in the HTML), the two
   age columns and the one-line link to another guide */
.galert {
  margin: 0 0 18px; padding: 14px 16px 16px; border-radius: 20px;
  background: var(--red-bg); border: 2px solid var(--red-line); color: var(--red-ink);
}
.galert-tx { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--red-strong); }
.galert .call { margin-top: 12px; }
.galert-jump { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.galert-jump span { flex: 1 0 100%; font-size: 13.5px; font-weight: 800; }
.galert-jump .btn2 { flex: 1 1 120px; padding: 0 10px; font-size: 14.5px; }
/* 320 px with the draft banner: keep the line and the 03 button above the fold */
@media (max-width: 360px) {
  .galert { padding: 12px 14px 14px; }
  .galert-tx { font-size: 17px; line-height: 1.25; }
  .galert .call { margin-top: 10px; }
}
.gages { display: grid; gap: 14px; }
.gage { scroll-margin-top: 84px; padding: 14px 16px 18px; }
.gage-h { margin: 0 0 10px; font-size: 18px; line-height: 1.25; }
.gage-fig { margin: 0 0 14px; max-width: none; }
.gfigcap { margin-top: 6px; font-size: 14px; line-height: 1.4; color: var(--ink-mid); font-weight: 700; }
.glink-a { margin: 14px 0 0; font-size: 15.5px; line-height: 1.45; font-weight: 700; }
.glink-a a { color: var(--terracotta-d); }

/* ---------------------------------------------------------------- card --- */
.gcardsec { margin-top: 30px; }
.gcardsec > .small { margin: -4px 0 0; }
.gcard { padding: 18px 18px 16px; max-width: 560px; }
.gbrand { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 13px; color: var(--ink-soft); }
.gbrand img { width: 28px; height: 29px; }
.gbrand b { font-size: 15px; font-weight: 800; color: var(--terracotta-d); }
.gbrand span { margin-left: auto; font-weight: 700; }
.gcard h3 { font-size: 23px; letter-spacing: -.01em; margin: 0 0 12px; }
.gcard-figs { display: grid; gap: 8px; margin: 0 0 14px; }
.gcard-figs.n2 { grid-template-columns: 1fr 1fr; }
.gcard-fig { margin: 0; max-width: none; }
.gcard-figs.n1 .gcard-fig img { max-height: 170px; width: auto; max-width: 100%; margin: 0 auto; }
.gcard-fig img { border-radius: 14px; }
.gcard-steps { list-style: none; counter-reset: gc; margin: 0; padding: 0; }
.gcard-steps li {
  counter-increment: gc; position: relative; min-height: 26px;
  padding: 1px 0 0 36px; margin: 0 0 10px; font-size: 16.5px; line-height: 1.38; font-weight: 700;
}
.gcard-steps li::before {
  content: counter(gc); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; background: var(--terracotta); color: #fff; font-size: 13.5px; font-weight: 800;
}
.gcard-red {
  display: flex; gap: 10px; align-items: flex-start; margin-top: 4px; padding: 11px 13px; border-radius: 16px;
  background: var(--red-bg); color: var(--red-ink); font-size: 15px; line-height: 1.4; font-weight: 700;
}
.gcard-red .gi { width: 22px; height: 22px; padding: 0; border-radius: 0; stroke: var(--red); stroke-width: 2.2; margin-top: 0; }
.gcard-redtx p { margin: 0; }
.gcard-redtx p + p { margin-top: 5px; }
.gcard-redtx b { color: var(--red); }
.gcard-red.first { margin: 0 0 14px; font-size: 16px; }
.gcard-gen { margin: 12px 0 0; font-size: 13px; font-weight: 700; color: var(--ink-mid); }
.gcard-src { margin: 2px 0 0; font-size: 12px; color: var(--ink-soft); }
.gcardsec .btnrow { max-width: 560px; }
/* the empty in-app hint under Print would make the Telegram button 8 px taller */
.gcardsec .printwrap .fhelp:empty { display: none; }
.gback { display: inline-flex; align-items: center; margin-top: 6px; }

/* ----------------------------------------------------------- dark mode --- */
/* the drawings keep their light paper; dim them so they do not glare */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gfig img { filter: brightness(.85) saturate(.92); }
}
:root[data-theme="dark"] .gfig img { filter: brightness(.85) saturate(.92); }

/* ------------------------------------------------------ tablet / desktop --- */
@media (min-width: 760px) {
  .gtitle { font-size: 32px; margin-bottom: 14px; }
  .gsteps li { font-size: 16.5px; }
  .gfigs { grid-template-columns: 1fr 1fr; gap: 12px; }
  .gpos { grid-template-columns: 120px minmax(0, 1fr); }
  .gages { grid-template-columns: 1fr 1fr; align-items: start; }
  .gcard { padding: 24px 26px 20px; }
  .gcard h3 { font-size: 26px; }
  .gcard-steps li { font-size: 17.5px; }
}

/* --------------------------------------------------------------- print --- */
/* A guide page prints its card alone, on an A6 sheet (105 x 148 mm). */
@page guidecard { size: A6 portrait; margin: 6mm; }
@media print {
  body[data-page="guide"] { page: guidecard; }
  body[data-page="guide"] #app > :not(.gcardsec) { display: none !important; }
  .gcardsec > :not(.gcard) { display: none !important; }
  .gcardsec { margin: 0; }
  .gfig img { filter: none !important; }
  .draftbar { margin: 0 0 2mm; padding: 1.5mm 2.5mm; font-size: 8pt; }
  .gcard {
    max-width: none; margin: 0; padding: 4mm 4.5mm 3.5mm; border: 1pt solid #8A7466; border-radius: 4mm;
    background: #fff !important; color: #000; break-inside: avoid;
  }
  .gbrand { margin-bottom: 2mm; font-size: 8pt; color: #444; }
  .gbrand img { width: 6mm; height: auto; }
  .gbrand b { font-size: 9pt; color: #B75833; }
  .gcard h3 { font-size: 15pt; margin: 0 0 2.5mm; }
  .gcard-figs { margin: 0 0 2.5mm; }
  .gcard-figs.n1 .gcard-fig img, .gcard-figs.n2 .gcard-fig img { max-height: 26mm; width: auto; margin: 0 auto; }
  .gcard-steps li { min-height: 0; padding: 0 0 0 6.5mm; margin: 0 0 1.6mm; font-size: 10pt; line-height: 1.3; }
  .gcard-steps li::before {
    width: 4.6mm; height: 4.6mm; font-size: 7.5pt; background: #B75833 !important; color: #fff !important;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .gcard-red {
    margin-top: 1.5mm; padding: 2mm 2.5mm; gap: 2mm; border: .8pt solid #C2452D; border-radius: 2.5mm; font-size: 9pt;
    background: #F9E1DA !important; color: #7A2A1A !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .gcard-red .gi { width: 4mm; height: 4mm; stroke: #C2452D; }
  .gcard-red.first { margin: 0 0 2.5mm; font-size: 9.5pt; }
  .gcard-redtx b { color: #C2452D; }
  .gcard-gen { margin-top: 2.5mm; font-size: 8pt; color: #333; }
  .gcard-src { font-size: 7.5pt; color: #555; }
}
