:root {
  color-scheme: dark;
  --background: #1a1410;
  --surface: #2c2418;
  --surface-warm: #332b1e;
  --border: #4a3f33;
  --text: #f0ebe3;
  --muted: #b8a898;
  --green: #52b788;
  --green-ink: #1a1410;
  --egg: #f4a261;
  font: 400 1rem/1.55 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #fefcf8;
  --surface: #fff;
  --surface-warm: #fdf6ec;
  --border: #e8e0d4;
  --text: #2c2418;
  --muted: #6b5e4f;
  --green: #2d6a4f;
  --green-ink: #fff;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--text);
}

main { flex-grow: 1; }
h1, h2, p, figure, dl, dd { margin: 0; }
a { color: inherit; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }

.container {
  width: min(1120px, 100% - clamp(2rem, 8vw, 6rem));
  margin-inline: auto;
}

.site-header { border-block-end: 1px solid var(--border); }

.site-nav, .footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  min-height: 4.5rem;
  padding-block: 0.625rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 750;
  text-decoration: none;
}

.brand img {
  display: block;
  border-radius: 0.625rem;
  object-fit: contain;
}

.nav-links, .actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.625rem;
}

.nav-links > a, .site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.nav-links { gap: 0.875rem; }
.nav-links a:hover, .site-footer a:hover { color: var(--green); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.65rem;
  color: var(--text);
  background: transparent;
  font-size: 0.875rem;
  font-weight: 680;
  text-decoration: none;
}

a.button:hover, button.button:hover { border-color: var(--green); }
button.button { cursor: pointer; }

.button-primary {
  color: var(--green-ink);
  background: var(--green);
  border-color: var(--green);
}

a.button-primary:hover, button.button-primary:hover { filter: brightness(1.1); }
.button-quiet { border-color: transparent; color: var(--muted); }
.button-unavailable { background: var(--surface-warm); color: var(--muted); }

.launch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 5.7vw, 5.25rem);
  padding-block: clamp(2.5rem, 8vw, 7.25rem);
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.6rem, 5.6vw, 4.7rem);
  font-weight: 760;
  line-height: 0.99;
  letter-spacing: -0.06em;
  text-wrap: balance;
}

.hero-copy > p, .support-content > p {
  max-width: 35ch;
  color: var(--muted);
  margin-top: 1.125rem;
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.hero-copy .actions, .support-content .actions { margin-top: 1.5rem; }

.demo { scroll-margin-top: 1rem; }

.analytics {
  padding: clamp(0.9rem, 3vw, 1.75rem);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1.125rem;
}

.chart-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 1rem;
}

h2 {
  font-size: 1.125rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); font-size: 0.875rem; }

.metrics {
  display: flex;
  gap: 0.75rem clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
  margin-block: 1rem 1.25rem;
}

.metrics dt { font-size: 0.875rem; color: var(--muted); }
.metrics dd {
  color: var(--text);
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  font-weight: 740;
  letter-spacing: -0.04em;
}

.chart {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(0.25rem, 1vw, 0.7rem);
  margin: 0;
  padding: 0;
}

.chart li {
  display: grid;
  grid-template-rows: clamp(5rem, 10vw, 8.5rem) auto;
  align-items: end;
  gap: 0.375rem;
  min-width: 0;
}

.bar {
  height: var(--bar-height);
  background: var(--green);
  border-radius: 0.325rem 0.325rem 0 0;
}

.chart li:last-child .bar { background: var(--egg); }

.date {
  display: grid;
  justify-items: center;
  color: var(--muted);
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
}

.date abbr { text-decoration: none; }
.date [data-count] { color: var(--text); font-weight: 650; }

.demo-actions {
  margin-bottom: 0.85rem;
  padding: clamp(0.9rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  background: var(--surface-warm);
}

.demo-actions .chart-heading { margin-bottom: 0.65rem; }
.demo-status { margin-top: 0.6rem; font-size: 0.875rem; }
.demo-actions p + p { margin-top: 0.2rem; }
.demo-actions .actions { gap: 0.4rem; margin-top: 0.7rem; }

.egg-color-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  padding-block: 0.3rem;
  border-block-start: 1px solid var(--border);
}

.egg-color-row label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 650;
}

.shell {
  width: 0.85rem;
  height: 1.1rem;
  flex: none;
  border: 1px solid var(--muted);
  border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
}

.shell.white { background: #fffdf5; }
.shell.brown { background: #af805c; }
.shell.blue { background: #a7ccd8; }
.shell.other { background: #b8b4b0; }

.egg-stepper { display: flex; align-items: center; gap: 0.3rem; }
.egg-stepper .button { width: 2.75rem; padding-inline: 0; font-size: 1.125rem; }
.egg-stepper .button:disabled { opacity: 0.45; cursor: default; border-color: var(--border); }

.egg-stepper input {
  width: 3.25rem;
  min-height: 2.75rem;
  padding: 0.25rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text);
  text-align: center;
  font: inherit;
  font-variant-numeric: tabular-nums;
  appearance: textfield;
}

.egg-stepper input::-webkit-inner-spin-button { appearance: none; }

.site-footer {
  border-block-start: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
}

.support-page { padding-block: clamp(3rem, 10vw, 8rem); }
.support-content { max-width: 41rem; }
.support-content h1 { max-width: unset; font-size: clamp(2.45rem, 6.5vw, 4.5rem); }

@media (max-width: 730px) {
  .launch-layout { grid-template-columns: minmax(0, 1fr); align-items: start; }
  h1 { max-width: 15ch; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .bar { transition: height 170ms ease-out; }
}
