/* =====================================================
   NURTURE — Design tokens
   Palette: sage green / warm cream / soft rose
   Display face: Fraunces (warm, organic serif)
   Body face: Atkinson Hyperlegible (clear, accessible)
   ===================================================== */

:root {
  --sage-50:   #f3f6f1;
  --sage-100:  #e3ebe0;
  --sage-300:  #aecaa3;
  --sage-500:  #6f9462;
  --sage-700:  #4a6b41;
  --sage-900:  #2c4126;

  --cream-50:  #fdfbf6;
  --cream-100: #f7f2e8;

  --rose-50:   #fdf2f1;
  --rose-100:  #fbe4e1;
  --rose-400:  #e08f88;
  --rose-600:  #b85c54;

  --stone-100: #f1efe9;
  --stone-200: #e4e1d8;
  --stone-600: #6b6357;
  --stone-800: #34302a;

  --radius-lg: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;

  --shadow-soft: 0 4px 18px rgba(70, 60, 40, 0.07);
  --shadow-lift: 0 10px 30px rgba(70, 60, 40, 0.12);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-body);
  color: var(--stone-800);
  background: var(--cream-50);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--sage-900);
  margin: 0 0 0.5em;
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.02rem; }

p { margin: 0 0 1em; color: var(--stone-600); }

a { color: var(--sage-700); text-decoration: none; }

img { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage-500);
  font-weight: 700;
  margin-bottom: 0.6em;
}

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.6em;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover { transform: translateY(-1px); }

.btn--primary {
  background: var(--sage-700);
  color: var(--cream-50);
  box-shadow: var(--shadow-soft);
}
.btn--primary:hover { background: var(--sage-900); box-shadow: var(--shadow-lift); }

.btn--ghost {
  background: var(--cream-50);
  color: var(--sage-700);
  border-color: var(--sage-300);
}
.btn--ghost:hover { background: var(--sage-50); }

.btn__icon { width: 18px; height: 18px; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--sage-700);
  color: var(--cream-50);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.icon-btn:hover { background: var(--sage-900); }
.icon-btn--primary { background: var(--sage-700); }

/* =====================================================
   SITE HEADER / NAV
   ===================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(253, 251, 246, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--stone-200);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--sage-900);
}

.site-nav { display: flex; align-items: center; gap: 1.8em; }

.site-nav a:not(.site-nav__cta) {
  color: var(--stone-600);
  font-weight: 700;
  font-size: 0.95rem;
}
.site-nav a:not(.site-nav__cta):hover { color: var(--sage-700); }

.site-nav__cta {
  background: var(--sage-700);
  color: var(--cream-50) !important;
  padding: 0.55em 1.2em;
  border-radius: var(--radius-pill);
  font-weight: 700;
}
.site-nav__cta:hover { background: var(--sage-900); }

/* =====================================================
   HERO
   ===================================================== */

.hero {
  background: linear-gradient(135deg, var(--sage-100) 0%, var(--cream-100) 55%, var(--rose-50) 100%);
  padding: 88px 0 64px;
}

.hero__inner { max-width: 760px; }

.hero__accent { color: var(--sage-700); }

.hero__sub { font-size: 1.15rem; max-width: 600px; }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin: 28px 0 40px;
}

/* =====================================================
   FEATURES
   ===================================================== */

.features { padding: 72px 0; }

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 32px;
}

.feature-card {
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  border: 1px solid var(--stone-200);
  box-shadow: var(--shadow-soft);
  padding: 28px;
}

.feature-card__icon { width: 40px; height: 40px; margin-bottom: 14px; }

/* =====================================================
   QUESTION HUB
   ===================================================== */

.hub { background: var(--sage-50); padding: 80px 0; }

.hub__sub { max-width: 620px; }

.hub__search { margin: 28px 0 22px; }

.hub__search input {
  width: 100%;
  padding: 0.95em 1.2em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--stone-200);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--cream-50);
}
.hub__search input:focus { outline: 2px solid var(--sage-500); outline-offset: 1px; }

.hub__count { font-size: 0.85rem; color: var(--stone-600); margin-bottom: 18px; min-height: 1.2em; }

.hub__group-label { margin-top: 36px; margin-bottom: 14px; color: var(--sage-700); }

.hub__list { display: flex; flex-direction: column; gap: 10px; }

.qa-card {
  background: var(--cream-50);
  border: 1px solid var(--stone-200);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.qa-card__question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  font-family: var(--font-body);
}

.qa-card__question h3,
.qa-card__question h2 {
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--stone-800);
  margin: 0;
}

.qa-card__chevron {
  color: var(--sage-500);
  font-size: 1rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.qa-card.is-open .qa-card__chevron { transform: rotate(180deg); }

.qa-card__answer { display: none; padding: 0 20px 18px; }

.qa-card.is-open .qa-card__answer { display: block; }

.qa-card__answer ul { margin: 0.6em 0 0.8em; padding-left: 1.2em; color: var(--stone-600); }

.hub__empty { text-align: center; padding: 24px; color: var(--stone-600); }

/* Trusted-source web search fallback */
.trusted-search {
  text-align: center;
  padding: 8px 0 28px;
}

.trusted-search .btn { margin: 0 auto; }

.trusted-search__status {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--stone-600);
}

.trusted-search__disclosure {
  font-size: 0.78rem;
  color: var(--stone-600);
  margin-top: 10px;
}

.trusted-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
  text-align: left;
}

.trusted-card {
  background: var(--cream-50);
  border: 1px solid var(--sage-300);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.trusted-card__source {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--sage-700);
  background: var(--sage-100);
  padding: 0.25em 0.7em;
  border-radius: var(--radius-pill);
  margin-bottom: 10px;
}

.trusted-card h4 {
  margin: 0 0 6px;
  font-family: var(--font-body);
  font-size: 1.02rem;
}

.trusted-card p { margin: 0 0 10px; font-size: 0.92rem; }

.trusted-card a.trusted-card__link {
  font-size: 0.85rem;
  font-weight: 700;
}

.trusted-card__error {
  color: var(--rose-600);
  font-size: 0.9rem;
}

.trusted-card--best {
  border: 2px solid var(--sage-500);
  background: var(--sage-50);
  position: relative;
  padding-top: 32px;
}

.trusted-card__best-flag {
  position: absolute;
  top: -12px;
  left: 18px;
  background: var(--sage-700);
  color: var(--cream-50);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-pill);
}

.trusted-search__more-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--stone-600);
  margin: 18px 0 4px;
}

.trusted-card__excerpt-label {
  font-size: 0.74rem;
  font-style: italic;
  color: var(--stone-600);
  margin: -4px 0 12px;
}

.hub__hook {
  margin: 48px 0 0;
  padding: 32px;
  background: var(--cream-50);
  border-left: 4px solid var(--sage-500);
  border-radius: var(--radius-md);
}
.hub__hook p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--sage-900);
  margin: 0;
  font-style: italic;
}

/* =====================================================
   DOWNLOAD / FOOTER
   ===================================================== */

.download { padding: 72px 0; text-align: center; }
.download__inner { max-width: 640px; margin: 0 auto; }
.download .hero__actions { justify-content: center; }

.download-android {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.download-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.download-qr img {
  border-radius: 12px;
  border: 1px solid var(--stone-200);
  padding: 8px;
  background: #fff;
}

.download-qr__label {
  font-size: 0.78rem;
  color: var(--stone-400);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.download-store {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.download-store__note {
  font-size: 0.8rem;
  color: var(--stone-400);
}

.site-footer { border-top: 1px solid var(--stone-200); padding: 28px 0; }
.site-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
  color: var(--stone-600);
}
.site-footer nav { display: flex; gap: 1.4em; }
.site-footer nav a { color: var(--stone-600); font-size: 0.85rem; }

/* =====================================================
   APP SHELL — desktop sidebar / mobile bottom-nav
   ===================================================== */

.view[hidden] { display: none; }

.app-shell {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--sage-50) 0%, var(--cream-50) 50%, var(--rose-50) 100%);
}

.app-nav {
  width: 232px;
  flex-shrink: 0;
  background: var(--cream-50);
  border-right: 1px solid var(--stone-200);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.app-nav__brand {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sage-900);
  padding: 0 12px 18px;
}

.app-nav__item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: none;
  border: none;
  text-align: left;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--stone-600);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-nav__item:hover { background: var(--sage-50); }

.app-nav__item.is-active { background: var(--sage-100); color: var(--sage-900); }

.app-nav__icon { font-size: 1.1rem; }

.app-nav__exit {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  color: var(--stone-600);
  font-weight: 700;
  font-size: 0.9rem;
  border-top: 1px solid var(--stone-200);
  padding-top: 18px;
}
.app-nav__exit:hover { color: var(--sage-700); }

.app-nav__refresh {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: var(--sage-700);
  font-weight: 600;
  font-size: 0.85rem;
  background: none;
  border: none;
  border-top: 1px solid var(--stone-100);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.15s;
}
.app-nav__refresh:hover { background: var(--sage-50); }
.app-nav__refresh:disabled { opacity: 0.5; cursor: default; }

.app-main { flex: 1; padding: 36px 40px 100px; max-width: 880px; }

.panel-header { margin-bottom: 28px; }

.app-panel { display: none; }
.app-panel.is-active { display: block; }

/* =====================================================
   APP CARDS / WIDGETS
   ===================================================== */

.card {
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--stone-200);
  padding: 24px 26px;
  margin-bottom: 20px;
}

.card--accent-rose { border-color: var(--rose-100); }

.card__header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.card__header-row h2 { margin: 0; }

.muted-text { color: var(--stone-600); font-size: 0.92rem; }

.quick-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.quick-card {
  border: none;
  border-radius: var(--radius-lg);
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-family: var(--font-body);
  font-size: 0.95rem;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease;
}
.quick-card:hover { transform: translateY(-2px); }
.quick-card--mind { background: var(--rose-100); color: var(--rose-600); }
.quick-card--body { background: var(--sage-100); color: var(--sage-900); }
.quick-card__emoji { font-size: 1.8rem; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { padding: 10px 0; border-bottom: 1px solid var(--stone-200); }
.checklist li:last-child { border-bottom: none; }
.checklist label { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.checklist input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--sage-700); }

/* Pulse */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__value { font-family: var(--font-display); font-size: 1.5rem; color: var(--sage-900); }
.stat__label { font-size: 0.8rem; color: var(--stone-600); }

.bar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 140px;
  gap: 8px;
}
.bar-chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}
.bar-chart__bar {
  width: 60%;
  background: var(--sage-500);
  border-radius: 6px 6px 2px 2px;
  min-height: 4px;
}
.bar-chart__day { font-size: 0.72rem; color: var(--stone-600); }

/* Companion chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  background: var(--sage-100);
  color: var(--sage-900);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.5em 1em;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover { background: var(--sage-300); }

/* Village / plain lists */
.plain-list { list-style: none; margin: 0; padding: 0; }
.plain-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--stone-200);
}
.plain-list li:last-child { border-bottom: none; }
.plain-list .item-title { font-weight: 700; }
.plain-list .item-sub { font-size: 0.82rem; color: var(--stone-600); }
.plain-list .item-remove {
  background: none; border: none; color: var(--stone-600);
  cursor: pointer; font-size: 1rem; padding: 4px;
}
.plain-list .item-remove:hover { color: var(--rose-600); }

.task-list { list-style: none; margin: 0; padding: 0; }
.task-list li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--stone-200); }
.task-list li:last-child { border-bottom: none; }
.task-list input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--sage-700); flex-shrink: 0; }
.task-list .task-text { flex: 1; }
.task-list .task-text.is-done { text-decoration: line-through; color: var(--stone-600); }
.task-list .task-assignee { font-size: 0.78rem; color: var(--stone-600); display: block; }

/* Care grid */
.care-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.care-grid__diary { grid-column: 1 / -1; }

/* Logs counters */
.counter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.counter { display: flex; align-items: center; gap: 12px; background: var(--stone-100); border-radius: var(--radius-md); padding: 16px; }
.counter__emoji { font-size: 1.6rem; }
.counter__text { flex: 1; display: flex; flex-direction: column; }
.counter__value { font-family: var(--font-display); font-size: 1.3rem; color: var(--sage-900); }
.counter__label { font-size: 0.78rem; color: var(--stone-600); }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-card {
  background: var(--stone-100);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.history-card__date { font-weight: 700; }
.history-card__stats { font-size: 0.8rem; color: var(--stone-600); }

/* =====================================================
   MODAL
   ===================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 65, 38, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
}
.modal-overlay[hidden] { display: none; }

.modal {
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 420px;
  width: 100%;
  box-shadow: var(--shadow-lift);
}

.modal label { display: block; font-size: 0.85rem; font-weight: 700; color: var(--stone-600); margin: 14px 0 6px; }
.modal input[type="text"],
.modal input[type="tel"],
.modal textarea,
.modal select {
  width: 100%;
  padding: 0.7em 0.9em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--stone-200);
  font-family: var(--font-body);
  font-size: 0.95rem;
}
.modal textarea { min-height: 90px; resize: vertical; }

.modal__actions { display: flex; gap: 10px; margin-top: 22px; }
.modal__actions button { flex: 1; padding: 0.8em; border-radius: var(--radius-pill); font-weight: 700; cursor: pointer; }
.modal__cancel { background: var(--stone-100); border: none; color: var(--stone-600); }
.modal__submit { background: var(--sage-700); border: none; color: var(--cream-50); }
.modal__submit:hover { background: var(--sage-900); }

/* =====================================================
   RESPONSIVE — mobile collapses sidebar to bottom nav
   ===================================================== */

@media (max-width: 860px) {
  .features__grid { grid-template-columns: 1fr; }
  .care-grid { grid-template-columns: 1fr; }
  .care-grid__diary { grid-column: auto; }
  .counter-row { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 18px 12px; }

  .site-nav { gap: 0.8em; }
  .site-nav a:not(.site-nav__cta):not(#nav-login) { display: none; }

  .hero { padding: 56px 0 44px; }
  .hero__actions { flex-direction: column; align-items: stretch; }

  .app-shell { flex-direction: column; }

  .app-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    top: auto;
    height: auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 8px 6px;
    border-right: none;
    border-top: 1px solid var(--stone-200);
    z-index: 50;
  }
  .app-nav__brand, .app-nav__exit, .app-nav__refresh { display: none; }
  .app-nav__item { flex-direction: column; gap: 3px; padding: 6px 8px; font-size: 0.68rem; flex: 1; }
  .app-nav__icon { font-size: 1.25rem; }

  .app-main { padding: 24px 18px 96px; max-width: 100%; }
}

@media (max-width: 600px) {
  .quick-cards { grid-template-columns: 1fr; }
}

/* =====================================================
   ONBOARDING
   ===================================================== */

.onboard-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sage-100) 0%, var(--cream-100) 55%, var(--rose-50) 100%);
  padding: 24px;
}

.onboard-card {
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 40px 36px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.onboard-emoji { font-size: 3rem; display: block; margin-bottom: 12px; }

.onboard-card label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--stone-600);
  margin: 24px 0 8px;
  text-align: left;
}

.onboard-card input[type="text"] {
  width: 100%;
  padding: 0.8em 1em;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--stone-200);
  font-family: var(--font-body);
  font-size: 1rem;
  margin-bottom: 4px;
}

.stage-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 10px 0 28px;
}

.stage-btn {
  border: 2px solid var(--stone-200);
  border-radius: var(--radius-lg);
  background: var(--cream-50);
  padding: 20px 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s, background 0.15s;
}

.stage-btn:hover { border-color: var(--sage-300); background: var(--sage-50); }

.stage-btn.is-selected {
  border-color: var(--sage-700);
  background: var(--sage-100);
}

.stage-btn__emoji { font-size: 2rem; }

.stage-btn__label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--stone-800);
}

.btn--full { width: 100%; justify-content: center; }

/* =====================================================
   STAGE BADGE
   ===================================================== */

.stage-badge {
  display: inline-block;
  background: var(--sage-100);
  color: var(--sage-900);
  border-radius: var(--radius-pill);
  padding: 0.3em 0.9em;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
}

/* =====================================================
   MOOD ROW
   ===================================================== */

.mood-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.mood-btn {
  flex: 1;
  min-width: 56px;
  border: 2px solid var(--stone-200);
  border-radius: var(--radius-md);
  background: var(--cream-50);
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: border-color 0.15s, background 0.15s;
}

.mood-btn:hover { border-color: var(--sage-300); background: var(--sage-50); }

.mood-btn.is-selected {
  border-color: var(--sage-700);
  background: var(--sage-100);
}

.mood-btn__emoji { font-size: 1.6rem; }

.mood-btn__label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--stone-600);
}

/* =====================================================
   CHECKLIST (updated — user-built, with remove button)
   ===================================================== */

.checklist { list-style: none; margin: 0; padding: 0; }

.checklist li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--stone-200);
}

.checklist li:last-child { border-bottom: none; }

.checklist label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
}

.checklist li.is-done label span {
  text-decoration: line-through;
  color: var(--stone-600);
}

.checklist input[type="checkbox"] {
  width: 20px; height: 20px;
  accent-color: var(--sage-700);
  flex-shrink: 0;
}

/* =====================================================
   SUGGESTIONS
   ===================================================== */

.suggest-section { margin-top: 16px; border-top: 1px solid var(--stone-200); padding-top: 14px; }

.suggest-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--stone-600);
  margin-bottom: 8px;
}

.suggest-chip {
  background: var(--sage-50);
  border: 1.5px solid var(--sage-300);
  color: var(--sage-900);
  border-radius: var(--radius-pill);
  padding: 0.45em 0.9em;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.suggest-chip:hover { background: var(--sage-100); }

/* =====================================================
   BABY ARRIVED TRANSITION CARD
   ===================================================== */

.card--transition {
  border: 2px dashed var(--sage-300);
  background: var(--sage-50);
  text-align: center;
}

/* =====================================================
   PULSE — gentle insight card + data note
   ===================================================== */

.card--gentle { background: var(--cream-100); }

.pulse-data-note { font-size: 0.78rem; margin-top: 12px; }

/* =====================================================
   BAR CHART — emoji above bars
   ===================================================== */

.bar-chart__emoji {
  font-size: 0.9rem;
  margin-bottom: 4px;
}

/* =====================================================
   SLEEP ROW
   ===================================================== */

.sleep-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
}

.sleep-row input[type="number"] {
  width: 100px;
  padding: 0.7em 0.9em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--stone-200);
  font-family: var(--font-body);
  font-size: 1rem;
}


/* =====================================================
   LOGS — new stage-aware widgets
   ===================================================== */

.counter-single {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
}

.counter-single .counter__value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--sage-900);
  min-width: 48px;
}

.counter-single .counter__label {
  font-size: 0.85rem;
  color: var(--stone-600);
  flex: 1;
}

.note-row {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

.note-row input[type="text"] {
  flex: 1;
  padding: 0.7em 0.9em;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--stone-200);
  font-family: var(--font-body);
  font-size: 0.95rem;
}

.energy-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.energy-btn {
  flex: 1;
  min-width: 52px;
  border: 2px solid var(--stone-200);
  border-radius: var(--radius-md);
  background: var(--cream-50);
  padding: 10px 6px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 1.5rem;
  transition: border-color 0.15s, background 0.15s;
}

.energy-btn span {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--stone-600);
  font-family: var(--font-body);
}

.energy-btn:hover { border-color: var(--sage-300); background: var(--sage-50); }

.energy-btn.is-selected {
  border-color: var(--sage-700);
  background: var(--sage-100);
}

.feed-options {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.feed-btn {
  flex: 1;
  border: 2px solid var(--stone-200);
  border-radius: var(--radius-md);
  background: var(--cream-50);
  padding: 14px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 1.6rem;
  transition: border-color 0.15s, background 0.15s;
}

.feed-btn span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--stone-600);
  font-family: var(--font-body);
}

.feed-btn:hover { border-color: var(--sage-300); background: var(--sage-50); }

.feed-btn.is-selected {
  border-color: var(--sage-700);
  background: var(--sage-100);
}

.log-saved-note {
  font-size: 0.82rem;
  color: var(--sage-700);
  font-weight: 700;
  margin-top: 6px;
}

.history-card__stats {
  display: block;
  font-size: 0.8rem;
  color: var(--stone-600);
  margin-top: 3px;
}


.storage-note {
  font-size: 0.78rem;
  margin-top: 4px;
}

/* =====================================================
   LOGIN SCREEN
   ===================================================== */

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--stone-600);
  font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--stone-200);
}

.login-error {
  color: var(--rose-600);
  font-size: 0.85rem;
  margin-top: 8px;
  font-weight: 700;
}

/* =====================================================
   AUTH OVERLAY — password gate over a blurred app shell
   ===================================================== */

#app-view.app-locked {
  position: relative;
}

.app-locked .app-shell {
  filter: blur(14px);
  pointer-events: none;
  user-select: none;
}

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(44, 65, 38, 0.25);
}

.auth-overlay[hidden] { display: none; }

.auth-overlay__card {
  max-width: 420px;
  box-shadow: var(--shadow-lift);
}

/* =====================================================
   REGISTER VIEW
   ===================================================== */

.register-steps {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 20px 0;
  text-align: left;
}

.register-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--stone-800);
}

.register-step__num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--sage-700);
  color: var(--cream-50);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── Register page — landscape two-column layout ─────────────────── */
.register-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--sage-100) 0%, var(--cream-100) 55%, var(--rose-50) 100%);
  padding: 24px;
}

.register-landscape {
  display: flex;
  gap: 48px;
  align-items: center;
  max-width: 900px;
  width: 100%;
  background: var(--cream-50);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lift);
  padding: 48px;
}

.register-left {
  flex: 1;
  text-align: left;
}

.register-icon {
  font-size: 2.4rem;
  display: block;
  margin-bottom: 14px;
}

.register-title {
  font-size: 1.8rem;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--sage-900);
}

.register-subtitle {
  font-size: 0.92rem;
  color: var(--stone-600);
  line-height: 1.6;
  margin-bottom: 24px;
}

.register-right {
  flex: 0 0 260px;
  display: flex;
  flex-direction: column;
}

.register-action-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.register-qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 18px;
  background: var(--sage-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--sage-200);
  width: 100%;
}

.register-qr-block img {
  border-radius: 8px;
  border: 1px solid var(--stone-200);
  padding: 6px;
  background: #fff;
}

.register-qr-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--stone-500);
  margin: 0;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.register-pc-link {
  font-size: 0.8rem;
  color: var(--sage-700);
  font-weight: 600;
  text-align: center;
  text-decoration: underline;
}

/* On mobile — stack to single column */
@media (max-width: 680px) {
  .register-landscape {
    flex-direction: column;
    padding: 28px 20px;
    gap: 28px;
  }
  .register-right { width: 100%; }
  .register-title { font-size: 1.4rem; }
}


/* ── Today's Moment card ───────────────────────────────────── */
.card--moment {
  background: linear-gradient(135deg, var(--color-tertiary-fixed, #d8eddb) 0%, var(--color-surface, #fff) 100%);
  padding: 28px 24px 24px;
}
.moment-prompt {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-primary, #2E5D3F);
  margin-bottom: 18px;
}
.moment-expanded {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  animation: fadeSlideIn 0.28s ease;
}
.moment-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-on-surface-variant, #555);
  margin-bottom: 4px;
  display: block;
}
.energy-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.energy-row input[type="range"] {
  flex: 1;
  accent-color: var(--color-primary, #2E5D3F);
}
.energy-label { font-size: 0.78rem; color: var(--color-on-surface-variant, #666); }
.stage-quick-field input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--color-outline-variant, #ccc);
  border-radius: 12px;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.7);
}
.moment-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  animation: fadeIn 0.22s ease;
}
.moment-summary__text {
  flex: 1;
  font-size: 0.9rem;
  color: var(--color-on-surface-variant, #555);
}

/* ── Streak chip ────────────────────────────────────────────── */
.panel-header--home {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.streak-chip {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary, #2E5D3F);
  background: rgba(46,93,63,0.1);
  border-radius: 99px;
  padding: 4px 12px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

/* ── Wind-down banner ───────────────────────────────────────── */
.wind-down-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(46,93,63,0.08);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 0.9rem;
  color: var(--color-primary, #2E5D3F);
  animation: fadeSlideIn 0.3s ease;
}
.wind-down-banner button { flex-shrink: 0; }

/* ── Sync toast ─────────────────────────────────────────────── */
.sync-toast {
  text-align: center;
  font-size: 0.82rem;
  background: rgba(46,93,63,0.12);
  color: var(--color-primary, #2E5D3F);
  border-radius: 99px;
  padding: 6px 18px;
  margin-bottom: 12px;
  animation: fadeIn 0.25s ease;
}

/* ── Daily tip card ─────────────────────────────────────────── */
.card--tip {
  background: linear-gradient(135deg, rgba(46,93,63,0.06) 0%, rgba(255,255,255,0) 100%);
}
.tip-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary, #2E5D3F);
  margin-bottom: 6px;
}
.tip-text {
  font-size: 0.95rem;
  color: var(--color-on-surface, #333);
  line-height: 1.55;
}

/* ── Chip rows ──────────────────────────────────────────────── */
.chip-row--col {
  flex-direction: column;
  align-items: stretch;
}
.chip-row--col .chip {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.9rem;
}

/* ── Follow-up chips ────────────────────────────────────────── */
.followup-chips {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.07);
}
.followup-chips .chip-row { gap: 8px; }

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Brand mark (header logo) ──────────────────────────────── */
.brand__mark {
  height: 64px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  object-fit: contain;
}

/* ── Companion Demo Section (landing page) ─────────────────── */
.companion-demo {
  padding: 80px 0 72px;
  background: var(--color-surface-container-lowest, #FAFAF7);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.companion-demo__inner {
  max-width: 640px;
  text-align: center;
}
.companion-demo__sub {
  font-size: 1.05rem;
  color: var(--color-on-surface-variant, #555);
  margin-bottom: 36px;
  line-height: 1.6;
}
.companion-demo__search-wrap {
  background: var(--color-surface, #fff);
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(46,93,63,0.08);
  padding: 24px 24px 18px;
  margin-bottom: 16px;
}
.companion-demo__input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.companion-demo__input {
  flex: 1;
  padding: 14px 18px;
  border: 1.5px solid var(--color-outline-variant, #ccc);
  border-radius: 14px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--color-surface-container-lowest, #FAFAF7);
  color: var(--color-on-surface, #2E3D32);
  transition: border-color 0.18s;
}
.companion-demo__input:focus {
  outline: none;
  border-color: var(--color-primary, #4A654F);
}
.companion-demo__input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.companion-demo__btn {
  flex-shrink: 0;
  padding: 14px 24px;
  border-radius: 14px;
  font-size: 0.95rem;
}
.companion-demo__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.companion-demo__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.demo-chip {
  background: var(--color-primary-fixed, #CCE8CF);
  color: var(--color-on-primary-fixed-variant, #2E5D3F);
  border: none;
  border-radius: 99px;
  padding: 7px 16px;
  font-size: 0.85rem;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.demo-chip:hover {
  background: #b8dcbb;
  transform: translateY(-1px);
}
.companion-demo__counter {
  font-size: 0.82rem;
  color: var(--color-on-surface-variant, #777);
  margin-bottom: 24px;
}
.companion-demo__results {
  text-align: left;
}
.companion-demo__limit-msg {
  background: var(--color-secondary-container, #E8E0F4);
  border-radius: 16px;
  padding: 28px 24px;
  margin-top: 12px;
}
.companion-demo__limit-msg p {
  margin: 0 0 6px;
  font-weight: 600;
  color: var(--color-on-surface, #2E3D32);
}
.companion-demo__limit-cta {
  font-weight: 400 !important;
  color: var(--color-on-surface-variant, #555) !important;
  margin-bottom: 18px !important;
}

@media (max-width: 540px) {
  .companion-demo__input-row {
    flex-direction: column;
  }
  .companion-demo__btn {
    width: 100%;
  }
  .companion-demo {
    padding: 52px 0 48px;
  }
}

.companion-demo__limit-sub {
  font-size: 0.9rem;
  color: var(--color-on-surface-variant, #555);
  margin-bottom: 18px !important;
  font-weight: 400 !important;
}

/* ── In-app companion ask form (inside the web app panel) ──── */
.app-ask-form {
  display: flex;
  gap: 10px;
}
.app-ask-form input[type="text"] {
  flex: 1;
  padding: 0.8em 1em;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--stone-200);
  font-family: var(--font-body);
  font-size: 1rem;
  background: var(--stone-100);
}
.app-ask-form input[type="text"]:focus {
  outline: 2px solid var(--sage-500);
  outline-offset: 1px;
  background: var(--cream-50);
}
.app-ask-form button {
  background: var(--sage-700);
  color: var(--cream-50);
  border: none;
  padding: 0 1.5em;
  border-radius: var(--radius-pill);
  font-weight: 700;
  cursor: pointer;
}
.app-ask-form button:hover { background: var(--sage-900); }
@media (max-width: 600px) {
  .app-ask-form { flex-direction: column; }
}

/* ── In-app logo replacements (leaf emoji removed) ──────── */
.onboard-logo {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto 16px;
  object-fit: contain;
}
.app-nav__logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  vertical-align: middle;
}
.streak-chip__logo {
  height: 16px;
  width: auto;
  vertical-align: middle;
  object-fit: contain;
}
