/* Balam-Bäbäm hubs ("Ejeler üçin" and its tools).
   Lifted from the approved mockup landing_page/mocks/hubs/index.html,
   without the phone frame: one centred column, mobile first (375 px design,
   works at 320 px), tap targets at least 48 px.
   Dark mode token blocks follow styles.css: same hues, warm, never navy. */

:root {
  --terracotta:#D06E47; --terracotta-d:#B75833; --marigold:#F1A744; --amber:#EE9537;
  --olive:#959C56; --olive-d:#6F7540; --brown:#A36743; --cream:#D6B685;
  --ground:#FBF7F1; --band:#F6EDE2; --surface:#FFFFFF; --line:#EADFD1;
  --ink:#2E2018; --ink-mid:#57443A; --ink-soft:#735F52;
  --green:#5E8A4E; --green-bg:#EAF1E2; --green-line:#C9DBB9;
  --amber-bg:#FCEFD9; --amber-line:#F3CF93; --amber-ink:#8A4F12;
  --red:#C2452D; --red-bg:#F9E1DA; --red-ink:#7A2A1A; --red-line:#EFB9AA;
  --tint-t:#FBE6DC; --tint-o:#EEF0DF; --tint-b:#F3E8D6; --sel-bg:#FDF3EE;
  --tabs-bg:rgba(255,255,255,.94);
  --solid:#2E2018; --solid-ink:#FFFFFF;
  /* filled controls: text on them passes WCAG AA (4.5:1) in both themes */
  --fill:#B75833; --on-fill:#FFFFFF; --on-red:#FFFFFF; --red-strong:#A8361F; --green-fill:#4F7A40;
  --font:'Nunito', ui-rounded, 'SF Pro Rounded', -apple-system, 'Segoe UI', Roboto, system-ui, sans-serif;
  --col:520px; --wrap:1120px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:#1B1512; --band:#241C17; --surface:#2A211B; --line:#3A2E26;
    --ink:#F3E9DF; --ink-mid:#CBB8A9; --ink-soft:#AD9886;
    --terracotta:#E4855E; --terracotta-d:#F09B76; --olive:#AEB570; --olive-d:#C2C888;
    --green:#8DB97B; --green-bg:#24301E; --green-line:#3A4D30;
    --amber-bg:#33261A; --amber-line:#5C4122; --amber-ink:#F5C98A;
    --red:#EE7F66; --red-bg:#3A1F18; --red-ink:#F6C3B6; --red-line:#64302A;
    --tint-t:#3D2820; --tint-o:#2F3122; --tint-b:#352A1F; --sel-bg:#352219;
    --tabs-bg:rgba(36,28,23,.94);
    --solid:#F3E9DF; --solid-ink:#1B1512;
    --fill:#E4855E; --on-fill:#1B1512; --on-red:#1B1512; --red-strong:#EE7F66; --green-fill:#8DB97B;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ground:#1B1512; --band:#241C17; --surface:#2A211B; --line:#3A2E26;
  --ink:#F3E9DF; --ink-mid:#CBB8A9; --ink-soft:#AD9886;
  --terracotta:#E4855E; --terracotta-d:#F09B76; --olive:#AEB570; --olive-d:#C2C888;
  --green:#8DB97B; --green-bg:#24301E; --green-line:#3A4D30;
  --amber-bg:#33261A; --amber-line:#5C4122; --amber-ink:#F5C98A;
  --red:#EE7F66; --red-bg:#3A1F18; --red-ink:#F6C3B6; --red-line:#64302A;
  --tint-t:#3D2820; --tint-o:#2F3122; --tint-b:#352A1F; --sel-bg:#352219;
  --tabs-bg:rgba(36,28,23,.94);
  --solid:#F3E9DF; --solid-ink:#1B1512;
  --fill:#E4855E; --on-fill:#1B1512; --on-red:#1B1512; --red-strong:#EE7F66; --green-fill:#8DB97B;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.45;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 99;
  background: var(--fill); color: var(--on-fill); padding: 10px 16px; border-radius: 0 0 8px 0; font-weight: 800;
}
.skip:focus { left: 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.col {
  max-width: var(--col); margin: 0 auto;
  padding: max(8px, env(safe-area-inset-top, 0px)) 18px calc(32px + env(safe-area-inset-bottom, 0px));
}
.has-tabs .col { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
@media (max-width: 340px) { .col { padding-left: 14px; padding-right: 14px; } }

/* top bar */
.top { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 56px; margin-bottom: 10px; }
.top .ttl { font-size: 17px; font-weight: 800; text-align: center; flex: 1; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--brown); font-size: 17px; text-decoration: none; min-height: 48px; }
.brand img { width: 30px; height: 30px; border-radius: 50%; }
.iconbtn {
  flex: none; width: 48px; height: 48px; border-radius: 50%; background: var(--surface);
  border: 1px solid var(--line); display: grid; place-items: center; cursor: pointer;
  color: var(--ink-mid); text-decoration: none; padding: 0;
}
.iconbtn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn.ghost { visibility: hidden; }

/* segmented switch: two links */
.seg { background: var(--band); border-radius: 999px; padding: 4px; display: flex; margin-bottom: 18px; }
.seg a {
  flex: 1; display: flex; align-items: center; justify-content: center; min-height: 48px;
  border-radius: 999px; font-weight: 800; font-size: 15px; color: var(--ink-soft); text-decoration: none; text-align: center; padding: 0 6px;
}
.seg a[aria-current="page"] { background: var(--fill); color: var(--on-fill); box-shadow: 0 4px 12px -4px rgba(208,110,71,.6); }

/* hero */
.hero {
  display: block; text-decoration: none; border-radius: 26px; background: var(--fill); color: var(--on-fill);
  position: relative; overflow: hidden; padding: 20px 18px 18px; min-height: 190px; isolation: isolate;
}
.hero img {
  position: absolute; right: -30px; bottom: -12px; width: 190px; height: 190px; object-fit: cover;
  border-radius: 50%; opacity: .95; border: 6px solid rgba(255,255,255,.18); z-index: -1;
}
.hero .k { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: 28px; margin: 6px 0; line-height: 1.05; max-width: 170px; letter-spacing: -.015em; }
.hero p { margin: 0 0 14px; font-size: 14px; max-width: 160px; }
.hero .btn {
  display: inline-flex; align-items: center; gap: 8px; background: #fff; color: #B75833;
  font-weight: 800; border-radius: 999px; padding: 0 18px; min-height: 48px; font-size: 15px;
}
@media (max-width: 340px) { .hero img { width: 150px; height: 150px; right: -36px; } .hero p { max-width: 140px; } }

.sect { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); margin: 22px 0 10px; }

/* tiles */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 14px; min-height: 112px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px; text-decoration: none; position: relative;
}
a.tile:active { transform: scale(.98); }
.tile b { font-size: 16px; line-height: 1.2; display: block; }
.tile em { font-style: normal; font-size: 12.5px; color: var(--ink-soft); display: block; margin-top: 2px; }
.tile.soon { opacity: .72; }
.grid > .tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
.badge {
  position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; letter-spacing: .02em;
  background: var(--band); color: var(--ink-soft); border-radius: 999px; padding: 3px 8px;
}
.ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.ic svg { width: 24px; height: 24px; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.t1 .ic { background: var(--tint-t); } .t1 svg { stroke: var(--terracotta); }
.t2 .ic { background: var(--amber-bg); } .t2 svg { stroke: var(--amber); }
.t3 .ic { background: var(--tint-o); } .t3 svg { stroke: var(--olive-d); }
.t4 .ic { background: var(--tint-b); } .t4 svg { stroke: var(--brown); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 16px; }
.gran { display: flex; gap: 12px; align-items: center; background: var(--band); border: none; position: relative; }
.gran img { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; flex: none; }
.gran b { font-size: 16px; display: block; padding-right: 44px; }
.gran .m { font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
a.gran { color: inherit; text-decoration: none; }
a.gran b { padding-right: 0; }
.gran .go-arrow { margin-left: auto; flex: none; font-size: 20px; font-weight: 800; color: var(--terracotta-d); }

.foot { margin-top: 22px; font-size: 12.5px; color: var(--ink-soft); }

/* tab bar */
.tabs {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: var(--tabs-bg);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
}
.tabs nav { max-width: var(--col); margin: 0 auto; display: flex; justify-content: space-around; }
.tabs a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 56px; min-width: 72px;
  font-size: 11px; font-weight: 700; color: var(--ink-soft); text-decoration: none;
}
.tabs svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tabs a[aria-current="page"] { color: var(--terracotta); }

/* checker */
.stepl { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--ink-soft); margin-bottom: 6px; }
.prog { height: 8px; background: var(--band); border-radius: 9px; margin-bottom: 18px; overflow: hidden; }
.prog i { display: block; height: 100%; width: 0; background: var(--marigold); border-radius: 9px; transition: width .25s ease; }
.illo { display: flex; justify-content: center; margin: 0 0 6px; }
.illo svg { width: 150px; height: 150px; }
.q { font-size: 25px; line-height: 1.2; font-weight: 800; margin: 6px 0 16px; letter-spacing: -.01em; }
.q.sm { font-size: 21px; }
.hint { font-size: 14.5px; color: var(--ink-mid); margin: -8px 0 14px; }
.ans { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; }
.opt {
  background: var(--surface); border: 2px solid var(--line); border-radius: 18px; padding: 14px 16px; min-height: 58px;
  font-size: 17px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  cursor: pointer; text-align: left; width: 100%; line-height: 1.25;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.radio { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); transition: border-width .12s ease, border-color .12s ease; }
.opt.sel { border-color: var(--terracotta); background: var(--sel-bg); }
.opt.sel .radio { border: 7px solid var(--terracotta); }
.opt:has(input:focus-visible) { outline: 3px solid var(--terracotta); outline-offset: 2px; }
.opt .sub { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.opt .sym { display: flex; align-items: center; gap: 14px; }
.opt .sym .ic { flex: none; }
.note { margin-top: 18px; font-size: 13px; color: var(--ink-soft); display: flex; gap: 8px; align-items: flex-start; }
.note svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; margin-top: 1px; }
.go {
  display: flex; align-items: center; justify-content: center; width: 100%; margin-top: 18px; min-height: 56px;
  background: var(--solid); color: var(--solid-ink); text-align: center; font-weight: 800; padding: 0 16px;
  border-radius: 18px; font-size: 17px; border: 0; cursor: pointer; text-decoration: none;
}
.go:disabled { opacity: .35; cursor: default; }
.err { color: var(--red-strong); font-size: 14px; font-weight: 700; margin-top: 10px; }

/* age form */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 14px; font-weight: 800; color: var(--ink-mid); margin-bottom: 6px; }
.agerow { display: flex; gap: 8px; }
.inp {
  background: var(--surface); border: 2px solid var(--line); border-radius: 16px; min-height: 56px; padding: 0 14px;
  font-size: 19px; font-weight: 800; width: 100%; min-width: 0;
}
.inp:focus { outline: none; border-color: var(--terracotta); }
.agerow .inp { flex: 1 1 40%; }
.units { flex: 1 1 60%; display: flex; background: var(--band); border-radius: 16px; padding: 4px; gap: 2px; }
.units label { flex: 1; position: relative; }
.units input { position: absolute; opacity: 0; inset: 0; }
.units span {
  display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px;
  font-weight: 800; font-size: 14.5px; color: var(--ink-soft); cursor: pointer; padding: 0 2px; text-align: center;
}
.units input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(46,32,24,.15); }
.units input:focus-visible + span { outline: 3px solid var(--terracotta); outline-offset: 1px; }
.yn { display: flex; gap: 8px; }
.yn .opt { justify-content: center; }
.small { font-size: 13px; color: var(--ink-soft); margin-top: 6px; }

/* result */
.res { border-radius: 26px; padding: 20px; border: 2px solid; }
.res.green { background: var(--green-bg); border-color: var(--green-line); }
.res.amber { background: var(--amber-bg); border-color: var(--amber-line); }
.res.red { background: var(--red-bg); border-color: var(--red-line); }
.res.info { background: var(--band); border-color: var(--line); }
.pill { display: inline-flex; gap: 6px; align-items: center; color: #fff; font-weight: 800; font-size: 13px; border-radius: 999px; padding: 6px 12px; }
.green .pill { background: var(--green-fill); } .amber .pill { background: var(--amber); color: #2E2018; } .red .pill { background: var(--red); } .info .pill { background: var(--ink-soft); }
:root[data-theme="dark"] .pill { color: #1B1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill { color: #1B1512; } }
.res h1 { font-size: 26px; margin: 12px 0 6px; line-height: 1.1; letter-spacing: -.015em; }
.res p { margin: 0; color: var(--ink-mid); font-size: 15px; }
.res p + p { margin-top: 8px; }
.call {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; min-height: 52px;
  background: var(--red); color: var(--on-red); font-weight: 800; font-size: 18px; border-radius: 16px; text-decoration: none;
}
.list { padding: 4px 16px; }
.li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.li:last-child { border: 0; }
.dot { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--tint-t); color: var(--terracotta); margin-top: -3px; }
.redcard { margin-top: 14px; background: var(--red-bg); border-radius: 20px; padding: 14px 16px; color: var(--red-ink); font-size: 14.5px; }
.redcard b { color: var(--red-strong); }
.share { display: flex; gap: 10px; margin-top: 16px; }
.share a, .share button {
  flex: 1; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: 0 10px;
  border-radius: 16px; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; line-height: 1.2;
}
.p1 { background: var(--fill); color: var(--on-fill); border: 0; }
.p2 { background: var(--surface); border: 1px solid var(--line); }
.src { margin-top: 14px; font-size: 12px; color: var(--ink-soft); }

/* tracker */
.dayhead { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dayhead h1 { font-size: 24px; margin: 0; letter-spacing: -.015em; line-height: 1.15; }
.linkbtn { background: none; border: 0; color: var(--terracotta-d); font-weight: 800; font-size: 14px; min-height: 48px; padding: 0 4px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.counter { display: flex; align-items: center; gap: 12px; padding: 14px 16px; }
.counter + .counter { border-top: 1px solid var(--line); }
.counter .lbl { flex: 1; min-width: 0; }
.counter .lbl b { display: block; font-size: 16.5px; }
.counter .lbl span { font-size: 13px; color: var(--ink-soft); }
.step {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface);
  font-size: 24px; font-weight: 800; line-height: 1; display: grid; place-items: center; cursor: pointer; color: var(--ink);
}
.step.plus { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.step:disabled { opacity: .35; cursor: default; }
/* the nappy counter's number; scoped so table cells marked .num keep their row's size */
.counter .num { flex: none; min-width: 34px; text-align: center; font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.chk { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font-size: 15px; font-weight: 700; cursor: pointer; }
.chk input { flex: none; width: 22px; height: 22px; accent-color: var(--terracotta); margin: 0; }
.verdict { margin-top: 16px; }
.flags { margin: 10px 0 0; padding-left: 20px; color: var(--ink-mid); font-size: 15px; }
.flags li + li { margin-top: 4px; }
.store { display: flex; gap: 8px; align-items: flex-start; margin-top: 16px; font-size: 13px; color: var(--ink-soft); }
.store svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
ul.list { list-style: none; margin: 0; }
.opt svg.chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.opt .sym .ic svg { width: 24px; height: 24px; }
h2.sect { font-family: inherit; }
[tabindex="-1"]:focus { outline: none; }
.counter .num small { font-size: 15px; font-weight: 700; color: var(--ink-soft); }
.counter .num { min-width: 52px; white-space: nowrap; }
.expect { margin: -4px 0 10px; font-size: 14px; color: var(--ink-mid); }
.res + .dayhead, .res + .sect { margin-top: 18px; }
.res h2.vh { font-size: 18px; margin: 10px 0 4px; }
.ghostgo { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
@media (max-width: 340px) { .counter { gap: 8px; padding: 12px; } .step { width: 48px; } }

/* ---------------------------------------------- doctors ("Lukmanlar üçin") */
.doc .seg a[aria-current="page"] { background: var(--olive-d); box-shadow: 0 4px 12px -4px rgba(111,117,64,.6); }
.doc .tabs a[aria-current="page"] { color: var(--olive-d); }
.doc :focus-visible { outline-color: var(--olive-d); }
:root[data-theme="dark"] .doc .seg a[aria-current="page"] { color: #1B1512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .doc .seg a[aria-current="page"] { color: #1B1512; } }
.dochead h1 { font-size: 24px; line-height: 1.15; margin: 4px 0 6px; letter-spacing: -.015em; }
.dochead p { margin: 0; font-size: 14.5px; color: var(--ink-mid); }
.hscroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin: 0 -18px; padding: 2px 18px 6px; scroll-padding: 0 18px;
}
.hscroll::-webkit-scrollbar { display: none; }
@media (max-width: 340px) { .hscroll { margin: 0 -14px; padding-left: 14px; padding-right: 14px; scroll-padding: 0 14px; } }
.brief {
  flex: none; width: min(230px, 78%); scroll-snap-align: start; background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 16px; text-decoration: none; display: flex; flex-direction: column;
}
a.brief:active { transform: scale(.98); }
.tag { align-self: flex-start; display: inline-block; font-size: 11.5px; font-weight: 800; background: var(--tint-o); color: var(--olive-d); border-radius: 8px; padding: 4px 8px; }
.brief h3 { font-size: 18px; margin: 10px 0 6px; line-height: 1.2; }
.brief .was { font-size: 13px; color: var(--ink-soft); text-decoration: line-through; }
.brief .now { font-size: 14px; font-weight: 700; margin-top: 4px; }
.brief .bsrc { margin-top: auto; padding-top: 12px; font-size: 12px; color: var(--olive-d); font-weight: 800; }
.lr { display: flex; align-items: center; gap: 12px; padding: 12px 0; min-height: 64px; border-bottom: 1px solid var(--line); }
.lr:last-child { border: 0; }
.lr .ic { flex: none; width: 38px; height: 38px; border-radius: 12px; background: var(--tint-o); }
.lr .ic svg { stroke: var(--olive-d); width: 20px; height: 20px; }
.lr > div:nth-child(2) { flex: 1; min-width: 0; }
.lr b { font-size: 15.5px; display: block; line-height: 1.25; }
.lr span.s { font-size: 12.5px; color: var(--ink-soft); display: block; line-height: 1.35; margin-top: 2px; }
.lr .badge { position: static; flex: none; }
a.lr { color: inherit; text-decoration: none; }
.lr svg.chev { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--ink-soft); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ana-grid { display: grid; gap: 12px; }
.ana { border-radius: 24px; background: linear-gradient(160deg,#3A2E26,#2E2018); color: #F3E9DF; padding: 16px; display: flex; gap: 14px; align-items: center; position: relative; text-decoration: none; }
a.ana:active { transform: scale(.98); }
.ana > div { flex: 1; min-width: 0; }
.ana svg.chev { flex: none; width: 20px; height: 20px; fill: none; stroke: #CBB8A9; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.brief-3d { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; min-height: 48px; padding: 0 16px; border-radius: 999px; background: var(--tint-o); color: var(--olive-d); font-weight: 800; text-decoration: none; }
.brief-3d svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ana svg { flex: none; width: 72px; height: 80px; }
.ana b { font-size: 17px; display: block; line-height: 1.25; }
.ana span.s { font-size: 13px; opacity: .8; display: block; line-height: 1.35; margin-top: 3px; }
.ana .badge { background: rgba(255,255,255,.14); color: #F3E9DF; }
/* brief page */
.bp h1 { font-size: 25px; line-height: 1.15; margin: 10px 0 16px; letter-spacing: -.015em; }
.wn { border-radius: 20px; padding: 14px 16px; }
.wn .lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wn p { margin: 6px 0 0; font-size: 15px; }
.wn.was { background: var(--band); color: var(--ink-mid); }
.wn.was .lbl { color: var(--ink-soft); }
.wn.now { background: var(--tint-o); margin-top: 10px; }
.wn.now .lbl { color: var(--olive-d); }
.wn.now p { font-weight: 700; color: var(--ink); }
.arrow { display: flex; justify-content: center; margin: 6px 0 -4px; color: var(--olive-d); }
.arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wsrc { font-size: 12.5px; margin-top: 8px; }
.wsrc a, .srcbox a { color: var(--olive-d); font-weight: 800; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 48px; }
.pts { margin: 0; padding: 4px 16px; list-style: none; }
.pts li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.pts li:last-child { border: 0; }
.pts .dot { background: var(--tint-o); color: var(--olive-d); }
.srcbox { margin-top: 16px; }
.srcbox .lbl { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.srcbox p { margin: 4px 0 0; font-size: 14.5px; font-weight: 700; }
.bp .go { background: var(--olive-d); color: var(--solid-ink); }

/* ------------------------------------------------ shared tool components ---
   Release-2 tools build on these (see hubs/PAGES.md); tool-specific rules
   go in hubs/css/<tool>.css. */
.lead { font-size: 16px; color: var(--ink-mid); margin: -4px 0 16px; line-height: 1.45; }
.h2 { font-size: 19px; font-weight: 800; margin: 26px 0 10px; letter-spacing: -.01em; line-height: 1.25; }
.btn2 {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px;
  border-radius: 16px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center;
}
.btn2.p1 { background: var(--fill); border-color: var(--fill); color: var(--on-fill); }
.doc .btn2.p1 { background: var(--olive-d); border-color: var(--olive-d); color: var(--solid-ink); }
.btnrow { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
/* fit-content: a button never shrinks below its label (so a label wraps only
   when it is wider than the row); two that do not fit stack full width. */
.btnrow > * { flex: 1 1 140px; min-width: fit-content; }

/* fields: a grid of labelled inputs; .inp-unit puts the unit inside the field */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 12px; }
/* when one label in a row wraps and its neighbour does not, the inputs still
   line up; not where a help line under an input would push it up instead */
.form-grid:not(:has(.fhelp)) { align-items: end; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 340px) { .form-grid { grid-template-columns: 1fr; } }
.form-grid .field { margin: 0; }
.inp-unit { position: relative; display: block; }
.inp-unit .inp { width: 100%; padding-right: 56px; }
.inp-unit .u { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; font-weight: 800; color: var(--ink-soft); pointer-events: none; }
select.inp { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.fhelp { font-size: 12.5px; color: var(--ink-soft); margin-top: 4px; display: block; }
/* a help line placed as a span inside .field must not take the label style of .field > span */
.field > .fhelp { font-size: 12.5px; font-weight: 400; color: var(--ink-soft); margin: 4px 0 0; }

/* 2-4 option pill switch built from radios (sex, unit, side ...) */
.seg-pick { display: flex; background: var(--band); border-radius: 16px; padding: 4px; gap: 2px; margin: 0; border: 0; }
.seg-pick label { flex: 1; position: relative; }
.seg-pick input { position: absolute; opacity: 0; inset: 0; }
.seg-pick span { display: flex; align-items: center; justify-content: center; min-height: 48px; border-radius: 12px; font-weight: 800; font-size: 14.5px; color: var(--ink-soft); cursor: pointer; text-align: center; padding: 0 6px; }
.seg-pick input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(46,32,24,.15); }
.seg-pick input:focus-visible + span { outline: 3px solid var(--terracotta); outline-offset: 1px; }

/* big result number with its label (z-score, %, volume) */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px; }
.kpi b { display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.01em; }
.kpi span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); margin-top: 2px; }
.res .kpi { background: rgba(255,255,255,.55); border-color: transparent; }
:root[data-theme="dark"] .res .kpi { background: rgba(0,0,0,.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .res .kpi { background: rgba(0,0,0,.18); } }

/* data tables scroll sideways inside their own box, never the page */
/* position: the .sr labels inside cells are absolute; without a containing
   block here they escape the scroll box and widen the whole page. */
.tablewrap { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin: 12px 0; }
.dtable { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.dtable caption { text-align: left; font-weight: 800; padding: 12px 14px 4px; font-size: 14px; }
.dtable th, .dtable td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.dtable thead th { font-size: 12.5px; color: var(--ink-soft); font-weight: 800; background: var(--band); position: sticky; top: 0; }
.dtable tr:last-child td { border-bottom: 0; }
.dtable tr.hit td { background: var(--sel-bg); font-weight: 800; }
.doc .dtable tr.hit td { background: var(--tint-o); }
.dtable td.num, .dtable th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

.chartbox { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 10px; margin: 12px 0; }
.chartbox svg { width: 100%; height: auto; overflow: visible; }

/* collapsible block; the sources list uses it */
details.fold { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; margin: 12px 0; }
details.fold > summary { list-style: none; cursor: pointer; min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 16px; font-weight: 800; font-size: 15px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::after { content: ""; width: 9px; height: 9px; border-right: 2.4px solid var(--ink-soft); border-bottom: 2.4px solid var(--ink-soft); transform: rotate(45deg); margin-top: -4px; transition: transform .15s ease; flex: none; }
details.fold[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.fold > :not(summary) { padding: 0 16px 14px; }
details.srcs > summary { font-size: 13px; color: var(--ink-soft); letter-spacing: .04em; text-transform: uppercase; }
.srclist { list-style: none; margin: 0; padding: 0 16px 12px; }
.srclist li { padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.srclist a { color: var(--ink); font-weight: 700; text-underline-offset: 3px; display: inline; }
.srclist .ext { display: inline-block; width: 14px; height: 14px; margin-left: 4px; vertical-align: -2px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.srcnote { display: block; font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.rflist { margin: 8px 0 0; padding-left: 20px; }
.rflist li { margin: 4px 0; }

/* a card meant to be printed or screenshotted and sent on Telegram */
.printcard { background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 20px; margin: 16px 0; }
.printcard h3 { margin: 0 0 8px; font-size: 21px; line-height: 1.2; }
.printcard .brandline { display: flex; align-items: center; gap: 8px; margin-top: 14px; font-size: 12.5px; color: var(--ink-soft); font-weight: 700; }
.print-only { display: none; }
.printwrap { display: inline-flex; flex-direction: column; gap: 4px; }
.printwrap .btn2 { width: 100%; }
/* the in-app print hint is empty outside Telegram; it must not make the print button taller than its neighbour */
.printwrap .fhelp:empty { display: none; }

/* draft banner (hub.js) until the package is signed off in hubs/signoff.js */
.draftbar { margin: -2px 0 14px; padding: 10px 14px; border-radius: 14px; background: var(--amber-bg); border: 1px dashed var(--amber-line); color: var(--amber-ink); font-size: 13px; font-weight: 700; line-height: 1.4; }

/* wide tool pages (tables, charts, forms, atlas) get more room on desktop */
@media print {
  .site-header, .bar, .tabs, .seg, .top, .no-print, .skip, details.srcs > summary::after { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff !important; color: #000 !important; }
  .col { max-width: none !important; padding: 0 !important; }
  details.fold { border: 0; }
  details.fold > :not(summary) { display: block !important; }
  .printcard, .tablewrap, .chartbox, .res { break-inside: avoid; border-color: #999; background: #fff; }
  a { color: #000; text-decoration: none; }
  .srclist a::after { content: " - " attr(href); font-weight: 400; font-size: 10px; word-break: break-all; }
}

/* ----------------------------------------------------- tablet / desktop ---
   >= 760px the header menu replaces the phone tab bar and the segmented
   switch; the hubs open up to the site width, tool pages sit in a centred
   ~680px column. */
@media (min-width: 760px) {
  .tabs, .seg { display: none; }
  .col, .has-tabs .col { max-width: 728px; padding: 28px 24px 64px; }
  [data-page="hub"] .col, [data-page="docs"] .col { max-width: var(--wrap); }
  body[data-wide] .col { max-width: 1000px; }
  .h2 { font-size: 22px; margin-top: 34px; }
  .lead { font-size: 17px; }
  .form-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; }

  /* tool pages */
  .top { margin-bottom: 18px; }
  .top .ttl { font-size: 19px; }
  .q { font-size: 30px; margin: 10px 0 20px; }
  .q.sm { font-size: 25px; }
  .illo svg { width: 170px; height: 170px; }
  .opt { padding: 16px 20px; }
  .go { max-width: 100%; }
  .res { padding: 28px 30px; }
  .res h1 { font-size: 32px; }
  .res p { font-size: 16px; }
  .dayhead h1 { font-size: 28px; }
  .bp h1 { font-size: 32px; margin: 12px 0 20px; }
  .wn { padding: 18px 22px; }
  .wn p { font-size: 16px; }

  /* mothers' hub */
  .hero {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
    padding: 44px 48px; min-height: 0; border-radius: 32px;
  }
  .hero img { position: static; width: 240px; height: 240px; border-width: 8px; z-index: auto; }
  .hero .k { font-size: 13px; }
  .hero h1 { font-size: 46px; max-width: none; margin: 10px 0; }
  .hero p { font-size: 18px; max-width: 30rem; margin-bottom: 22px; }
  .hero .btn { min-height: 52px; padding: 0 24px; font-size: 16px; transition: transform .16s ease; }
  .hero:hover .btn { transform: translateY(-2px); }
  .sect { margin: 34px 0 14px; }
  .grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .grid > .tile:last-child:nth-child(odd) { grid-column: auto; }
  .tile { min-height: 148px; padding: 18px; border-radius: 22px; transition: transform .16s ease, box-shadow .16s ease; }
  a.tile:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(46,32,24,.35); }
  .tile b { font-size: 17px; }
  .tile em { font-size: 13.5px; }
  .gran { padding: 22px 26px; gap: 20px; border-radius: 24px; }
  .gran img { width: 88px; height: 88px; border-radius: 20px; }
  .gran b { font-size: 19px; }
  .gran .m { font-size: 14.5px; }
  .foot { margin-top: 34px; font-size: 13px; }

  /* doctors' hub */
  .dochead h1 { font-size: 38px; margin-top: 8px; }
  .dochead p { font-size: 17px; }
  .hscroll {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px;
    overflow: visible; margin: 0; padding: 0; scroll-snap-type: none;
  }
  .brief { width: auto; padding: 20px; transition: transform .16s ease, box-shadow .16s ease; }
  a.brief:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(46,32,24,.35); }
  .brief h3 { font-size: 19px; }
  .card.list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; padding: 6px 22px; }
  .card.list > .lr:nth-last-child(2):nth-child(odd),
  .card.list > .li:nth-last-child(2):nth-child(odd) { border-bottom: 0; }
  .ana-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .ana-grid > .ana.wide { grid-column: 1 / -1; }
  .ana { padding: 20px; gap: 16px; transition: transform .16s ease, box-shadow .16s ease; }
  a.ana:hover { transform: translateY(-2px); box-shadow: 0 10px 26px -16px rgba(46,32,24,.5); }
  .grid.g2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1100px) {
  .hero { padding: 52px 64px; }
  .hero h1 { font-size: 54px; }
  .hero img { width: 280px; height: 280px; }
}
