:root {
  color-scheme: light;
  --bg: #fbfbfd;
  --document-bg: #fff8fa;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --surface-warm: #fff6f7;
  --surface-blue: #eef6ff;
  --text: #202027;
  --muted: #696873;
  --line: #e3e5ea;
  --accent: #d93f73;
  --accent-dark: #a62752;
  --blue: #1f6feb;
  --cyan: #3dd6d0;
  --mint: #49c781;
  --tile-dark: #151720;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--document-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

body.home {
  background:
    linear-gradient(165deg, rgba(103, 70, 255, 0.16) 0 18%, transparent 18% 100%),
    linear-gradient(130deg, rgba(61, 214, 208, 0.18) 0 24%, transparent 24% 100%),
    linear-gradient(180deg, #f7fbff 0, #ffffff 46%, #fbfbfd 100%);
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

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

.site-nav {
  position: sticky;
  top: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: 58px;
  margin: 0 auto;
  padding: 8px 10px;
  border: 1px solid rgba(212, 219, 232, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(35, 45, 72, 0.08);
}

.site-nav a {
  text-decoration: none;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 800;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
}

.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  color: #343642;
}

.nav-links a:hover {
  background: rgba(31, 111, 235, 0.08);
  color: var(--blue);
}

.homepage-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(560px, 1.2fr);
  gap: 54px;
  align-items: center;
  width: calc(100% - 32px);
  max-width: 1180px;
  min-height: calc(100vh - 86px);
  min-height: calc(100svh - 86px);
  margin: 0 auto;
  padding: 76px 0 64px;
}

.homepage-hero::before {
  content: "";
  position: absolute;
  inset: 28px 0 auto 44%;
  height: 320px;
  z-index: -1;
  background: linear-gradient(110deg, rgba(31, 111, 235, 0.9), rgba(217, 63, 115, 0.78) 58%, rgba(61, 214, 208, 0.76));
  clip-path: polygon(12% 0, 100% 0, 86% 100%, 0 100%);
  opacity: 0.86;
}

.hero-copy {
  max-width: 590px;
}

.eyebrow,
.updated {
  margin: 0 0 10px;
  color: #5b5f72;
  font-size: 14px;
  font-weight: 800;
}

.home h1,
.home h2,
.home h3,
.document h1,
.document h2 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: 0;
  word-break: keep-all;
}

.home h1 {
  font-size: 60px;
  font-weight: 900;
}

.lead {
  max-width: 560px;
  margin: 22px 0 0;
  color: #4e4e58;
  font-size: 21px;
  line-height: 1.55;
  word-break: keep-all;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
  text-decoration: none;
}

.button-primary {
  background: #131722;
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(19, 23, 34, 0.18);
}

.button-secondary {
  border: 1px solid rgba(31, 111, 235, 0.16);
  background: rgba(255, 255, 255, 0.84);
  color: #1f3f85;
}

.tile-wall {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(9, 64px);
  gap: 8px;
  width: 100%;
  min-width: 0;
}

.feature-tile {
  margin: 0;
}

.feature-tile {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: var(--tile-dark);
  box-shadow: 0 18px 36px rgba(28, 36, 62, 0.16);
}

.feature-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
}

.feature-tile figcaption {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 9px;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.tile-quick {
  grid-column: 1 / 4;
  grid-row: 1 / 5;
}

.tile-metric {
  grid-column: 4 / 9;
  grid-row: 1 / 3;
}

.tile-stat {
  grid-column: 1 / 4;
  grid-row: 5 / 10;
}

.tile-baby {
  grid-column: 4 / 6;
  grid-row: 3 / 5;
}

.tile-growth {
  grid-column: 4 / 9;
  grid-row: 5 / 10;
}

.tile-timer {
  grid-column: 6 / 9;
  grid-row: 3 / 5;
}

.tile-quick img {
  object-position: 49% 47%;
}

.tile-metric img,
.tile-baby img,
.tile-timer img {
  object-fit: contain;
  background: #f3f4f8;
}

.tile-stat img {
  object-position: 50% 49%;
}

.tile-growth img {
  object-position: 50% 45%;
}

.quick-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: calc(100% - 32px);
  max-width: 1180px;
  gap: 10px;
  margin: -34px auto 0;
  padding-bottom: 44px;
}

.quick-points div {
  min-height: 108px;
  padding: 22px;
  border: 1px solid rgba(212, 219, 232, 0.86);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 34px rgba(35, 45, 72, 0.08);
}

.quick-points strong,
.quick-points span {
  display: block;
}

.quick-points strong {
  font-size: 19px;
}

.quick-points span {
  margin-top: 4px;
  color: var(--muted);
}

.section-band {
  padding: 86px 0;
  background: var(--surface);
}

.soft-band {
  background: var(--surface-soft);
}

.trust-band {
  background: var(--surface-warm);
}

.section-inner {
  width: calc(100% - 44px);
  max-width: 1180px;
  margin: 0 auto;
}

.section-heading,
.compact-copy {
  max-width: 680px;
}

.home h2 {
  max-width: 760px;
  font-size: 42px;
  font-weight: 900;
}

.home h3 {
  font-size: 20px;
  font-weight: 800;
}

.section-band p {
  max-width: 680px;
  margin: 16px 0 0;
  color: #555762;
  font-size: 18px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 34px;
}

.feature-list article {
  min-height: 148px;
  padding: 24px;
  border: 1px solid rgba(212, 219, 232, 0.9);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 14px 34px rgba(31, 49, 84, 0.06);
}

.feature-list p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.6;
}

.feature-list article:nth-child(2),
.feature-list article:nth-child(5) {
  background: linear-gradient(180deg, #f7fbff, #ffffff);
}

.feature-list article:nth-child(3),
.feature-list article:nth-child(6) {
  background: linear-gradient(180deg, #f6fff9, #ffffff);
}

.stats-band {
  background:
    linear-gradient(155deg, rgba(31, 111, 235, 0.1) 0 28%, transparent 28% 100%),
    var(--surface-soft);
}

.stats-demo-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(520px, 1.28fr);
  gap: 48px;
  align-items: center;
}

.sample-records {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.sample-records span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(212, 219, 232, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: #343642;
  font-size: 14px;
  font-weight: 900;
}

.stats-demo-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid rgba(212, 219, 232, 0.92);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 26px 70px rgba(31, 49, 84, 0.16);
}

.demo-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 16px 16px 0;
}

.demo-tabs button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid rgba(212, 219, 232, 0.9);
  border-radius: 8px;
  background: #ffffff;
  color: #555762;
  font: inherit;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

.demo-tabs button.is-active {
  border-color: #111827;
  background: #111827;
  color: #ffffff;
}

.demo-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 16px 18px 0;
  color: #555762;
  font-size: 13px;
  font-weight: 900;
}

.type-dot,
.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.type-dot.feeding,
.chart-legend i.feeding {
  background: #ff7a59;
}

.type-dot.sleep,
.chart-legend i.sleep {
  background: #6257d8;
}

.type-dot.diaper,
.chart-legend i.diaper {
  background: #1685f4;
}

.type-dot.other,
.chart-legend i.other {
  background: #34c759;
}

.demo-date-row {
  display: grid;
  grid-template-columns: 32px 1fr 32px;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 10px;
  color: var(--blue);
  text-align: center;
}

.demo-date-row span {
  color: #727680;
  font-size: 36px;
  line-height: 1;
}

.demo-date-row strong {
  font-size: 22px;
  font-weight: 900;
}

.demo-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 470px;
  padding: 0 18px 18px;
}

.daily-clock,
.weekly-pattern {
  display: block;
  width: min(100%, 400px);
  height: auto;
  margin: 0 auto;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 12px;
  color: #555762;
  font-size: 13px;
  font-weight: 900;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.timeline-list {
  width: 100%;
  height: 100%;
  overflow: auto;
  padding: 8px 8px 2px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 86px 24px minmax(0, 1fr);
  min-height: 78px;
}

.timeline-time {
  padding-top: 2px;
  text-align: right;
}

.timeline-time strong,
.timeline-time span {
  display: block;
}

.timeline-time strong {
  color: #2f3038;
  font-size: 18px;
  line-height: 1.2;
}

.timeline-time span {
  width: max-content;
  max-width: 78px;
  margin: 9px 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  background: #f2f4f8;
  color: #777b86;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.timeline-axis {
  position: relative;
}

.timeline-axis::before {
  content: "";
  position: absolute;
  top: 16px;
  bottom: -12px;
  left: 50%;
  width: 2px;
  background: #dfe3ec;
  transform: translateX(-50%);
}

.timeline-row:last-child .timeline-axis::before {
  bottom: 34px;
}

.timeline-axis i {
  position: absolute;
  top: 8px;
  left: 50%;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 999px;
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(212, 219, 232, 0.9);
}

.timeline-body {
  min-width: 0;
  padding: 0 0 20px 10px;
  border-bottom: 1px solid #edf0f5;
}

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

.timeline-body strong,
.timeline-body span {
  display: block;
}

.timeline-body strong {
  font-size: 20px;
  line-height: 1.2;
}

.timeline-body span {
  margin-top: 7px;
  color: #666a73;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.demo-insight {
  margin: 0;
  min-height: 86px;
  padding: 16px 18px 18px;
  border-top: 1px solid #edf0f5;
  color: #555762;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.55;
}

.trust-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 48px;
  align-items: start;
}

.policy-links {
  display: grid;
  gap: 10px;
}

.policy-links a {
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px 22px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.site-footer strong,
.site-footer span {
  display: block;
}

.site-footer span {
  margin-top: 4px;
  color: var(--muted);
}

.page,
.document {
  width: calc(100% - 32px);
  max-width: 980px;
  margin: 0 auto;
  padding: 56px 0 80px;
}

.hero {
  padding: 36px 0 28px;
}

.document {
  max-width: 940px;
}

.document header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.back-link {
  display: inline-block;
  margin-bottom: 14px;
  font-weight: 700;
  text-decoration: none;
}

.document h1 {
  font-size: 52px;
}

.document h2 {
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.3;
}

.document section {
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.document section:last-child {
  border-bottom: 0;
}

.document p,
.document ul {
  margin: 12px 0 0;
}

.document ul {
  padding-left: 22px;
}

.document li + li {
  margin-top: 6px;
}

.link-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.link-list a {
  display: block;
  min-height: 76px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.table-wrap {
  width: 100%;
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #fff0f4;
  font-size: 14px;
}

tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 900px) {
  .homepage-hero,
  .stats-demo-layout,
  .trust-layout {
    grid-template-columns: 1fr;
  }

  .homepage-hero {
    gap: 32px;
    min-height: auto;
    padding: 54px 0 66px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .home h1 {
    font-size: 42px;
  }

  .home h2 {
    font-size: 31px;
  }

  .lead {
    font-size: 18px;
  }

  .tile-wall,
  .stats-demo-layout {
    max-width: 680px;
  }

  .tile-wall {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    grid-template-rows: repeat(9, 58px);
  }

  .quick-points,
  .feature-list {
    grid-template-columns: 1fr;
  }

  .quick-points {
    margin-top: -34px;
  }

  .quick-points div {
    min-height: auto;
    padding: 20px 22px;
  }

  .section-band {
    padding: 58px 0;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 28px 22px;
  }
}

@media (max-width: 640px) {
  .site-nav {
    top: 0;
    width: 100%;
    border-width: 0 0 1px;
    border-radius: 0;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
  }

  .brand {
    gap: 8px;
    font-size: 14px;
  }

  .brand img {
    width: 32px;
    height: 32px;
  }

  .nav-links {
    gap: 4px;
    font-size: 13px;
  }

  .nav-links a {
    min-height: 30px;
    padding: 0 8px;
  }

  .homepage-hero,
  .section-inner {
    width: calc(100% - 40px);
  }

  .homepage-hero {
    gap: 26px;
    padding: 42px 0 60px;
  }

  .homepage-hero::before {
    inset: 190px -38vw auto 18%;
    height: 230px;
  }

  .home h1 {
    font-size: 34px;
  }

  .hero-actions,
  .button-primary,
  .button-secondary {
    width: 100%;
  }

  .tile-wall {
    max-width: 420px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: repeat(11, 54px);
    gap: 6px;
  }

  .tile-quick {
    grid-column: 1 / 3;
    grid-row: 1 / 4;
  }

  .tile-metric {
    grid-column: 3 / 5;
    grid-row: 1 / 3;
  }

  .tile-baby {
    grid-column: 3 / 5;
    grid-row: 3 / 4;
  }

  .tile-stat {
    grid-column: 1 / 3;
    grid-row: 4 / 8;
  }

  .tile-growth {
    grid-column: 3 / 5;
    grid-row: 4 / 8;
  }

  .tile-timer {
    grid-column: 1 / 5;
    grid-row: 8 / 12;
  }

  .feature-tile figcaption {
    font-size: 12px;
    left: 8px;
    right: 8px;
    bottom: 7px;
  }

  .demo-tabs {
    gap: 6px;
    padding: 12px 12px 0;
  }

  .demo-tabs button {
    min-height: 38px;
    font-size: 13px;
  }

  .demo-filter,
  .demo-date-row,
  .demo-chart {
    padding-left: 12px;
    padding-right: 12px;
  }

  .demo-date-row {
    grid-template-columns: 22px 1fr 22px;
    gap: 4px;
  }

  .demo-date-row strong {
    font-size: 18px;
  }

  .demo-chart {
    height: 390px;
  }

  .demo-insight {
    min-height: 104px;
  }

  .timeline-row {
    grid-template-columns: 64px 20px minmax(0, 1fr);
    min-height: 72px;
  }

  .timeline-time strong {
    font-size: 16px;
  }

  .timeline-time span {
    max-width: 58px;
    padding-inline: 7px;
    font-size: 11px;
  }

  .timeline-body strong {
    font-size: 18px;
  }

  .page,
  .document {
    width: calc(100% - 24px);
    max-width: 980px;
    padding-top: 36px;
  }

  .document h1 {
    font-size: 36px;
  }
}

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