:root {
  color-scheme: light;
  --cream: #fff8ec;
  --ivory: #f5e9d5;
  --sage: #a2a77b;
  --olive: #555b36;
  --blush: #e8b5a2;
  --gold: #d9a43a;
  --brown: #604936;
  --line: #ded1b9;
  --paper: #fffdf5;
  --serif: Georgia, "Times New Roman", serif;
  color: var(--brown);
  background: var(--cream);
  font: 1rem/1.6 system-ui, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  isolation: isolate;
  background:
    radial-gradient(ellipse at 6% 0%, #e8b5a242, transparent 36rem),
    radial-gradient(ellipse at 96% 30%, #a2a77b24, transparent 36rem),
    var(--cream);
}
body::before {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
  inset: auto 0 0 auto;
  width: clamp(15rem, 37vw, 29rem);
  aspect-ratio: 2 / 3;
  max-height: 85vh;
  background: url("/assets/wildflowers.webp") bottom right / contain no-repeat;
  mix-blend-mode: multiply;
  opacity: .2;
  mask-image: radial-gradient(ellipse at 78% 72%, #000 28%, transparent 75%);
}
main { max-width: 68rem; margin: auto; padding: clamp(1.25rem, 4vw, 3.2rem) clamp(1.375rem, 4vw, 3.2rem); }
h1, h2, h3 { color: var(--olive); font-family: var(--serif); font-weight: 500; line-height: 1.12; text-wrap: balance; }
h1 { font-size: clamp(2.25rem, 6vw, 4.1rem); font-weight: 400; letter-spacing: -.045em; margin: 0; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .75rem; }
h3 { font-size: 1.35rem; margin: 0; overflow-wrap: anywhere; }
p { margin: .65rem 0; overflow-wrap: anywhere; }
a { color: var(--olive); text-decoration-color: #89651b; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
img { display: block; max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
.site-heading {
  display: grid;
  justify-items: center;
  gap: .95rem;
  margin: 0 0 clamp(1.2rem, 4vw, 2.8rem);
  text-align: center;
}
.site-heading h1 { width: min(100%, 36rem); }
.site-heading img { width: 100%; }
body.entry {
  background: radial-gradient(ellipse at 99% 35%, #e8b5a230, transparent 30rem),
    linear-gradient(#fdf5e6 0 26rem, var(--cream) 49rem);
}
.welcome-layout, .family-grid { display: grid; gap: 2rem; }
.welcome-intro { min-width: 0; }
.welcome-intro p { max-width: 55ch; line-height: 1.65; }
.entry-card, .family-card {
  min-width: 0;
  padding: clamp(1.15rem, 4vw, 2.25rem);
}
.family-card { background: var(--paper); border-radius: 1rem; }
.entry-card {
  width: 100%;
  max-width: 29rem;
  margin-inline: auto;
  align-self: start;
  border-radius: 24px;
  background: #f8efdf;
  box-shadow: 0 12px 36px rgb(96 73 54 / 7%);
}
.entry-card > p { margin-bottom: 1.25rem; }
.entry-card .entry-link { margin: 1rem 0 0; }
.entry-card .entry-error { color: #852e35; }
form { display: grid; gap: .65rem; }
label { color: var(--olive); font-weight: 650; }
input, button {
  font: inherit;
  padding: .65rem .9rem;
  border: 1px solid #858a61;
  border-radius: .65rem;
  min-height: 2.85rem;
}
input { min-width: 0; width: 100%; background: #fffdf8; color: var(--brown); }
button { color: var(--cream); background: var(--olive); cursor: pointer; font-weight: 650; overflow-wrap: anywhere; }
button:hover { background: #404527; }
button.selected { outline: 2px solid var(--olive); outline-offset: 2px; }
.entry-card button { margin-top: .25rem; }
.family-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0 1.15rem;
  border-block: 1px solid var(--line);
  margin: 0 0 1.2rem;
  padding: .3rem 0;
}
.family-nav a { padding: .55rem .1rem; }
.tracker {
  background: var(--olive);
  color: var(--cream);
  border-radius: 1.4rem;
  padding: clamp(1.2rem, 5vw, 3rem);
  box-shadow: 0 1rem 1.9rem #60493619;
}
.tracker h2 { color: inherit; margin-top: .35rem; }
.tracker-due, .tracker-stats span { color: var(--ivory); }
.tracker-stats { display: flex; flex-wrap: wrap; gap: .65rem 2rem; }
.tracker-stats strong, .tracker-stats span { display: block; }
.tracker-stats strong { font-size: clamp(1.08rem, 4vw, 1.45rem); }
.tracker-stats span { font-size: .9rem; }
.tracker progress {
  display: block;
  width: 100%;
  height: .65rem;
  margin: 1rem 0;
  border: 0;
  border-radius: 1rem;
  overflow: hidden;
  background: #777f55;
  accent-color: var(--gold);
}
.tracker progress::-webkit-progress-bar { background: #777f55; }
.tracker progress::-webkit-progress-value { background: var(--gold); }
.tracker progress::-moz-progress-bar { background: var(--gold); }
.tracker a { color: var(--cream); text-decoration-color: var(--gold); font-size: .9rem; }
.family-grid { margin-top: 2rem; }
.family-card p:last-child { margin-bottom: 0; }
.family-card article + article { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.family-card time { color: var(--brown); font-size: .875rem; }
.update-body { white-space: pre-wrap; }
.update-intro, .ballot-intro { display: grid; gap: 1rem; align-items: start; }
.update-intro img { max-width: 8rem; border-radius: .65rem; }
.registry-card { background: var(--ivory); }
.ballot-intro img { display: none; width: min(100%, 11rem); border-radius: .85rem; }
.ballot-section { margin-top: 1rem; }
form.card, .ballot-results .card {
  background: var(--ivory);
  border: 1px solid var(--line);
  border-radius: .8rem;
  padding: .9rem;
  margin: .65rem 0;
  scroll-margin-top: 1rem;
}
.choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.choices button { color: var(--olive); background: var(--cream); }
.choices button.selected { color: var(--cream); background: var(--olive); }
#tracker, #updates, #registry, #ballot { scroll-margin-top: 1rem; }
@media (min-width: 48rem) {
  .welcome-layout { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
  .welcome-layout .entry-card { margin-top: 1.4rem; }
  .family-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .updates-card { grid-column: 1 / -1; }
  .update-intro, .ballot-intro { grid-template-columns: minmax(0, 1fr) auto; }
  .update-intro img { max-width: 10rem; }
  .ballot-intro img { display: block; }
  .family-story { grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); }
}
.family-story {
  display: grid;
  gap: clamp(1.4rem, 4vw, 3rem);
  align-items: center;
  padding-block: .65rem;
  margin-bottom: 2rem;
}
.family-story p { max-width: 46ch; }
.family-portrait { margin: 0; }
.family-portrait img { width: 100%; height: auto; border-radius: .85rem; }
.sonogram { max-width: 32rem; margin: 1.75rem 0 0; }
.sonogram img { width: 100%; border-radius: .65rem; }
.sonogram figcaption { margin-top: .45rem; font-size: .9rem; }
.appointment-photos { margin-top: 2rem; }
.appointment-photos .sonogram { margin-top: 1rem; }
.top-votes { margin-top: 1rem; background: var(--ivory); }
.family-grid .top-votes { margin-top: 0; grid-column: 1 / -1; }
.top-votes ol { margin: .85rem 0 0; padding-left: 1.5rem; }
.top-votes li { padding-block: .35rem; overflow-wrap: anywhere; }
.top-votes li + li { border-top: 1px solid var(--line); }
.top-votes li span { margin-left: .5rem; font-size: .9rem; }
.registry-qr { margin: 1rem 0 0; }
.registry-qr img { width: 164px; height: auto; background: #fff; padding: 4px; }
.registry-qr figcaption { margin-top: .35rem; font-size: .9rem; }

.vote-count { margin: 0; font-size: .9rem; }
.ballot-results { padding: 0; list-style: none; }
.ballot-results h3 { margin-bottom: .25rem; }
