:root {
  --paper: #f8f3ea;
  --paper-strong: #fffaf1;
  --ink: #171512;
  --muted: #5f5b52;
  --line: #d9d0c3;
  --accent: #d84b36;
  --accent-deep: #9d2f23;
  --accent-soft: #ffe3d9;
  --secondary: #0b7774;
  --secondary-soft: #d8eadc;
  --lemon: #d6a61e;
  --blue: #315c9a;
  --yes: #1f7a5f;
  --no: #bd3d31;
  --shadow: 0 24px 70px rgba(23, 21, 18, 0.14);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

a {
  color: inherit;
}

button,
input,
select {
  font: inherit;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-160%);
  background: var(--ink);
  color: var(--paper-strong);
  padding: 0.7rem 1rem;
  border-radius: 6px;
}

.skip-link:focus {
  transform: translateY(0);
}

.food-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
  padding: 0.9rem 1rem;
  background: rgba(248, 243, 234, 0.92);
  border-bottom: 1px solid rgba(23, 21, 18, 0.09);
  backdrop-filter: blur(18px);
}

.brand,
.child-nav,
.food-actions,
.category-tabs,
.quick-links,
.status-line {
  display: flex;
  align-items: center;
}

.brand {
  gap: 0.7rem;
  text-decoration: none;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  background: var(--ink);
  color: var(--paper-strong);
  border-radius: 8px;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 1.35rem;
}

.child-nav {
  gap: 0.45rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.child-nav a,
.quick-links a,
.category-tabs a {
  min-height: 38px;
  padding: 0.55rem 0.75rem;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 800;
}

.child-nav a:hover,
.quick-links a:hover,
.category-tabs a:hover,
.child-nav a[aria-current="page"] {
  border-color: var(--line);
  background: rgba(255, 250, 241, 0.74);
  color: var(--ink);
}

.food-hero {
  position: relative;
  min-height: 470px;
  overflow: hidden;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: -3;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(255, 250, 241, 0.97) 0%, rgba(255, 250, 241, 0.88) 36%, rgba(255, 250, 241, 0.32) 74%, rgba(255, 250, 241, 0.12) 100%),
    linear-gradient(180deg, rgba(248, 243, 234, 0) 55%, var(--paper) 100%);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.45fr);
  gap: 2rem;
  max-width: 1160px;
  min-height: 470px;
  margin: 0 auto;
  padding: 4.2rem 1rem 2.2rem;
  align-items: end;
}

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

.eyebrow,
.section-kicker,
.metric-label,
.status-label,
.card-kicker {
  display: inline-flex;
  align-items: center;
  color: var(--accent-deep);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: "DM Serif Display", Georgia, serif;
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0;
}

h1 {
  max-width: 650px;
  margin-bottom: 1rem;
  font-size: 5.4rem;
}

h2 {
  margin-bottom: 0.8rem;
  font-size: 2.7rem;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.2rem;
  line-height: 1.15;
}

.hero-copy p {
  max-width: 520px;
  color: #3f3a33;
  font-size: 1.17rem;
}

.progress-panel {
  display: grid;
  gap: 1rem;
  align-self: end;
  padding: 1rem;
  background: rgba(255, 250, 241, 0.88);
  border: 1px solid rgba(23, 21, 18, 0.16);
  border-radius: 8px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--progress), rgba(23, 21, 18, 0.1) 0);
}

.progress-ring span {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  border-radius: 50%;
  background: var(--paper-strong);
  color: var(--ink);
  font-size: 2rem;
  font-weight: 900;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.metric {
  min-height: 76px;
  padding: 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.78);
}

.metric strong {
  display: block;
  margin-top: 0.1rem;
  font-size: 1.6rem;
  line-height: 1;
}

.status-line {
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--secondary);
}

.food-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

.food-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.category-tabs {
  gap: 0.55rem;
  flex-wrap: wrap;
}

.category-tabs a {
  border-color: var(--line);
  background: var(--paper-strong);
}

.category-tabs span {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  border-radius: 6px;
  background: var(--secondary-soft);
  color: var(--ink);
  font-size: 0.78rem;
}

.food-actions {
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.action-button,
.choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 850;
  cursor: pointer;
}

.action-button {
  min-height: 42px;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-strong);
  text-decoration: none;
}

.action-button.secondary {
  background: var(--paper-strong);
  color: var(--ink);
}

.action-button.warning {
  border-color: rgba(189, 61, 49, 0.42);
  background: #fff3ef;
  color: #8e251d;
}

.action-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.food-category {
  padding: 2.2rem 0 0;
}

.category-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}

.category-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.category-count {
  min-width: 74px;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  text-align: center;
  font-weight: 900;
}

.food-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.78rem;
}

.food-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  min-height: 80px;
  margin: 0;
  padding: 0.85rem;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
}

.food-item.is-liked {
  border-color: rgba(31, 122, 95, 0.48);
  background: #f2fbf5;
}

.food-item.is-disliked {
  border-color: rgba(189, 61, 49, 0.42);
  background: #fff5f1;
}

.food-name {
  min-width: 0;
  font-size: 1rem;
  font-weight: 850;
}

.choice-group {
  display: grid;
  grid-template-columns: repeat(2, 58px);
  gap: 0.38rem;
}

.choice {
  display: block;
}

.choice-input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

.choice span {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--muted);
  font-size: 0.92rem;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.choice:hover span,
.choice-input:focus-visible + .choice span {
  transform: translateY(-1px);
  border-color: var(--ink);
}

.choice-input:checked + .choice.yes span {
  border-color: var(--yes);
  background: var(--yes);
  color: #ffffff;
}

.choice-input:checked + .choice.no span {
  border-color: var(--no);
  background: var(--no);
  color: #ffffff;
}

.live-region {
  min-height: 1.4rem;
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.food-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1160px;
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.food-footer p {
  margin-bottom: 0;
}

.quick-links {
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.hub-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.98), rgba(216, 234, 220, 0.76)),
    linear-gradient(90deg, rgba(216, 75, 54, 0.12), rgba(49, 92, 154, 0.12));
}

.hub-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 2rem;
  max-width: 1160px;
  min-height: 520px;
  margin: 0 auto;
  padding: 4.5rem 1rem;
  align-items: center;
}

.hub-copy p {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.15rem;
}

.child-card-grid {
  display: grid;
  gap: 1rem;
}

.child-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  min-height: 142px;
  overflow: hidden;
  border: 1px solid rgba(23, 21, 18, 0.14);
  border-radius: 8px;
  background: rgba(255, 250, 241, 0.9);
  text-decoration: none;
  box-shadow: 0 18px 42px rgba(23, 21, 18, 0.1);
}

.child-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.child-card-content {
  display: grid;
  gap: 0.55rem;
  padding: 1rem;
  align-content: center;
}

.child-card strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.child-card span:not(.card-kicker) {
  color: var(--muted);
  font-weight: 700;
}

.child-card:hover {
  transform: translateY(-2px);
  border-color: rgba(23, 21, 18, 0.32);
}

.theme-henley {
  --accent: #d84b36;
  --accent-deep: #9e2e24;
  --accent-soft: #ffe1d8;
  --secondary: #0b7774;
  --secondary-soft: #d8eadc;
}

.theme-kennedy {
  --accent: #0b7774;
  --accent-deep: #075b58;
  --accent-soft: #d8eadc;
  --secondary: #d84b36;
  --secondary-soft: #ffe1d8;
}

.theme-bellamy {
  --accent: #315c9a;
  --accent-deep: #223f70;
  --accent-soft: #dce8ff;
  --secondary: #d5a71f;
  --secondary-soft: #fff2bd;
}

@media (max-width: 880px) {
  .food-header,
  .food-footer,
  .food-toolbar,
  .hero-inner,
  .hub-hero-inner,
  .category-heading {
    grid-template-columns: 1fr;
  }

  .food-header {
    display: grid;
    align-items: start;
  }

  .child-nav,
  .food-actions,
  .quick-links {
    justify-content: flex-start;
  }

  .hero-inner {
    gap: 1.2rem;
    min-height: 560px;
    padding-top: 3rem;
    align-items: end;
  }

  h1 {
    font-size: 4rem;
  }

  h2 {
    font-size: 2.3rem;
  }

  .progress-panel {
    max-width: 460px;
  }

  .hub-hero-inner {
    min-height: auto;
    padding-top: 3rem;
  }
}

@media (max-width: 620px) {
  .food-header {
    position: static;
  }

  .brand span:last-child {
    font-size: 0.98rem;
  }

  .child-nav a,
  .quick-links a,
  .category-tabs a {
    min-height: 36px;
    padding: 0.48rem 0.58rem;
    font-size: 0.86rem;
  }

  .food-hero,
  .hero-inner {
    min-height: 600px;
  }

  .hero-scrim {
    background:
      linear-gradient(180deg, rgba(255, 250, 241, 0.96) 0%, rgba(255, 250, 241, 0.88) 45%, rgba(255, 250, 241, 0.34) 78%, var(--paper) 100%);
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2rem;
  }

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

  .food-main {
    padding-top: 1rem;
  }

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

  .food-item {
    grid-template-columns: 1fr;
    min-height: 116px;
  }

  .choice-group {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice span {
    width: 100%;
  }

  .child-card {
    grid-template-columns: 1fr;
  }

  .child-card img {
    height: 150px;
  }
}
