/* happychild.ge: მშობლის გზამკვლევი. განლაგება: ერთი სვეტი ტელეფონზე, ლენდინგზე ორი სვეტი დიდ ეკრანზე. */
:root {
  --bg: #F5F0E6;
  --ink: #3A3B2F;
  --card: #FFFDF8;
  --line: #3A3B2F;
  --p1: #DCE5CF;
  --p2: #D3E2E4;
  --p3: #E8DCE3;
  --p4: #F0DAC8;
  --sunsoft: #F4E6BE;
  --sun: #DDAA45;
  --on-sun: #3A3B2F;
  --leaf: #52704A;
  --on-leaf: #FFFFFF;
  --btn-bg: #4B3F34;
  --btn-fg: #FFFFFF;
  --serif: "Noto Serif Georgian", "Sylfaen", Georgia, serif;
  --sans: "Noto Sans Georgian", "Sylfaen", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1F2119;
    --ink: #EDE7D8;
    --card: #2A2C22;
    --line: #A8B293;
    --p1: #2F3A29;
    --p2: #293A3D;
    --p3: #3A3139;
    --p4: #46342A;
    --sunsoft: #453B1E;
    --btn-bg: #DDAA45;
    --btn-fg: #2A2C22;
    --leaf: #7FA16F;
    --on-leaf: #1F2119;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1F2119;
  --ink: #EDE7D8;
  --card: #2A2C22;
  --line: #A8B293;
  --p1: #2F3A29;
  --p2: #293A3D;
  --p3: #3A3139;
  --p4: #46342A;
  --sunsoft: #453B1E;
  --btn-bg: #DDAA45;
  --btn-fg: #2A2C22;
  --leaf: #7FA16F;
  --on-leaf: #1F2119;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; margin: 0; text-wrap: balance; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

.gutter { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1040px; margin: 0 auto; }

/* ღილაკები */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.5rem;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 2px solid var(--btn-bg); border-radius: 999px;
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
}
.btn:hover { filter: brightness(1.12); }
.btn.sm { min-height: 44px; padding: 0 1.1rem; font-size: .95rem; }
.btn.block { width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.leaf { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.link-btn { background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; color: inherit; cursor: pointer; min-height: 44px; }

/* ჩიპები და ტეგები */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip, .chip-label {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 1rem;
  background: var(--card); color: var(--ink);
  border: 2px solid var(--line); border-radius: 999px;
  font: 600 .95rem var(--sans); cursor: pointer; position: relative;
}
.chip[aria-pressed="true"], .chip-label:has(input:checked) { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.chip-label input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 3px; }
.tag {
  display: inline-block; padding: .1rem .8rem;
  background: var(--card); border: 2px solid var(--line); border-radius: 999px;
  font-size: .85rem; font-weight: 600;
}

/* ბარათები */
.card {
  background: var(--card); border: 2px solid var(--line); border-radius: 22px;
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; align-items: flex-start;
}
.p1 { background: var(--p1); } .p2 { background: var(--p2); } .p3 { background: var(--p3); } .p4 { background: var(--p4); } .sun { background: var(--sunsoft); }
.card h2, .card h3 { font-size: 1.2rem; line-height: 1.4; }
.card .small { font-size: .95rem; }
.grid2 { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tile {
  min-height: 84px; padding: .9rem; border: 2px solid var(--line); border-radius: 18px;
  display: flex; align-items: flex-end; text-decoration: none;
  font: 700 1rem/1.3 var(--serif);
}
.stack { display: flex; flex-direction: column; gap: 1rem; }
.note { padding: .8rem 1rem; border-radius: 16px; background: var(--p1); font-size: .95rem; line-height: 1.55; }
.muted { font-size: .9rem; }

/* ფორმები */
label.field { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], input[type="tel"], input[type="number"], input[type="url"], input[type="date"], input[type="time"], select, textarea {
  font: 400 1rem var(--sans); min-height: 48px; padding: .7rem 1rem;
  border: 2px solid var(--line); border-radius: 14px; background: var(--card); color: var(--ink); width: 100%;
}
input[type="checkbox"] { width: 24px; height: 24px; flex: none; accent-color: var(--leaf); }
label.check { flex-direction: row; align-items: center; gap: .6rem; min-height: 44px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .7rem 0; border-bottom: 2px solid var(--line); }
.row:last-child { border-bottom: 0; }
audio { width: 100%; }
fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
legend { font-weight: 600; padding: 0 0 .5rem; }
.msg { min-height: 1.5em; font-size: .95rem; }

/* დეტალები (აკორდეონი) */
details { background: var(--card); border: 2px solid var(--line); border-radius: 18px; padding: 0 1rem; }
details[open] { padding-bottom: 1rem; }
summary {
  min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  font-weight: 700; cursor: pointer; list-style: none;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; width: .6rem; height: .6rem; flex: none;
  border-right: 3px solid currentColor; border-bottom: 3px solid currentColor; transform: rotate(45deg);
}
details[open] > summary::after { transform: rotate(-135deg); }
details > .body { display: flex; flex-direction: column; gap: .75rem; }
details ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }
.sleepbox { background: var(--p2); }
.range { position: relative; height: 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); margin-top: .4rem; }
.range i { position: absolute; top: -2px; bottom: -2px; border: 2px solid var(--line); border-radius: 999px; background: var(--sun); }
.range-labels { display: flex; justify-content: space-between; font-size: .8rem; }

/* პასუხის დონე */
.badge {
  display: inline-flex; align-items: center; gap: .35rem; padding: .1rem .7rem;
  border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap;
}
.badge svg { flex: none; }
.lv-ok { background: var(--leaf); color: var(--on-leaf); border: 2px solid var(--leaf); }
.lv-watch { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.lv-doctor { background: var(--sun); color: var(--on-sun); border: 2px solid var(--line); }
.doc { padding: .8rem 1rem; border: 2px dashed var(--line); border-radius: 14px; font-size: .95rem; }
.q-head { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: .6rem 0; }

/* საიტის ჩარჩო: ერთი და იგივე ზედა ზოლი და ქვედა ნაწილი ყველა გვერდზე */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 30; background: var(--bg); }
.logo { font: 700 1.3rem var(--serif); text-decoration: none; }
.site-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 2px solid var(--line); }
.head-in { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem 1rem; padding-block: .6rem .4rem; }
.head-in .logo { order: 1; margin-right: auto; }
.head-in .btn { order: 2; }
.sitenav { order: 3; width: 100%; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .2rem; }
.sitenav::-webkit-scrollbar { display: none; }
.sitenav a {
  flex: none; min-height: 44px; padding: 0 1rem; display: inline-flex; align-items: center;
  border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap;
}
.sitenav a:hover { background: var(--p1); }
.sitenav a[aria-current="page"] { background: var(--sun); color: var(--on-sun); font-weight: 700; }
@media (min-width: 700px) {
  .sitenav { flex-wrap: wrap; justify-content: center; overflow: visible; gap: .1rem; }
  .sitenav a { padding: 0 .42rem; font-size: .88rem; }
}
.icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; color: inherit; }
main { outline: none; min-height: 60vh; }

/* გვერდები */
.page { padding-block: 1.5rem 3rem; display: flex; flex-direction: column; gap: 1.25rem; }
.page h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.25; }
.narrow { max-width: 46rem; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); align-items: stretch; }
.cards > .card { height: 100%; }
.home-grid { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 820px) { .home-grid { grid-template-columns: 1fr 1fr; } }
.tile { min-height: 96px; }
.done-line { font: 700 1.2rem/1.4 var(--serif); }
.link-card { text-decoration: none; transition: transform .15s; }
.link-card:hover { transform: translateY(-3px); }
.link-card .more { margin-top: auto; display: inline-flex; align-items: center; gap: .4rem; font-weight: 700; }

/* მთავარი გვერდი */
.hero { display: grid; gap: 2.5rem; align-items: center; padding-block: 2rem 3rem; }
.hero h1 { font-size: clamp(2rem, 6vw, 3.3rem); line-height: 1.2; margin-bottom: 1.1rem; }
.hero .lead { max-width: 34rem; margin-bottom: 0; font-size: 1.15rem; }
@media (min-width: 820px) { .hero { grid-template-columns: 1.1fr .9fr; padding-block: 3rem 4rem; } }
.badge-time { align-self: flex-end; margin-bottom: -.2rem; }
.section { padding-block: 2.5rem; }
.section h2.sec { font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.3; max-width: 32rem; margin-bottom: 1.5rem; }
.promise { background: var(--p1); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; max-width: 36rem; }
.checks li { padding-left: 2rem; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: .55rem; width: 1.1rem; height: .55rem; border-left: 3px solid var(--leaf); border-bottom: 3px solid var(--leaf); transform: rotate(-45deg); }
footer.foot { padding-block: 2rem 3rem; font-size: .95rem; border-top: 2px solid var(--line); }
footer.foot .wrap { display: flex; flex-direction: column; gap: .4rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-bottom: .6rem; }
.foot-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }

/* შესვლა */
.sheet { max-width: 26rem; margin: 0 auto; padding-block: 2rem 3rem; display: flex; flex-direction: column; gap: 1.25rem; }
.sheet h1 { font-size: 1.7rem; line-height: 1.3; }
.sep { text-align: center; }
.gbtn { background: var(--card); color: var(--ink); border-color: var(--line); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* შემოსავლის წყაროების გვერდები */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.progress { height: 14px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--sun); }
.ans { min-height: 56px; font-size: 1.05rem; }
.ans[aria-pressed="true"] { background: var(--btn-bg); color: var(--btn-fg); }
.promo { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; }
.promo > div { flex: 1 1 18rem; display: flex; flex-direction: column; gap: .4rem; }
.trust { padding: 1rem 0 0; font-weight: 600; }
.lockcard { border-style: dashed; }
.ctx-card { padding: .8rem 1rem; width: 100%; }
.thumb { width: 100%; max-height: 180px; object-fit: cover; border-radius: 14px; border: 2px solid var(--line); }
.portrait { max-width: 260px; border-radius: 22px; border: 2px solid var(--line); }
ul.plain { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; }
h1 svg { vertical-align: -3px; }
.hero.solo { grid-template-columns: 1fr !important; padding-block: 2rem 2.5rem; }
.hero.solo h1 { max-width: 28ch; }
.card h3 .tag { font: 700 .75rem var(--sans); vertical-align: middle; margin-left: .3rem; }

.srcs { margin: 0; padding-left: 1.1rem; display: grid; gap: .75rem; }
.srcs a { overflow-wrap: anywhere; }

/* შეხსენების შეტყობინებები (toast) */
#hc-toasts { position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; gap: .6rem; padding: .8rem max(.8rem, env(safe-area-inset-left, 0px)) max(.8rem, env(safe-area-inset-bottom, 0px)); pointer-events: none; justify-items: center; }
.toast { pointer-events: auto; width: min(100%, 30rem); background: var(--card); color: var(--ink); border: 2px solid var(--line); border-radius: 18px; padding: .9rem 1rem; box-shadow: 0 6px 0 var(--line); display: grid; gap: .6rem; }
.toast-btns { display: flex; gap: .5rem; flex-wrap: wrap; }
textarea { resize: vertical; }

/* ჩემი ბავშვი: ჩანართები */
.tabs { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-bottom: .25rem; margin-inline: -.1rem; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; min-height: 44px; padding: 0 1rem; display: inline-flex; align-items: center; border-radius: 999px; border: 2px solid var(--line); background: var(--card); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap; }
.tab[aria-current="page"] { background: var(--btn-bg); color: var(--btn-fg); border-color: var(--btn-bg); }
.tab-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.tab-title h2 { font-size: 1.35rem; }
.tag.lv-ok { display: inline-flex; align-items: center; gap: .3rem; }
.tag.soon { background: var(--sunsoft); }
.chip.sm { min-height: 36px; padding: 0 .8rem; font-size: .85rem; }

/* აცრები */
.vax-group { display: grid; gap: .4rem; }
.vax-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding-top: .6rem; }
.vax-head h3 { font-size: 1.05rem; }
.vax-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.vax-row { display: flex; gap: .8rem; align-items: flex-start; background: var(--card); border: 2px solid var(--line); border-radius: 16px; padding: .8rem; }
.vax-body { display: grid; gap: .25rem; min-width: 0; flex: 1; }
.vax-check { flex: none; width: 44px; height: 44px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); color: var(--on-leaf); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.vax-check[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); }

/* რეჟიმი: გრაფიკები */
.chart { width: 100%; height: auto; display: block; }
.chart-bar { fill: var(--leaf); }
.chart-band { fill: var(--sun); opacity: .35; }
.chart-line { stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart-none { fill: var(--line); opacity: .5; }
.chart-tx { fill: var(--ink); font: 600 10px var(--sans); }
.eat-row { display: grid; grid-template-columns: repeat(14, 1fr); gap: 3px; }
.eat-dot { aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font: 700 .7rem var(--sans); color: var(--ink); background: var(--card); }
.eat-dot.e-good { background: var(--leaf); border-color: var(--leaf); color: var(--on-leaf); }
.eat-dot.e-mid { background: var(--sun); border-color: var(--sun); color: var(--on-sun); }
.eat-dot.e-bad { background: var(--p4); }

.print-only { display: none; }
@media print {
  .site-head, .foot, .no-print, #hc-toasts, .skip { display: none !important; }
  .print-only { display: block !important; }
  .vax-mark.print-only { display: inline !important; font-weight: 700; }
  body { background: #fff !important; color: #000 !important; }
  .card, .vax-row { box-shadow: none !important; background: #fff !important; border: 1px solid #000 !important; break-inside: avoid; }
  .page { padding: 0 !important; max-width: none !important; }
  .print-head { border-bottom: 1px solid #000; padding-bottom: .5rem; margin-bottom: .75rem; }
  a { color: inherit; text-decoration: none; }
}

.row-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }

/* Happy Child+: ოთხი გეგმა ერთ რიგში */
.cards.plans { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* YouTube-ის გადასახედი სურათი პოდკასტის ეპიზოდზე */
.yt { position: relative; display: block; width: 100%; max-width: 560px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #000; border: 2px solid var(--ink, #3A3B2F); }
.yt img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: rgba(0, 0, 0, .7); }
.yt-play::after { content: ""; position: absolute; left: 25px; top: 18px; border-style: solid; border-width: 14px 0 14px 22px; border-color: transparent transparent transparent #fff; }
.yt:hover .yt-play, .yt:focus-visible .yt-play { background: #c00; }
.row .chips { margin: 0; }
