/* App layout and page components, on top of the design tokens in /static/brand.css. */

[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---- shell: a top bar everywhere, a bottom tab bar on phones ---- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); }
.skip:focus { top: 10px; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--glass); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent); padding-top: env(safe-area-inset-top); }
.topbar-in { position: relative; max-width: 1080px; margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 8px 24px; min-height: 64px; }
.topnav { display: flex; gap: 2px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--surface-2) 70%, transparent); border: 1px solid var(--line); }
.topnav a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 18px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .94rem; transition: color .15s, background .15s; }
.topnav a:hover { color: var(--ink); background: var(--surface-3); }
.topnav a[aria-current="page"] { color: var(--brand-ink); background: var(--grad-brand); box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .25); }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.familybtn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: 220px; padding: 0 12px 0 6px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); font: 650 .9rem var(--sans); cursor: pointer; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s; }
.familybtn:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line-strong)); box-shadow: var(--shadow-md); }
.familybtn .avatar { width: 30px; height: 30px; font-size: .74rem; }
.familybtn-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signin-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin: 2px 0; padding: 0 14px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent);
  color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, transparent); text-decoration: none; font-weight: 650; font-size: .9rem; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.signin-link:hover { color: var(--brand-ink); background: var(--grad-brand); border-color: transparent; box-shadow: var(--shadow-brand); }
.signin-link.on { border-color: var(--line); background: none; color: var(--ink-2); font-weight: 550; }
.signin-link.on svg { color: var(--good, #16a34a); }
.signin-link.bad { color: var(--warn, #b45309); border-color: currentColor; }
@media (max-width: 420px) { .signin-link.on .signin-t { display: none; } .signin-link { padding: 0 10px; } }
.sync-cta { margin-bottom: 22px; border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 16%, var(--surface)), color-mix(in srgb, var(--brand-2) 8%, var(--surface)) 55%, var(--surface)); }
.sync-cta h2 { margin-top: 0; }
.signin-sent { padding: 16px 18px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 30%, transparent); }
.signin-sent p { margin: 0 0 8px; }
.avatar { display: inline-flex; width: 30px; height: 30px; border-radius: 50%; align-items: center; justify-content: center; flex: none;
  font: 750 .8rem var(--sans); color: #fff; background: linear-gradient(135deg, #7d8bff, #7b4fd8); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3); }
.menu { position: absolute; right: 24px; top: calc(100% + 8px); z-index: 30; width: 290px; max-height: calc(100vh - 90px); overflow-y: auto; background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; }
.menu:not([hidden]) { animation: pop-in .16s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .menu:not([hidden]) { animation: none; } }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; min-height: 44px; padding: 6px 10px; border: 0; background: none; color: var(--ink);
  font: inherit; font-size: .92rem; text-align: left; border-radius: 10px; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); color: var(--ink); }
.menu .cur { background: var(--brand-soft); }
.menu .menu-t { display: flex; flex-direction: column; line-height: 1.25; }
.menu .menu-t small { color: var(--muted); font-size: .78rem; }
.menu-label { font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 4px; }
.menu .sep { border-top: 1px solid var(--line); margin: 6px 0; }

main { display: block; width: 100%; max-width: 1080px; margin: 0 auto; padding: 40px 24px 72px; }
main:focus { outline: none; }
footer { position: relative; max-width: 1080px; margin: 0 auto; color: var(--muted); font-size: .8rem; line-height: 1.6; padding: 28px 24px 36px; }
footer::before { content: ""; position: absolute; left: 24px; right: 24px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong) 20%, color-mix(in srgb, var(--brand) 45%, var(--line-strong)) 50%, var(--line-strong) 80%, transparent); }
footer strong { font-family: var(--display); color: var(--ink-2); }
footer a { color: var(--ink-2); display: inline-flex; align-items: center; min-height: 32px; text-decoration: none; font-weight: 500; }
footer a:hover { color: var(--brand); text-decoration: underline; }
.footer-links { display: flex; flex-wrap: wrap; gap: 2px 20px; margin-bottom: 10px; }
.offline-note { margin: 8px 0 0; }

.tabbar { display: none; }
@media (max-width: 760px) {
  .topbar-in { gap: 10px; padding: 6px 16px; min-height: 56px; }
  .topnav { display: none; }
  .brand-name { font-size: 1rem; }
  .familybtn { max-width: 150px; }
  .menu { right: 12px; left: 12px; width: auto; }
  main { padding: 20px 16px 40px; }
  footer { padding: 24px 16px calc(104px + env(safe-area-inset-bottom)); }
  footer::before { left: 16px; right: 16px; }
  body.is-article footer { padding-bottom: 28px; }
  /* A floating glass dock, inset from the edges. */
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20;
    max-width: 440px; margin: 0 auto; background: var(--glass); backdrop-filter: saturate(170%) blur(18px); -webkit-backdrop-filter: saturate(170%) blur(18px);
    border: 1px solid var(--line-strong); border-radius: 22px; padding: 5px; box-shadow: var(--shadow-lg); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 52px; color: var(--muted); text-decoration: none;
    font: 650 .74rem var(--sans); border-radius: 17px; transition: color .15s, background .15s; }
  .tabbar a svg { width: 23px; height: 23px; }
  .tabbar a[aria-current="page"] { color: var(--brand); background: color-mix(in srgb, var(--brand) 15%, transparent); }
  .tabbar a[aria-current="page"] svg { stroke-width: 2.2; }
}
@media (max-width: 400px) {
  .brand-name { display: none; }
}

/* ---- Get help: the sheet and the /help page ---- */
.sheet { border: 1px solid var(--line-strong); padding: 0; width: min(560px, 100vw); max-height: min(88vh, 900px); background: var(--surface); color: var(--ink);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); overflow-y: auto; padding: 0 20px 4px; }
.sheet::backdrop { background: rgba(5, 6, 12, .62); backdrop-filter: blur(4px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--surface);
  margin: 0 -20px; padding: 14px 20px 10px; border-bottom: 1px solid var(--line); z-index: 1; }
.sheet-head h2 { margin: 0; font-size: 1.2rem; }
.sheet-head .btn { min-height: 44px; }
@media (max-width: 600px) {
  .sheet { margin: auto 0 0; width: 100vw; max-width: 100vw; border-radius: 18px 18px 0 0; max-height: 92vh; padding-bottom: env(safe-area-inset-bottom); }
}
.help-page { max-width: 640px; }
.help-why { margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); color: var(--ink); font-weight: 550; }
.help-lines, .help-signs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.help-line { display: flex; flex-direction: column; gap: 2px; min-height: 60px; justify-content: center; padding: 12px 16px; border-radius: var(--radius);
  border: 1px solid var(--line-strong); background: var(--surface-2); color: var(--ink); text-decoration: none; transition: border-color .15s, transform .18s var(--ease), box-shadow .18s; }
.help-line:hover { color: var(--ink); border-color: var(--ink-2); box-shadow: var(--shadow-md); }
.help-line-t { font-weight: 650; }
.help-num { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; margin-left: 4px; }
.help-line-s { font-size: .84rem; color: var(--ink-2); }
.help-line.urgent { background: linear-gradient(135deg, #b8261b, var(--call)); border-color: var(--call); color: #fff; box-shadow: 0 12px 28px -12px rgba(200, 40, 30, .7); }
.help-line.urgent .help-line-s { color: #ffe3df; }
.help-line.urgent:hover { color: #fff; filter: brightness(1.08); }
.help-region { font-size: .82rem; color: var(--muted); margin: 10px 0 0; }
.help-h { margin: 22px 0 0; font-size: 1rem; }
.help-signs a { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-left: 3px solid var(--bad); background: var(--surface-2); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink); text-decoration: none; font-size: .88rem; }
.help-signs a span { color: var(--ink-2); }
.help-note { font-size: .86rem; color: var(--ink-2); margin: 16px 0 18px; }
.help-after { margin: 0 0 20px; }

/* ---- page header ---- */
.page-head { margin-bottom: 28px; }
.page-head h1 { margin: 0 0 8px; font-size: clamp(2rem, 5vw, 2.7rem); }
.page-head p { color: var(--ink-2); font-size: 1.04rem; max-width: 64ch; margin: 0; }
.eyebrow-label, .rp-label { font: 700 .7rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.narrow { max-width: 440px; margin: 7vh auto 0; }
.narrow .page-head { display: block; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---- notices ---- */
.flash { max-width: 1160px; width: 100%; margin: 20px auto 0; padding: 0 36px; }
.flash > div { border-radius: var(--radius-sm); padding: 10px 14px; font-size: .9rem; border: 1px solid; }
.flash .ok { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.flash .err { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
@media (max-width: 900px) { .flash { padding: 0 16px; } }

/* ---- forms ---- */
.field { margin-bottom: 16px; }
.field > label, .label { display: block; font-weight: 600; font-size: .84rem; color: var(--ink-2); margin-bottom: 6px; }
.field .opt { color: var(--muted); font-weight: 400; }
.help { font-size: .82rem; color: var(--muted); margin-top: 5px; }
input[type=text], input[type=password], input[type=url], input[type=email], input[type=date], input[type=search], input[type=number], input[type=datetime-local], input[type=time], input[type=tel], select, textarea {
  width: 100%; padding: 10px 14px; background: var(--surface); color: var(--ink); min-height: 44px;
  border: 1px solid var(--line-strong); border-radius: 12px; font: inherit; font-size: 1rem; box-shadow: var(--shadow); transition: border-color .15s, box-shadow .15s;
  /* 16px text fields: below this iOS Safari zooms the whole page when a field is tapped. */
}
textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
::placeholder { color: color-mix(in srgb, var(--muted) 75%, transparent); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { margin: 0; flex: 1 1 150px; }
.toggle { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: border-color .15s; }
.toggle:hover { border-color: var(--line-strong); }
.toggle input { margin-top: 4px; accent-color: var(--brand); }
.steps { margin: 0 0 18px; padding-left: 1.3em; display: grid; gap: 8px; color: var(--ink-2); }
.steps select { width: auto; display: inline-block; min-height: 34px; padding: 5px 10px; }

/* ---- stat tiles (the overview strip) ---- */

/* ---- ask page ---- */
.composer { padding: 0; overflow: hidden; }
.composer .composer-body { padding: 20px 22px 6px; }
.composer textarea { border: 0; box-shadow: none; padding: 4px 0; min-height: 130px; font-size: 1.02rem; background: transparent; }
.composer textarea:focus { box-shadow: none; }
.composer { transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); box-shadow: var(--shadow-md), 0 0 0 4px color-mix(in srgb, var(--brand) 16%, transparent), 0 20px 50px -20px color-mix(in srgb, var(--brand) 55%, transparent); }
.composer .composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.about-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: .86rem; }
.chipbtn { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 3px 11px; font: 600 .84rem var(--sans); cursor: pointer; text-decoration: none; transition: border-color .15s, color .15s, background .15s; }
.chipbtn:hover { border-color: color-mix(in srgb, var(--brand) 55%, var(--line-strong)); color: var(--ink); }
.chipbtn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--brand) 70%, transparent); background: color-mix(in srgb, var(--brand) 16%, var(--surface)); color: var(--brand); font-weight: 650; box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 10%, transparent); }
.chipbtn.add { border-style: dashed; color: var(--muted); }
.modes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.mode { display: block; cursor: pointer; position: relative; }
.mode input { position: absolute; opacity: 0; }
.mode-body { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .15s, background .15s; }
.mode:hover .mode-body { border-color: var(--line-strong); }
.mode input:checked + .mode-body { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 9%, var(--surface)); }
.mode input:focus-visible + .mode-body { outline: 2px solid var(--brand); outline-offset: 2px; }
.mode-name { font-weight: 600; font-size: .9rem; }
.mode-blurb { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.emergency { font-size: .82rem; color: var(--ink-2); border: 1px solid color-mix(in srgb, var(--bad) 22%, var(--line)); background: var(--bad-soft);
  border-radius: var(--radius-sm); padding: 10px 14px; margin: 16px 0 0; }
.emergency strong { color: var(--bad); }
.progress { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 16px; box-shadow: var(--shadow-md); }
.progress-head { display: flex; align-items: center; gap: 10px; }
.stages { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; font-size: .88rem; }
.stages .st-ok { color: var(--good); } .stages .st-running { color: var(--brand); font-weight: 600; }
.stages .st-blocked, .stages .st-failed { color: var(--warn); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.runlist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.runlist li + li a { border-top: 1px solid var(--line); }
.runlist a { display: block; padding: 10px 2px; color: inherit; text-decoration: none; }
.runlist a:hover .t { color: var(--ink); }
.runlist .t { font-size: .84rem; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }
.example { text-align: left; padding: 9px 12px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font: 500 .86rem var(--sans); display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.example:hover { border-color: var(--brand); }
.example small { color: var(--muted); font-size: .72rem; font-weight: 500; white-space: nowrap; }

/* ---- choice cards (settings, admin) ---- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.choice { display: block; cursor: pointer; position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice-body { display: block; height: 100%; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, background .15s; }
.choice:hover .choice-body { border-color: var(--line-strong); }
.choice input:checked + .choice-body { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand-soft) 45%, var(--surface)); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--brand); outline-offset: 2px; }
.choice-body strong { display: flex; align-items: center; gap: 8px; font-size: .92rem; margin-bottom: 2px; }
.choice-body span { font-size: .8rem; color: var(--muted); }
.choice-body .pill { font-size: .66rem; }
.testout { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); font-size: .88rem; border: 1px solid; }
.testout.ok { background: var(--good-soft); color: var(--good); border-color: color-mix(in srgb, var(--good) 25%, transparent); }
.testout.bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }
.card > h2 { margin-bottom: 14px; }
.kids, .people { display: grid; gap: 0; margin: 0 0 14px; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.kids li, .people li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 14px; background: var(--surface); }
.kids li + li, .people li + li { border-top: 1px solid var(--line); }
.kids li.help, .people li.help { margin: 0; }
.kids li .grow, .people li .grow { flex: 1 1 120px; min-width: 0; }

/* ---- history ---- */
.hist { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.hist li + li { border-top: 1px solid var(--line); }
.hist a { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 4px 16px; align-items: center; padding: 12px 18px; color: inherit; text-decoration: none; }
.hist a { transition: background .15s; }
.hist a:hover { background: var(--surface-2); }
.hist .q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.hist .meta { grid-column: 2 / 4; font-size: .78rem; color: var(--muted); }
.hist .meta:empty { display: none; }
@media (max-width: 640px) { .hist a { grid-template-columns: 1fr; } .hist .meta { grid-column: auto; } }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }

/* ---- answer page ---- */
.rp { display: flex; flex-direction: column; gap: 16px; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.rp-quote { white-space: pre-wrap; padding: 12px 16px; border: 1px solid var(--line); background: var(--surface-2); border-radius: var(--radius-sm); color: var(--ink-2); }
.rp-card h2 { font-size: 1.05rem; }
.rp-card h3 { font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 0 8px; }
.rp-verdict { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.rp-claim { font-size: 1.12rem; font-weight: 500; line-height: 1.55; margin: 2px 0 14px; }
.rp-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.rp-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 5px; }
.rp-mono td { font-family: var(--mono); font-size: .78rem; }
.rp-finding { padding: 12px 0; border-bottom: 1px solid var(--line); } .rp-finding p { margin: 4px 0; }
.answer p { font-size: 1.04rem; line-height: 1.7; color: var(--ink); }
.say { display: grid; gap: 8px; margin: 6px 0 0; padding: 0; list-style: none; }
.say li { border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line)); background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--surface)), color-mix(in srgb, var(--brand-2) 12%, var(--surface))); color: var(--ink); border-radius: 16px 16px 16px 5px; padding: 12px 16px; font-weight: 550; font-size: 1.02rem; }
.checkin { border: 1px solid color-mix(in srgb, var(--good) 25%, var(--line)); background: var(--good-soft); padding: 12px 14px; border-radius: var(--radius-sm); margin-top: 18px; }
details.more { margin-top: 12px; } details.more summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .88rem; }
details.card.more summary { color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { font: 600 .78rem var(--sans); padding: 4px 11px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); background: var(--surface); text-decoration: none; transition: border-color .15s, color .15s; }
.chip:hover { border-color: var(--brand); color: var(--brand); }
@media print { .topbar, .tabbar, footer, .noprint, .sheet { display: none !important; } body { background: #fff; } }

/* ---- library ---- */
.kn { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 900px) { .kn { grid-template-columns: 1fr; } }
.kn-list { display: flex; flex-direction: column; gap: 1px; max-height: 75vh; overflow-y: auto; }
.kn-list .grp { font: 600 .68rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 12px 8px 6px; }
.kn-list a { padding: 6px 10px; border-radius: 6px; color: var(--ink-2); text-decoration: none; font-size: .86rem; }
.kn-list a:hover { background: var(--surface-2); color: var(--ink); }
.kn-list a { border-radius: 9px; }
.kn-list a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); font-weight: 650; box-shadow: inset 3px 0 0 var(--brand); }
.prose { max-width: 72ch; } .prose h1 { font-size: clamp(1.9rem, 4.5vw, 2.5rem); margin-bottom: .45em; } .prose h2 { font-size: 1.28rem; margin-top: 1.8em; }
.prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin: .25em 0; }
.prose table { margin: 1em 0; }
.prose > table { width: 100%; } .prose > table th, .prose > table td { overflow-wrap: anywhere; }
dialog.modal { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; max-width: 440px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(4, 6, 14, .6); }
dialog.modal form { padding: 24px; }
/* ---- First-visit nudge: one quiet card for a brand-new household ---- */
/* The first-visit welcome: centred, with its own look, sign-in first. */
dialog.modal.welcome { max-width: 480px; max-height: calc(100dvh - 24px); border: 0; overflow-y: auto; margin: auto; box-shadow: 0 24px 80px rgba(0, 0, 0, .45); }
dialog.modal.welcome::backdrop { background: rgba(4, 6, 14, .72); backdrop-filter: blur(3px); }
dialog.modal.welcome[open] { animation: welcome-in .22s ease-out; }
@keyframes welcome-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.modal.welcome[open] { animation: none; } }
.welcome-hero { padding: 26px 24px 20px; text-align: center; color: #fff; background: linear-gradient(135deg, var(--logo-a), var(--logo-b)); }
.welcome-hero img { display: block; margin: 0 auto 10px; border-radius: 12px; background: rgba(255, 255, 255, .12); padding: 6px; }
.welcome-hero h2 { margin: 0 0 4px; font-size: 1.4rem; color: #fff; }
.welcome-hero p { margin: 0; color: rgba(255, 255, 255, .85); }
dialog.modal.welcome .welcome-body { padding: 20px 24px 16px; }
.welcome-signin { padding: 16px; border-radius: var(--radius-sm); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); }
.welcome-signin h3 { margin: 0 0 4px; font-size: 1.02rem; }
.welcome-signin p { margin: 0 0 12px; font-size: .92rem; }
.welcome-signin .help { margin: 8px 0 0; }
.welcome-email, dialog.modal .welcome-email { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; }
.welcome-email input { flex: 1 1 200px; min-height: 44px; }
.welcome-email .btn { flex: 1 1 auto; justify-content: center; }
.welcome-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 6px; }
.welcome-tile { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); text-decoration: none; background: var(--surface); }
.welcome-tile:hover { border-color: var(--brand); background: var(--surface-2); }
.welcome-tile span { font-size: .84rem; color: var(--ink-2); }
.welcome-fine { margin: 10px 0 4px; text-align: center; }
.welcome-later { display: flex; margin: 0 auto; }
@media (max-width: 420px) { .welcome-actions { grid-template-columns: 1fr; } .welcome-hero { padding: 18px 18px 14px; } .welcome-hero img { width: 36px; height: 36px; } dialog.modal.welcome .welcome-body { padding: 16px 18px 12px; } }
.menu .cur { font-weight: 700; }
.profile-btn[hidden] { display: none !important; }
/* ---- voice input ---- */
.mic { gap: 6px; }
.mic[aria-pressed="true"] { background: var(--bad); border-color: var(--bad); color: #fff; }
.mic[aria-pressed="true"] svg { animation: mic-pulse 1.2s ease-in-out infinite; }
@keyframes mic-pulse { 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .mic[aria-pressed="true"] svg { animation: none; } }
.mic-status { display: flex; align-items: center; gap: 8px; font-size: .82rem; color: var(--bad); font-weight: 600; margin-bottom: 6px; }
.mic-status.quiet { color: var(--muted); font-weight: 400; }
.mic-status.quiet::before { display: none; }
.mic-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.mic-status.busy { color: var(--muted); } .mic-status.busy::before { background: var(--muted); }
@media (max-width: 640px) { .mic .mic-label { display: none; } }
/* ---- follow-up chat ---- */
.chat { margin-top: 16px; }
.chat-log { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.chat-msg { max-width: 86%; }
.chat-msg.me { align-self: flex-end; }
.chat-who { font: 600 .7rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 4px; }
.chat-msg.me .chat-who { text-align: right; }
.chat-body { padding: 10px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.chat-body { border-radius: 18px; }
.chat-msg.me .chat-body { background: var(--grad-brand); border-color: transparent; color: var(--brand-ink); border-bottom-right-radius: 5px; box-shadow: var(--shadow-brand); }
.chat-msg.bot .chat-body { border-bottom-left-radius: 4px; }
.chat-body p { margin: 0 0 .6em; } .chat-body p:last-child { margin-bottom: 0; }
.chat-msg.pending .chat-body { color: var(--muted); font-style: italic; }
.chat-form textarea { min-height: 64px; }
.chat-actions { justify-content: flex-end; margin-top: 10px; }
.chat-actions .help { margin: 0 auto 0 0; color: var(--bad); }
@media (max-width: 640px) { .chat-msg { max-width: 100%; } }
.more-examples { margin-top: 8px; }
.more-examples > summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .86rem; padding: 4px 0; }
.more-examples[open] > summary { margin-bottom: 6px; }
.role-select { width: auto; min-height: 30px; padding: 3px 8px; font-size: .82rem; }
/* ---- eyebrow and lede ---- */
.eyebrow { font: 600 .72rem var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--brand); margin-bottom: 8px; }
.lede { font-size: 1rem; line-height: 1.65; color: var(--ink-2); margin: 0; max-width: 60ch; }


/* ---- light Markdown in answers and chat ---- */
.answer ul, .answer ol { margin: 0 0 1em; padding-left: 1.3em; font-size: 1.04rem; line-height: 1.7; }
.answer li + li { margin-top: .25em; }
.answer h4, .chat-body h4 { margin: 1em 0 .35em; }
.chat-body ul, .chat-body ol { margin: 0 0 .6em; padding-left: 1.2em; }
.chat-body ul:last-child, .chat-body ol:last-child { margin-bottom: 0; }
.answer strong, .chat-body strong { font-weight: 650; }

/* ---- resources ---- */
.res-jump { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 26px; }
.res-section { margin-bottom: 34px; scroll-margin-top: 24px; }
@media (max-width: 900px) { .res-section { scroll-margin-top: 130px; } }
.res-section > h2 { margin: 0 0 14px; }
.res-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.res-card { background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface)); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); min-width: 0; display: flex; flex-direction: column; gap: 6px;
  transition: border-color .18s, box-shadow .18s, transform .18s var(--ease); }
.res-card:hover { border-color: color-mix(in srgb, var(--brand) 40%, var(--line)); box-shadow: var(--shadow-md); }
@media (prefers-reduced-motion: no-preference) { .res-card:hover { transform: translateY(-2px); } }
.res-card h3 { margin: 0; font-size: 1rem; }
.res-card p { margin: 0; color: var(--ink-2); font-size: .88rem; line-height: 1.5; }
.res-card p.res-cost { font-size: .8rem; color: var(--ink-3, var(--ink-2)); font-style: italic; }
.res-take { display: block; margin-top: 4px; font-size: .84rem; line-height: 1.5; color: var(--ink-2); }
.res-take strong { color: var(--ink); font-weight: 600; }
.res-cost-note { font-size: .9rem; color: var(--ink-2); margin-top: 8px; }
.res-links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: auto; padding-top: 6px; font-size: .86rem; font-weight: 500; }
.res-list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.res-list li { display: flex; align-items: center; gap: 12px; padding: 11px 18px; }
.res-list li + li { border-top: 1px solid var(--line); }
.res-list .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.res-list cite { font-style: normal; font-weight: 600; }
.res-list .by { color: var(--muted); font-size: .84rem; }
.res-list .pill { color: var(--brand); background: var(--brand-soft); }
@media (max-width: 640px) { .res-list li { padding: 10px 14px; } .res-list .pill { white-space: normal; text-align: center; } }

/* ---- Guides: stage hub, article pages, and Your week on the Ask page ---- */
.pill.g-pill-now { color: var(--brand); background: var(--brand-soft); }
.pill.g-pill-soon { color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, var(--surface)); }
.g-pill-plain { font-size: .75rem; color: var(--muted); }
.g-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.g-head-text { max-width: 64ch; display: flex; flex-direction: column; gap: 6px; }
.g-head-text h1, .g-head-text p { margin: 0; }
.g-head-text p { color: var(--ink-2); }
.g-for { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.g-stage { display: flex; flex-direction: column; gap: 22px; }
.g-flag, .g-callnow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-soft); color: var(--ink); text-decoration: none; }
.g-flag svg, .g-callnow svg { color: var(--bad); flex: none; }
.g-flag:hover, a.g-callnow:hover { color: var(--ink); border-color: var(--bad); }
.g-flag-text { flex: 1 1 320px; display: flex; flex-direction: column; }
.g-flag-text span { font-size: .9rem; color: var(--ink-2); }
.g-flag-go { font-size: .9rem; font-weight: 600; color: var(--bad); white-space: nowrap; }
.g-callnow { margin: 20px 0 0; padding: 12px 16px; font-size: .9rem; border-radius: var(--radius-sm); }
.g-callnow > span:not(.g-flag-go) { flex: 1 1 260px; }
.g-callnow strong { color: var(--bad); }
/* TLDR: built to stand out from the article - apricot accent bar, a tinted card, a pill label and
   larger display-font points with check marks, so a busy parent can read just this. */
.g-tldr { position: relative; overflow: hidden; margin: 22px 0 4px; padding: 20px 22px 20px 24px; border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, var(--line)); border-left: 6px solid var(--accent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 17%, var(--surface)) 0%, color-mix(in srgb, var(--accent-2) 8%, var(--surface)) 55%, color-mix(in srgb, var(--brand) 12%, var(--surface)) 100%);
  box-shadow: var(--shadow-lg), 0 18px 48px -24px color-mix(in srgb, var(--accent) 60%, transparent); color: var(--ink); }
.g-tldr::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 28%, transparent), transparent 70%); }
.g-tldr > * { position: relative; z-index: 1; }
.g-tldr h2 { margin: 0 0 12px; font-size: .95rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.g-tldr-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; background: var(--grad-warm); color: var(--bg); box-shadow: 0 6px 16px -6px color-mix(in srgb, var(--accent) 80%, transparent);
  font: 800 .78rem var(--display); letter-spacing: .12em; text-transform: uppercase; }
.g-tldr-pill svg { flex: none; }
.g-tldr-sub { font-size: .85rem; font-weight: 500; color: var(--ink-2); letter-spacing: 0; }
.g-tldr ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.g-tldr li { position: relative; padding-left: 32px; font: 600 1.04rem/1.5 var(--sans); letter-spacing: -.005em; color: var(--ink); }
.g-tldr li::before { content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border: 1.5px solid var(--accent); }
.g-tldr li::after { content: ""; position: absolute; left: 7px; top: calc(.2em + 4px); width: 5px; height: 9px;
  border: solid var(--accent-text); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.g-tldr a { white-space: nowrap; font-size: .85rem; font-weight: 600; letter-spacing: 0; color: var(--accent-text); }
.g-stage-tldr { margin: 0; }
.g-sec { display: flex; flex-direction: column; gap: 10px; }
.g-sec-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.g-sec-head h2 { margin: 0; font-size: 1.1rem; }
.g-t { font-weight: 600; line-height: 1.35; }
.g-s { font-size: .88rem; color: var(--muted); line-height: 1.5; }
.g-m { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .75rem; color: var(--muted); }
.g-m .g-when:empty { display: none; }
.g-soon { padding: 18px 20px; background: var(--surface-2); display: flex; flex-direction: column; gap: 12px; }
.g-art-wrap { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.g-art { flex: 999 1 480px; min-width: 0; max-width: 700px; }
.g-art h1 { font-size: clamp(2rem, 5vw, 2.8rem); letter-spacing: -.04em; line-height: 1.05; margin: 0 0 14px; }
.g-lede { font-size: 1.18rem; line-height: 1.55; color: var(--ink-2); margin: 0 0 18px; }
.g-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: .8rem; color: var(--muted); padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.g-actions { margin-top: 14px; }
.g-meta .g-when:empty { display: none; }
.g-rev { display: inline-flex; align-items: center; gap: 6px; }
.g-prose { max-width: none; font-size: 1rem; line-height: 1.7; color: var(--ink-2); }
.g-prose { font-size: 1.04rem; line-height: 1.75; }
.g-prose h2 { font-size: 1.4rem; margin: 2em 0 .5em; color: var(--ink); scroll-margin-top: 84px; }
.g-prose strong { color: var(--ink); }
.g-call { margin-top: 28px; padding: 20px 24px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--bad) 40%, var(--line)); background: var(--bad-soft); color: var(--ink); scroll-margin-top: 80px; }
.g-call h2 { margin: 0 0 8px; display: flex; align-items: center; gap: 10px; }
.g-call h2 svg { color: var(--bad); flex: none; }
.g-call p, .g-call li { color: var(--ink); }
.g-table { margin: 24px 0 0; }
.g-table figcaption { font-weight: 600; color: var(--ink); margin-bottom: 8px; }
.g-table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.g-table-scroll:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.g-table table { margin: 0; width: 100%; border-collapse: collapse; font-size: .88rem; }
.g-table th, .g-table td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.g-table thead th { color: var(--muted); font-weight: 600; font-size: .78rem; background: var(--surface-2); }
.g-table tbody th { color: var(--ink); white-space: nowrap; }
.g-table tr.g-row-now th, .g-table tr.g-row-now td { background: var(--brand-soft); color: var(--ink); }
.g-table tr.g-row-now th { box-shadow: inset 3px 0 0 var(--brand); }
.g-credit { margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; font-size: .82rem; color: var(--muted); }
.g-credit p { margin: 0; }
.g-credit strong { color: var(--ink-2); }
.g-feedback { margin-top: 18px; font-size: .86rem; color: var(--muted); }
.g-related { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
.g-related h2 { margin: 0; font-size: 1.1rem; }
.g-prevnext { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .88rem; }
.g-side { flex: 1 1 280px; max-width: 340px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 24px; }
.g-toc { display: flex; flex-direction: column; }
.g-toc a { display: block; padding: 6px 0 6px 14px; border-left: 2px solid var(--line); color: var(--ink-2); text-decoration: none; font-size: .9rem; transition: color .15s, border-color .15s; }
.g-toc a:hover { color: var(--brand); border-left-color: var(--brand); }
.g-toc a.call { color: var(--bad); }
.g-ask { padding: 20px; display: flex; flex-direction: column; gap: 10px; border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface) 60%); }
.g-ask h2 { font-size: 1.12rem; margin: 0 0 2px; }
.g-ask p { margin: 0; }
.g-ask textarea { width: 100%; box-sizing: border-box; }
.g-ask-kids:empty { display: none; }
.g-q { display: block; width: 100%; text-align: left; padding: 10px 14px; min-height: 44px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); color: var(--ink); font: inherit; font-size: .9rem; line-height: 1.45; cursor: pointer; transition: border-color .15s, background .15s; }
.g-q:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); background: color-mix(in srgb, var(--brand) 8%, var(--surface-2)); }
@media (max-width: 900px) { .g-side { position: static; max-width: none; } .g-art h1 { font-size: 1.7rem; } }

.yw-cells { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.yw-cells span { height: 10px; border-radius: 5px; background: var(--line-strong); }
.yw-cells span.on { background: var(--grad-brand); }
.yw-cells span.here { background: var(--grad-warm); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent), 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent); }
.yw-cap { display: flex; justify-content: space-between; font-size: .75rem; color: var(--muted); margin-top: 6px; }

/* ---- rows: the one list style for guides everywhere (no boxes in boxes) ---- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rows > li { border-bottom: 1px solid var(--line); }
.row-link { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 14px 36px 14px 10px; margin: 0 -10px; min-height: 56px; color: var(--ink); text-decoration: none; border-radius: 12px; transition: background .15s; }
.row-link::after { content: ""; position: absolute; right: 14px; top: 50%; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: translateY(-50%) rotate(45deg); opacity: .45; transition: transform .2s var(--ease), opacity .15s, border-color .15s; }
.row-link:hover { color: var(--ink); background: color-mix(in srgb, var(--brand) 7%, var(--surface-2)); }
.row-link:hover::after { opacity: 1; border-color: var(--brand); transform: translate(3px, -50%) rotate(45deg); }
.row-link:hover .row-t { color: var(--brand); }
.row-t { font-weight: 650; line-height: 1.35; font-size: 1.01rem; letter-spacing: -.005em; }
.row-m { font-size: .88rem; color: var(--ink-2); line-height: 1.45; }
.row-meta { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 0 4px; margin-top: 2px; }
.row-meta .g-when:empty { display: none; }
.calltag { color: var(--bad); font-weight: 600; }

/* ---- Today ---- */
.today { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 30px; }
.today h1 { font-size: clamp(2.3rem, 7vw, 3.9rem); letter-spacing: -.045em; line-height: 1.02; margin: 0 0 16px; }
.today-week h2 { font-size: clamp(1.7rem, 5vw, 2.4rem); letter-spacing: -.035em; line-height: 1.08; }
.today-lede { font-size: 1.1rem; line-height: 1.6; color: var(--ink-2); margin: 0 0 14px; max-width: 60ch; }
.today-intro { padding-top: 8px; }
#today-new, #today-kid:not([hidden]) { display: flex; flex-direction: column; gap: 30px; }
@media (max-width: 480px) { .findbox-row { padding-left: 14px; } .findbox-row .btn { padding: 0 16px; } }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 5px 14px 5px 6px; border-radius: 999px; font: 650 .84rem var(--sans); color: var(--ink-2);
  background: color-mix(in srgb, var(--surface-2) 80%, transparent); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.hero-badge b { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-weight: 750; font-size: .74rem; color: var(--brand-ink); background: var(--grad-brand); }
.today-lede:empty { display: none; }
.today-week .yw-bar { max-width: 420px; }
.today-sec h2 { font-size: 1.32rem; margin: 0 0 12px; }
.today-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.today-sec-head a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .9rem; }
.today-qs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -12px; }
.today-qs:empty { display: none; }
.qchip { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 550; line-height: 1.3; box-shadow: var(--shadow); transition: border-color .15s, background .15s, color .15s; }
.qchip:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--line-strong)); color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.today-others { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.today-others .chipbtn { min-height: 44px; padding: 0 14px; }
/* Stage cards: each stage has its own hue, shown as a glowing orb and a tint on hover. */
.stagepick { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stagepick a { --hue: #a3aeff; position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; min-height: 112px; padding: 14px 16px; border-radius: var(--radius); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  transition: border-color .2s, box-shadow .2s, transform .2s var(--ease), background .2s; }
.stagepick a::before { content: ""; position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  background: radial-gradient(circle at 32% 30%, #fff 0, color-mix(in srgb, var(--hue) 80%, #fff) 18%, var(--hue) 55%, color-mix(in srgb, var(--hue) 60%, #000) 100%);
  box-shadow: 0 0 22px -2px color-mix(in srgb, var(--hue) 75%, transparent); }
.stagepick a::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; pointer-events: none; opacity: .5; transition: opacity .2s;
  background: radial-gradient(circle, color-mix(in srgb, var(--hue) 30%, transparent), transparent 70%); }
.stagepick a:nth-child(1) { --hue: #ffa9c0; }
.stagepick a:nth-child(2) { --hue: #ffc08f; }
.stagepick a:nth-child(3) { --hue: #8fe3b8; }
.stagepick a:nth-child(4) { --hue: #9fb0ff; }
.stagepick a:nth-child(5) { --hue: #c9a6ff; }
.stagepick a:nth-child(6) { --hue: #8fd3ff; }
.stagepick a:hover { border-color: color-mix(in srgb, var(--hue) 70%, var(--line-strong)); color: var(--ink); box-shadow: var(--shadow-md), 0 14px 36px -18px var(--hue); }
.stagepick a:hover::after { opacity: 1; }
@media (prefers-reduced-motion: no-preference) { .stagepick a:hover { transform: translateY(-3px); } }
.stagepick strong { font: 700 1.1rem var(--display); letter-spacing: -.02em; position: relative; }
.stagepick span { font-size: .86rem; color: var(--muted); position: relative; }
.adddate { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; padding: 14px 18px; border-radius: var(--radius); border: 1.5px dashed color-mix(in srgb, var(--brand) 45%, var(--line-strong));
  background: color-mix(in srgb, var(--brand) 6%, transparent); color: var(--ink); text-decoration: none; transition: border-color .15s, background .15s; }
.adddate strong { color: var(--brand); }
.adddate span { font-size: .86rem; color: var(--ink-2); }
.adddate:hover { border-color: var(--brand); color: var(--ink); background: color-mix(in srgb, var(--brand) 11%, transparent); }
.today-present { position: relative; overflow: hidden; padding: 22px 24px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), color-mix(in srgb, var(--accent-2) 7%, var(--surface)) 60%, var(--surface)); box-shadow: var(--shadow-md); }
.today-present::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-warm); }
.today-present h2 { font-size: 1.22rem; margin: 0 0 8px; }
.today-present p { margin: 0; line-height: 1.6; color: var(--ink-2); max-width: 60ch; }
.today-present-links { display: flex; flex-wrap: wrap; gap: 0 18px; margin-top: 4px !important; }
.today-present-links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; font-size: .9rem; }
.trust { font-size: .86rem; color: var(--muted); line-height: 1.6; border-top: 1px solid var(--line); padding-top: 16px; margin: 0; }
.trust a { color: var(--ink-2); }

/* ---- the search-or-ask box ---- */
.findbox { position: relative; }
.findbox-row { display: flex; align-items: center; gap: 8px; padding: 7px 7px 7px 18px; border: 1px solid var(--line-strong); border-radius: 20px; background: var(--surface);
  box-shadow: var(--shadow-md), 0 24px 60px -30px color-mix(in srgb, var(--brand) 55%, transparent); transition: border-color .15s, box-shadow .2s; }
.findbox-row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent), 0 24px 60px -24px color-mix(in srgb, var(--brand) 70%, transparent); }
.findbox-row svg { color: var(--muted); flex: none; }
.findbox-row input { flex: 1; min-width: 0; border: 0; box-shadow: none; background: transparent; min-height: 48px; padding: 0 4px; font-size: 1.06rem; }
.findbox-row input:focus { box-shadow: none; }
.findbox-row .btn { min-height: 48px; padding: 0 22px; border-radius: 14px; }
.find-results { list-style: none; margin: 8px 0 0; padding: 6px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); }
.find-results a, .find-results button { display: flex; flex-direction: column; gap: 1px; width: 100%; min-height: 48px; justify-content: center; padding: 6px 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; text-align: left; background: none; border: 0; font: inherit; cursor: pointer; }
.find-results a:hover, .find-results button:hover { background: var(--surface-2); color: var(--ink); }
.find-ask { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.find-ask button { color: var(--brand); font-weight: 600; }

/* ---- Guides: search, one stage control, flat rows under sticky topic headings ---- */
.guides { max-width: 760px; margin: 0 auto; }
.g-search { display: flex; align-items: center; gap: 10px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 16px; background: var(--surface); margin-bottom: 14px; box-shadow: var(--shadow-md); transition: border-color .15s, box-shadow .2s; }
.g-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent), 0 18px 44px -18px color-mix(in srgb, var(--brand) 60%, transparent); }
.g-search svg { color: var(--muted); flex: none; }
.g-search input { border: 0; box-shadow: none; background: transparent; min-height: 48px; padding: 0 2px; font-size: 1rem; }
.g-search input:focus { box-shadow: none; }
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: 16px; background: color-mix(in srgb, var(--surface-2) 80%, transparent); border: 1px solid var(--line); margin-bottom: 16px; }
@media (min-width: 640px) { .seg { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.seg-b { position: relative; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 4px; border-radius: 12px; color: var(--ink-2); text-decoration: none;
  font: 650 .9rem var(--sans); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color .15s, background .15s; }
.seg-b:hover { color: var(--ink); background: var(--surface-3); }
.seg-b[aria-selected="true"] { background: var(--grad-brand); color: var(--brand-ink); box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .28); }
.seg-b[aria-selected="true"] .seg-here { box-shadow: 0 0 0 2px var(--surface); }
.seg-here { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.g-count { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .84rem; color: var(--muted); margin: 0 0 6px; }
.g-here { color: var(--accent-text); font-weight: 600; }
.g-here::before { content: "● "; }
.g-sec { margin-top: 10px; }
.g-topic { position: sticky; top: 64px; z-index: 2; margin: 0; padding: 14px 4px 10px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font: 700 1.08rem var(--display); letter-spacing: -.015em; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.g-topic span { display: inline-flex; align-items: center; min-width: 24px; height: 22px; justify-content: center; padding: 0 7px; border-radius: 999px; font: 700 .72rem var(--sans); letter-spacing: 0;
  color: var(--brand); background: color-mix(in srgb, var(--brand) 14%, transparent); margin-left: 2px; }
@media (max-width: 760px) { .g-topic { top: 56px; } }
.g-also { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.g-also summary { cursor: pointer; min-height: 48px; display: flex; align-items: center; padding: 0 16px; font-weight: 600; color: var(--ink); }
.g-also .rows { margin: 0 12px 8px; }
.g-results .rows { margin-bottom: 16px; }
.g-results-ask { margin: 0; }
.g-results-ask .btn { min-height: 44px; }
.g-foot { margin-top: 28px; font-size: .88rem; color: var(--muted); }
.g-back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; margin: -8px 0 8px; font-weight: 600; text-decoration: none; }
.g-callnow.quiet { border-color: var(--line-strong); background: var(--surface-2); }
.g-newhere { margin: 28px 0 0; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: .9rem; color: var(--ink-2); }

/* ---- Ask ---- */
.ask { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.ask-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 0; }
.ask-head .btn { min-height: 44px; }
.ask-urgent { font-size: .86rem; color: var(--ink-2); margin: 12px 0 0; }
.ask-urgent a { font-weight: 600; color: var(--bad); }
.ask-recent h2 { font-size: 1.05rem; margin: 0; }
.ask .runlist { border-top: 1px solid var(--line); }
.ask .runlist a { min-height: 48px; }
.chipbtn { min-height: 44px; padding-left: 14px; padding-right: 14px; }
.ideas { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 0 18px; box-shadow: var(--shadow); }
.ideas summary { cursor: pointer; min-height: 52px; display: flex; align-items: center; font-weight: 600; }
.ideas h3 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-family: var(--sans); margin: 14px 0 8px; }
.ideas .preset-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ideas .preset-list:last-child { margin-bottom: 16px; }
.example { text-align: left; padding: 11px 14px; min-height: 44px; background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; cursor: pointer;
  font: 500 .86rem var(--sans); display: flex; flex-direction: column; align-items: flex-start; gap: 2px; transition: border-color .15s, background .15s; }
.example:hover { border-color: color-mix(in srgb, var(--brand) 60%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface-2)); }
.ex-title { font-weight: 600; font-size: .88rem; }
.ex-q { font-weight: 400; font-size: .8rem; color: var(--ink-2); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---- answers: When to call, always last ---- */
.whencall { margin-top: 22px; padding: 14px 16px; border-radius: var(--radius-sm); border-left: 3px solid var(--bad); background: var(--surface-2); }
.whencall h3 { margin: 0 0 6px; }
.whencall p { margin: 0 0 6px; }
.whencall p:last-child { margin: 0; }
.whencall a { font-weight: 600; color: var(--bad); }
.whencall.urgent { background: var(--bad-soft); }

.g-askjump { display: none; }
@media (max-width: 900px) { .g-askjump { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; margin: -6px 0 6px; } }
.avatar.kid { background: #8a4a1c; }
@media (max-width: 420px) { .fb-age { display: none; } }
.findbox-row:focus-within, .g-search:focus-within { outline: 2px solid var(--brand); outline-offset: 1px; }
@media (max-width: 760px) { .footer-links a { min-height: 44px; } }
.g-results-ask .btn, .composer-foot .btn { min-height: 44px; }

/* Today: "At this age" snapshot from the age tables */
.glance { display: grid; gap: 10px; margin: 0 0 8px; grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .glance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .glance-item:first-child { grid-column: 1 / -1; }
  .glance-item:first-child ul { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 20px; }
}
.glance-item { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface)); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow); }
.glance-item dt { font-weight: 600; margin: 0 0 6px; }
.glance-item dt a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ink); text-decoration: none; }
.glance-item dt a::after { content: " \203A"; color: var(--brand); margin-left: 4px; }
.glance-item dt a:hover { color: var(--brand); }
.glance-item dd { margin: 0; }
.glance-item ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.glance-item li { font-size: .92rem; line-height: 1.45; color: var(--ink-2); }
.glance-k { color: var(--muted); font-weight: 600; }
.today-more-btn { margin: 12px 0 4px; min-height: 44px; }

/* ---- Feeding log ---- */
.feed { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.feed h1 { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -.04em; margin: 0 0 8px; }
.feed-head .today-others { margin-top: 4px; }
.feed-next { position: relative; overflow: hidden; padding: 22px 24px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 18%, var(--surface)), color-mix(in srgb, var(--brand-2) 12%, var(--surface))); box-shadow: var(--shadow-md), 0 20px 50px -26px color-mix(in srgb, var(--brand) 70%, transparent); }
.feed-next.is-due { border-color: var(--brand); }
.feed-next.is-late { background: var(--surface); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); border-left: 3px solid var(--accent); }
.feed-next-k { font: 700 .76rem var(--sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: 4px; }
.feed-next-t { font-size: clamp(1.6rem, 5vw, 2.2rem); letter-spacing: -.035em; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.feed-next-m { margin: 0; color: var(--ink-2); line-height: 1.55; }
.feed-next-m:empty { display: none; }
.feed-next-n { margin: 8px 0 0; }
.feed-form .field { margin-bottom: 18px; }
.feed-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); max-width: 100%; }
.feed-seg label { position: relative; display: inline-flex; }
.feed-seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.feed-seg span { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 16px; border-radius: 12px; color: var(--ink-2); font: 650 .9rem var(--sans); transition: background .15s, color .15s; }
.feed-seg input:checked + span { background: var(--grad-brand); color: var(--brand-ink); box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, .28); }
.feed-seg input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 1px; }
.feed-amount { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.feed-amount input[type="number"] { flex: 1 1 120px; max-width: 200px; min-height: 48px; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.feed-amount input[type="datetime-local"] { flex: 1 1 200px; max-width: 260px; min-height: 48px; min-width: 0; }
.feed-amount .btn { min-height: 48px; }
.feed-quick { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.feed-err { margin: 0 0 12px; color: var(--bad); font-weight: 600; }
.feed-form .btn[type="submit"] { min-height: 48px; padding-left: 22px; padding-right: 22px; }
.feed-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 0; }
.feed-stat { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface)); padding: 14px 16px; min-width: 0; box-shadow: var(--shadow); }
.feed-stat dt { font-size: .8rem; color: var(--muted); font-weight: 650; margin-bottom: 4px; }
.feed-stat dd { margin: 0; font: 750 1.6rem/1.15 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--ink); }
.feed-stat small { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); margin-top: 2px; }
#fd-cap { margin: 12px 0 0; }
.feed-days { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.feed-days li { display: grid; grid-template-columns: minmax(84px, 9em) 1fr auto; gap: 12px; align-items: center; font-size: .92rem; }
.feed-day-l { color: var(--ink-2); font-weight: 600; }
.feed-day-bar { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; }
.feed-day-bar span { display: block; height: 100%; border-radius: 5px; background: var(--grad-brand); }
.feed-day-v { color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.feed-group { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .9rem; margin: 16px 0 6px; color: var(--ink); }
.feed-group:first-child { margin-top: 0; }
.feed-group span { color: var(--muted); font-weight: 500; }
.feed-row { display: flex; align-items: center; gap: 12px; padding: 8px 4px; min-height: 56px; }
.feed-row.is-editing { background: var(--brand-soft); border-radius: 6px; }
.feed-row-time { flex: 0 0 5.2em; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--ink); }
.feed-row-main { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-row-main .row-t { font-weight: 500; }
.feed-row-act { display: flex; gap: 2px; flex: none; }
.feed-row-act .btn { min-height: 44px; }
.feed-toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 30; display: flex; align-items: center; gap: 10px;
  padding: 6px 8px 6px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); }
.feed-toast[hidden] { display: none; }
@media (max-width: 480px) {
  .feed-row { flex-wrap: wrap; row-gap: 0; }
  .feed-row-main { flex-basis: calc(100% - 6.5em); }
  .feed-row-act { margin-left: calc(5.2em + 12px); }
}

/* Today: the feeding card */
.today-feed { display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 18px 20px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, var(--surface)), var(--surface)); box-shadow: var(--shadow-md); }
.today-feed h2 { font-size: 1.15rem; margin: 0 0 2px; }
.today-feed p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.today-feed .btn { min-height: 44px; }

/* ---- Growth chart ---- */
.growth { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.growth h1 { font-size: clamp(2rem, 5vw, 2.7rem); letter-spacing: -.04em; margin: 0 0 8px; }
.growth-main, .growth-side { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
.growth-main[hidden], .growth-side[hidden] { display: none; }
.growth-chart-top { display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap; }
.growth-chart-top h2 { margin: 0; }
.growth-headline { margin: 14px 0 6px; font-size: 1.12rem; font-weight: 650; color: var(--ink); line-height: 1.4; }
.growth-plot { position: relative; margin: 0 -6px; }
.growth-svg { display: block; overflow: visible; font-family: var(--sans); }
.growth-svg .g-grid { stroke: var(--line); stroke-width: 1; }
.growth-svg .g-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.growth-svg .g-axis { fill: var(--muted); font-size: 11px; font-weight: 600; }
.growth-svg .g-band-outer { fill: color-mix(in srgb, var(--brand) 10%, transparent); }
.growth-svg .g-band-inner { fill: color-mix(in srgb, var(--brand-2) 14%, transparent); }
.growth-svg .g-line { fill: none; stroke: color-mix(in srgb, var(--brand) 45%, var(--line-strong)); stroke-width: 1; }
.growth-svg .g-mid { stroke: var(--brand); stroke-width: 1.5; }
.growth-svg .g-lab { fill: var(--muted); font-size: 11px; }
.growth-svg .g-kid-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 55%, transparent)); }
.growth-svg .g-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.growth-svg .g-hit { fill: transparent; }
.growth-svg .g-pt { cursor: pointer; outline: none; }
.growth-svg .g-pt:focus-visible .g-dot, .growth-svg .g-pt:hover .g-dot { r: 7; }
.growth-tip { position: absolute; transform: translate(-50%, calc(-100% - 12px)); pointer-events: none; background: var(--surface-2); border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 6px 10px; font-size: .84rem; color: var(--ink-2); white-space: nowrap; box-shadow: var(--shadow-lg); z-index: 2; }
.growth-tip strong { color: var(--ink); font-weight: 600; }
.growth-tip[hidden] { display: none; }
.growth-src { margin: 6px 0 0; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; text-decoration: underline; cursor: pointer; min-height: 32px; }
.growth-notes { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.growth-note { padding: 12px 16px; border-radius: 12px; line-height: 1.5; font-size: .94rem; color: var(--ink-2); background: var(--surface-2); border-left: 3px solid var(--line-strong); }
.growth-note.is-steady { border-left-color: var(--good); }
.growth-note.is-gentle { border-left-color: var(--accent); }
.growth-ai .feed-seg { margin: 4px 0 14px; }
.growth-ai .feed-seg span { padding: 0 12px; }
.growth-note-field { margin-bottom: 14px; }
.growth-note-field input { width: 100%; min-height: 44px; }
.growth-ai #gr-explain { min-height: 48px; padding-left: 22px; padding-right: 22px; }
.growth-ai-out { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; }
.growth-ai-out h3 { margin: 14px 0 6px; font-size: 1rem; }
.growth .feed-amount input[type="number"] { flex: 1 1 70px; max-width: 160px; min-width: 0; padding: 9px 12px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm); font: inherit; font-size: 1.05rem; box-shadow: var(--shadow); }
.growth .feed-amount { flex-wrap: nowrap; }
.growth-u { color: var(--muted); font-weight: 600; min-width: 1.6em; }
.growth-u[hidden], .growth input[hidden] { display: none; }
.growth .feed-form input[type="date"], .growth-setup input[type="text"] { min-height: 48px; max-width: 260px; width: 100%; }
@media (min-width: 1100px) {
  .growth { max-width: none; display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 26px 48px; align-items: start; }
  .growth > .growth-head, .growth > .trust, .growth > .growth-setup { grid-column: 1 / -1; }
  .growth > .growth-setup { max-width: 560px; }
}

/* ---- Wide screens (laptops and up): use the width instead of one narrow centered column.
   Phones and tablets keep the single-column layout above; DOM order is unchanged. ---- */
.ask-main, .ask-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.feed-main, .feed-side { display: flex; flex-direction: column; gap: 26px; min-width: 0; }
@media (min-width: 1100px) {
  main, .topbar-in, footer { max-width: 1240px; }
  body.is-article main, body.is-article .topbar-in, body.is-article footer { max-width: 1080px; }

  /* Today, new visitor: a bit wider, starter guides in two columns */
  .today { max-width: 960px; }
  #today-new .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }

  /* Today, with a child: reading column on the left, feeding + "At this age" on the right */
  .today:has(#today-kid:not([hidden])) { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 360px; column-gap: 56px; row-gap: 0; align-items: start; }
  .today:has(#today-kid:not([hidden])) > #today-kid { display: contents; }
  .today:has(#today-kid:not([hidden])) > *,
  .today:has(#today-kid:not([hidden])) > #today-kid > * { grid-column: 1; margin-bottom: 26px; }
  .today:has(#today-kid:not([hidden])) > #today-kid > #tw-feed { grid-column: 2; grid-row: 1; }
  .today:has(#today-kid:not([hidden])) > #today-kid > #tw-glance-sec { grid-column: 2; grid-row: 2 / span 30; position: sticky; top: 84px; }
  #tw-glance-sec .glance { grid-template-columns: 1fr; }
  #tw-glance-sec .glance-item:first-child ul { grid-template-columns: 1fr; }
  .today-feed { flex-direction: column; align-items: flex-start; }

  /* Guides: rows in two columns under each topic */
  .guides { max-width: none; }
  .guides .g-sec .rows, .guides .g-results .rows, .guides .g-also .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }

  /* Ask: composer on the left, past questions and example ideas on the right */
  .ask { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 18px 56px; align-items: start; }
  .ask-head { grid-column: 1 / -1; }
  .ask .ideas .preset-list { grid-template-columns: 1fr; }

  /* Feeding: log on the left, totals and history on the right */
  .feed { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 26px 56px; align-items: start; }
  .feed > .feed-head, .feed > .trust { grid-column: 1 / -1; }
  .feed-main { position: sticky; top: 84px; }

  /* When to call (/help): numbers on the left, warning signs on the right.
     Each side is its own column container, so the two lists start at the top
     together. The 640px cap stays on phones and tablets; only wide screens
     go two-column. */
  .help-page { max-width: none; }
  .help-page .help-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 56px; align-items: start; }
  .help-page .help-col { min-width: 0; }
  .help-page .help-h { margin-top: 14px; }
}

/* ---- Read state: a check and the word, never colour alone. Read rows keep their place; only the
   title steps back to the muted ink (still AA on both themes). ---- */
.g-read { display: inline-flex; align-items: center; gap: 3px; color: var(--good); font-weight: 600; }
.g-read svg { flex: none; }
.g-started { color: var(--accent-text); font-weight: 600; }
.row-link.is-read .row-t, .g-row.is-read .row-t { color: var(--muted); font-weight: 500; }
.row-meta .g-mine:empty { display: none; }
.g-actions { gap: 8px; align-items: center; }
.g-actions .btn { min-height: 44px; }
.g-readbtn[aria-pressed="true"] { border-color: color-mix(in srgb, var(--good) 45%, var(--line)); }
.g-readbtn .g-readbtn-undo { color: var(--muted); font-weight: 500; }
.g-readnote { margin: 28px 0 0; font-size: .8rem; color: var(--muted); }

/* ---- Stage lists: a count line with the Hide read toggle, then a row of topic chips to jump
   with. On phones each row is the title and its meta only (titles are written as the parent's
   question); the one-line summary comes back from 640px, and always in search results. ---- */
.g-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin-bottom: 6px; }
.g-bar .g-count { margin: 0; }
.g-readcount { color: var(--good); font-weight: 600; }
.g-hideread { min-height: 44px; }
.g-alldone { margin: 12px 0; }
.g-jump { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; margin: 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.g-jump::-webkit-scrollbar { display: none; }
.g-jump a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: 600 .88rem var(--sans); text-decoration: none; white-space: nowrap; transition: color .15s, border-color .15s, background .15s; }
.g-jump a:hover { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 55%, var(--line-strong)); background: color-mix(in srgb, var(--brand) 8%, var(--surface)); }
.g-sec { scroll-margin-top: 64px; }
.g-topic:focus { outline: none; }
.g-topic:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (max-width: 639px) {
  .g-list .row-m { display: none; }
  .g-list .row-link { min-height: 48px; padding: 10px 4px; justify-content: center; }
}
@media (min-width: 900px) { .g-jump { flex-wrap: wrap; overflow: visible; } }

/* ---- Today: Continue reading sits right under the search box. ---- */
.today-continue { margin-top: 4px; }
.today-continue .row-link { margin-left: 0; border-left: 3px solid var(--accent); border-radius: 4px 12px 12px 4px; padding-left: 14px; background: color-mix(in srgb, var(--accent) 7%, transparent); }
.g-read::after, .g-started::after { content: " -"; content: " -" / ""; color: var(--muted); font-weight: 400; white-space: pre; }

/* Optional sign-in (sync) */
.sync-key { font-size: 1.05rem; letter-spacing: .06em; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px dashed color-mix(in srgb, var(--brand) 45%, transparent); background: var(--brand-soft); color: var(--ink); overflow-wrap: anywhere; display: inline-block; max-width: 100%; }
.sync-state { margin-top: 0; }
.sync-state.bad { color: var(--bad); }
.sync-who { margin: 12px 0 16px; padding: 14px 16px; border-radius: var(--radius); background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); }
.sync-who p { margin: 0 0 8px; }
.sync-banner { position: fixed; left: 16px; right: 16px; margin: 0 auto; width: fit-content; bottom: calc(92px + env(safe-area-inset-bottom)); z-index: 60; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center;
  max-width: 560px; padding: 10px 14px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: 0 8px 24px rgba(0,0,0,.25); font-size: .9rem; }
@media (min-width: 761px) { .sync-banner { bottom: 24px; } }

/* Topic links under the guide lists and on topic pages */
.g-topics { margin-top: 2.2rem; }
.g-topics p { line-height: 1.9; }

.signin-lead { margin-top: 0; }
.signin-more { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 12px; }
.signin-more summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }

/* ---- Today, pregnancy: countdown, the week (TLDR-style card), to-dos, the partner's part and visits.
   Same tokens and card language as the TLDR and "The most important thing" cards. ---- */
.preg-count { position: relative; overflow: hidden; padding: 20px 22px; border-radius: var(--radius-lg); border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--line));
  background: linear-gradient(150deg, color-mix(in srgb, var(--brand) 16%, var(--surface)) 0%, color-mix(in srgb, var(--brand-2) 9%, var(--surface)) 55%, var(--surface) 100%); box-shadow: var(--shadow-md); }
.preg-count::after { content: ""; position: absolute; right: -70px; top: -70px; width: 200px; height: 200px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 26%, transparent), transparent 70%); }
.preg-count > * { position: relative; z-index: 1; }
.pc-top { display: flex; align-items: center; gap: 18px; }
.pc-ring { --p: 0; flex: none; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), color-mix(in srgb, var(--line-strong) 70%, transparent) 0); box-shadow: 0 0 26px -6px color-mix(in srgb, var(--accent) 55%, transparent); }
.pc-ring-in { width: 76px; height: 76px; border-radius: 50%; background: var(--surface); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.pc-ring-in strong { font: 750 1.2rem var(--display); letter-spacing: -.02em; }
.pc-ring-in small { font-size: .7rem; color: var(--muted); }
.pc-num { min-width: 0; }
.pc-eyebrow { margin: 0 0 2px; font: 700 .74rem var(--sans) !important; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-text); }
.pc-big { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; }
.pc-big strong { font: 800 clamp(2.4rem, 8vw, 3rem)/1 var(--display); letter-spacing: -.04em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pc-big span { font-weight: 650; color: var(--ink); }
.pc-sub { margin: 4px 0 0; font-size: .9rem; color: var(--ink-2); line-height: 1.45; }
.pc-tri { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.pc-tri li { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pc-tri-bar { height: 8px; border-radius: 4px; background: var(--line-strong); }
.pc-tri li.done .pc-tri-bar { background: var(--grad-brand); }
.pc-tri li.here .pc-tri-bar { background: var(--grad-warm); box-shadow: 0 0 12px color-mix(in srgb, var(--accent) 55%, transparent); }
.pc-tri-t { font-size: .8rem; font-weight: 650; color: var(--ink-2); margin-top: 4px; }
.pc-tri li.here .pc-tri-t { color: var(--ink); }
.pc-tri-w { font-size: .72rem; color: var(--muted); }
.pc-foot { margin: 14px 0 0; font-size: .84rem; color: var(--muted); }
.pc-foot a { font-weight: 600; }

.preg-week { display: flex; flex-direction: column; gap: 14px; }
.preg-week .today-sec-head h2 { margin: 0; }
.preg-week .today-sec-head h2:focus { outline: none; }
.pw-nav { display: flex; flex-wrap: wrap; gap: 6px; }
.pw-nav .chipbtn { min-height: 40px; padding: 0 12px; font-size: .85rem; }
.pw-nav .chipbtn:disabled { opacity: .45; cursor: default; }
.pw-hero { margin: 0; }
.pw-head { margin: 0 0 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pw-size { margin: 0; font: 700 clamp(1.25rem, 3.6vw, 1.5rem)/1.25 var(--display); letter-spacing: -.02em; color: var(--ink); }
.pw-size-n { margin: 4px 0 0; font-size: .86rem; color: var(--ink-2); }
.pw-two { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
@media (min-width: 640px) { .pw-two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; } }
.pw-part h3 { margin: 0 0 4px; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); }
.pw-part p { margin: 0; line-height: 1.55; color: var(--ink); }
.pw-card { padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.pw-card h3 { margin: 0 0 8px; font-size: 1.02rem; display: flex; align-items: center; gap: 8px; }
.pw-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pw-check { display: flex; align-items: flex-start; gap: 12px; width: 100%; min-height: 44px; padding: 8px 6px; margin: 0 -6px; border: 0; border-radius: 10px; background: none;
  color: var(--ink); font: inherit; font-size: .95rem; line-height: 1.45; text-align: left; cursor: pointer; transition: background .15s; }
.pw-check:hover { background: color-mix(in srgb, var(--brand) 7%, transparent); }
.pw-box { flex: none; position: relative; width: 20px; height: 20px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--line-strong); background: var(--surface-2); transition: background .15s, border-color .15s; }
.pw-check[aria-pressed="true"] .pw-box { background: var(--good); border-color: var(--good); }
.pw-check[aria-pressed="true"] .pw-box::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.pw-check[aria-pressed="true"] > span:last-child { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.pw-partner { position: relative; overflow: hidden; border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 11%, var(--surface)), var(--surface) 70%); }
.pw-partner::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--grad-brand); }
.pw-partner-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--grad-brand); color: var(--brand-ink); font-size: .8rem; }
.pw-partner ul { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.pw-partner li { line-height: 1.5; color: var(--ink-2); }
.pw-partner li::marker { color: var(--brand); }
.pw-more { display: inline-flex; align-items: center; min-height: 44px; margin-top: 4px; font-weight: 600; font-size: .9rem; }
.pw-note { margin: 0; padding: 12px 16px; border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--bad) 35%, var(--line)); background: var(--bad-soft); color: var(--ink); font-size: .92rem; line-height: 1.5; }
.pw-note strong { color: var(--bad); }
.pw-note a { font-weight: 600; white-space: nowrap; }
.pw-read h3 { font-size: 1rem; margin: 6px 0 8px; }

.preg-visits { padding: 16px 18px; border-radius: var(--radius-lg); border: 1px solid var(--line); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-2) 50%, var(--surface)), var(--surface)); box-shadow: var(--shadow); }
.preg-visits h2 { font-size: 1.12rem; margin: 0; }
.preg-visits ul { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; }
.preg-visits li { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.preg-visits li:first-child { border-top: 0; }
.pv-when { flex: none; width: 64px; font-size: .78rem; font-weight: 700; color: var(--muted); padding-top: 2px; }
.preg-visits li.is-now .pv-when { color: var(--accent-text); }
.pv-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: .9rem; line-height: 1.45; color: var(--ink-2); }
.pv-body a, .pv-body strong { font-weight: 650; color: var(--ink); }
.pv-body a:hover { color: var(--brand); }

@media (min-width: 1100px) {
  .today:has(#today-kid:not([hidden])) > #today-kid > #tw-count { grid-column: 2; grid-row: 1; }
  .today:has(#today-kid:not([hidden])) > #today-kid > #tw-visits { grid-column: 2; grid-row: 2 / span 30; position: sticky; top: 84px; }
}

/* Photos with a question or follow-up (photos.js) */
.photo-btn { gap: 6px; }
.photo-tray { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; }
.photo-thumb { position: relative; width: 76px; height: 76px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-x { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; padding: 0; line-height: 26px; text-align: center;
  font-size: 18px; cursor: pointer; background: rgba(0, 0, 0, .62); color: #fff; }
.photo-x:hover, .photo-x:focus-visible { background: rgba(0, 0, 0, .85); }
.photo-status { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.composer.drop-on, .chat-form.drop-on { outline: 2px dashed var(--brand); outline-offset: 4px; }
.rp-photos { margin-top: 8px; }
.rp-photos .help { margin-top: 6px; }
.chat-photos { margin-top: 4px; }
@media (max-width: 640px) { .photo-btn .mic-label { display: none; } }
