:root {
  --ink: #f5f5f5;
  --muted: rgba(255, 255, 255, 0.72);
  --line: rgba(255, 255, 255, 0.14);
  --card: rgba(14, 14, 14, 0.72);
  --green: #f2f2f2;
  --mint: rgba(255, 255, 255, 0.1);
  --clay: #f4f4f4;
  --clay-2: #ffffff;
  --gold: rgba(255, 255, 255, 0.12);
  --warn: #f0d7a2;
  --warn-bg: rgba(80, 58, 18, 0.55);
  --sans: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --serif: "Source Serif 4", "Iowan Old Style", Palatino, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background: #090909;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #090909 url("hero.jpg") center / cover no-repeat;
}

.bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.bg video.is-on { opacity: 1; }

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.22) 46%, rgba(0, 0, 0, 0.55) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.48) 0%, rgba(0, 0, 0, 0.4) 42%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1;
}

#app { position: relative; z-index: 2; }

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

button { cursor: pointer; }

a { color: inherit; }

.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: #111;
  color: white;
  padding: 8px 12px;
  z-index: 30;
}

.skip:focus { top: 12px; }

.pillbar {
  position: fixed;
  top: 14px;
  left: 16px;
  right: 16px;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 52px;
  padding: 6px 8px 6px 16px;
  background: rgba(8, 8, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.18);
  transition: background 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

body.is-scrolled .pillbar {
  background: rgba(8, 8, 8, 0.94);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.42);
}

.pill-logo, .pill-links button, .drop-toggle {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.pill-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 6px 8px;
  font-weight: 600;
}

.logo-mark { width: 18px; height: 18px; display: block; }

.pill-links {
  display: flex;
  align-items: center;
  gap: 26px;
}

.pill-links button:hover, .drop-toggle:hover, .pill-logo:hover { color: white; }

.pill-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.btn-line, .btn-fill, button.primary, button.ghost {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.2;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.btn-line:hover, .btn-fill:hover, button.primary:hover, button.ghost:hover {
  transform: translateY(-1px);
}

.btn-line, button.ghost {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.btn-fill {
  background: #2a2a2a;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.btn-line:hover, button.ghost:hover { background: rgba(255, 255, 255, 0.08); }

.btn-fill:hover { background: #3a3a3a; }

button.primary {
  background: white;
  color: #111;
  border: 1px solid white;
  padding: 12px 18px;
}

button.primary:hover { background: #e8e8e8; }

button.textish {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.8);
  padding: 12px 8px;
}

.drop { position: relative; }

.drop-toggle { display: inline-flex; align-items: center; gap: 4px; padding: 8px 0; }

.chev { width: 12px; height: 12px; opacity: 0.8; }

.drop-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  padding: 8px;
  background: rgba(12, 12, 12, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: grid;
}

.drop-panel[hidden] { display: none; }

.drop-panel button {
  text-align: left;
  padding: 8px 10px;
  border-radius: 10px;
}

.drop-panel button:hover { background: rgba(255, 255, 255, 0.08); }

.stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 88px 24px 120px;
}

.hero {
  width: min(820px, 100%);
  text-align: center;
}

.hero h1, .hero p, .hero-cta {
  animation: rise 0.9s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

.hero p { animation-delay: 0.12s; }
.hero-cta { animation-delay: 0.24s; }

.hero h1 {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 68px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: white;
}

.hero p {
  margin: 22px auto 0;
  max-width: 640px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 16px;
  line-height: 1.55;
}

.hero-cta { margin-top: 28px; padding: 11px 18px; }

.marquee {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  align-items: center;
  gap: 22px;
  width: max-content;
  animation: ticker 36s linear infinite;
  color: rgba(255, 255, 255, 0.84);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.marquee b { font-weight: 600; }
.marquee .thin { font-weight: 500; letter-spacing: 0.14em; font-size: 15px; text-transform: uppercase; }
.marquee .serifish { font-weight: 500; font-style: italic; letter-spacing: 0; }
.dot { opacity: 0.55; font-weight: 400; }

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.band {
  width: min(1080px, calc(100% - 40px));
  margin: 0 auto 72px;
  padding: 28px 8px 8px;
  scroll-margin-top: 96px;
}

.band h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 18px;
}

.band-grid, .store-row {
  display: grid;
  gap: 12px;
}

.band-grid { grid-template-columns: repeat(3, 1fr); }

.glass {
  background: rgba(10, 10, 10, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 22px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease, background 0.25s ease, border-color 0.25s ease;
}

.band.is-in .glass { opacity: 1; transform: none; }
.band.is-in .glass:nth-child(2) { transition-delay: 0.08s; }
.band.is-in .glass:nth-child(3) { transition-delay: 0.16s; }
.band.is-in .glass:nth-child(4) { transition-delay: 0.22s; }
.band.is-in .glass:nth-child(5) { transition-delay: 0.28s; }
.band.is-in .glass:nth-child(6) { transition-delay: 0.34s; }
.band.is-in .glass:nth-child(7) { transition-delay: 0.4s; }

.band.is-in .glass:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.28);
  transition-delay: 0s;
}

.glass h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.glass p { margin: 0; color: var(--muted); }

.store-row { grid-template-columns: repeat(4, 1fr); }
.store-row .glass { font-weight: 600; letter-spacing: -0.02em; }

.shell, .results {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 96px 0 72px;
}

.progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 18px;
}

.progress span { display: block; height: 100%; background: white; transition: width 0.45s ease; }

.panel {
  background: rgba(12, 12, 12, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 32px 28px 24px;
  backdrop-filter: blur(16px);
  animation: rise 0.5s cubic-bezier(0.22, 0.7, 0.2, 1) both;
}

h1, h2, h3 { font-weight: 500; letter-spacing: -0.02em; }

.panel h1 { font-size: clamp(34px, 4vw, 52px); line-height: 1.08; margin: 8px 0 12px; }

.kicker { color: var(--muted); font-size: 13px; margin: 0; }

.lede { color: var(--muted); font-size: 16px; max-width: 62ch; margin: 0 0 22px; }

.fields { display: grid; gap: 14px; }

label.stack { display: grid; gap: 6px; font-weight: 500; }

label.stack small, .hint { color: var(--muted); font-weight: 400; }

input[type="text"], input[type="number"], select, textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 14px 16px;
  outline: none;
  color: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

select option { color: #111; }

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

input:focus, select:focus, textarea:focus, .choice:focus-within {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.08);
}

.split, .choices.two, .stat-grid { display: grid; gap: 12px; }

.choices { display: grid; gap: 10px; }

.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.choice:hover {
  border-color: rgba(255, 255, 255, 0.36);
  transform: translateY(-1px);
}

.choice input { margin-top: 4px; accent-color: white; }
.choice strong { display: block; }
.choice small { color: var(--muted); }

.choice:has(input:checked) {
  border-color: rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.12);
}

.nav, .result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.error { min-height: 1.4em; color: #ffb4a8; margin: 12px 0 0; }

.summary { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }

.summary li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.summary button { border: 0; background: none; color: white; padding: 0; }

.section { margin: 36px 0; }

.band,
.results .section {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.75s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.band.is-in,
.results .section.is-in {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

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

.jump { display: flex; gap: 14px; flex-wrap: wrap; }
.jump a { color: white; }

.stat-grid { grid-template-columns: repeat(4, 1fr); }

.stat, .meal, .product, .story, .warn {
  background: rgba(12, 12, 12, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  backdrop-filter: blur(12px);
}

.stat { padding: 16px 18px; animation: rise 0.55s ease both; }
.stat-grid .stat:nth-child(2) { animation-delay: 0.06s; }
.stat-grid .stat:nth-child(3) { animation-delay: 0.12s; }
.stat-grid .stat:nth-child(4) { animation-delay: 0.18s; }
.stat b { display: block; font-size: 32px; font-weight: 500; letter-spacing: -0.03em; }
.stat span { color: var(--muted); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }

.story, .warn { padding: 18px 20px; }
.story p, .warn p { margin: 0 0 10px; }
.story p:last-child, .warn p:last-child { margin: 0; }
.warn { background: var(--warn-bg); color: var(--warn); }

.layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 22px;
  align-items: start;
  margin-top: 16px;
}

.ring-wrap { display: grid; justify-items: center; gap: 8px; }

.ring {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(
    #ffffff 0 calc(var(--p) * 1%),
    #a7a7a7 0 calc((var(--p) + var(--c)) * 1%),
    #5c5c5c 0 calc((var(--p) + var(--c) + var(--f)) * 1%),
    rgba(255, 255, 255, 0.12) 0 100%
  );
}

.ring span {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: #141414;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
}

.legend { display: flex; gap: 12px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 4px; }
.legend .p { background: white; }
.legend .c { background: #a7a7a7; }
.legend .f { background: #5c5c5c; }

.days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; }

.days button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: white;
  border-radius: 999px;
  padding: 8px 12px;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.days button[aria-pressed="true"] { background: white; color: #111; }

.day-total { color: var(--muted); margin: 8px 0 14px; }

.meals { display: grid; gap: 14px; }
.meal { padding: 18px; animation: rise 0.5s ease both; }
.meals .meal:nth-child(2) { animation-delay: 0.07s; }
.meals .meal:nth-child(3) { animation-delay: 0.14s; }
.meals .meal:nth-child(4) { animation-delay: 0.21s; }
.meals .meal:nth-child(5) { animation-delay: 0.28s; }
.meal header { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.meal h3 { margin: 0 0 4px; font-size: 26px; }

.tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.macros-inline { color: var(--muted); font-variant-numeric: tabular-nums; }
.ingredients { list-style: none; padding: 0; margin: 12px 0; }
.ingredients li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-top: 1px solid var(--line);
}
.method { margin: 0; color: var(--muted); }

.meter { height: 8px; background: rgba(255, 255, 255, 0.12); border-radius: 99px; overflow: hidden; }
.meter span { display: block; height: 100%; background: white; }
.meter.over span { background: #e7b3a8; }

.aisle-block { margin-top: 22px; }
.aisle-block h3 { display: flex; justify-content: space-between; font-size: 22px; margin: 0 0 10px; }

.product {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  padding: 16px;
  margin-bottom: 10px;
}

.product.bought { opacity: 0.45; }
.product h4 { margin: 0 0 4px; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.exact { margin: 0; font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.buy, .meta, .uses { margin: 6px 0 0; }
.offers { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 4px; }
.offers li { font-size: 14px; color: var(--muted); }
.offers .win { color: white; font-weight: 600; }
.fine { color: var(--muted); font-size: 14px; max-width: 75ch; }
.check input { width: 18px; height: 18px; accent-color: white; }

@media (min-width: 720px) {
  .split, .choices.two { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 800px) {
  .pill-links { display: none; }
  .pillbar { grid-template-columns: 1fr auto; }
  .band-grid, .store-row, .stat-grid, .layout { grid-template-columns: 1fr 1fr; }
  .layout { grid-template-columns: 1fr; }
  .hero h1 { font-size: 40px; }
}

@media (max-width: 560px) {
  .stat-grid, .band-grid, .store-row { grid-template-columns: 1fr; }
  .pill-actions .btn-fill { display: none; }
  .shell, .results, .band { width: min(100% - 20px, 1080px); }
  .ingredients li, .summary li { flex-direction: column; gap: 2px; }
}

@media print {
  .no-print, .pillbar, .marquee, .stage, .band, .bg { display: none !important; }
  body { background: white; color: #111; }
  body::before { display: none; }
  .stat, .meal, .product, .story { background: white; color: #111; border-color: #ddd; }
  .results { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .bg video { display: none; }
  .hero h1, .hero p, .hero-cta, .panel, .meal, .stat { animation: none; }
  .band, .results .section, .glass, .hero {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
