:root {
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-soft: #f4f0e8;
  --text: #173d38;
  --muted: #52645f;
  --primary: #164f48;
  --primary-soft: #e5efea;
  --accent: #f3a276;
  --accent-soft: #fce8db;
  --outline: #dfe7e1;
  --danger: #a33131;
  --warning: #825017;
  --success: #3e8267;
  --radius-sm: 12px;
  --radius: 18px;
  --radius-lg: 24px;
  --shadow-sm: 0 1px 2px rgba(22, 79, 72, 0.04);
  --shadow: 0 16px 44px rgba(22, 79, 72, 0.08);
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

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

button,
input,
select,
textarea {
  color: inherit;
  font: inherit;
}

button,
a,
select,
input {
  min-height: 44px;
}

button {
  -webkit-tap-highlight-color: transparent;
}

img,
svg {
  display: block;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  letter-spacing: -0.025em;
}

h2 {
  font-size: 21px;
}

.icon {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, white);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--bg);
  background: var(--primary);
}

.skip-link:focus {
  top: 16px;
}

.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;
}

/* App shell */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 0 max(22px, calc((100vw - 1440px) / 2 + 22px));
  border-bottom: 1px solid color-mix(in srgb, var(--outline) 82%, transparent);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  color: var(--text);
  font-size: 22px;
  font-weight: 780;
  letter-spacing: -0.04em;
}

.brand-logo {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.selectors {
  display: flex;
  align-items: center;
  gap: 8px;
}

.selectors form {
  margin: 0;
}

.selectors select {
  max-width: 190px;
  height: 42px;
  min-height: 42px;
  padding: 0 34px 0 13px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  font-size: 14px;
  font-weight: 650;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  max-width: 1440px;
  min-height: calc(100vh - 72px);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: calc(100vh - 72px);
  padding: 26px 18px 22px;
  border-right: 1px solid var(--outline);
}

.sidebar-main,
.sidebar-care {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-care {
  padding-top: 24px;
  margin-top: 12px;
  border-top: 1px solid var(--outline);
}

.sidebar-care > p {
  margin: 0 12px 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sidebar a,
.admin-link {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 11px 13px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 650;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.sidebar a:hover {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary-soft) 66%, transparent);
}

.sidebar a[aria-current="page"] {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 750;
}

.sidebar a[aria-current="page"] .icon {
  stroke-width: 2.2px;
}

.register-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 52px;
  padding: 0 16px;
  margin-top: auto;
  border: 0;
  border-radius: 15px;
  color: #173d38;
  background: var(--accent);
  box-shadow: 0 10px 24px rgba(243, 162, 118, 0.24);
  cursor: pointer;
  font-weight: 780;
}

.register-button:hover {
  background: color-mix(in srgb, var(--accent) 88%, white);
  transform: translateY(-1px);
}

.sidebar .admin-link {
  margin-top: 7px;
  font-size: 13px;
}

.content {
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  padding: 44px clamp(28px, 5vw, 72px) 100px;
}

.bottom-nav {
  display: none;
}

/* Calendar */
.view-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 360px;
  padding: 4px;
  margin-bottom: 18px;
  border: 1px solid var(--outline);
  border-radius: 14px;
  background: var(--surface-soft);
}

.view-switcher a {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.view-switcher a[aria-current="page"] {
  color: var(--primary);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.month-calendar {
  padding: 16px;
}

.month-calendar-head {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  margin-bottom: 12px;
}

.month-calendar-head h2 {
  margin: 0;
  text-align: center;
  text-transform: capitalize;
}

.month-calendar-head a {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 30px;
}

.weekday-row,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekday-row span {
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
  text-align: center;
}

.calendar-day {
  min-width: 0;
  min-height: 112px;
  padding: 8px;
  border-top: 1px solid var(--outline);
  border-left: 1px solid var(--outline);
}

.calendar-day:nth-child(7n) {
  border-right: 1px solid var(--outline);
}

.calendar-day:nth-last-child(-n + 7) {
  border-bottom: 1px solid var(--outline);
}

.calendar-day.outside {
  color: color-mix(in srgb, var(--muted) 45%, transparent);
  background: var(--surface-soft);
}

.day-number {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  margin-bottom: 5px;
  border-radius: 50%;
  color: inherit;
  font-size: 13px;
  font-weight: 720;
}

.calendar-day.today .day-number {
  color: var(--bg);
  background: var(--primary);
}

.calendar-day.selected {
  background: color-mix(in srgb, var(--primary-soft) 55%, var(--surface));
  box-shadow: inset 0 0 0 2px var(--primary);
}

.calendar-day.selected .day-number,
.calendar-day.today.selected .day-number {
  color: var(--accent-foreground, #173d38);
  background: var(--accent);
}

.day-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.day-events a {
  min-height: auto;
  padding: 5px 6px;
  overflow: hidden;
  border-radius: 7px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-events time {
  font-variant-numeric: tabular-nums;
}

.day-events small {
  padding-left: 4px;
  font-size: 11px;
}

.agenda-list {
  max-width: 760px;
}

.selected-day-events {
  max-width: 760px;
  margin-top: 20px;
}

.event-list-row {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--outline);
  color: var(--text);
}

.event-list-row:last-child {
  border-bottom: 0;
}

.event-list-row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.event-time {
  color: var(--primary);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.action-icon.event-emoji {
  font-size: 24px;
}

.event-now-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 13px;
  font-weight: 800;
}

.event-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  max-width: 820px;
}

.event-detail-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 15px;
  padding: 20px;
}

.event-detail-card h2,
.event-detail-card p {
  margin: 0 0 7px;
}

.event-detail-icon {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 17px;
  background: var(--primary-soft);
  font-size: 27px;
}

.event-detail-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}

.event-notes-card {
  max-width: 820px;
  padding: 20px;
  margin-top: 16px;
}

.event-notes-card .section-head {
  margin: 0 0 12px;
}

.event-notes-card textarea {
  width: 100%;
  min-height: 132px;
  resize: vertical;
}

@media (max-width: 640px) {
  .event-detail-grid {
    grid-template-columns: 1fr;
  }

  .event-detail-head {
    align-items: flex-start;
  }
}

/* Shared type and controls */
.page-head,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.page-head {
  margin-bottom: 28px;
}

.page-head h1 {
  margin: 4px 0 5px;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.section-head {
  min-height: 44px;
  margin: 21px 0 8px;
}

.section-head h2 {
  margin: 0;
  font-size: 21px;
}

.section-head > a {
  min-height: auto;
  font-size: 14px;
  font-weight: 700;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.meta,
small,
.form-note {
  color: var(--muted);
  font-size: 14px;
}

.meta {
  margin: 0;
  line-height: 1.5;
}

.card {
  padding: 20px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card > h2:first-child,
.card > h3:first-child {
  margin-top: 0;
}

.narrow {
  max-width: 620px;
  margin-inline: auto;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 19px;
  border: 1px solid var(--primary);
  border-radius: 14px;
  color: var(--bg);
  background: var(--primary);
  cursor: pointer;
  font-weight: 750;
  transition: transform 160ms ease, opacity 160ms ease, background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
  opacity: 0.9;
}

.button.secondary {
  color: var(--primary);
  background: var(--surface);
  border-color: var(--outline);
}

.button.small {
  min-height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 14px;
}

.button.full {
  width: 100%;
  margin-top: 18px;
}

.button-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.button-row.compact {
  margin-top: 10px;
}

.text-link,
.danger-link {
  min-height: 40px;
  padding: 5px;
  border: 0;
  color: var(--primary);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.danger-link,
.text-link.danger {
  color: var(--danger);
}

.round-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 17px;
  border: 0;
  border-radius: 999px;
  color: #173d38;
  background: var(--accent);
  cursor: pointer;
  font-weight: 760;
}

.round-add .icon {
  width: 20px;
  height: 20px;
}

.action-icon,
.timeline-icon,
.empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.action-icon.medication,
.timeline-item.medication .timeline-icon {
  color: var(--warning);
  background: var(--accent-soft);
}

.action-icon .icon,
.timeline-icon .icon,
.empty-icon .icon {
  width: 21px;
  height: 21px;
}

.chevron-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Today */
.today-head {
  margin-bottom: 18px;
}

.active-card {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 15px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 32%, var(--outline));
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.active-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.active-card small {
  text-transform: capitalize;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(270px, 0.75fr);
  gap: 22px;
  align-items: start;
}

.today-activity,
.today-aside {
  min-width: 0;
}

.today-aside {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.today-aside .section-head {
  margin-bottom: 8px;
}

.timeline {
  padding: 0;
  overflow: hidden;
}

.timeline-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 16px;
  gap: 11px;
  align-items: center;
  min-height: 70px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--outline);
  color: var(--text);
  transition: background 150ms ease;
}

.timeline-item:last-child {
  border-bottom: 0;
}

.timeline-item:hover {
  background: color-mix(in srgb, var(--primary-soft) 42%, transparent);
}

.timeline-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.timeline-copy b,
.timeline-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-copy b {
  font-size: 15px;
}

.timeline-copy small,
.timeline-time {
  color: var(--muted);
  font-size: 12px;
}

.timeline-time {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.empty strong {
  color: var(--text);
}

.reminder-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto 15px;
  align-items: center;
  gap: 10px;
  padding: 14px;
  color: var(--text);
}

.reminder-card > span:nth-child(2),
.last-feed span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.reminder-card time,
.last-feed time {
  color: var(--text);
  font-weight: 780;
  font-variant-numeric: tabular-nums;
}

.day-summary .eyebrow,
.last-feed .eyebrow {
  margin-bottom: 17px;
}

.stat-row,
.sample-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.stat-row > span {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.stat-row b {
  color: var(--text);
  font-size: 17px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.last-feed > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.growth-summary {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.growth-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.growth-summary-head .eyebrow {
  margin: 0;
}

.growth-summary-head a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.growth-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.growth-values > span {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 3px 9px;
  align-items: center;
  min-width: 0;
}

.growth-values .metric-icon {
  grid-row: 1 / 3;
}

.growth-values .metric-icon .icon {
  width: 19px;
  height: 19px;
}

.growth-values strong,
.growth-values small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.growth-values strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.growth-values small {
  color: var(--muted);
  font-size: 11px;
}

.growth-empty {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 11px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.growth-empty .chevron-icon {
  width: 16px;
  height: 16px;
}

/* Care, history and lists */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0 26px;
}

.quick-grid a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  color: var(--text);
  background: var(--surface);
  font-size: 14px;
  transition: border-color 160ms ease, transform 160ms ease;
}

.quick-grid a:hover {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--outline));
  transform: translateY(-2px);
}

.dashboard-grid,
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.columns-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.care-columns .card {
  padding: 9px 0 0;
  overflow: hidden;
}

.care-columns h2 {
  padding: 0 17px;
}

.highlight {
  border: 0;
  color: var(--bg);
  background: var(--primary);
}

.highlight .eyebrow,
.highlight p {
  color: color-mix(in srgb, var(--bg) 78%, transparent);
}

.big-time,
.sample-time {
  margin: 16px 0;
  font-size: 52px;
  font-weight: 760;
  line-height: 1;
}

.medication-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding: 11px;
  margin-bottom: 18px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface);
}

.filter-bar label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--surface-soft);
  font-size: 14px;
  font-weight: 600;
}

.filter-bar input[type="checkbox"] {
  min-height: auto;
  accent-color: var(--primary);
}

.filter-bar input[type="date"] {
  min-height: 40px;
  padding: 7px 9px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  color: var(--text);
  background: var(--bg);
}

.list-card {
  padding: 0;
  overflow: hidden;
}

.list-row,
.treatment-row,
.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  padding: 12px 17px;
  border-bottom: 1px solid var(--outline);
  color: var(--text);
}

.list-row:last-child,
.treatment-row:last-child,
.member-row:last-child {
  border-bottom: 0;
}

.list-row:hover,
.treatment-row:hover {
  background: color-mix(in srgb, var(--primary-soft) 40%, transparent);
}

.list-row span,
.treatment-row span,
.member-row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.treatment-row > a:first-child {
  flex: 1;
  color: var(--text);
}

.member-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-left: auto;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 800;
}

.chevron {
  color: var(--muted);
  font-size: 24px;
}

.medical-note,
.form-note {
  padding: 14px 16px;
  border-radius: 0 12px 12px 0;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  background: var(--accent-soft);
  line-height: 1.55;
}

/* Forms */
.form-card {
  max-width: 760px;
}

.stack-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.stack-form > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.stack-form label,
legend {
  color: var(--text);
  font-size: 14px;
  font-weight: 720;
}

.stack-form input:not([type="checkbox"]):not([type="radio"]),
.stack-form select,
.stack-form textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 13px;
  border: 1px solid var(--outline);
  border-radius: 12px;
  color: var(--text);
  background: var(--bg);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.stack-form textarea {
  min-height: 110px;
  resize: vertical;
}

.stack-form input:focus,
.stack-form select:focus,
.stack-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent);
  outline: 0;
}

.stack-form input[type="checkbox"],
.stack-form input[type="radio"] {
  min-height: auto;
  accent-color: var(--primary);
}

.stack-form ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.stack-form ul li label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.choice-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
}

.stack-form .choice-card {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 22px;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  padding: 11px 12px;
  border: 1px solid var(--outline);
  border-radius: 16px;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.choice-card > input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.choice-card-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--muted);
  background: var(--surface-soft);
}

.choice-card-icon .icon {
  width: 23px;
  height: 23px;
}

.choice-card-label {
  min-width: 0;
  line-height: 1.25;
}

.choice-card-check {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border: 1.5px solid var(--outline);
  border-radius: 50%;
  color: transparent;
}

.choice-card-check .icon {
  width: 13px;
  height: 13px;
}

.choice-card:has(input:checked) {
  border: 2px solid var(--primary);
  padding: 10px 11px;
  background: var(--primary-soft);
}

.choice-card:has(input:checked) .choice-card-icon {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 13%, var(--surface));
}

.choice-card:has(input:checked) .choice-card-check {
  border-color: var(--primary);
  color: var(--bg);
  background: var(--primary);
}

.choice-card:has(input:focus-visible) {
  outline: 3px solid color-mix(in srgb, var(--primary) 28%, transparent);
  outline-offset: 2px;
}

.choice-card:hover {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--outline));
}

.helptext {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.errorlist {
  padding: 0;
  margin: 0;
  color: var(--danger);
  font-size: 13px;
  list-style: none;
}

.sticky-actions {
  margin-top: 7px;
}

.button:disabled,
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sticky-actions .button,
.form-card > .stack-form > .button {
  min-width: 160px;
}

.quick-medication-head .meta {
  max-width: 620px;
  margin-top: 9px;
}

.quick-medication-card {
  max-width: 680px;
}

.stack-form > .quick-medication-note {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 32%, var(--outline));
  border-radius: 14px;
  color: var(--muted);
  background: var(--accent-soft);
}

.quick-medication-note .icon {
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  color: var(--warning);
}

.quick-medication-note strong {
  color: var(--text);
}

.quick-medication-note p {
  margin: 5px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.stack-form input[readonly] {
  color: var(--muted);
  background: var(--surface-soft);
}

.danger-zone {
  max-width: 760px;
  padding: 18px;
  margin-top: 30px;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--outline));
  border-radius: var(--radius);
}

.danger-zone h2 {
  margin-top: 0;
  font-size: 18px;
}

fieldset {
  padding: 16px;
  border: 1px solid var(--outline);
  border-radius: 14px;
}

.segment-form {
  display: grid;
  grid-template-columns: 0.7fr 1fr 1fr auto;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid var(--outline);
}

/* Timer */
.timer-card {
  max-width: 760px;
  padding: clamp(34px, 7vw, 72px);
  margin: 0 auto;
  border-radius: 28px;
  color: #f5f3ec;
  background: #164f48;
  text-align: center;
  box-shadow: 0 24px 60px rgba(22, 79, 72, 0.16);
}

.timer-card .eyebrow,
.timer-card .meta {
  color: rgba(245, 243, 236, 0.75);
}

.timer-value {
  margin: 14px 0;
  font-size: clamp(64px, 12vw, 126px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.07em;
}

.timer-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* Medication, statistics and settings */
.dose-grid,
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

/* Settings */
.settings-page {
  width: 100%;
  max-width: 980px;
}

.settings-heading {
  margin-bottom: 24px;
}

.settings-heading .meta {
  max-width: 590px;
  margin-top: 8px;
  font-size: 15px;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.settings-primary,
.settings-secondary {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.settings-card {
  padding: 0;
  overflow: hidden;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--outline);
}

.settings-card-header > div {
  min-width: 0;
}

.settings-card-header h2 {
  margin: 2px 0 0;
  font-size: 19px;
}

.settings-card-header .button,
.settings-add-link {
  margin-left: auto;
}

.settings-section-icon,
.settings-row-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--primary);
  background: var(--primary-soft);
}

.settings-section-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.settings-section-icon .icon,
.settings-row-icon .icon {
  width: 20px;
  height: 20px;
}

.settings-profile-summary {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 22px 19px;
}

.settings-avatar {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 19px;
  color: #173d38;
  background: var(--accent);
  font-size: 23px;
  font-weight: 820;
  box-shadow: 0 9px 22px rgba(243, 162, 118, 0.2);
}

.settings-profile-copy,
.settings-row-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.settings-profile-copy {
  align-items: flex-start;
  gap: 4px;
}

.settings-profile-copy strong {
  max-width: 100%;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-profile-copy > span {
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.settings-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  margin-top: 4px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 750;
}

.settings-add-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 38px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 750;
}

.settings-add-link:hover {
  background: var(--primary-soft);
}

.settings-add-link .icon {
  width: 17px;
  height: 17px;
}

.settings-list {
  display: block;
}

.settings-action-row,
.settings-empty-row,
.settings-delete > summary {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 70px;
  padding: 12px 17px;
  border: 0;
  border-bottom: 1px solid var(--outline);
  color: var(--text);
  background: transparent;
  text-align: left;
}

.settings-action-row:last-child,
.settings-empty-row:last-child {
  border-bottom: 0;
}

.settings-action-row {
  transition: background 150ms ease;
}

.settings-action-row:hover,
.settings-delete > summary:hover {
  background: color-mix(in srgb, var(--primary-soft) 50%, transparent);
}

.settings-family-row {
  background: color-mix(in srgb, var(--primary-soft) 33%, transparent);
}

.settings-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}

.settings-row-icon.baby {
  color: var(--warning);
  background: var(--accent-soft);
}

.settings-row-icon.danger {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
}

.settings-row-copy {
  gap: 3px;
}

.settings-row-copy strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-row-copy small {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-empty-row {
  grid-template-columns: 40px minmax(0, 1fr);
  color: var(--muted);
  font-size: 14px;
}

.settings-action-button {
  min-height: 70px;
  font: inherit;
  cursor: pointer;
}

.settings-account > form {
  margin: 0;
}

.settings-delete {
  border-top: 1px solid var(--outline);
}

.settings-delete > summary {
  border-bottom: 0;
  cursor: pointer;
  list-style: none;
}

.settings-delete > summary::-webkit-details-marker {
  display: none;
}

.settings-delete > summary strong {
  color: var(--danger);
}

.settings-details-chevron {
  transition: transform 160ms ease;
}

.settings-delete[open] .settings-details-chevron {
  transform: rotate(90deg);
}

.settings-delete-content {
  padding: 0 17px 18px 69px;
}

.settings-delete-content > p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.settings-delete-content .stack-form {
  gap: 12px;
}

.settings-delete-content .stack-form > label {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.danger-button {
  width: 100%;
  color: white;
  border-color: var(--danger);
  background: var(--danger);
}

.settings-medical-note {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: none;
  padding: 13px 16px;
  margin: 18px 0 0;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--outline));
  border-left-width: 3px;
  border-radius: 13px;
  font-size: 13px;
}

.settings-medical-note .icon {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  color: var(--warning);
}

/* Medication */
.medication-page {
  max-width: 1040px;
}

.medication-head {
  align-items: flex-end;
  margin-bottom: 22px;
}

.medication-head .meta {
  max-width: 620px;
  margin-top: 9px;
}

.medication-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.medication-summary {
  display: grid;
  grid-template-columns: auto auto minmax(240px, 1fr);
  align-items: center;
  min-height: 72px;
  padding: 12px 18px;
  margin-bottom: 32px;
  border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--outline));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--primary-soft) 58%, var(--surface));
}

.medication-summary > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding-right: 20px;
  margin-right: 20px;
  border-right: 1px solid color-mix(in srgb, var(--primary) 16%, var(--outline));
}

.medication-summary strong {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.medication-summary span,
.medication-summary p {
  color: var(--muted);
  font-size: 13px;
}

.medication-summary p {
  margin: 0;
  text-align: right;
}

.medication-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
  gap: 24px;
  align-items: start;
}

.medication-section-head {
  align-items: flex-end;
  min-height: 48px;
  margin: 0 0 12px;
}

.medication-section-head h2 {
  margin-top: 3px;
}

.medication-section-head .meta {
  margin-top: 5px;
}

.count-badge,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 25px;
  min-height: 25px;
  padding: 3px 8px;
  border-radius: 999px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 11px;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}

.count-badge.accent {
  color: var(--warning);
  background: var(--accent-soft);
}

.count-badge.muted,
.status-badge.muted {
  color: var(--muted);
  background: var(--surface-soft);
}

.status-badge.success {
  color: var(--success);
  background: color-mix(in srgb, var(--success) 11%, var(--surface));
}

.status-badge.warning {
  color: var(--warning);
  background: var(--accent-soft);
}

.active-treatment-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.treatment-card {
  padding: 19px;
  border: 1px solid var(--outline);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.treatment-card:hover {
  border-color: color-mix(in srgb, var(--primary) 32%, var(--outline));
  box-shadow: 0 10px 30px rgba(22, 79, 72, 0.07);
  transform: translateY(-1px);
}

.treatment-card > header {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.treatment-card > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.treatment-card h3,
.inactive-treatment-row h3 {
  margin: 0;
  font-size: 18px;
}

.treatment-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 13px;
  color: var(--warning);
  background: var(--accent-soft);
}

.treatment-icon .icon {
  width: 21px;
  height: 21px;
}

.treatment-icon.disabled {
  color: var(--muted);
  background: var(--surface-soft);
}

.treatment-edit-link,
.treatment-manage-link {
  min-height: auto;
  font-size: 13px;
  font-weight: 750;
}

.treatment-dose {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 15px 0 12px;
  margin-top: 13px;
  border-top: 1px solid var(--outline);
}

.treatment-dose strong {
  color: var(--text);
  font-size: 23px;
  letter-spacing: -0.035em;
}

.treatment-dose span,
.treatment-notes {
  color: var(--muted);
  font-size: 13px;
}

.treatment-notes {
  margin: 0 0 13px;
  line-height: 1.5;
}

.next-dose {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  margin: 0 0 12px;
  border-radius: 11px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
}

.next-dose strong {
  color: var(--text);
  text-align: right;
}

.treatment-register {
  width: 100%;
  min-height: 44px;
}

.medication-empty {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 180px;
}

.medication-empty .empty-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.medication-empty h3,
.medication-empty p {
  margin: 0;
}

.medication-empty p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.medication-empty .button {
  grid-column: 1 / -1;
  justify-self: start;
}

.dose-panel {
  position: sticky;
  top: 94px;
}

.dose-list {
  padding: 0;
}

.dose-row {
  position: relative;
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 82px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--outline);
}

.dose-row:last-child {
  border-bottom: 0;
}

.dose-row.is-overdue {
  background: color-mix(in srgb, var(--accent-soft) 40%, transparent);
}

.dose-when,
.dose-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.dose-when {
  align-items: flex-start;
  gap: 5px;
}

.dose-when time {
  color: var(--text);
  font-size: 20px;
  font-weight: 790;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.035em;
}

.dose-when .status-badge {
  min-height: 20px;
  padding: 3px 6px;
  font-size: 9px;
}

.dose-copy {
  gap: 4px;
}

.dose-copy strong,
.dose-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dose-copy strong {
  font-size: 14px;
}

.dose-copy small {
  font-size: 12px;
}

.dose-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dose-row-actions .button {
  min-height: 40px;
  padding-inline: 12px;
  font-size: 12px;
}

.dose-more {
  position: relative;
}

.dose-more > summary {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  border-radius: 11px;
  color: var(--muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.06em;
  list-style: none;
}

.dose-more > summary::-webkit-details-marker {
  display: none;
}

.dose-more > summary:hover,
.dose-more[open] > summary {
  color: var(--text);
  background: var(--surface-soft);
}

.dose-more-menu {
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  z-index: 6;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--outline);
  border-radius: 13px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.dose-more-menu form,
.dose-more-menu button {
  width: 100%;
  margin: 0;
}

.dose-more-menu button {
  justify-content: flex-start;
  padding-inline: 10px;
  text-align: left;
}

.dose-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 230px;
  padding: 28px;
  text-align: center;
}

.dose-empty .empty-icon {
  margin-bottom: 12px;
}

.dose-empty p {
  max-width: 250px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.more-doses {
  border-top: 1px solid var(--outline);
}

.more-doses > summary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 9px 14px;
  color: var(--primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.more-doses[open] > summary {
  border-bottom: 1px solid var(--outline);
}

.more-dose-list .dose-row:last-child {
  border-bottom: 0;
}

.dose-limit-note {
  padding: 12px 14px;
  margin: 0;
  border-top: 1px solid var(--outline);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.inactive-section {
  margin-top: 38px;
}

.inactive-treatment-list {
  padding: 0;
  overflow: hidden;
}

.inactive-treatment-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 76px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--outline);
  background: color-mix(in srgb, var(--surface-soft) 42%, var(--surface));
}

.inactive-treatment-row:last-child {
  border-bottom: 0;
}

.inactive-treatment-copy {
  min-width: 0;
}

.inactive-treatment-copy > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.inactive-treatment-copy h3 {
  color: var(--muted);
  font-size: 15px;
}

.inactive-treatment-copy p {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inactive-treatment-row .button:disabled {
  color: var(--muted);
  border-color: var(--outline);
  background: var(--surface-soft);
  cursor: not-allowed;
  opacity: 0.62;
}

.medication-footer {
  margin-top: 24px;
}

.medication-footer .medical-note {
  margin: 0;
  font-size: 12px;
}

.period-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
}

.period-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.period-tabs a:hover {
  background: var(--primary-soft);
}

.stat-cards article {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.stat-cards strong {
  font-size: 36px;
  letter-spacing: -0.04em;
}

.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bar-row {
  display: grid;
  grid-template-columns: 65px minmax(80px, 1fr) 180px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.bar-row > div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--outline);
}

.bar-row i {
  display: block;
  width: min(100%, calc(var(--value) * 0.08%));
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.statistics-heading {
  margin-bottom: 18px;
}

.custom-range {
  max-width: 720px;
  padding: 0;
  margin: 0 0 20px;
  overflow: hidden;
}

.custom-range > summary,
.daily-data > summary {
  padding: 16px 18px;
  cursor: pointer;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.custom-range[open] > summary,
.daily-data[open] > summary {
  border-bottom: 1px solid var(--outline);
}

.statistics-filter {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 17px;
}

.statistics-filter > div {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.statistics-filter label {
  font-size: 13px;
  font-weight: 700;
}

.statistics-filter input {
  width: 100%;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--outline);
  border-radius: 11px;
  background: var(--bg);
}

.statistics-summary-grid,
.statistics-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  min-height: 230px;
}

.metric-card header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.metric-card h3,
.chart-card h3 {
  margin: 0;
  font-size: 16px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 18px;
}

.metric-card > strong {
  display: block;
  margin-top: 25px;
  font-size: clamp(30px, 4vw, 40px);
  line-height: 1;
  letter-spacing: -0.05em;
}

.metric-card > p {
  min-height: 21px;
  margin: 8px 0 17px;
  color: var(--muted);
  font-size: 13px;
}

.metric-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: auto 0 0;
}

.metric-card dl > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.metric-card dt {
  color: var(--muted);
  font-size: 11px;
}

.metric-card dd {
  margin: 0;
  font-size: 14px;
  font-weight: 750;
}

.metric-card-empty {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.metric-card-empty h3 {
  margin: 15px 0 0;
}

.statistics-section-title {
  margin-top: 30px;
}

.statistics-section-title .meta {
  margin-top: 4px;
}

.chart-card {
  min-width: 0;
}

.chart-card > .meta {
  margin: 4px 0 22px;
  font-size: 12px;
}

.mini-chart {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(20px, 1fr);
  align-items: end;
  gap: 7px;
  height: 170px;
  overflow-x: auto;
  padding-top: 8px;
}

.chart-column {
  display: grid;
  grid-template-rows: 1fr 23px;
  align-items: end;
  gap: 7px;
  height: 100%;
  text-align: center;
}

.chart-column i {
  width: min(100%, 24px);
  height: max(4px, var(--bar-height));
  margin: 0 auto;
  border-radius: 6px 6px 3px 3px;
  background: var(--primary);
}

.bottle-chart .chart-column i {
  background: var(--accent);
}

.diaper-chart .chart-column i {
  background: color-mix(in srgb, var(--primary) 62%, var(--accent));
}

.chart-column.no-records i {
  height: 3px;
  background: var(--outline);
}

.chart-column small {
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.daily-data {
  padding: 0;
  margin-top: 14px;
  overflow: hidden;
}

.table-scroll {
  overflow-x: auto;
}

.daily-data table {
  min-width: 560px;
}

.no-value,
.no-records-cell {
  color: var(--muted);
}

.statistics-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 620px;
  min-height: 300px;
  justify-content: center;
  margin: 28px auto;
  text-align: center;
}

.statistics-empty .empty-icon {
  margin-bottom: 13px;
}

.statistics-empty h2 {
  margin: 0;
}

.statistics-empty p {
  max-width: 430px;
  color: var(--muted);
  line-height: 1.55;
}

.statistics-notes {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 2px;
  color: var(--muted);
  font-size: 12px;
}

.statistics-notes p {
  margin: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px;
  border-bottom: 1px solid var(--outline);
  text-align: left;
}

.detail-list {
  margin: 0 0 17px;
}

.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--outline);
}

.detail-list dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: var(--success);
}

.status-dot.muted {
  background: var(--muted);
}

.banner {
  padding: 13px 16px;
  margin-bottom: 12px;
  border: 1px solid color-mix(in srgb, var(--success) 22%, var(--outline));
  border-radius: 12px;
  background: color-mix(in srgb, var(--success) 10%, var(--surface));
}

.banner.error {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 24%, var(--outline));
  background: color-mix(in srgb, var(--danger) 9%, var(--surface));
}

.banner.warning {
  border-color: color-mix(in srgb, var(--accent) 36%, var(--outline));
  background: var(--accent-soft);
}

.loading-line {
  padding: 15px;
  border-radius: 12px;
  background: var(--bg);
}

.messages {
  position: relative;
  z-index: 4;
}

/* Add record sheet */
.register-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}

.register-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(11, 31, 28, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: default;
}

.register-panel {
  position: relative;
  z-index: 1;
  width: min(100%, 540px);
  padding: 24px;
  border: 1px solid var(--outline);
  border-radius: 26px;
  background: var(--bg);
  box-shadow: 0 30px 90px rgba(11, 31, 28, 0.24);
  animation: sheet-in 180ms ease-out;
}

.register-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.register-head h2 {
  margin: 4px 0 0;
  font-size: 26px;
}

.close-button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--text);
  background: var(--surface-soft);
  cursor: pointer;
  font-size: 23px;
}

.register-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.register-grid .register-section-title {
  grid-column: 1 / -1;
  margin: 4px 2px -2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.register-grid a {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--outline);
  border-radius: 17px;
  color: var(--text);
  background: var(--surface);
}

.register-grid a:hover {
  border-color: color-mix(in srgb, var(--primary) 40%, var(--outline));
}

.register-grid a.register-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  min-height: 68px;
}

.register-grid a.register-wide .chevron-icon {
  width: 18px;
  height: 18px;
  margin-left: auto;
  color: var(--muted);
}

.register-grid .action-icon {
  flex: 0 0 40px;
}

.register-grid strong {
  line-height: 1.2;
  overflow-wrap: anywhere;
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Public pages */
.public-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1180px;
  min-height: 76px;
  padding: 12px 24px;
  margin: 0 auto;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.public-header::before {
  position: fixed;
  top: 75px;
  right: 0;
  left: 0;
  height: 1px;
  content: "";
  background: color-mix(in srgb, var(--outline) 72%, transparent);
}

.public-nav,
.public-nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.public-nav a:not(.button) {
  min-height: auto;
  color: var(--muted);
  font-size: 14px;
  font-weight: 680;
}

.public-nav a:not(.button):hover {
  color: var(--primary);
}

.public-nav .language-link {
  padding-left: 20px;
  border-left: 1px solid var(--outline);
}

.public-content {
  max-width: 1180px;
  padding: 0 24px 24px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, 0.72fr);
  align-items: center;
  gap: clamp(38px, 7vw, 96px);
  min-height: min(790px, calc(100vh - 76px));
  padding: 64px 0 84px;
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.hero h1 {
  max-width: 760px;
  margin: 15px 0 24px;
  font-size: clamp(50px, 6.5vw, 82px);
  line-height: 0.99;
  letter-spacing: -0.057em;
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: 20px;
  line-height: 1.55;
}

.hero-actions {
  margin-top: 30px;
}

.hero-actions .button {
  min-height: 54px;
  padding-inline: 22px;
}

.hero-proof {
  display: flex;
  gap: 10px 22px;
  padding: 0;
  margin: 25px 0 0;
  list-style: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.hero-proof li {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-proof li span,
.check-list li span,
.feature-summary li span {
  color: var(--success);
  font-weight: 900;
}

.product-preview-wrap {
  position: relative;
  width: min(100%, 430px);
  max-width: 100%;
  min-width: 0;
  margin-left: auto;
}

.live-pill {
  position: absolute;
  top: 49px;
  left: -57px;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  margin: 0;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 760;
}

.live-pill span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 18%, transparent);
}

.phone-preview {
  position: relative;
  width: min(100%, 390px);
  max-width: 100%;
  min-height: 590px;
  padding: 20px 18px 18px;
  margin-left: auto;
  overflow: hidden;
  border: 7px solid var(--text);
  border-radius: 42px;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(22, 79, 72, 0.18);
  transform: rotate(1.5deg);
}

.phone-top {
  display: flex;
  justify-content: space-between;
  padding: 0 7px 25px;
  font-size: 12px;
  font-weight: 800;
}

.phone-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.phone-title > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.phone-title strong {
  font-size: 25px;
  letter-spacing: -0.04em;
}

.preview-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #173d38;
  background: var(--accent);
  font-weight: 800;
}

.preview-card {
  display: grid;
  grid-template-columns: 9px 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 16px;
  border: 1px solid var(--outline);
  border-radius: 18px;
  background: var(--surface);
}

.preview-card > span:nth-child(2),
.preview-list > div > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preview-card > b {
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.phone-preview h2 {
  margin: 25px 0 10px;
  font-size: 18px;
}

.preview-list {
  overflow: hidden;
  border: 1px solid var(--outline);
  border-radius: 18px;
  background: var(--surface);
}

.preview-list > div {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border-bottom: 1px solid var(--outline);
}

.preview-list > div:last-child {
  border: 0;
}

.preview-synced {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 680;
}

.preview-synced span {
  color: var(--success);
}

.preview-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
}

.preview-icon .icon {
  width: 20px;
  height: 20px;
}

.preview-nav {
  position: absolute;
  right: 16px;
  bottom: 18px;
  left: 16px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  min-height: 58px;
  padding: 5px;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow);
  text-align: center;
}

.preview-nav b {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: -17px auto 0;
  border-radius: 50%;
  color: #173d38;
  background: var(--accent);
  font-size: 25px;
}

.preview-nav > span {
  display: grid;
  place-items: center;
  color: var(--muted);
}

.preview-nav > span:first-child {
  color: var(--primary);
}

.preview-nav .icon {
  width: 20px;
  height: 20px;
}

.preview-nav b .icon {
  width: 24px;
  height: 24px;
}

.marketing-section {
  padding: 112px 0;
  border-top: 1px solid var(--outline);
}

.section-intro {
  max-width: 780px;
  margin-bottom: 48px;
}

.section-intro.centered {
  margin-inline: auto;
  text-align: center;
}

.section-intro h2,
.showcase-copy h2,
.feature-page h1,
.feature-page h2,
.final-cta h2 {
  margin: 12px 0 17px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.048em;
}

.section-intro > p:last-child,
.showcase-copy > p,
.feature-page-hero .lead {
  max-width: 690px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.problem-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.78fr);
  gap: 20px;
  align-items: stretch;
}

.question-stack {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: clamp(26px, 5vw, 58px);
  border-radius: 30px;
  background: var(--primary);
}

.question-stack p {
  margin: 0;
  color: var(--bg);
  font-size: clamp(23px, 3vw, 36px);
  font-weight: 760;
  letter-spacing: -0.035em;
}

.question-stack p:nth-child(2) {
  color: var(--accent);
}

.answer-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 360px;
  padding: clamp(26px, 4vw, 44px);
  border: 1px solid var(--outline);
  border-radius: 30px;
  background: var(--surface);
}

.answer-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: auto;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 20px;
  font-weight: 900;
}

.answer-card h3 {
  margin: 50px 0 10px;
  font-size: 27px;
}

.answer-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.steps-grid article {
  min-height: 285px;
  padding: 28px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.steps-grid b,
.capability-number,
.feature-section-number {
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.08em;
}

.steps-grid h3 {
  margin: 76px 0 12px;
  font-size: 24px;
}

.steps-grid p,
.capability-card p,
.principles-grid p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.showcase-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(400px, 1fr);
  gap: clamp(40px, 8vw, 110px);
  align-items: center;
}

.check-list,
.feature-summary ul {
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 0;
  margin: 28px 0 0;
  list-style: none;
}

.check-list li,
.feature-summary li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  font-weight: 680;
}

.timeline-demo {
  padding: 18px;
  border: 1px solid var(--outline);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 9px 20px;
}

.timeline-demo-head span {
  color: var(--success);
  font-size: 12px;
  font-weight: 700;
}

.timeline-demo-row {
  display: grid;
  grid-template-columns: 54px 1fr 28px;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  padding: 12px;
  border-top: 1px solid var(--outline);
}

.timeline-demo-row time {
  color: var(--muted);
  font-size: 13px;
  font-weight: 760;
  font-variant-numeric: tabular-nums;
}

.timeline-demo-row > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.row-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 12px;
  font-weight: 900;
}

.next-demo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 18px;
  margin-top: 12px;
  border-radius: 17px;
  color: #173d38;
  background: var(--accent-soft);
}

.next-demo > span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.next-demo small {
  color: #52645f;
}

.capability-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.capability-card {
  position: relative;
  min-height: 245px;
  padding: 27px;
  border: 1px solid var(--outline);
  border-radius: var(--radius-lg);
  color: var(--text);
  background: var(--surface);
  transition: transform 170ms ease, border-color 170ms ease, box-shadow 170ms ease;
}

.capability-card:hover {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--outline));
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.capability-card h3 {
  margin: 58px 0 11px;
  font-size: 24px;
}

.capability-link {
  position: absolute;
  top: 23px;
  right: 25px;
  color: var(--primary);
  font-size: 24px;
}

.principles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.principles-grid article {
  padding: 30px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
}

.principles-grid article > span {
  color: var(--accent);
  font-size: 24px;
}

.principles-grid h3 {
  margin: 42px 0 10px;
  font-size: 24px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.privacy-note span {
  color: var(--success);
  font-size: 9px;
}

.faq-section {
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(0, 1fr);
  gap: clamp(36px, 8vw, 100px);
  align-items: start;
}

.faq-list {
  border-top: 1px solid var(--outline);
}

.faq-list details {
  border-bottom: 1px solid var(--outline);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 16px 2px;
  cursor: pointer;
  font-size: 17px;
  font-weight: 730;
  list-style: none;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary span {
  color: var(--accent);
  font-size: 25px;
  font-weight: 400;
  transition: transform 160ms ease;
}

.faq-list details[open] summary span {
  transform: rotate(45deg);
}

.faq-list details p {
  max-width: 68ch;
  padding: 0 38px 23px 2px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.final-cta {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(36px, 7vw, 76px);
  margin-top: 40px;
  border-radius: 32px;
  color: #f5f3ec;
  background: #164f48;
}

.final-cta > div {
  max-width: 760px;
}

.final-cta .eyebrow {
  color: #a4d8c7;
}

.final-cta h2 {
  color: #f5f3ec;
}

.final-cta p:last-child {
  margin-bottom: 0;
  color: #b8c9c3;
  line-height: 1.6;
}

.final-cta .button {
  flex: 0 0 auto;
  border-color: var(--accent);
  color: #173d38;
  background: var(--accent);
}

/* SEO feature pages */
.feature-page {
  padding-top: 80px;
}

.feature-page-hero {
  max-width: 900px;
  padding: 40px 0 86px;
}

.feature-page h1 {
  max-width: 880px;
  font-size: clamp(48px, 7vw, 82px);
}

.feature-page-hero .button-row {
  margin-top: 30px;
}

.feature-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.7fr);
  gap: 48px;
  padding: clamp(28px, 5vw, 56px);
  border-radius: 28px;
  color: #f5f3ec;
  background: #164f48;
}

.feature-summary > strong {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.16;
  letter-spacing: -0.035em;
}

.feature-summary ul {
  justify-content: center;
  margin: 0;
  color: #dfe7e1;
}

.feature-article-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 112px 0;
}

.feature-article-grid section {
  padding: clamp(28px, 4vw, 46px);
  border: 1px solid var(--outline);
  border-radius: 28px;
  background: var(--surface);
}

.feature-article-grid h2 {
  margin-top: 68px;
  font-size: clamp(29px, 3vw, 39px);
}

.feature-article-grid p {
  color: var(--muted);
  line-height: 1.7;
}

.feature-faq {
  max-width: 850px;
  margin: 0 auto;
}

.feature-faq > h2 {
  font-size: clamp(36px, 5vw, 56px);
}

.compact-cta {
  margin-top: 112px;
}

.compact-cta h2 {
  font-size: clamp(32px, 4vw, 49px);
}

.public-footer {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 42px 0 28px;
  color: var(--muted);
  font-size: 14px;
}

.public-footer > span:last-child {
  text-align: right;
}

.auth-card {
  padding: clamp(24px, 5vw, 46px);
  margin-top: 6vh;
  border: 1px solid var(--outline);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: clamp(36px, 5vw, 56px);
  letter-spacing: -0.05em;
}

.auth-intro {
  max-width: 52ch;
  margin: -4px 0 26px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-switch {
  padding-top: 17px;
  margin: 25px 0 0;
  border-top: 1px solid var(--outline);
  color: var(--muted);
  font-size: 14px;
}

.prose {
  max-width: 780px;
  line-height: 1.75;
}

.prose h1 {
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
}

.prose p {
  max-width: 68ch;
}

@media (max-width: 1040px) {
  .content {
    padding-inline: 32px;
  }

  .today-grid {
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
  }

  .columns-3 {
    grid-template-columns: 1fr 1fr;
  }

  .statistics-summary-grid,
  .statistics-chart-grid {
    grid-template-columns: 1fr 1fr;
  }

  .care-columns section:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .topbar {
    height: 66px;
    padding: 0 18px;
  }

  .brand-logo {
    width: 39px;
    height: 39px;
  }

  .app-shell {
    display: block;
    min-height: calc(100vh - 66px);
  }

  .sidebar {
    display: none;
  }

  .content {
    max-width: 760px;
    padding: 28px 18px 126px;
    margin: 0 auto;
  }

  .bottom-nav {
    position: fixed;
    right: 12px;
    bottom: max(10px, env(safe-area-inset-bottom));
    left: 12px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    align-items: center;
    width: min(calc(100% - 24px), 520px);
    min-height: 66px;
    padding: 5px 7px;
    margin: 0 auto;
    border: 1px solid color-mix(in srgb, var(--outline) 82%, transparent);
    border-radius: 999px;
    background: color-mix(in srgb, var(--surface) 91%, transparent);
    box-shadow: 0 14px 34px rgba(17, 48, 43, 0.18);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
  }

  .bottom-nav > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 54px;
    border-radius: 50%;
    color: var(--muted);
  }

  .bottom-nav > a[aria-current="page"] {
    color: var(--primary);
    background: var(--primary-soft);
  }

  .bottom-nav > a .icon {
    width: 21px;
    height: 21px;
  }

  .bottom-nav > a span {
    max-width: 100%;
    overflow: hidden;
    font-size: 9px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-add {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    min-height: 58px;
    padding: 0;
    margin: -18px auto 0;
    border: 1px solid color-mix(in srgb, var(--text) 8%, transparent);
    border-radius: 50%;
    color: #173d38;
    background: var(--accent);
    box-shadow: 0 10px 22px rgba(24, 48, 44, 0.18);
    cursor: pointer;
  }

  .bottom-add .icon {
    width: 25px;
    height: 25px;
  }

  .today-grid {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .today-activity {
    display: contents;
  }

  .today-aside {
    gap: 12px;
  }

  .today-aside > section:first-child {
    order: -1;
  }

  .dashboard-grid,
  .two-columns {
    grid-template-columns: 1fr;
  }

  .settings-layout {
    grid-template-columns: 1fr;
  }

  .medication-layout {
    grid-template-columns: 1fr;
  }

  .dose-panel {
    position: static;
    order: -1;
  }

  .quick-grid {
    grid-template-columns: 1fr 1fr;
  }

  .statistics-chart-grid .chart-card:last-child:nth-child(odd),
  .statistics-summary-grid .metric-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-top: 46px;
  }

  .product-preview-wrap,
  .phone-preview {
    margin: 0 auto;
  }

  .phone-preview {
    transform: none;
  }

  .live-pill {
    left: max(0px, calc(50% - 245px));
  }

  .problem-grid,
  .showcase-section,
  .faq-section {
    grid-template-columns: 1fr;
  }

  .showcase-copy {
    max-width: 720px;
  }

  .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .feature-summary,
  .feature-article-grid {
    grid-template-columns: 1fr;
  }

  .feature-article-grid section {
    min-height: auto;
  }

  .segment-form {
    grid-template-columns: 1fr 1fr;
  }

  .segment-form > div:first-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 620px) {
  .agenda-head {
    align-items: center;
  }

  .agenda-head .round-add {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

  .agenda-head .round-add span {
    display: none;
  }

  .month-calendar {
    padding: 10px 6px;
  }

  .calendar-day {
    min-height: 62px;
    padding: 4px;
  }

  .day-number {
    width: 25px;
    height: 25px;
    margin-inline: auto;
  }

  .day-events {
    flex-direction: row;
    justify-content: center;
  }

  .day-events a {
    width: 6px;
    height: 6px;
    min-height: 6px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }

  .day-events small {
    display: none;
  }

  .topbar {
    align-items: center;
    min-height: 66px;
    padding: 7px 13px;
  }

  .brand {
    min-height: 44px;
  }

  .brand > span {
    display: none;
  }

  .selectors {
    flex: 1;
    justify-content: flex-end;
    gap: 5px;
  }

  .selectors select {
    max-width: 135px;
    height: 40px;
    min-height: 40px;
    padding-left: 10px;
    font-size: 12px;
  }

  .content {
    padding: 24px 14px 122px;
  }

  .page-head {
    align-items: flex-start;
    margin-bottom: 22px;
  }

  .page-head h1 {
    font-size: 34px;
  }

  .settings-heading .meta {
    font-size: 14px;
  }

  .settings-card-header {
    min-height: 72px;
    padding: 13px 14px;
  }

  .settings-card-header h2 {
    font-size: 18px;
  }

  .settings-card-header .button {
    min-height: 40px;
    padding-inline: 11px;
    font-size: 12px;
  }

  .settings-profile-summary {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 13px;
    padding: 18px 15px;
  }

  .settings-avatar {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 20px;
  }

  .settings-profile-copy strong {
    font-size: 18px;
  }

  .settings-action-row,
  .settings-empty-row,
  .settings-delete > summary {
    padding-inline: 14px;
  }

  .settings-delete-content {
    padding: 0 14px 16px;
  }

  .medication-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .medication-head-actions {
    width: 100%;
  }

  .medication-head-actions .button {
    flex: 1 1 auto;
  }

  .medication-head .round-add {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

  .medication-head .round-add span {
    display: none;
  }

  .medication-summary {
    grid-template-columns: 1fr 1fr;
    gap: 12px 0;
    padding: 14px;
    margin-bottom: 26px;
  }

  .medication-summary > div {
    padding-right: 12px;
    margin-right: 12px;
  }

  .medication-summary > div:nth-child(2) {
    padding-right: 0;
    margin-right: 0;
    border-right: 0;
  }

  .medication-summary p {
    grid-column: 1 / -1;
    padding-top: 10px;
    border-top: 1px solid color-mix(in srgb, var(--primary) 16%, var(--outline));
    text-align: left;
  }

  .dose-row {
    grid-template-columns: 61px minmax(0, 1fr) auto;
    gap: 9px;
    padding-inline: 11px;
  }

  .dose-row-actions .button {
    width: 40px;
    padding: 0;
    overflow: hidden;
    font-size: 0;
  }

  .dose-row-actions .button::before {
    content: "✓";
    font-size: 16px;
  }

  .treatment-card > header > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .treatment-dose {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .inactive-treatment-row {
    grid-template-columns: 42px minmax(0, 1fr) auto;
  }

  .inactive-treatment-row .button {
    display: none;
  }

  .treatment-manage-link {
    grid-column: 2 / -1;
    justify-self: start;
  }

  .today-head {
    align-items: center;
  }

  .today-head .round-add {
    width: 48px;
    min-width: 48px;
    padding: 0;
  }

  .today-head .round-add span {
    display: none;
  }

  .section-head h2 {
    font-size: 20px;
  }

  .timeline-item {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding-inline: 12px;
  }

  .timeline-item .chevron-icon {
    display: none;
  }

  .timeline-copy small {
    max-width: 45vw;
  }

  .empty {
    flex-direction: column;
  }

  .quick-grid,
  .dashboard-grid,
  .two-columns,
  .columns-3 {
    grid-template-columns: 1fr;
  }

  .care-columns section:last-child {
    grid-column: auto;
  }

  .quick-grid {
    gap: 9px;
  }

  .quick-grid a {
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 11px;
    padding: 13px;
  }

  .medication-callout {
    align-items: flex-start;
    flex-direction: column;
  }

  .filter-bar {
    align-items: stretch;
  }

  .filter-bar label {
    flex: 1 0 42%;
  }

  .filter-bar input[type="date"] {
    width: 100%;
  }

  .stat-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-row b {
    font-size: 15px;
  }

  .bar-row {
    grid-template-columns: 45px 1fr;
  }

  .bar-row b {
    grid-column: 2;
  }

  .statistics-filter,
  .statistics-summary-grid,
  .statistics-chart-grid {
    grid-template-columns: 1fr;
  }

  .statistics-chart-grid .chart-card:last-child:nth-child(odd),
  .statistics-summary-grid .metric-card:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .statistics-filter .button {
    width: 100%;
  }

  .metric-card {
    min-height: auto;
  }

  .mini-chart {
    height: 155px;
  }

  .statistics-notes {
    flex-direction: column;
    gap: 5px;
  }

  .timer-value {
    font-size: 64px;
  }

  .timer-actions,
  .timer-actions form,
  .timer-actions .button {
    width: 100%;
  }

  .member-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .member-actions {
    width: 100%;
    padding-left: 54px;
  }

  .segment-form {
    grid-template-columns: 1fr;
  }

  .segment-form > div:first-child {
    grid-column: auto;
  }

  .register-menu {
    place-items: end center;
    padding: 0;
  }

  .register-panel {
    width: 100%;
    padding: 22px 16px max(24px, env(safe-area-inset-bottom));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 26px 26px 0 0;
    animation-name: mobile-sheet-in;
  }

  .register-grid {
    grid-template-columns: 1fr 1fr;
  }

  .register-grid a {
    min-height: 112px;
    padding: 13px;
  }

  @keyframes mobile-sheet-in {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .public-header {
    padding: 13px 15px;
  }

  .public-nav {
    gap: 10px;
  }

  .public-nav-links,
  .public-nav .login-link {
    display: none;
  }

  .public-nav .language-link {
    padding-left: 0;
    border-left: 0;
    font-size: 12px;
  }

  .public-content {
    padding: 16px;
  }

  .hero {
    gap: 50px;
    min-height: auto;
    padding: 42px 0 56px;
  }

  .hero h1 {
    font-size: clamp(45px, 14vw, 62px);
  }

  .lead {
    font-size: 17px;
  }

  .hero .button-row .button {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .hero-proof {
    flex-direction: column;
    gap: 9px;
  }

  .live-pill {
    top: 42px;
    left: -5px;
  }

  .phone-preview {
    min-height: 550px;
    border-width: 6px;
    border-radius: 36px;
  }

  .public-footer {
    flex-direction: column;
  }

  .public-footer > span:last-child {
    text-align: left;
    line-height: 1.8;
  }

  .marketing-section {
    padding: 76px 0;
  }

  .problem-grid,
  .steps-grid,
  .capability-grid,
  .principles-grid {
    grid-template-columns: 1fr;
  }

  .question-stack p {
    font-size: 23px;
  }

  .answer-card,
  .steps-grid article,
  .capability-card {
    min-height: auto;
  }

  .steps-grid h3,
  .capability-card h3 {
    margin-top: 40px;
  }

  .timeline-demo {
    padding: 12px;
  }

  .timeline-demo-row {
    grid-template-columns: 48px 1fr 25px;
    padding-inline: 6px;
  }

  .final-cta {
    align-items: stretch;
    flex-direction: column;
    padding: 34px 25px;
    border-radius: 25px;
  }

  .final-cta .button {
    width: 100%;
  }

  .feature-page {
    padding-top: 34px;
  }

  .feature-page-hero {
    padding-bottom: 62px;
  }

  .feature-summary {
    gap: 30px;
  }

  .feature-article-grid {
    padding: 76px 0;
  }

  .feature-article-grid h2 {
    margin-top: 44px;
  }

  .compact-cta {
    margin-top: 76px;
  }

  .auth-card {
    margin-top: 3vh;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101f1d;
    --surface: #1b302d;
    --surface-soft: #213a36;
    --text: #f5f3ec;
    --muted: #b8c9c3;
    --primary: #a4d8c7;
    --primary-soft: #203e38;
    --accent: #f3a276;
    --accent-soft: #4a3328;
    --outline: #38534b;
    --danger: #ffb4ab;
    --warning: #f6c47e;
    --success: #8fd3b5;
    --shadow-sm: none;
    --shadow: 0 16px 44px rgba(0, 0, 0, 0.2);
  }

  .button {
    color: #10231f;
  }

  .danger-button {
    color: #35100e;
  }

  .timer-card,
  .highlight {
    color: #f5f3ec;
    background: #173f39;
  }

  .phone-preview {
    border-color: #f5f3ec;
  }

  .question-stack p:nth-child(2) {
    color: #825017;
  }

  .register-backdrop {
    background: rgba(0, 0, 0, 0.55);
  }

  input[type="date"] {
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Statistics */
.statistics-page {
  max-width: 1180px;
}

.statistics-heading {
  margin-bottom: 18px;
}

.statistics-page .period-tabs {
  max-width: 100%;
  overflow-x: auto;
}

.statistics-page .period-tabs a {
  justify-content: center;
  white-space: nowrap;
  color: var(--muted);
}

.statistics-page .period-tabs a.active {
  color: var(--bg);
  background: var(--primary);
}

.metric-segments {
  display: flex;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  padding: 4px;
  margin: 0 0 18px;
  overflow-x: auto;
  border: 1px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
}

.metric-segments a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 13px;
  border-radius: 999px;
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
  white-space: nowrap;
}

.metric-segments a.active {
  color: #173d38;
  background: var(--accent);
}

.metric-segments .icon {
  width: 17px;
  height: 17px;
}

.statistics-focus {
  display: grid;
  gap: 14px;
  max-width: 900px;
}

.custom-range {
  padding: 0;
  margin-bottom: 24px;
}

.custom-range > summary,
.daily-data > summary {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 18px;
  cursor: pointer;
  font-weight: 750;
}

.custom-range[open] > summary,
.daily-data[open] > summary {
  border-bottom: 1px solid var(--outline);
}

.statistics-filter {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px;
}

.statistics-filter > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.statistics-filter label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.statistics-filter input {
  padding: 8px;
  border: 1px solid var(--outline);
  border-radius: 10px;
  color: var(--text);
  background: var(--bg);
}

.statistics-summary-grid,
.statistics-chart-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-height: 238px;
}

.metric-card-focus {
  min-height: 0;
}

.metric-card-focus header h2,
.chart-card-focus h2 {
  margin: 0;
  font-size: 18px;
}

.metric-card-focus > strong {
  font-size: clamp(40px, 7vw, 64px);
}

.chart-card-focus {
  min-width: 0;
}

.metric-card header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.metric-card h3,
.chart-card h3 {
  margin: 0;
  font-size: 17px;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 20px;
}

.metric-card > strong {
  margin-top: 8px;
  font-size: clamp(29px, 3vw, 40px);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.metric-card > p {
  margin: 0;
  color: var(--muted);
}

.metric-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: auto 0 0;
}

.metric-card dl div {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 12px;
  border-top: 1px solid var(--outline);
}

.metric-card dt {
  color: var(--muted);
  font-size: 12px;
}

.metric-card dd {
  margin: 0;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.metric-card-empty {
  align-items: flex-start;
  justify-content: center;
}

.metric-card-empty h3 {
  margin: 4px 0 0;
}

.statistics-section-title {
  align-items: flex-end;
}

.statistics-section-title h2 {
  margin-bottom: 4px;
}

.statistics-section-title p,
.chart-card > p {
  margin: 0;
}

.statistics-chart-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.chart-card {
  min-width: 0;
}

.mini-chart {
  display: flex;
  align-items: stretch;
  gap: 5px;
  height: 205px;
  padding: 18px 2px 0;
  margin-top: 8px;
  overflow-x: auto;
}

.chart-column {
  display: grid;
  grid-template-rows: 1fr 28px;
  align-items: end;
  justify-items: center;
  flex: 1 0 20px;
  min-width: 20px;
  height: 100%;
}

.chart-column i {
  display: block;
  width: min(22px, 78%);
  height: max(5px, var(--bar-height));
  max-height: 100%;
  border-radius: 6px 6px 2px 2px;
  background: var(--primary);
}

.bottle-chart .chart-column i {
  background: var(--accent);
}

.diaper-chart .chart-column i {
  background: color-mix(in srgb, var(--primary) 62%, var(--accent));
}

.chart-column.no-records i {
  height: 2px;
  background: var(--outline);
}

.chart-column small {
  width: 44px;
  overflow: hidden;
  font-size: 10px;
  text-align: center;
  text-overflow: clip;
  white-space: nowrap;
}

.growth-line-chart {
  margin-top: 10px;
}

.growth-line-chart svg {
  display: block;
  width: 100%;
  height: 220px;
  overflow: visible;
}

.growth-line-chart line {
  stroke: var(--outline);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.growth-line-chart polyline {
  fill: none;
  stroke: var(--primary);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.growth-line-chart circle {
  fill: var(--surface);
  stroke: var(--primary);
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.growth-chart-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.daily-data {
  padding: 0;
  margin-top: 16px;
}

.table-scroll {
  padding: 8px 18px 16px;
  overflow-x: auto;
}

.daily-data th {
  color: var(--muted);
  font-size: 12px;
}

.daily-data td {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.no-records-cell,
.no-value {
  color: var(--muted);
}

.statistics-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(36px, 7vw, 72px) 22px;
  text-align: center;
}

.statistics-empty .empty-icon {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 30px;
}

.statistics-empty h2 {
  margin: 18px 0 8px;
}

.statistics-empty p {
  max-width: 520px;
  margin: 0 0 22px;
  color: var(--muted);
}

.statistics-notes {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

.statistics-notes p {
  margin: 4px 0;
}

@media (max-width: 900px) {
  .statistics-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .statistics-summary-grid .metric-card:last-child {
    grid-column: 1 / -1;
  }

  .statistics-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .statistics-summary-grid {
    grid-template-columns: 1fr;
  }

  .statistics-summary-grid .metric-card:last-child {
    grid-column: auto;
  }

  .metric-card {
    min-height: 0;
  }

  .statistics-filter {
    align-items: stretch;
  }

  .statistics-filter > div,
  .statistics-filter input,
  .statistics-filter button {
    width: 100%;
  }

  .statistics-page .period-tabs a {
    flex: 1;
  }

  .chart-card {
    padding-inline: 16px;
  }

  .metric-segments {
    width: 100%;
  }

  .metric-card-focus > strong {
    font-size: clamp(38px, 14vw, 54px);
  }
}

@media (prefers-color-scheme: dark) {
  .statistics-page .period-tabs a.active {
    color: #10231f;
  }
}
